{"openapi":"3.1.0","info":{"title":"Harness Infrastructure Management (BYOK) API","version":"0.1.0","description":"Harness Infrastructure Management (BYOK) lets an AI assistant read your own Harness Infrastructure Management data through the Harness Infrastructure Management API with a key you supply (Harness personal access token or service account token). Read-only: 12 tools (list_workspaces, get_workspace, list_workspace_modules, list_workspace_pipelines, get_workspace_drift_config, list_executions,...\n\nEvery operation is read-only or compute-only. The same tools are available over MCP (streamable HTTP) at https://byok-harness-iacm.connectorbay.com/mcp.","contact":{"name":"Unify Dynamics LLC","email":"agent@connectorbay.com","url":"https://connectorbay.com/byok-harness-iacm/docs"},"termsOfService":"https://connectorbay.com/byok-harness-iacm/terms"},"servers":[{"url":"https://byok-harness-iacm.connectorbay.com"}],"externalDocs":{"url":"https://connectorbay.com/byok-harness-iacm/docs"},"security":[{"upstreamKey":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","description":"Optional. A Pro API key raises rate limits; no credentials are required."},"upstreamKey":{"type":"apiKey","in":"header","name":"X-Upstream-Key","description":"Your own key for the service this connector wraps (bring your own key). Used for that one call only; never stored, logged or cached."}},"schemas":{"Error":{"type":"object","properties":{"ok":{"const":false},"error":{"type":"object"}}}}},"paths":{"/v1/tools/list_workspaces":{"post":{"operationId":"list_workspaces","summary":"List the IaCM workspaces of a project with name, status (active, failed, provisioning ...), description and timestamps. ","description":"List the IaCM workspaces of a project with name, status (active, failed, provisioning ...), description and timestamps. Filter by name, tag or status. Use for \"Which Harness IaCM workspaces does my project have and are any failed\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"org":{"description":"Harness organization identifier, for example 'default'.","maxLength":64,"title":"Org","type":"string"},"project":{"description":"Harness project identifier within the organization.","maxLength":64,"title":"Project","type":"string"},"search_term":{"anyOf":[{"maxLength":100,"type":"string"},{"type":"null"}],"default":null,"description":"Part of the workspace name.","title":"Search Term"},"sort":{"anyOf":[{"enum":["name,ASC","name,DESC","updated,ASC","updated,DESC"],"type":"string"},{"type":"null"}],"default":"name,ASC","description":"Sort order.","title":"Sort"},"limit":{"anyOf":[{"maximum":1000,"minimum":1,"type":"integer"},{"type":"null"}],"default":30,"description":"Records per page (1 to 1000, default 30).","title":"Limit"},"page":{"anyOf":[{"maximum":10000,"minimum":1,"type":"integer"},{"type":"null"}],"default":1,"description":"Page number, starting at 1.","title":"Page"}},"required":["org","project"],"title":"list_workspacesArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/get_workspace":{"post":{"operationId":"get_workspace","summary":"Get one IaCM workspace: provisioner and version, source repository branch and path, cost estimation and budget, lock sta","description":"Get one IaCM workspace: provisioner and version, source repository branch and path, cost estimation and budget, lock state, template, tags and variable set names. Variable values and state are not returned. Use for \"Which repository and OpenTofu version does Harness workspace network_prod use\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"org":{"description":"Harness organization identifier, for example 'default'.","maxLength":64,"title":"Org","type":"string"},"project":{"description":"Harness project identifier within the organization.","maxLength":64,"title":"Project","type":"string"},"identifier":{"description":"Workspace identifier (from list_workspaces).","maxLength":100,"title":"Identifier","type":"string"}},"required":["org","project","identifier"],"title":"get_workspaceArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/list_workspace_modules":{"post":{"operationId":"list_workspace_modules","summary":"List the Terraform or OpenTofu modules a workspace uses with source, version and invocation count. Use for \"Which module","description":"List the Terraform or OpenTofu modules a workspace uses with source, version and invocation count. Use for \"Which modules does Harness workspace network_prod use\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"org":{"description":"Harness organization identifier, for example 'default'.","maxLength":64,"title":"Org","type":"string"},"project":{"description":"Harness project identifier within the organization.","maxLength":64,"title":"Project","type":"string"},"identifier":{"description":"Workspace identifier (from list_workspaces).","maxLength":100,"title":"Identifier","type":"string"}},"required":["org","project","identifier"],"title":"list_workspace_modulesArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/list_workspace_pipelines":{"post":{"operationId":"list_workspace_pipelines","summary":"List the pipelines linked to a workspace. Use for \"Which pipelines run Harness workspace network_prod\".","description":"List the pipelines linked to a workspace. Use for \"Which pipelines run Harness workspace network_prod\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"org":{"description":"Harness organization identifier, for example 'default'.","maxLength":64,"title":"Org","type":"string"},"project":{"description":"Harness project identifier within the organization.","maxLength":64,"title":"Project","type":"string"},"workspace":{"description":"Workspace identifier (from list_workspaces).","maxLength":100,"title":"Workspace","type":"string"},"limit":{"anyOf":[{"maximum":1000,"minimum":1,"type":"integer"},{"type":"null"}],"default":30,"description":"Records per page (1 to 1000, default 30).","title":"Limit"},"page":{"anyOf":[{"maximum":10000,"minimum":1,"type":"integer"},{"type":"null"}],"default":1,"description":"Page number, starting at 1.","title":"Page"}},"required":["org","project","workspace"],"title":"list_workspace_pipelinesArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/get_workspace_drift_config":{"post":{"operationId":"get_workspace_drift_config","summary":"Get a workspace's drift detection schedule: whether it is on, how often it runs and the pipeline used. Use for \"Is drift","description":"Get a workspace's drift detection schedule: whether it is on, how often it runs and the pipeline used. Use for \"Is drift detection enabled for Harness workspace network_prod\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"org":{"description":"Harness organization identifier, for example 'default'.","maxLength":64,"title":"Org","type":"string"},"project":{"description":"Harness project identifier within the organization.","maxLength":64,"title":"Project","type":"string"},"workspace":{"description":"Workspace identifier (from list_workspaces).","maxLength":100,"title":"Workspace","type":"string"},"provisioner":{"anyOf":[{"maxLength":40,"type":"string"},{"type":"null"}],"default":null,"description":"Provisioner key, for example opentofu (the default) or terraform.","title":"Provisioner"}},"required":["org","project","workspace"],"title":"get_workspace_drift_configArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/list_executions":{"post":{"operationId":"list_executions","summary":"List IaCM pipeline executions of a project with workspace, pipeline, status (none, success, failure) and time. Filter by","description":"List IaCM pipeline executions of a project with workspace, pipeline, status (none, success, failure) and time. Filter by workspace or time. Use for \"What were the latest IaCM executions in my Harness project\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"org":{"description":"Harness organization identifier, for example 'default'.","maxLength":64,"title":"Org","type":"string"},"project":{"description":"Harness project identifier within the organization.","maxLength":64,"title":"Project","type":"string"},"workspace":{"anyOf":[{"maxLength":100,"type":"string"},{"type":"null"}],"default":null,"description":"Only executions of this workspace identifier.","title":"Workspace"},"pipeline_name":{"anyOf":[{"maxLength":100,"type":"string"},{"type":"null"}],"default":null,"description":"Only this pipeline name.","title":"Pipeline Name"},"start_time":{"anyOf":[{"minimum":0,"type":"integer"},{"type":"null"}],"default":null,"description":"Only data from this Unix time in seconds.","title":"Start Time"},"end_time":{"anyOf":[{"minimum":0,"type":"integer"},{"type":"null"}],"default":null,"description":"Only data up to this Unix time in seconds.","title":"End Time"},"limit":{"anyOf":[{"maximum":1000,"minimum":1,"type":"integer"},{"type":"null"}],"default":30,"description":"Records per page (1 to 1000, default 30).","title":"Limit"},"page":{"anyOf":[{"maximum":10000,"minimum":1,"type":"integer"},{"type":"null"}],"default":1,"description":"Page number, starting at 1.","title":"Page"}},"required":["org","project"],"title":"list_executionsArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/get_execution":{"post":{"operationId":"get_execution","summary":"Get one IaCM execution stage: workspace, pipeline, status and creation time. Use for \"Did IaCM execution AbCdEf123 succe","description":"Get one IaCM execution stage: workspace, pipeline, status and creation time. Use for \"Did IaCM execution AbCdEf123 succeed\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"org":{"description":"Harness organization identifier, for example 'default'.","maxLength":64,"title":"Org","type":"string"},"project":{"description":"Harness project identifier within the organization.","maxLength":64,"title":"Project","type":"string"},"pipeline_execution_id":{"description":"Pipeline execution ID (from list_executions).","maxLength":100,"title":"Pipeline Execution Id","type":"string"},"pipeline_stage_id":{"description":"Pipeline stage ID (from list_executions).","maxLength":100,"title":"Pipeline Stage Id","type":"string"}},"required":["org","project","pipeline_execution_id","pipeline_stage_id"],"title":"get_executionArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/list_activities":{"post":{"operationId":"list_activities","summary":"List IaCM activity records (plan, apply, destroy, drift ...) with status, pipeline, provisioner, branch and monthly cost","description":"List IaCM activity records (plan, apply, destroy, drift ...) with status, pipeline, provisioner, branch and monthly cost. Commit messages are left out. Use for \"What apply and plan activity happened in my Harness IaCM project\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"org":{"description":"Harness organization identifier, for example 'default'.","maxLength":64,"title":"Org","type":"string"},"project":{"description":"Harness project identifier within the organization.","maxLength":64,"title":"Project","type":"string"},"workspace":{"anyOf":[{"maxLength":100,"type":"string"},{"type":"null"}],"default":null,"description":"Only activity of this workspace identifier.","title":"Workspace"},"activity_type":{"anyOf":[{"maxLength":40,"type":"string"},{"type":"null"}],"default":null,"description":"Only this activity type, for example apply, plan, destroy or drift.","title":"Activity Type"},"activity_status":{"anyOf":[{"maxLength":40,"type":"string"},{"type":"null"}],"default":null,"description":"Only this status: success, failure or incomplete.","title":"Activity Status"},"start_time":{"anyOf":[{"minimum":0,"type":"integer"},{"type":"null"}],"default":null,"description":"Only data from this Unix time in seconds.","title":"Start Time"},"end_time":{"anyOf":[{"minimum":0,"type":"integer"},{"type":"null"}],"default":null,"description":"Only data up to this Unix time in seconds.","title":"End Time"},"limit":{"anyOf":[{"maximum":1000,"minimum":1,"type":"integer"},{"type":"null"}],"default":30,"description":"Records per page (1 to 1000, default 30).","title":"Limit"},"page":{"anyOf":[{"maximum":10000,"minimum":1,"type":"integer"},{"type":"null"}],"default":1,"description":"Page number, starting at 1.","title":"Page"}},"required":["org","project"],"title":"list_activitiesArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/get_workspace_metrics":{"post":{"operationId":"get_workspace_metrics","summary":"Get how many workspaces of a project are in each status (active, failed, provisioning ...), optionally for a time window","description":"Get how many workspaces of a project are in each status (active, failed, provisioning ...), optionally for a time window. Use for \"How many Harness IaCM workspaces are failed right now\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"org":{"description":"Harness organization identifier, for example 'default'.","maxLength":64,"title":"Org","type":"string"},"project":{"description":"Harness project identifier within the organization.","maxLength":64,"title":"Project","type":"string"},"start_time":{"anyOf":[{"minimum":0,"type":"integer"},{"type":"null"}],"default":null,"description":"Only data from this Unix time in seconds.","title":"Start Time"},"end_time":{"anyOf":[{"minimum":0,"type":"integer"},{"type":"null"}],"default":null,"description":"Only data up to this Unix time in seconds.","title":"End Time"}},"required":["org","project"],"title":"get_workspace_metricsArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/list_workspace_costs":{"post":{"operationId":"list_workspace_costs","summary":"List estimated cost per workspace for a project with currency and date. Use for \"What do my Harness IaCM workspaces cost","description":"List estimated cost per workspace for a project with currency and date. Use for \"What do my Harness IaCM workspaces cost\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"org":{"description":"Harness organization identifier, for example 'default'.","maxLength":64,"title":"Org","type":"string"},"project":{"description":"Harness project identifier within the organization.","maxLength":64,"title":"Project","type":"string"},"start_time":{"anyOf":[{"minimum":0,"type":"integer"},{"type":"null"}],"default":null,"description":"Only data from this Unix time in seconds.","title":"Start Time"},"end_time":{"anyOf":[{"minimum":0,"type":"integer"},{"type":"null"}],"default":null,"description":"Only data up to this Unix time in seconds.","title":"End Time"},"limit":{"anyOf":[{"maximum":1000,"minimum":1,"type":"integer"},{"type":"null"}],"default":30,"description":"Records per page (1 to 1000, default 30).","title":"Limit"},"page":{"anyOf":[{"maximum":10000,"minimum":1,"type":"integer"},{"type":"null"}],"default":1,"description":"Page number, starting at 1.","title":"Page"}},"required":["org","project"],"title":"list_workspace_costsArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/get_workspace_ccm_cost_summary":{"post":{"operationId":"get_workspace_ccm_cost_summary","summary":"Get a workspace's cloud cost summary: monthly cost, previous month, savings found, open recommendations and resource cou","description":"Get a workspace's cloud cost summary: monthly cost, previous month, savings found, open recommendations and resource count. Use for \"How much does Harness workspace network_prod cost per month and what savings are open\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"org":{"description":"Harness organization identifier, for example 'default'.","maxLength":64,"title":"Org","type":"string"},"project":{"description":"Harness project identifier within the organization.","maxLength":64,"title":"Project","type":"string"},"workspace":{"description":"Workspace identifier (from list_workspaces).","maxLength":100,"title":"Workspace","type":"string"}},"required":["org","project","workspace"],"title":"get_workspace_ccm_cost_summaryArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/list_workspace_insights":{"post":{"operationId":"list_workspace_insights","summary":"List cost and drift insights for a workspace with type, state, resource type, monthly saving and remediation status. Use","description":"List cost and drift insights for a workspace with type, state, resource type, monthly saving and remediation status. Use for \"Which open cost insights does Harness workspace network_prod have\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"org":{"description":"Harness organization identifier, for example 'default'.","maxLength":64,"title":"Org","type":"string"},"project":{"description":"Harness project identifier within the organization.","maxLength":64,"title":"Project","type":"string"},"workspace":{"description":"Workspace identifier (from list_workspaces).","maxLength":100,"title":"Workspace","type":"string"},"type":{"anyOf":[{"enum":["cost","drift"],"type":"string"},{"type":"null"}],"default":null,"description":"Only this insight type.","title":"Type"},"state":{"anyOf":[{"enum":["OPEN","APPLIED"],"type":"string"},{"type":"null"}],"default":null,"description":"Only this state.","title":"State"},"limit":{"anyOf":[{"maximum":1000,"minimum":1,"type":"integer"},{"type":"null"}],"default":30,"description":"Records per page (1 to 1000, default 30).","title":"Limit"},"page":{"anyOf":[{"maximum":10000,"minimum":1,"type":"integer"},{"type":"null"}],"default":1,"description":"Page number, starting at 1.","title":"Page"}},"required":["org","project","workspace"],"title":"list_workspace_insightsArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}}}}