How AI is applied across API Evangelist and APIs.io. Read my AI disclosure →
API Evangelist API Evangelist
Discovery
Learnings
Guidance
Toolbox
Alignment
API Evangelist LLC

Harness Repository API

The repository API from Harness — 38 operation(s) for repository.

Harness Repository API is one of 488 APIs that Harness publishes on the APIs.io network, described by a machine-readable OpenAPI specification.

Tagged areas include Repository. The published artifact set on APIs.io includes an OpenAPI specification, API documentation, an API reference, a getting-started guide, authentication docs, and rate-limit docs.

This API exposes 49 operations across 38 paths, and defines 113 schemas. It is described by OpenAPI 3.2.0, at version 1.0.

Requests are made against 2 base URLs: https://app.harness.io, https://{vanity}.

49 operations 38 paths 113 schemas 4 DELETE23 GET3 PATCH19 POST

Metadata

The identity and technical contract details declared by the specification.

Specification
OpenAPI 3.2.0
API Version
1.0
Base URL
https://app.harness.io
Authentication
API Key
Terms of Service
Resource Areas
1

Authentication & Security 1

Harness Repository API declares 1 security scheme for authenticating requests. An API key is passed in the header as x-api-key (x-api-key). By default, every request must be authenticated.

  • x-api-key — API key is a token provided while making the API calls. This is used to authenticate the client at the exposed endpoint.

Paths & Operations 49

Across 38 paths, the API surfaces 49 operations — 4 DELETE, 23 GET, 3 PATCH, 19 POST. Each is listed below with its method, path, parameters, and response codes.

Repository 49
GET
/code/api/v1/repos
List repositories
listRepos 10 params → 200401403404500
POST
/code/api/v1/repos
Create repository
createRepository 3 params body → 201400401403500
DELETE
/code/api/v1/repos/{repo_identifier}
Soft delete repository
deleteRepository 4 params → 200401403404500
GET
/code/api/v1/repos/{repo_identifier}
Get repository
getRepository 4 params → 200401403404500
PATCH
/code/api/v1/repos/{repo_identifier}
Update repository
updateRepository 4 params body → 200400401403404500
GET
/code/api/v1/repos/{repo_identifier}/activities
List repository activities
listRepoActivities 8 params → 200400401403404500
GET
/code/api/v1/repos/{repo_identifier}/archive/{git_ref}.{format}
Download repo in archived format
archive 11 params → 200401403404422500
GET
/code/api/v1/repos/{repo_identifier}/blame/{path}
Get git blame
getBlame 8 params → 200401403404500
GET
/code/api/v1/repos/{repo_identifier}/branches
List branches
listBranches 14 params → 200401403404500
POST
/code/api/v1/repos/{repo_identifier}/branches
Create branch
createBranch 4 params body → 201400401403422500
DELETE
/code/api/v1/repos/{repo_identifier}/branches/{branch_name}
Delete branch
deleteBranch 7 params → 200401403404422500
GET
/code/api/v1/repos/{repo_identifier}/branches/{branch_name}
Get branch
getBranch 9 params → 200401403404500
GET
/code/api/v1/repos/{repo_identifier}/codeowners/validate
Validate code owners file
codeOwnersValidate 5 params → 200401403404422500
GET
/code/api/v1/repos/{repo_identifier}/commits
List commits
listCommits 16 params → 200401403404500
POST
/code/api/v1/repos/{repo_identifier}/commits
Commit files
commitFiles 4 params body → 200400401403404422500
GET
/code/api/v1/repos/{repo_identifier}/commits/{commit_sha}
Get commit
getCommit 5 params → 200401403404500
GET
/code/api/v1/repos/{repo_identifier}/commits/{commit_sha}/diff
Get raw git diff of a commit
getCommitDiff 5 params → 200401403404500
POST
/code/api/v1/repos/{repo_identifier}/commits/calculate-divergence
Get commit divergence
calculateCommitDivergence 4 params body → 200401403404500
GET
/code/api/v1/repos/{repo_identifier}/content/{path}
Get content of a file
getContent 8 params → 200401403404500
POST
/code/api/v1/repos/{repo_identifier}/default-branch
Update default branch
updateDefaultBranch 4 params body → 200400401403404500
GET
/code/api/v1/repos/{repo_identifier}/diff-stats/{range}
Get diff stats
diffStats 6 params → 200401403500
GET
/code/api/v1/repos/{repo_identifier}/diff/{range}
Get raw diff
rawDiff 6 params → 200401403500
POST
/code/api/v1/repos/{repo_identifier}/diff/{range}
Get raw diff
rawDiffPost 5 params body → 200401403500
POST
/code/api/v1/repos/{repo_identifier}/fork
Fork create
forkCreate 4 params body → 201400401403404500
POST
/code/api/v1/repos/{repo_identifier}/fork-sync
Fork sync branch
forkSyncBranch 4 params body → 200400401403404409500
GET
/code/api/v1/repos/{repo_identifier}/languages
Get repository language statistics
getRepoLanguages 4 params → 200401403404500
GET
/code/api/v1/repos/{repo_identifier}/linked/source
Get linked source
getLinkedSource 4 params → 200400401403404500
POST
/code/api/v1/repos/{repo_identifier}/linked/sync
Linked sync
linkedSync 4 params body → 200400401403404500
POST
/code/api/v1/repos/{repo_identifier}/merge-check/{range}
Check mergeability
mergeCheck 6 params → 200401403500
POST
/code/api/v1/repos/{repo_identifier}/merge-commit
Creates a merge commit on the head branch with changes from the base
mergeCommit 4 params body → 200400401403404422500
DELETE
/code/api/v1/repos/{repo_identifier}/mergequeue/{branch_name}
Merge queue clear
mergeQueueClear 5 params → 204400401403404500
GET
/code/api/v1/repos/{repo_identifier}/mergequeue/{branch_name}
Merge queue list entries
mergeQueueListEntries 5 params → 200400401403404500
POST
/code/api/v1/repos/{repo_identifier}/path-details
Get commit details
pathDetails 5 params body → 200401403404500
GET
/code/api/v1/repos/{repo_identifier}/paths
List all paths
listPaths 6 params → 200401403404500
POST
/code/api/v1/repos/{repo_identifier}/purge
Purge repository
purgeRepository 5 params → 204401403404500
GET
/code/api/v1/repos/{repo_identifier}/raw/{path}
Get raw file content
getRaw 6 params → 200401403404500
POST
/code/api/v1/repos/{repo_identifier}/rebase
Rebase a branch relative to another branch or a commit
rebaseBranch 4 params body → 200400401403404422500
POST
/code/api/v1/repos/{repo_identifier}/restore
Restore repository
restoreRepository 5 params body → 200400401403404500
GET
/code/api/v1/repos/{repo_identifier}/settings/general
Get general settings
findGeneralSettings 4 params → 200400401403404500
PATCH
/code/api/v1/repos/{repo_identifier}/settings/general
Update general settings
updateGeneralSettings 4 params body → 200400401403404500
GET
/code/api/v1/repos/{repo_identifier}/settings/security
Get security settings
findSecuritySettings 4 params → 200400401403404500
PATCH
/code/api/v1/repos/{repo_identifier}/settings/security
Update security settings
updateSecuritySettings 4 params body → 200400401403404500
POST
/code/api/v1/repos/{repo_identifier}/squash
Squashes commits in a branch relative to another branch or a commit
squashBranch 4 params body → 200400401403404422500
GET
/code/api/v1/repos/{repo_identifier}/summary
Get repository summary
summary 4 params → 200400401403404500
GET
/code/api/v1/repos/{repo_identifier}/tags
List tags
listTags 10 params → 200401403404500
POST
/code/api/v1/repos/{repo_identifier}/tags
Create tag
createTag 4 params body → 201400401403409422500
DELETE
/code/api/v1/repos/{repo_identifier}/tags/{tag_name}
Delete tag
deleteTag 7 params → 204401403404409422500
POST
/code/api/v1/repos/import
Import repository
importRepository 3 params body → 201400401403500
POST
/code/api/v1/repos/link
Linked create
linkedCreate 3 params body → 200400401403404500

Schemas 113

The contract defines 113 schemas that model the data the API accepts and returns. The most detailed are TypesPullReq (34 properties), RepoRepositoryOutput (34 properties), TypesCheck (13 properties), GitFileDiff (11 properties). Each schema is shown below with its type and property counts.

EnumPullReqType
stringnull
EnumMergeCheckStatus
string
TypesCheckPayload
object
3 properties
OpenapiUpdateDefaultBranchRequest
object
1 property
TypesRulesViolations
object
2 properties
RepoMergeQueueFullInfo
object
3 properties
TypesMergeQueueListItem
object
2 properties
RepoMergeCheck
object
2 properties
OpenapiCreateRepositoryRequest
object
10 properties
RepoListPathsOutput
object
2 properties
GitFileAction
string
GitSignature
object
2 properties
OpenapiCommitFilesRequest
object
8 properties
EnumCheckStatus
string
EnumPullReqState
string
EnumCheckPayloadKind
string
OpenapiGeneralSettingsRequest
object
3 properties
OpenapiCalculateCommitDivergenceRequest
object
2 properties
TypesSquashResponse
object
5 properties
EnumLabelColor
string
TypesCommitDivergence
object
2 properties
TypesCheckCountSummary
object
6 properties
OpenapiSecuritySettingsRequest
object
3 properties
TypesCommitTag
object
8 properties
TypesViolation
object
3 properties
RepoLinkedSyncOutput
object
1 property
RepoCommitFileAction
object
5 properties
ImporterProvider
object
4 properties
ShaSHA
string
Git object hash
TypesGitSignatureResult
objectnull
6 properties
RepoSubmoduleContent
object
2 properties
RepoPathsDetailsOutput
object
1 property
TypesMergeCommitResponse
object
6 properties
GitIdentity
objectnull
2 properties
TypesCommit
object
8 properties
TypesDeleteBranchOutput
object
2 properties
TypesPrincipalInfo
objectnull
7 properties
TypesLabelPullReqAssignmentInfo
object
8 properties
OpenapiUpdateRepoRequest
object
3 properties
GitFileDiff
object
11 properties
TypesRenameDetails
object
4 properties
EnumFileDiffStatus
string
EnumPrincipalType
string
RepoSoftDeleteResponse
object
1 property
TypesRuleViolations
object
4 properties
TypesRepositoryPullReqSummary
object
3 properties
OpenapiPostRawDiffRequest
arraynull
GitBlamePartPrevious
object
2 properties
SettingsSecuritySettings
object
3 properties
EnumMergeQueueEntryState
string
GitCommit
objectnull
7 properties
RepoFileContent
object
6 properties
EnumContentEncodingType
string
RepoRepositoryOutput
object
34 properties
TypesMergeViolations
object
3 properties
TypesCommitStats
object
2 properties
TypesRepositoryCore
object
7 properties
TypesForkSyncConflict
object
2 properties
OpenapiDirContent
object
1 property
ApiFileDiffRequest
object
2 properties
TypesRepoActivity
object
5 properties
UsererrorError
object
2 properties
OpenapiCreateTagRequest
object
5 properties
EnumRepoType
string
TypesCreateBranchOutput
object
5 properties
EnumRepoActivityType
string
RepoCommitDivergenceRequest
object
2 properties
EnumRuleState
stringnull
TypesCheck
object
13 properties
RepoSymlinkContent
object
2 properties
TypesMergeQueueInfo
objectnull
5 properties
TypesPathDetails
object
2 properties
TypesRepoLangStat
object
TypesRepositorySummary
object
4 properties
TypesPullReqStats
object
6 properties
TypesRepoTags
objectnull
TypesDiffStats
object
4 properties
TypesForkSyncOutput
object
2 properties
TypesRepoActivityPayload
OpenapiContent
object
TypesChangeStats
object
3 properties
EnumPublicKeyScheme
string
SettingsGeneralSettings
object
3 properties
ImporterProviderType
string
OpenapiContentInfo
object
5 properties
EnumMergeMethod
string
TypesPullReqCheck
object
3 properties
TypesListCommitResponse
object
3 properties
GitBlamePart
object
3 properties
TypesFileReference
object
2 properties
OpenapiCreateBranchRequest
object
4 properties
TypesBranchExtended
object
8 properties
TypesIdentity
object
2 properties
TypesSignature
object
2 properties
ProtectionMergeQueueSetup
object
4 properties
EnumGitSignatureResult
string
OpenapiPathsDetailsRequest
object
1 property
OpenapiRestoreRequest
object
2 properties
HookReferenceUpdate
object
3 properties
GitCommitFileStats
object
OpenapiGetContentOutput
object
6 properties
TypesCommitFileStats
object
6 properties
EnumRepoState
integernull
SettingsVulnerabilityScanningMode
stringnull
TypesRebaseResponse
object
6 properties
ImporterPipelineOption
string
OpenapiContentType
string
TypesRuleInfo
object
5 properties
EnumRuleType
string
TypesCommitFilesResponse
object
4 properties
RepoLinkedSourceOutput
object
1 property
TypesPullReq
object
34 properties
EnumPullReqSubState
string

Specification

The full machine-readable OpenAPI contract behind this narrative.

Source

harness-repository-api-openapi.yml Raw ↑

Other APIs Harness publishes across the network.

Harness Continuous Integration API
Harness Continuous Delivery and GitOps API
Harness Feature Management and Experimentation API
Harness Cloud Cost Management API
Harness Chaos Engineering API
Harness Security Testing Orchestration API
Harness Internal Developer Portal API
Harness Code Repository API
Harness Service Reliability Management API
Harness Infrastructure as Code Management API
Harness Supply Chain Security API
Harness Software Engineering Insights API
Where this information came from

This is an independent, third-party profile of Harness Repository API, published by API Evangelist. We do not operate, host, resell, or support these APIs, and we are not affiliated with or endorsed by the company unless stated above. Everything here is built from publicly available information — the company's own site, developer portal, documentation, public repositories, and the specifications it publishes for public use. Nothing is obtained by breaching a system, defeating an access control, or using credentials.

The Kin Score and Agent Readiness rating are independently calculated assessments of a company's public API artifacts, scored against a published rubric. They are not certifications, endorsements, security assessments, or audits.

Corrections, re-scores, and removal are free — no partnership or purchase required, and you do not need to justify the request. A removed company is recorded as unrated, never scored zero for having asked. Acknowledgement within one business day; removal within two.

info@apievangelist.com · Read the full data-sourcing policy →
On a security or compliance team? Put security in the subject line and you will get a person, not a form — we will tell you exactly which public URLs this profile was built from.