{"openapi":"3.1.0","info":{"title":"Harness Code (BYOK) API","version":"0.1.0","description":"Harness Code (BYOK) lets an AI assistant read your own Harness Code data through the Harness Code API with a key you supply (Harness personal access token or service account token). Read-only: 10 tools (list_repositories, get_repository, list_branches, list_tags, get_repository_summary, list_repository_rules, list_space_rules, get_repository_general_settings, get_repository_security_settings,...\n\nEvery operation is read-only or compute-only. The same tools are available over MCP (streamable HTTP) at https://byok-harness-code.connectorbay.com/mcp.","contact":{"name":"Unify Dynamics LLC","email":"agent@connectorbay.com","url":"https://connectorbay.com/byok-harness-code/docs"},"termsOfService":"https://connectorbay.com/byok-harness-code/terms"},"servers":[{"url":"https://byok-harness-code.connectorbay.com"}],"externalDocs":{"url":"https://connectorbay.com/byok-harness-code/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_repositories":{"post":{"operationId":"list_repositories","summary":"List Harness Code repositories of an account, organization or project with language, size, pull request counts and last ","description":"List Harness Code repositories of an account, organization or project with language, size, pull request counts and last push time. Use for \"Which repositories do I have in Harness Code\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"account_identifier":{"description":"Harness account ID (the string after /account/ in your Harness URL).","maxLength":64,"title":"Account Identifier","type":"string"},"org_identifier":{"anyOf":[{"maxLength":64,"type":"string"},{"type":"null"}],"default":null,"description":"Organization identifier, for example 'default'. Leave out for account-level repositories.","title":"Org Identifier"},"project_identifier":{"anyOf":[{"maxLength":64,"type":"string"},{"type":"null"}],"default":null,"description":"Project identifier (needs org_identifier). Leave out for organization-level repositories.","title":"Project Identifier"},"query":{"anyOf":[{"maxLength":100,"type":"string"},{"type":"null"}],"default":null,"description":"Part of the repository path to match.","title":"Query"},"sort":{"anyOf":[{"enum":["identifier","created","updated"],"type":"string"},{"type":"null"}],"default":"identifier","description":"Sort by identifier, created or updated.","title":"Sort"},"order":{"anyOf":[{"enum":["desc","asc"],"type":"string"},{"type":"null"}],"default":"asc","description":"asc or desc.","title":"Order"},"recursive":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":false,"description":"True to include repositories of child organizations and projects.","title":"Recursive"},"page":{"anyOf":[{"maximum":10000,"minimum":1,"type":"integer"},{"type":"null"}],"default":1,"description":"Page number, starting at 1.","title":"Page"},"limit":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}],"default":30,"description":"Results per page (1 to 100, default 30).","title":"Limit"}},"required":["account_identifier"],"title":"list_repositoriesArguments","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_repository":{"post":{"operationId":"get_repository","summary":"Get one Harness Code repository: description, default branch, language, size, visibility, pull request counts and timest","description":"Get one Harness Code repository: description, default branch, language, size, visibility, pull request counts and timestamps. Use for \"How many open pull requests does Harness Code repository web-app have\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"repo_identifier":{"description":"Repository identifier, or its full path 'org/project/repo' (slashes are encoded for you).","maxLength":300,"title":"Repo Identifier","type":"string"},"account_identifier":{"description":"Harness account ID (the string after /account/ in your Harness URL).","maxLength":64,"title":"Account Identifier","type":"string"},"org_identifier":{"anyOf":[{"maxLength":64,"type":"string"},{"type":"null"}],"default":null,"description":"Organization identifier, for example 'default'. Leave out for account-level repositories.","title":"Org Identifier"},"project_identifier":{"anyOf":[{"maxLength":64,"type":"string"},{"type":"null"}],"default":null,"description":"Project identifier (needs org_identifier). Leave out for organization-level repositories.","title":"Project Identifier"}},"required":["repo_identifier","account_identifier"],"title":"get_repositoryArguments","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_branches":{"post":{"operationId":"list_branches","summary":"List a repository's branches with the commit SHA, default flag, and optionally how far each is ahead of or behind the de","description":"List a repository's branches with the commit SHA, default flag, and optionally how far each is ahead of or behind the default branch. Use for \"Which branches does Harness Code repository web-app have\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"repo_identifier":{"description":"Repository identifier, or its full path 'org/project/repo' (slashes are encoded for you).","maxLength":300,"title":"Repo Identifier","type":"string"},"account_identifier":{"description":"Harness account ID (the string after /account/ in your Harness URL).","maxLength":64,"title":"Account Identifier","type":"string"},"org_identifier":{"anyOf":[{"maxLength":64,"type":"string"},{"type":"null"}],"default":null,"description":"Organization identifier, for example 'default'. Leave out for account-level repositories.","title":"Org Identifier"},"project_identifier":{"anyOf":[{"maxLength":64,"type":"string"},{"type":"null"}],"default":null,"description":"Project identifier (needs org_identifier). Leave out for organization-level repositories.","title":"Project Identifier"},"query":{"anyOf":[{"maxLength":100,"type":"string"},{"type":"null"}],"default":null,"description":"Part of the branch name to match.","title":"Query"},"sort":{"anyOf":[{"enum":["name","date"],"type":"string"},{"type":"null"}],"default":"name","description":"Sort by name or date.","title":"Sort"},"order":{"anyOf":[{"enum":["desc","asc"],"type":"string"},{"type":"null"}],"default":"asc","description":"asc or desc.","title":"Order"},"max_divergence":{"anyOf":[{"maximum":1000,"minimum":0,"type":"integer"},{"type":"null"}],"default":0,"description":"If above 0, include how many commits each branch is ahead and behind the default branch, counted up to this number (0 to 1000).","title":"Max Divergence"},"page":{"anyOf":[{"maximum":10000,"minimum":1,"type":"integer"},{"type":"null"}],"default":1,"description":"Page number, starting at 1.","title":"Page"},"limit":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}],"default":30,"description":"Results per page (1 to 100, default 30).","title":"Limit"}},"required":["repo_identifier","account_identifier"],"title":"list_branchesArguments","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_tags":{"post":{"operationId":"list_tags","summary":"List a repository's tags with the target SHA, whether the tag is annotated, its title and signature verification result.","description":"List a repository's tags with the target SHA, whether the tag is annotated, its title and signature verification result. Use for \"Which release tags does Harness Code repository web-app have\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"repo_identifier":{"description":"Repository identifier, or its full path 'org/project/repo' (slashes are encoded for you).","maxLength":300,"title":"Repo Identifier","type":"string"},"account_identifier":{"description":"Harness account ID (the string after /account/ in your Harness URL).","maxLength":64,"title":"Account Identifier","type":"string"},"org_identifier":{"anyOf":[{"maxLength":64,"type":"string"},{"type":"null"}],"default":null,"description":"Organization identifier, for example 'default'. Leave out for account-level repositories.","title":"Org Identifier"},"project_identifier":{"anyOf":[{"maxLength":64,"type":"string"},{"type":"null"}],"default":null,"description":"Project identifier (needs org_identifier). Leave out for organization-level repositories.","title":"Project Identifier"},"query":{"anyOf":[{"maxLength":100,"type":"string"},{"type":"null"}],"default":null,"description":"Part of the tag name to match.","title":"Query"},"sort":{"anyOf":[{"enum":["name","date"],"type":"string"},{"type":"null"}],"default":"name","description":"Sort by name or date.","title":"Sort"},"order":{"anyOf":[{"enum":["desc","asc"],"type":"string"},{"type":"null"}],"default":"asc","description":"asc or desc.","title":"Order"},"page":{"anyOf":[{"maximum":10000,"minimum":1,"type":"integer"},{"type":"null"}],"default":1,"description":"Page number, starting at 1.","title":"Page"},"limit":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}],"default":30,"description":"Results per page (1 to 100, default 30).","title":"Limit"}},"required":["repo_identifier","account_identifier"],"title":"list_tagsArguments","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_repository_summary":{"post":{"operationId":"get_repository_summary","summary":"Get a repository's branch count, tag count, commit count on the default branch and pull request totals (open, merged, cl","description":"Get a repository's branch count, tag count, commit count on the default branch and pull request totals (open, merged, closed). Use for \"How many branches and open pull requests does Harness Code repository web-app have\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"repo_identifier":{"description":"Repository identifier, or its full path 'org/project/repo' (slashes are encoded for you).","maxLength":300,"title":"Repo Identifier","type":"string"},"account_identifier":{"description":"Harness account ID (the string after /account/ in your Harness URL).","maxLength":64,"title":"Account Identifier","type":"string"},"org_identifier":{"anyOf":[{"maxLength":64,"type":"string"},{"type":"null"}],"default":null,"description":"Organization identifier, for example 'default'. Leave out for account-level repositories.","title":"Org Identifier"},"project_identifier":{"anyOf":[{"maxLength":64,"type":"string"},{"type":"null"}],"default":null,"description":"Project identifier (needs org_identifier). Leave out for organization-level repositories.","title":"Project Identifier"}},"required":["repo_identifier","account_identifier"],"title":"get_repository_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_repository_rules":{"post":{"operationId":"list_repository_rules","summary":"List a repository's protection rules (branch, tag and push rules) with state, branch pattern and the rule definition suc","description":"List a repository's protection rules (branch, tag and push rules) with state, branch pattern and the rule definition such as required approvals. Creator names are left out. Use for \"What protection rules apply to Harness Code repository web-app\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"repo_identifier":{"description":"Repository identifier, or its full path 'org/project/repo' (slashes are encoded for you).","maxLength":300,"title":"Repo Identifier","type":"string"},"account_identifier":{"description":"Harness account ID (the string after /account/ in your Harness URL).","maxLength":64,"title":"Account Identifier","type":"string"},"org_identifier":{"anyOf":[{"maxLength":64,"type":"string"},{"type":"null"}],"default":null,"description":"Organization identifier, for example 'default'. Leave out for account-level repositories.","title":"Org Identifier"},"project_identifier":{"anyOf":[{"maxLength":64,"type":"string"},{"type":"null"}],"default":null,"description":"Project identifier (needs org_identifier). Leave out for organization-level repositories.","title":"Project Identifier"},"inherited":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":false,"description":"True to include rules inherited from the project, organization and account.","title":"Inherited"},"sort":{"anyOf":[{"enum":["created_at","identifier","updated_at"],"type":"string"},{"type":"null"}],"default":"created_at","description":"Sort by created_at, identifier or updated_at.","title":"Sort"},"order":{"anyOf":[{"enum":["desc","asc"],"type":"string"},{"type":"null"}],"default":"asc","description":"asc or desc.","title":"Order"},"page":{"anyOf":[{"maximum":10000,"minimum":1,"type":"integer"},{"type":"null"}],"default":1,"description":"Page number, starting at 1.","title":"Page"},"limit":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}],"default":30,"description":"Results per page (1 to 100, default 30).","title":"Limit"}},"required":["repo_identifier","account_identifier"],"title":"list_repository_rulesArguments","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_space_rules":{"post":{"operationId":"list_space_rules","summary":"List protection rules defined at account, organization or project level (they apply to many repositories) with state, ty","description":"List protection rules defined at account, organization or project level (they apply to many repositories) with state, type and pattern. Use for \"Which Harness Code protection rules apply across my whole project\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"account_identifier":{"description":"Harness account ID (the string after /account/ in your Harness URL).","maxLength":64,"title":"Account Identifier","type":"string"},"org_identifier":{"anyOf":[{"maxLength":64,"type":"string"},{"type":"null"}],"default":null,"description":"Organization identifier, for example 'default'. Leave out for account-level repositories.","title":"Org Identifier"},"project_identifier":{"anyOf":[{"maxLength":64,"type":"string"},{"type":"null"}],"default":null,"description":"Project identifier (needs org_identifier). Leave out for organization-level repositories.","title":"Project Identifier"},"inherited":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":false,"description":"True to include rules inherited from parent scopes.","title":"Inherited"},"page":{"anyOf":[{"maximum":10000,"minimum":1,"type":"integer"},{"type":"null"}],"default":1,"description":"Page number, starting at 1.","title":"Page"},"limit":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}],"default":30,"description":"Results per page (1 to 100, default 30).","title":"Limit"}},"required":["account_identifier"],"title":"list_space_rulesArguments","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_repository_general_settings":{"post":{"operationId":"get_repository_general_settings","summary":"Get a repository's general settings: auto-merge, Git LFS and file size limit. Use for \"Is Git LFS enabled on Harness Cod","description":"Get a repository's general settings: auto-merge, Git LFS and file size limit. Use for \"Is Git LFS enabled on Harness Code repository web-app\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"repo_identifier":{"description":"Repository identifier, or its full path 'org/project/repo' (slashes are encoded for you).","maxLength":300,"title":"Repo Identifier","type":"string"},"account_identifier":{"description":"Harness account ID (the string after /account/ in your Harness URL).","maxLength":64,"title":"Account Identifier","type":"string"},"org_identifier":{"anyOf":[{"maxLength":64,"type":"string"},{"type":"null"}],"default":null,"description":"Organization identifier, for example 'default'. Leave out for account-level repositories.","title":"Org Identifier"},"project_identifier":{"anyOf":[{"maxLength":64,"type":"string"},{"type":"null"}],"default":null,"description":"Project identifier (needs org_identifier). Leave out for organization-level repositories.","title":"Project Identifier"}},"required":["repo_identifier","account_identifier"],"title":"get_repository_general_settingsArguments","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_repository_security_settings":{"post":{"operationId":"get_repository_security_settings","summary":"Get a repository's security settings: secret scanning, vulnerability scanning mode (disabled, detect, block, strict) and","description":"Get a repository's security settings: secret scanning, vulnerability scanning mode (disabled, detect, block, strict) and committer identity matching. Use for \"Is secret scanning on for Harness Code repository web-app\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"repo_identifier":{"description":"Repository identifier, or its full path 'org/project/repo' (slashes are encoded for you).","maxLength":300,"title":"Repo Identifier","type":"string"},"account_identifier":{"description":"Harness account ID (the string after /account/ in your Harness URL).","maxLength":64,"title":"Account Identifier","type":"string"},"org_identifier":{"anyOf":[{"maxLength":64,"type":"string"},{"type":"null"}],"default":null,"description":"Organization identifier, for example 'default'. Leave out for account-level repositories.","title":"Org Identifier"},"project_identifier":{"anyOf":[{"maxLength":64,"type":"string"},{"type":"null"}],"default":null,"description":"Project identifier (needs org_identifier). Leave out for organization-level repositories.","title":"Project Identifier"}},"required":["repo_identifier","account_identifier"],"title":"get_repository_security_settingsArguments","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_usage_metrics":{"post":{"operationId":"get_usage_metrics","summary":"Get Harness Code usage for an account, organization or project: pushes, bandwidth, storage and storage limit status. Use","description":"Get Harness Code usage for an account, organization or project: pushes, bandwidth, storage and storage limit status. Use for \"How much Harness Code storage am I using\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"account_identifier":{"description":"Harness account ID (the string after /account/ in your Harness URL).","maxLength":64,"title":"Account Identifier","type":"string"},"org_identifier":{"anyOf":[{"maxLength":64,"type":"string"},{"type":"null"}],"default":null,"description":"Organization identifier, for example 'default'. Leave out for account-level repositories.","title":"Org Identifier"},"project_identifier":{"anyOf":[{"maxLength":64,"type":"string"},{"type":"null"}],"default":null,"description":"Project identifier (needs org_identifier). Leave out for organization-level repositories.","title":"Project Identifier"}},"required":["account_identifier"],"title":"get_usage_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}}}}