> For the complete documentation index, see [llms.txt](https://developer.harness.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.harness.io/api-reference/software-delivery-agent-apis/code-repository/repository.md).

# Repository

## GET /repos

> List repositories

```json
{"openapi":"3.0.0","info":{"title":"API Specification","version":"1.111.0"},"servers":[{"url":"gateway/code/api/v1"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"scheme":"bearer","type":"http"}},"schemas":{"RepoRepositoryOutput":{"properties":{"archived":{"type":"boolean"},"created":{"type":"integer"},"created_by":{"type":"integer"},"default_branch":{"type":"string"},"deleted":{"nullable":true,"type":"integer"},"description":{"type":"string"},"fork_id":{"type":"integer"},"git_ssh_url":{"type":"string"},"git_url":{"type":"string"},"id":{"type":"integer"},"identifier":{"type":"string"},"import_failed":{"type":"boolean"},"importing":{"type":"boolean"},"is_empty":{"type":"boolean"},"is_favorite":{"type":"boolean"},"is_public":{"type":"boolean"},"language":{"type":"string"},"last_git_push":{"type":"integer"},"loc":{"description":"source lines of code on the default branch","type":"integer"},"num_closed_pulls":{"type":"integer"},"num_forks":{"type":"integer"},"num_merged_pulls":{"type":"integer"},"num_open_pulls":{"type":"integer"},"num_pulls":{"type":"integer"},"parent_id":{"type":"integer"},"path":{"type":"string"},"repo_type":{"$ref":"#/components/schemas/EnumRepoType"},"root_space_id":{"type":"integer"},"root_space_identifier":{"type":"string"},"size":{"description":"size of the repository in KiB","type":"integer"},"size_lfs":{"description":"size of the repository LFS in KiB","type":"integer"},"size_updated":{"type":"integer"},"state":{"$ref":"#/components/schemas/EnumRepoState"},"tags":{},"updated":{"type":"integer"},"upstream":{"$ref":"#/components/schemas/TypesRepositoryCore"}},"type":"object"},"EnumRepoType":{"type":"string"},"EnumRepoState":{"nullable":true,"type":"integer"},"TypesRepositoryCore":{"properties":{"default_branch":{"type":"string"},"fork_id":{"type":"integer"},"id":{"type":"integer"},"identifier":{"type":"string"},"parent_id":{"type":"integer"},"path":{"type":"string"},"type":{"$ref":"#/components/schemas/EnumRepoType"}},"type":"object"},"UsererrorError":{"properties":{"message":{"type":"string"},"values":{"additionalProperties":{},"type":"object"}},"type":"object"}}},"paths":{"/repos":{"get":{"operationId":"listRepos","parameters":[{"description":"Account Identifier for the Entity.","in":"query","name":"accountIdentifier","required":true,"schema":{"type":"string"}},{"description":"Organization Identifier for the Entity.","in":"query","name":"orgIdentifier","required":false,"schema":{"type":"string"}},{"description":"Project Identifier for the Entity.","in":"query","name":"projectIdentifier","required":false,"schema":{"type":"string"}},{"description":"The substring which is used to filter the repositories by their path name.","in":"query","name":"query","required":false,"schema":{"type":"string"}},{"description":"The data by which the repositories are sorted.","in":"query","name":"sort","required":false,"schema":{"default":"identifier","enum":["identifier","created","updated"],"type":"string"}},{"description":"The order of the output.","in":"query","name":"order","required":false,"schema":{"default":"asc","enum":["asc","desc"],"type":"string"}},{"description":"The page to return.","in":"query","name":"page","required":false,"schema":{"default":1,"minimum":1,"type":"integer"}},{"description":"The maximum number of results to return.","in":"query","name":"limit","required":false,"schema":{"default":30,"maximum":100,"minimum":1,"type":"integer"}},{"description":"The result should contain only the favorite entries for the logged in user.","in":"query","name":"only_favorites","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"The result should include entities from child spaces.","in":"query","name":"recursive","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"The tags used to filter the repositories. Each entry is either a key (e.g. \"team\") to match any value, or a key:value pair (e.g. \"team:backend\"). The parameter may be repeated.","in":"query","name":"tag","required":false,"schema":{"items":{"type":"string"},"type":"array"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/RepoRepositoryOutput"},"type":"array"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Not Found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Internal Server Error"}},"summary":"List repositories","tags":["repository"]}}}}
```

## POST /repos

> Create repository

```json
{"openapi":"3.0.0","info":{"title":"API Specification","version":"1.111.0"},"servers":[{"url":"gateway/code/api/v1"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"scheme":"bearer","type":"http"}},"schemas":{"OpenapiCreateRepositoryRequest":{"properties":{"default_branch":{"type":"string"},"description":{"type":"string"},"git_ignore":{"type":"string"},"identifier":{"type":"string"},"is_public":{"type":"boolean"},"license":{"type":"string"},"parent_ref":{"type":"string"},"readme":{"type":"boolean"},"tags":{"$ref":"#/components/schemas/TypesRepoTags"},"uid":{"deprecated":true,"type":"string"}},"type":"object"},"TypesRepoTags":{"additionalProperties":{"type":"string"},"nullable":true,"type":"object"},"RepoRepositoryOutput":{"properties":{"archived":{"type":"boolean"},"created":{"type":"integer"},"created_by":{"type":"integer"},"default_branch":{"type":"string"},"deleted":{"nullable":true,"type":"integer"},"description":{"type":"string"},"fork_id":{"type":"integer"},"git_ssh_url":{"type":"string"},"git_url":{"type":"string"},"id":{"type":"integer"},"identifier":{"type":"string"},"import_failed":{"type":"boolean"},"importing":{"type":"boolean"},"is_empty":{"type":"boolean"},"is_favorite":{"type":"boolean"},"is_public":{"type":"boolean"},"language":{"type":"string"},"last_git_push":{"type":"integer"},"loc":{"description":"source lines of code on the default branch","type":"integer"},"num_closed_pulls":{"type":"integer"},"num_forks":{"type":"integer"},"num_merged_pulls":{"type":"integer"},"num_open_pulls":{"type":"integer"},"num_pulls":{"type":"integer"},"parent_id":{"type":"integer"},"path":{"type":"string"},"repo_type":{"$ref":"#/components/schemas/EnumRepoType"},"root_space_id":{"type":"integer"},"root_space_identifier":{"type":"string"},"size":{"description":"size of the repository in KiB","type":"integer"},"size_lfs":{"description":"size of the repository LFS in KiB","type":"integer"},"size_updated":{"type":"integer"},"state":{"$ref":"#/components/schemas/EnumRepoState"},"tags":{},"updated":{"type":"integer"},"upstream":{"$ref":"#/components/schemas/TypesRepositoryCore"}},"type":"object"},"EnumRepoType":{"type":"string"},"EnumRepoState":{"nullable":true,"type":"integer"},"TypesRepositoryCore":{"properties":{"default_branch":{"type":"string"},"fork_id":{"type":"integer"},"id":{"type":"integer"},"identifier":{"type":"string"},"parent_id":{"type":"integer"},"path":{"type":"string"},"type":{"$ref":"#/components/schemas/EnumRepoType"}},"type":"object"},"UsererrorError":{"properties":{"message":{"type":"string"},"values":{"additionalProperties":{},"type":"object"}},"type":"object"}}},"paths":{"/repos":{"post":{"operationId":"createRepository","parameters":[{"description":"Account Identifier for the Entity.","in":"query","name":"accountIdentifier","required":true,"schema":{"type":"string"}},{"description":"Organization Identifier for the Entity.","in":"query","name":"orgIdentifier","required":false,"schema":{"type":"string"}},{"description":"Project Identifier for the Entity.","in":"query","name":"projectIdentifier","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenapiCreateRepositoryRequest"}}}},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RepoRepositoryOutput"}}},"description":"Created"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Bad Request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Forbidden"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Internal Server Error"}},"summary":"Create repository","tags":["repository"]}}}}
```

## GET /repos/{repo\_identifier}

> Get repository

```json
{"openapi":"3.0.0","info":{"title":"API Specification","version":"1.111.0"},"servers":[{"url":"gateway/code/api/v1"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"scheme":"bearer","type":"http"}},"schemas":{"RepoRepositoryOutput":{"properties":{"archived":{"type":"boolean"},"created":{"type":"integer"},"created_by":{"type":"integer"},"default_branch":{"type":"string"},"deleted":{"nullable":true,"type":"integer"},"description":{"type":"string"},"fork_id":{"type":"integer"},"git_ssh_url":{"type":"string"},"git_url":{"type":"string"},"id":{"type":"integer"},"identifier":{"type":"string"},"import_failed":{"type":"boolean"},"importing":{"type":"boolean"},"is_empty":{"type":"boolean"},"is_favorite":{"type":"boolean"},"is_public":{"type":"boolean"},"language":{"type":"string"},"last_git_push":{"type":"integer"},"loc":{"description":"source lines of code on the default branch","type":"integer"},"num_closed_pulls":{"type":"integer"},"num_forks":{"type":"integer"},"num_merged_pulls":{"type":"integer"},"num_open_pulls":{"type":"integer"},"num_pulls":{"type":"integer"},"parent_id":{"type":"integer"},"path":{"type":"string"},"repo_type":{"$ref":"#/components/schemas/EnumRepoType"},"root_space_id":{"type":"integer"},"root_space_identifier":{"type":"string"},"size":{"description":"size of the repository in KiB","type":"integer"},"size_lfs":{"description":"size of the repository LFS in KiB","type":"integer"},"size_updated":{"type":"integer"},"state":{"$ref":"#/components/schemas/EnumRepoState"},"tags":{},"updated":{"type":"integer"},"upstream":{"$ref":"#/components/schemas/TypesRepositoryCore"}},"type":"object"},"EnumRepoType":{"type":"string"},"EnumRepoState":{"nullable":true,"type":"integer"},"TypesRepositoryCore":{"properties":{"default_branch":{"type":"string"},"fork_id":{"type":"integer"},"id":{"type":"integer"},"identifier":{"type":"string"},"parent_id":{"type":"integer"},"path":{"type":"string"},"type":{"$ref":"#/components/schemas/EnumRepoType"}},"type":"object"},"UsererrorError":{"properties":{"message":{"type":"string"},"values":{"additionalProperties":{},"type":"object"}},"type":"object"}}},"paths":{"/repos/{repo_identifier}":{"get":{"operationId":"getRepository","parameters":[{"description":"Account Identifier for the Entity.","in":"query","name":"accountIdentifier","required":true,"schema":{"type":"string"}},{"description":"Organization Identifier for the Entity.","in":"query","name":"orgIdentifier","required":false,"schema":{"type":"string"}},{"description":"Project Identifier for the Entity.","in":"query","name":"projectIdentifier","required":false,"schema":{"type":"string"}},{"in":"path","name":"repo_identifier","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RepoRepositoryOutput"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Not Found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Internal Server Error"}},"summary":"Get repository","tags":["repository"]}}}}
```

## DELETE /repos/{repo\_identifier}

> Soft delete repository

```json
{"openapi":"3.0.0","info":{"title":"API Specification","version":"1.111.0"},"servers":[{"url":"gateway/code/api/v1"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"scheme":"bearer","type":"http"}},"schemas":{"RepoSoftDeleteResponse":{"properties":{"deleted_at":{"type":"integer"}},"type":"object"},"UsererrorError":{"properties":{"message":{"type":"string"},"values":{"additionalProperties":{},"type":"object"}},"type":"object"}}},"paths":{"/repos/{repo_identifier}":{"delete":{"operationId":"deleteRepository","parameters":[{"description":"Account Identifier for the Entity.","in":"query","name":"accountIdentifier","required":true,"schema":{"type":"string"}},{"description":"Organization Identifier for the Entity.","in":"query","name":"orgIdentifier","required":false,"schema":{"type":"string"}},{"description":"Project Identifier for the Entity.","in":"query","name":"projectIdentifier","required":false,"schema":{"type":"string"}},{"in":"path","name":"repo_identifier","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RepoSoftDeleteResponse"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Not Found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Internal Server Error"}},"summary":"Soft delete repository","tags":["repository"]}}}}
```

## PATCH /repos/{repo\_identifier}

> Update repository

```json
{"openapi":"3.0.0","info":{"title":"API Specification","version":"1.111.0"},"servers":[{"url":"gateway/code/api/v1"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"scheme":"bearer","type":"http"}},"schemas":{"OpenapiUpdateRepoRequest":{"properties":{"description":{"nullable":true,"type":"string"},"state":{"$ref":"#/components/schemas/EnumRepoState"},"tags":{"$ref":"#/components/schemas/TypesRepoTags"}},"type":"object"},"EnumRepoState":{"nullable":true,"type":"integer"},"TypesRepoTags":{"additionalProperties":{"type":"string"},"nullable":true,"type":"object"},"RepoRepositoryOutput":{"properties":{"archived":{"type":"boolean"},"created":{"type":"integer"},"created_by":{"type":"integer"},"default_branch":{"type":"string"},"deleted":{"nullable":true,"type":"integer"},"description":{"type":"string"},"fork_id":{"type":"integer"},"git_ssh_url":{"type":"string"},"git_url":{"type":"string"},"id":{"type":"integer"},"identifier":{"type":"string"},"import_failed":{"type":"boolean"},"importing":{"type":"boolean"},"is_empty":{"type":"boolean"},"is_favorite":{"type":"boolean"},"is_public":{"type":"boolean"},"language":{"type":"string"},"last_git_push":{"type":"integer"},"loc":{"description":"source lines of code on the default branch","type":"integer"},"num_closed_pulls":{"type":"integer"},"num_forks":{"type":"integer"},"num_merged_pulls":{"type":"integer"},"num_open_pulls":{"type":"integer"},"num_pulls":{"type":"integer"},"parent_id":{"type":"integer"},"path":{"type":"string"},"repo_type":{"$ref":"#/components/schemas/EnumRepoType"},"root_space_id":{"type":"integer"},"root_space_identifier":{"type":"string"},"size":{"description":"size of the repository in KiB","type":"integer"},"size_lfs":{"description":"size of the repository LFS in KiB","type":"integer"},"size_updated":{"type":"integer"},"state":{"$ref":"#/components/schemas/EnumRepoState"},"tags":{},"updated":{"type":"integer"},"upstream":{"$ref":"#/components/schemas/TypesRepositoryCore"}},"type":"object"},"EnumRepoType":{"type":"string"},"TypesRepositoryCore":{"properties":{"default_branch":{"type":"string"},"fork_id":{"type":"integer"},"id":{"type":"integer"},"identifier":{"type":"string"},"parent_id":{"type":"integer"},"path":{"type":"string"},"type":{"$ref":"#/components/schemas/EnumRepoType"}},"type":"object"},"UsererrorError":{"properties":{"message":{"type":"string"},"values":{"additionalProperties":{},"type":"object"}},"type":"object"}}},"paths":{"/repos/{repo_identifier}":{"patch":{"operationId":"updateRepository","parameters":[{"description":"Account Identifier for the Entity.","in":"query","name":"accountIdentifier","required":true,"schema":{"type":"string"}},{"description":"Organization Identifier for the Entity.","in":"query","name":"orgIdentifier","required":false,"schema":{"type":"string"}},{"description":"Project Identifier for the Entity.","in":"query","name":"projectIdentifier","required":false,"schema":{"type":"string"}},{"in":"path","name":"repo_identifier","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenapiUpdateRepoRequest"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RepoRepositoryOutput"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Bad Request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Not Found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Internal Server Error"}},"summary":"Update repository","tags":["repository"]}}}}
```

## GET /repos/{repo\_identifier}/activities

> List repository activities

```json
{"openapi":"3.0.0","info":{"title":"API Specification","version":"1.111.0"},"servers":[{"url":"gateway/code/api/v1"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"scheme":"bearer","type":"http"}},"schemas":{"TypesRepoActivity":{"properties":{"payload":{"$ref":"#/components/schemas/TypesRepoActivityPayload"},"principal_id":{"type":"integer"},"repo_id":{"type":"integer"},"timestamp":{"type":"integer"},"type":{"$ref":"#/components/schemas/EnumRepoActivityType"}},"type":"object"},"TypesRepoActivityPayload":{},"EnumRepoActivityType":{"enum":["branch-created","branch-deleted","branch-updated"],"type":"string"},"UsererrorError":{"properties":{"message":{"type":"string"},"values":{"additionalProperties":{},"type":"object"}},"type":"object"}}},"paths":{"/repos/{repo_identifier}/activities":{"get":{"operationId":"listRepoActivities","parameters":[{"description":"Account Identifier for the Entity.","in":"query","name":"accountIdentifier","required":true,"schema":{"type":"string"}},{"description":"Organization Identifier for the Entity.","in":"query","name":"orgIdentifier","required":false,"schema":{"type":"string"}},{"description":"Project Identifier for the Entity.","in":"query","name":"projectIdentifier","required":false,"schema":{"type":"string"}},{"description":"The result should contain only entries created at and after this timestamp (unix millis).","in":"query","name":"after","required":false,"schema":{"minimum":0,"type":"integer"}},{"description":"The result should contain only entries created before this timestamp (unix millis).","in":"query","name":"before","required":false,"schema":{"minimum":0,"type":"integer"}},{"description":"The page to return.","in":"query","name":"page","required":false,"schema":{"default":1,"minimum":1,"type":"integer"}},{"description":"The maximum number of results to return.","in":"query","name":"limit","required":false,"schema":{"default":30,"maximum":100,"minimum":1,"type":"integer"}},{"in":"path","name":"repo_identifier","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/TypesRepoActivity"},"type":"array"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Bad Request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Not Found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Internal Server Error"}},"summary":"List repository activities","tags":["repository"]}}}}
```

## GET /repos/{repo\_identifier}/archive/{git\_ref}.{format}

> Download repo in archived format

```json
{"openapi":"3.0.0","info":{"title":"API Specification","version":"1.111.0"},"servers":[{"url":"gateway/code/api/v1"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"scheme":"bearer","type":"http"}},"schemas":{"UsererrorError":{"properties":{"message":{"type":"string"},"values":{"additionalProperties":{},"type":"object"}},"type":"object"}}},"paths":{"/repos/{repo_identifier}/archive/{git_ref}.{format}":{"get":{"operationId":"archive","parameters":[{"description":"Account Identifier for the Entity.","in":"query","name":"accountIdentifier","required":true,"schema":{"type":"string"}},{"description":"Organization Identifier for the Entity.","in":"query","name":"orgIdentifier","required":false,"schema":{"type":"string"}},{"description":"Project Identifier for the Entity.","in":"query","name":"projectIdentifier","required":false,"schema":{"type":"string"}},{"description":"Without an optional path parameter, all files and subdirectories of the current working directory are included in the archive. If one or more paths are specified, only these are included.","in":"query","name":"path","required":false,"schema":{"items":{"type":"string"},"type":"array"}},{"description":"Prepend <prefix>/ to paths in the archive.","in":"query","name":"prefix","required":false,"schema":{"type":"string"}},{"description":"Look for attributes in .gitattributes files in the working tree as well","in":"query","name":"attributes","required":false,"schema":{"type":"string"}},{"description":"Set modification time of archive entries. Without this option the committer time is used if <tree-ish> is a commit or tag, and the current time if it is a tree.","in":"query","name":"time","required":false,"schema":{"type":"string"}},{"description":"Specify compression level. Larger values allow the command to spend more time to compress to smaller size.","in":"query","name":"compression","required":false,"schema":{"type":"integer"}},{"in":"path","name":"repo_identifier","required":true,"schema":{"type":"string"}},{"in":"path","name":"git_ref","required":true,"schema":{"type":"string"}},{"in":"path","name":"format","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/gzip":{"schema":{"type":"string"}},"application/tar":{"schema":{"type":"string"}},"application/zip":{"schema":{"type":"string"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Not Found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Unprocessable Entity"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Internal Server Error"}},"summary":"Download repo in archived format","tags":["repository"]}}}}
```

## GET /repos/{repo\_identifier}/blame/{path}

> Get git blame

```json
{"openapi":"3.0.0","info":{"title":"API Specification","version":"1.111.0"},"servers":[{"url":"gateway/code/api/v1"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"scheme":"bearer","type":"http"}},"schemas":{"GitBlamePart":{"properties":{"commit":{"$ref":"#/components/schemas/GitCommit"},"lines":{"items":{"type":"string"},"nullable":true,"type":"array"},"previous":{"$ref":"#/components/schemas/GitBlamePartPrevious"}},"type":"object"},"GitCommit":{"nullable":true,"properties":{"author":{"$ref":"#/components/schemas/GitSignature"},"committer":{"$ref":"#/components/schemas/GitSignature"},"file_stats":{"items":{"$ref":"#/components/schemas/GitCommitFileStats"},"type":"array"},"message":{"type":"string"},"parent_shas":{"items":{"$ref":"#/components/schemas/ShaSHA"},"type":"array"},"sha":{"$ref":"#/components/schemas/ShaSHA"},"title":{"type":"string"}},"type":"object"},"GitSignature":{"properties":{"identity":{"$ref":"#/components/schemas/GitIdentity"},"when":{"format":"date-time","type":"string"}},"type":"object"},"GitIdentity":{"nullable":true,"properties":{"email":{"type":"string"},"name":{"type":"string"}},"type":"object"},"GitCommitFileStats":{"type":"object"},"ShaSHA":{"description":"Git object hash","type":"string"},"GitBlamePartPrevious":{"properties":{"commit_sha":{"$ref":"#/components/schemas/ShaSHA"},"file_name":{"type":"string"}},"type":"object"},"UsererrorError":{"properties":{"message":{"type":"string"},"values":{"additionalProperties":{},"type":"object"}},"type":"object"}}},"paths":{"/repos/{repo_identifier}/blame/{path}":{"get":{"operationId":"getBlame","parameters":[{"description":"Account Identifier for the Entity.","in":"query","name":"accountIdentifier","required":true,"schema":{"type":"string"}},{"description":"Organization Identifier for the Entity.","in":"query","name":"orgIdentifier","required":false,"schema":{"type":"string"}},{"description":"Project Identifier for the Entity.","in":"query","name":"projectIdentifier","required":false,"schema":{"type":"string"}},{"description":"The git reference (branch / tag / commitID) that will be used to retrieve the data. If no value is provided the default branch of the repository is used.","in":"query","name":"git_ref","required":false,"schema":{"default":"{Repository Default Branch}","type":"string"}},{"description":"Line number from which the file data is considered","in":"query","name":"line_from","required":false,"schema":{"default":0,"type":"integer"}},{"description":"Line number to which the file data is considered","in":"query","name":"line_to","required":false,"schema":{"default":0,"type":"integer"}},{"in":"path","name":"repo_identifier","required":true,"schema":{"type":"string"}},{"in":"path","name":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/GitBlamePart"},"type":"array"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Not Found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Internal Server Error"}},"summary":"Get git blame","tags":["repository"]}}}}
```

## GET /repos/{repo\_identifier}/branches

> List branches

```json
{"openapi":"3.0.0","info":{"title":"API Specification","version":"1.111.0"},"servers":[{"url":"gateway/code/api/v1"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"scheme":"bearer","type":"http"}},"schemas":{"TypesBranchExtended":{"properties":{"check_summary":{"$ref":"#/components/schemas/TypesCheckCountSummary"},"commit":{"$ref":"#/components/schemas/TypesCommit"},"commit_divergence":{"$ref":"#/components/schemas/TypesCommitDivergence"},"is_default":{"type":"boolean"},"merge_queue":{"$ref":"#/components/schemas/TypesMergeQueueBranchInfo"},"name":{"type":"string"},"pull_requests":{"items":{"$ref":"#/components/schemas/TypesPullReq"},"type":"array"},"rules":{"items":{"$ref":"#/components/schemas/TypesRuleInfo"},"type":"array"},"sha":{"$ref":"#/components/schemas/ShaSHA"}},"type":"object"},"TypesCheckCountSummary":{"properties":{"error":{"type":"integer"},"failure":{"type":"integer"},"failure_ignored":{"type":"integer"},"pending":{"type":"integer"},"running":{"type":"integer"},"success":{"type":"integer"}},"type":"object"},"TypesCommit":{"properties":{"author":{"$ref":"#/components/schemas/TypesSignature"},"committer":{"$ref":"#/components/schemas/TypesSignature"},"message":{"type":"string"},"parent_shas":{"items":{"$ref":"#/components/schemas/ShaSHA"},"type":"array"},"sha":{"$ref":"#/components/schemas/ShaSHA"},"signature":{"$ref":"#/components/schemas/TypesGitSignatureResult"},"stats":{"$ref":"#/components/schemas/TypesCommitStats"},"title":{"type":"string"}},"type":"object"},"TypesSignature":{"properties":{"identity":{"$ref":"#/components/schemas/TypesIdentity"},"when":{"format":"date-time","type":"string"}},"type":"object"},"TypesIdentity":{"properties":{"email":{"type":"string"},"name":{"type":"string"}},"type":"object"},"ShaSHA":{"description":"Git object hash","type":"string"},"TypesGitSignatureResult":{"nullable":true,"properties":{"created":{"type":"integer"},"key_fingerprint":{"type":"string"},"key_id":{"type":"string"},"key_scheme":{"$ref":"#/components/schemas/EnumPublicKeyScheme"},"result":{"$ref":"#/components/schemas/EnumGitSignatureResult"},"updated":{"type":"integer"}},"type":"object"},"EnumPublicKeyScheme":{"enum":["pgp","ssh"],"type":"string"},"EnumGitSignatureResult":{"enum":["bad","good","invalid","key_expired","revoked","unsupported","unverified"],"type":"string"},"TypesCommitStats":{"properties":{"files":{"items":{"$ref":"#/components/schemas/TypesCommitFileStats"},"type":"array"},"total":{"$ref":"#/components/schemas/TypesChangeStats"}},"type":"object"},"TypesCommitFileStats":{"properties":{"changes":{"type":"integer"},"deletions":{"type":"integer"},"insertions":{"type":"integer"},"old_path":{"type":"string"},"path":{"type":"string"},"status":{"$ref":"#/components/schemas/EnumFileDiffStatus"}},"type":"object"},"EnumFileDiffStatus":{"type":"string"},"TypesChangeStats":{"properties":{"changes":{"type":"integer"},"deletions":{"type":"integer"},"insertions":{"type":"integer"}},"type":"object"},"TypesCommitDivergence":{"properties":{"ahead":{"type":"integer"},"behind":{"type":"integer"}},"type":"object"},"TypesMergeQueueBranchInfo":{"properties":{"active":{"type":"boolean"}},"type":"object"},"TypesPullReq":{"properties":{"author":{"$ref":"#/components/schemas/TypesPrincipalInfo"},"check_summary":{"$ref":"#/components/schemas/TypesCheckCountSummary"},"closed":{"nullable":true,"type":"integer"},"created":{"type":"integer"},"description":{"type":"string"},"edited":{"type":"integer"},"is_draft":{"type":"boolean"},"labels":{"items":{"$ref":"#/components/schemas/TypesLabelPullReqAssignmentInfo"},"type":"array"},"merge_base_sha":{"type":"string"},"merge_check_status":{"$ref":"#/components/schemas/EnumMergeCheckStatus"},"merge_conflicts":{"items":{"type":"string"},"type":"array"},"merge_method":{"$ref":"#/components/schemas/EnumMergeMethod"},"merge_target_sha":{"nullable":true,"type":"string"},"merge_violations_bypassed":{"nullable":true,"type":"boolean"},"merged":{"nullable":true,"type":"integer"},"merger":{"$ref":"#/components/schemas/TypesPrincipalInfo"},"number":{"type":"integer"},"pullreq_type":{"$ref":"#/components/schemas/EnumPullReqType"},"rebase_check_status":{"$ref":"#/components/schemas/EnumMergeCheckStatus"},"rebase_conflicts":{"items":{"type":"string"},"type":"array"},"root_space_id":{"type":"integer"},"root_space_identifier":{"type":"string"},"rules":{"items":{"$ref":"#/components/schemas/TypesRuleInfo"},"type":"array"},"source_branch":{"type":"string"},"source_repo":{"$ref":"#/components/schemas/TypesRepositoryCore"},"source_repo_id":{"nullable":true,"type":"integer"},"source_sha":{"type":"string"},"state":{"$ref":"#/components/schemas/EnumPullReqState"},"stats":{"$ref":"#/components/schemas/TypesPullReqStats"},"substate":{"$ref":"#/components/schemas/EnumPullReqSubState"},"target_branch":{"type":"string"},"target_repo_id":{"type":"integer"},"title":{"type":"string"},"updated":{"type":"integer"}},"type":"object"},"TypesPrincipalInfo":{"nullable":true,"properties":{"created":{"type":"integer"},"display_name":{"type":"string"},"email":{"type":"string"},"id":{"type":"integer"},"type":{"$ref":"#/components/schemas/EnumPrincipalType"},"uid":{"type":"string"},"updated":{"type":"integer"}},"type":"object"},"EnumPrincipalType":{"enum":["service","serviceaccount","user"],"type":"string"},"TypesLabelPullReqAssignmentInfo":{"properties":{"color":{"$ref":"#/components/schemas/EnumLabelColor"},"id":{"type":"integer"},"key":{"type":"string"},"scope":{"type":"integer"},"value":{"nullable":true,"type":"string"},"value_color":{"$ref":"#/components/schemas/EnumLabelColor"},"value_count":{"type":"integer"},"value_id":{"nullable":true,"type":"integer"}},"type":"object"},"EnumLabelColor":{"enum":["blue","brown","cyan","green","indigo","lime","mint","orange","pink","purple","red","violet","yellow"],"type":"string"},"EnumMergeCheckStatus":{"type":"string"},"EnumMergeMethod":{"enum":["fast-forward","merge","rebase","squash"],"type":"string"},"EnumPullReqType":{"nullable":true,"type":"string"},"TypesRuleInfo":{"properties":{"identifier":{"type":"string"},"repo_path":{"type":"string"},"space_path":{"type":"string"},"state":{"$ref":"#/components/schemas/EnumRuleState"},"type":{"$ref":"#/components/schemas/EnumRuleType"}},"type":"object"},"EnumRuleState":{"enum":["active","disabled","monitor"],"nullable":true,"type":"string"},"EnumRuleType":{"enum":["branch","push","tag"],"type":"string"},"TypesRepositoryCore":{"properties":{"default_branch":{"type":"string"},"fork_id":{"type":"integer"},"id":{"type":"integer"},"identifier":{"type":"string"},"parent_id":{"type":"integer"},"path":{"type":"string"},"type":{"$ref":"#/components/schemas/EnumRepoType"}},"type":"object"},"EnumRepoType":{"type":"string"},"EnumPullReqState":{"enum":["closed","merged","open"],"type":"string"},"TypesPullReqStats":{"properties":{"additions":{"nullable":true,"type":"integer"},"commits":{"nullable":true,"type":"integer"},"conversations":{"type":"integer"},"deletions":{"nullable":true,"type":"integer"},"files_changed":{"nullable":true,"type":"integer"},"unresolved_count":{"type":"integer"}},"type":"object"},"EnumPullReqSubState":{"enum":["","auto_merge","merge_queue"],"type":"string"},"UsererrorError":{"properties":{"message":{"type":"string"},"values":{"additionalProperties":{},"type":"object"}},"type":"object"}}},"paths":{"/repos/{repo_identifier}/branches":{"get":{"operationId":"listBranches","parameters":[{"description":"Account Identifier for the Entity.","in":"query","name":"accountIdentifier","required":true,"schema":{"type":"string"}},{"description":"Organization Identifier for the Entity.","in":"query","name":"orgIdentifier","required":false,"schema":{"type":"string"}},{"description":"Project Identifier for the Entity.","in":"query","name":"projectIdentifier","required":false,"schema":{"type":"string"}},{"description":"Indicates whether optional commit information should be included in the response.","in":"query","name":"include_commit","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"The substring by which the branches are filtered.","in":"query","name":"query","required":false,"schema":{"type":"string"}},{"description":"The order of the output.","in":"query","name":"order","required":false,"schema":{"default":"asc","enum":["asc","desc"],"type":"string"}},{"description":"The data by which the branches are sorted.","in":"query","name":"sort","required":false,"schema":{"default":"name","enum":["name","date"],"type":"string"}},{"description":"The page to return.","in":"query","name":"page","required":false,"schema":{"default":1,"minimum":1,"type":"integer"}},{"description":"The maximum number of results to return.","in":"query","name":"limit","required":false,"schema":{"default":30,"maximum":100,"minimum":1,"type":"integer"}},{"description":"If true, the summary of check for the branch commit SHA would be included in the response.","in":"query","name":"include_checks","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"If true, a list of rules that apply to this branch would be included in the response.","in":"query","name":"include_rules","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"If true, a list of pull requests from the branch would be included in the response.","in":"query","name":"include_pullreqs","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"If true, merge queue info for the branch would be included in the response.","in":"query","name":"include_merge_queue","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"If greater than zero, branch divergence from the default branch will be included in the response. The divergence would be calculated up the this many commits.","in":"query","name":"max_divergence","required":false,"schema":{"default":0,"type":"integer"}},{"in":"path","name":"repo_identifier","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/TypesBranchExtended"},"type":"array"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Not Found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Internal Server Error"}},"summary":"List branches","tags":["repository"]}}}}
```

## POST /repos/{repo\_identifier}/branches

> Create branch

```json
{"openapi":"3.0.0","info":{"title":"API Specification","version":"1.111.0"},"servers":[{"url":"gateway/code/api/v1"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"scheme":"bearer","type":"http"}},"schemas":{"OpenapiCreateBranchRequest":{"properties":{"bypass_rules":{"type":"boolean"},"dry_run_rules":{"type":"boolean"},"name":{"type":"string"},"target":{"type":"string"}},"type":"object"},"TypesCreateBranchOutput":{"properties":{"commit":{"$ref":"#/components/schemas/TypesCommit"},"dry_run_rules":{"type":"boolean"},"name":{"type":"string"},"rule_violations":{"items":{"$ref":"#/components/schemas/TypesRuleViolations"},"type":"array"},"sha":{"$ref":"#/components/schemas/ShaSHA"}},"type":"object"},"TypesCommit":{"properties":{"author":{"$ref":"#/components/schemas/TypesSignature"},"committer":{"$ref":"#/components/schemas/TypesSignature"},"message":{"type":"string"},"parent_shas":{"items":{"$ref":"#/components/schemas/ShaSHA"},"type":"array"},"sha":{"$ref":"#/components/schemas/ShaSHA"},"signature":{"$ref":"#/components/schemas/TypesGitSignatureResult"},"stats":{"$ref":"#/components/schemas/TypesCommitStats"},"title":{"type":"string"}},"type":"object"},"TypesSignature":{"properties":{"identity":{"$ref":"#/components/schemas/TypesIdentity"},"when":{"format":"date-time","type":"string"}},"type":"object"},"TypesIdentity":{"properties":{"email":{"type":"string"},"name":{"type":"string"}},"type":"object"},"ShaSHA":{"description":"Git object hash","type":"string"},"TypesGitSignatureResult":{"nullable":true,"properties":{"created":{"type":"integer"},"key_fingerprint":{"type":"string"},"key_id":{"type":"string"},"key_scheme":{"$ref":"#/components/schemas/EnumPublicKeyScheme"},"result":{"$ref":"#/components/schemas/EnumGitSignatureResult"},"updated":{"type":"integer"}},"type":"object"},"EnumPublicKeyScheme":{"enum":["pgp","ssh"],"type":"string"},"EnumGitSignatureResult":{"enum":["bad","good","invalid","key_expired","revoked","unsupported","unverified"],"type":"string"},"TypesCommitStats":{"properties":{"files":{"items":{"$ref":"#/components/schemas/TypesCommitFileStats"},"type":"array"},"total":{"$ref":"#/components/schemas/TypesChangeStats"}},"type":"object"},"TypesCommitFileStats":{"properties":{"changes":{"type":"integer"},"deletions":{"type":"integer"},"insertions":{"type":"integer"},"old_path":{"type":"string"},"path":{"type":"string"},"status":{"$ref":"#/components/schemas/EnumFileDiffStatus"}},"type":"object"},"EnumFileDiffStatus":{"type":"string"},"TypesChangeStats":{"properties":{"changes":{"type":"integer"},"deletions":{"type":"integer"},"insertions":{"type":"integer"}},"type":"object"},"TypesRuleViolations":{"properties":{"bypassable":{"type":"boolean"},"bypassed":{"type":"boolean"},"rule":{"$ref":"#/components/schemas/TypesRuleInfo"},"violations":{"items":{"$ref":"#/components/schemas/TypesViolation"},"nullable":true,"type":"array"}},"type":"object"},"TypesRuleInfo":{"properties":{"identifier":{"type":"string"},"repo_path":{"type":"string"},"space_path":{"type":"string"},"state":{"$ref":"#/components/schemas/EnumRuleState"},"type":{"$ref":"#/components/schemas/EnumRuleType"}},"type":"object"},"EnumRuleState":{"enum":["active","disabled","monitor"],"nullable":true,"type":"string"},"EnumRuleType":{"enum":["branch","push","tag"],"type":"string"},"TypesViolation":{"properties":{"code":{"type":"string"},"message":{"type":"string"},"params":{"items":{},"nullable":true,"type":"array"}},"type":"object"},"UsererrorError":{"properties":{"message":{"type":"string"},"values":{"additionalProperties":{},"type":"object"}},"type":"object"},"TypesRulesViolations":{"properties":{"message":{"type":"string"},"violations":{"items":{"$ref":"#/components/schemas/TypesRuleViolations"},"nullable":true,"type":"array"}},"type":"object"}}},"paths":{"/repos/{repo_identifier}/branches":{"post":{"operationId":"createBranch","parameters":[{"description":"Account Identifier for the Entity.","in":"query","name":"accountIdentifier","required":true,"schema":{"type":"string"}},{"description":"Organization Identifier for the Entity.","in":"query","name":"orgIdentifier","required":false,"schema":{"type":"string"}},{"description":"Project Identifier for the Entity.","in":"query","name":"projectIdentifier","required":false,"schema":{"type":"string"}},{"in":"path","name":"repo_identifier","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenapiCreateBranchRequest"}}}},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TypesCreateBranchOutput"}}},"description":"Created"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Bad Request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Forbidden"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TypesRulesViolations"}}},"description":"Unprocessable Entity"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Internal Server Error"}},"summary":"Create branch","tags":["repository"]}}}}
```

## GET /repos/{repo\_identifier}/branches/{branch\_name}

> Get branch

```json
{"openapi":"3.0.0","info":{"title":"API Specification","version":"1.111.0"},"servers":[{"url":"gateway/code/api/v1"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"scheme":"bearer","type":"http"}},"schemas":{"TypesBranchExtended":{"properties":{"check_summary":{"$ref":"#/components/schemas/TypesCheckCountSummary"},"commit":{"$ref":"#/components/schemas/TypesCommit"},"commit_divergence":{"$ref":"#/components/schemas/TypesCommitDivergence"},"is_default":{"type":"boolean"},"merge_queue":{"$ref":"#/components/schemas/TypesMergeQueueBranchInfo"},"name":{"type":"string"},"pull_requests":{"items":{"$ref":"#/components/schemas/TypesPullReq"},"type":"array"},"rules":{"items":{"$ref":"#/components/schemas/TypesRuleInfo"},"type":"array"},"sha":{"$ref":"#/components/schemas/ShaSHA"}},"type":"object"},"TypesCheckCountSummary":{"properties":{"error":{"type":"integer"},"failure":{"type":"integer"},"failure_ignored":{"type":"integer"},"pending":{"type":"integer"},"running":{"type":"integer"},"success":{"type":"integer"}},"type":"object"},"TypesCommit":{"properties":{"author":{"$ref":"#/components/schemas/TypesSignature"},"committer":{"$ref":"#/components/schemas/TypesSignature"},"message":{"type":"string"},"parent_shas":{"items":{"$ref":"#/components/schemas/ShaSHA"},"type":"array"},"sha":{"$ref":"#/components/schemas/ShaSHA"},"signature":{"$ref":"#/components/schemas/TypesGitSignatureResult"},"stats":{"$ref":"#/components/schemas/TypesCommitStats"},"title":{"type":"string"}},"type":"object"},"TypesSignature":{"properties":{"identity":{"$ref":"#/components/schemas/TypesIdentity"},"when":{"format":"date-time","type":"string"}},"type":"object"},"TypesIdentity":{"properties":{"email":{"type":"string"},"name":{"type":"string"}},"type":"object"},"ShaSHA":{"description":"Git object hash","type":"string"},"TypesGitSignatureResult":{"nullable":true,"properties":{"created":{"type":"integer"},"key_fingerprint":{"type":"string"},"key_id":{"type":"string"},"key_scheme":{"$ref":"#/components/schemas/EnumPublicKeyScheme"},"result":{"$ref":"#/components/schemas/EnumGitSignatureResult"},"updated":{"type":"integer"}},"type":"object"},"EnumPublicKeyScheme":{"enum":["pgp","ssh"],"type":"string"},"EnumGitSignatureResult":{"enum":["bad","good","invalid","key_expired","revoked","unsupported","unverified"],"type":"string"},"TypesCommitStats":{"properties":{"files":{"items":{"$ref":"#/components/schemas/TypesCommitFileStats"},"type":"array"},"total":{"$ref":"#/components/schemas/TypesChangeStats"}},"type":"object"},"TypesCommitFileStats":{"properties":{"changes":{"type":"integer"},"deletions":{"type":"integer"},"insertions":{"type":"integer"},"old_path":{"type":"string"},"path":{"type":"string"},"status":{"$ref":"#/components/schemas/EnumFileDiffStatus"}},"type":"object"},"EnumFileDiffStatus":{"type":"string"},"TypesChangeStats":{"properties":{"changes":{"type":"integer"},"deletions":{"type":"integer"},"insertions":{"type":"integer"}},"type":"object"},"TypesCommitDivergence":{"properties":{"ahead":{"type":"integer"},"behind":{"type":"integer"}},"type":"object"},"TypesMergeQueueBranchInfo":{"properties":{"active":{"type":"boolean"}},"type":"object"},"TypesPullReq":{"properties":{"author":{"$ref":"#/components/schemas/TypesPrincipalInfo"},"check_summary":{"$ref":"#/components/schemas/TypesCheckCountSummary"},"closed":{"nullable":true,"type":"integer"},"created":{"type":"integer"},"description":{"type":"string"},"edited":{"type":"integer"},"is_draft":{"type":"boolean"},"labels":{"items":{"$ref":"#/components/schemas/TypesLabelPullReqAssignmentInfo"},"type":"array"},"merge_base_sha":{"type":"string"},"merge_check_status":{"$ref":"#/components/schemas/EnumMergeCheckStatus"},"merge_conflicts":{"items":{"type":"string"},"type":"array"},"merge_method":{"$ref":"#/components/schemas/EnumMergeMethod"},"merge_target_sha":{"nullable":true,"type":"string"},"merge_violations_bypassed":{"nullable":true,"type":"boolean"},"merged":{"nullable":true,"type":"integer"},"merger":{"$ref":"#/components/schemas/TypesPrincipalInfo"},"number":{"type":"integer"},"pullreq_type":{"$ref":"#/components/schemas/EnumPullReqType"},"rebase_check_status":{"$ref":"#/components/schemas/EnumMergeCheckStatus"},"rebase_conflicts":{"items":{"type":"string"},"type":"array"},"root_space_id":{"type":"integer"},"root_space_identifier":{"type":"string"},"rules":{"items":{"$ref":"#/components/schemas/TypesRuleInfo"},"type":"array"},"source_branch":{"type":"string"},"source_repo":{"$ref":"#/components/schemas/TypesRepositoryCore"},"source_repo_id":{"nullable":true,"type":"integer"},"source_sha":{"type":"string"},"state":{"$ref":"#/components/schemas/EnumPullReqState"},"stats":{"$ref":"#/components/schemas/TypesPullReqStats"},"substate":{"$ref":"#/components/schemas/EnumPullReqSubState"},"target_branch":{"type":"string"},"target_repo_id":{"type":"integer"},"title":{"type":"string"},"updated":{"type":"integer"}},"type":"object"},"TypesPrincipalInfo":{"nullable":true,"properties":{"created":{"type":"integer"},"display_name":{"type":"string"},"email":{"type":"string"},"id":{"type":"integer"},"type":{"$ref":"#/components/schemas/EnumPrincipalType"},"uid":{"type":"string"},"updated":{"type":"integer"}},"type":"object"},"EnumPrincipalType":{"enum":["service","serviceaccount","user"],"type":"string"},"TypesLabelPullReqAssignmentInfo":{"properties":{"color":{"$ref":"#/components/schemas/EnumLabelColor"},"id":{"type":"integer"},"key":{"type":"string"},"scope":{"type":"integer"},"value":{"nullable":true,"type":"string"},"value_color":{"$ref":"#/components/schemas/EnumLabelColor"},"value_count":{"type":"integer"},"value_id":{"nullable":true,"type":"integer"}},"type":"object"},"EnumLabelColor":{"enum":["blue","brown","cyan","green","indigo","lime","mint","orange","pink","purple","red","violet","yellow"],"type":"string"},"EnumMergeCheckStatus":{"type":"string"},"EnumMergeMethod":{"enum":["fast-forward","merge","rebase","squash"],"type":"string"},"EnumPullReqType":{"nullable":true,"type":"string"},"TypesRuleInfo":{"properties":{"identifier":{"type":"string"},"repo_path":{"type":"string"},"space_path":{"type":"string"},"state":{"$ref":"#/components/schemas/EnumRuleState"},"type":{"$ref":"#/components/schemas/EnumRuleType"}},"type":"object"},"EnumRuleState":{"enum":["active","disabled","monitor"],"nullable":true,"type":"string"},"EnumRuleType":{"enum":["branch","push","tag"],"type":"string"},"TypesRepositoryCore":{"properties":{"default_branch":{"type":"string"},"fork_id":{"type":"integer"},"id":{"type":"integer"},"identifier":{"type":"string"},"parent_id":{"type":"integer"},"path":{"type":"string"},"type":{"$ref":"#/components/schemas/EnumRepoType"}},"type":"object"},"EnumRepoType":{"type":"string"},"EnumPullReqState":{"enum":["closed","merged","open"],"type":"string"},"TypesPullReqStats":{"properties":{"additions":{"nullable":true,"type":"integer"},"commits":{"nullable":true,"type":"integer"},"conversations":{"type":"integer"},"deletions":{"nullable":true,"type":"integer"},"files_changed":{"nullable":true,"type":"integer"},"unresolved_count":{"type":"integer"}},"type":"object"},"EnumPullReqSubState":{"enum":["","auto_merge","merge_queue"],"type":"string"},"UsererrorError":{"properties":{"message":{"type":"string"},"values":{"additionalProperties":{},"type":"object"}},"type":"object"}}},"paths":{"/repos/{repo_identifier}/branches/{branch_name}":{"get":{"operationId":"getBranch","parameters":[{"description":"Account Identifier for the Entity.","in":"query","name":"accountIdentifier","required":true,"schema":{"type":"string"}},{"description":"Organization Identifier for the Entity.","in":"query","name":"orgIdentifier","required":false,"schema":{"type":"string"}},{"description":"Project Identifier for the Entity.","in":"query","name":"projectIdentifier","required":false,"schema":{"type":"string"}},{"description":"If true, the summary of check for the branch commit SHA would be included in the response.","in":"query","name":"include_checks","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"If true, a list of rules that apply to this branch would be included in the response.","in":"query","name":"include_rules","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"If true, a list of pull requests from the branch would be included in the response.","in":"query","name":"include_pullreqs","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"If true, merge queue info for the branch would be included in the response.","in":"query","name":"include_merge_queue","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"If greater than zero, branch divergence from the default branch will be included in the response. The divergence would be calculated up the this many commits.","in":"query","name":"max_divergence","required":false,"schema":{"default":0,"type":"integer"}},{"in":"path","name":"repo_identifier","required":true,"schema":{"type":"string"}},{"in":"path","name":"branch_name","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TypesBranchExtended"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Not Found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Internal Server Error"}},"summary":"Get branch","tags":["repository"]}}}}
```

## DELETE /repos/{repo\_identifier}/branches/{branch\_name}

> Delete branch

```json
{"openapi":"3.0.0","info":{"title":"API Specification","version":"1.111.0"},"servers":[{"url":"gateway/code/api/v1"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"scheme":"bearer","type":"http"}},"schemas":{"TypesDeleteBranchOutput":{"properties":{"dry_run_rules":{"type":"boolean"},"rule_violations":{"items":{"$ref":"#/components/schemas/TypesRuleViolations"},"type":"array"}},"type":"object"},"TypesRuleViolations":{"properties":{"bypassable":{"type":"boolean"},"bypassed":{"type":"boolean"},"rule":{"$ref":"#/components/schemas/TypesRuleInfo"},"violations":{"items":{"$ref":"#/components/schemas/TypesViolation"},"nullable":true,"type":"array"}},"type":"object"},"TypesRuleInfo":{"properties":{"identifier":{"type":"string"},"repo_path":{"type":"string"},"space_path":{"type":"string"},"state":{"$ref":"#/components/schemas/EnumRuleState"},"type":{"$ref":"#/components/schemas/EnumRuleType"}},"type":"object"},"EnumRuleState":{"enum":["active","disabled","monitor"],"nullable":true,"type":"string"},"EnumRuleType":{"enum":["branch","push","tag"],"type":"string"},"TypesViolation":{"properties":{"code":{"type":"string"},"message":{"type":"string"},"params":{"items":{},"nullable":true,"type":"array"}},"type":"object"},"UsererrorError":{"properties":{"message":{"type":"string"},"values":{"additionalProperties":{},"type":"object"}},"type":"object"},"TypesRulesViolations":{"properties":{"message":{"type":"string"},"violations":{"items":{"$ref":"#/components/schemas/TypesRuleViolations"},"nullable":true,"type":"array"}},"type":"object"}}},"paths":{"/repos/{repo_identifier}/branches/{branch_name}":{"delete":{"operationId":"deleteBranch","parameters":[{"description":"Account Identifier for the Entity.","in":"query","name":"accountIdentifier","required":true,"schema":{"type":"string"}},{"description":"Organization Identifier for the Entity.","in":"query","name":"orgIdentifier","required":false,"schema":{"type":"string"}},{"description":"Project Identifier for the Entity.","in":"query","name":"projectIdentifier","required":false,"schema":{"type":"string"}},{"description":"Bypass rule violations if possible.","in":"query","name":"bypass_rules","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Dry run rules for operations","in":"query","name":"dry_run_rules","required":false,"schema":{"default":false,"type":"boolean"}},{"in":"path","name":"repo_identifier","required":true,"schema":{"type":"string"}},{"in":"path","name":"branch_name","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TypesDeleteBranchOutput"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Not Found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TypesRulesViolations"}}},"description":"Unprocessable Entity"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Internal Server Error"}},"summary":"Delete branch","tags":["repository"]}}}}
```

## GET /repos/{repo\_identifier}/codeowners

> Get raw code owners file

```json
{"openapi":"3.0.0","info":{"title":"API Specification","version":"1.111.0"},"servers":[{"url":"gateway/code/api/v1"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"scheme":"bearer","type":"http"}},"schemas":{"UsererrorError":{"properties":{"message":{"type":"string"},"values":{"additionalProperties":{},"type":"object"}},"type":"object"}}},"paths":{"/repos/{repo_identifier}/codeowners":{"get":{"operationId":"codeOwnersRaw","parameters":[{"description":"Account Identifier for the Entity.","in":"query","name":"accountIdentifier","required":true,"schema":{"type":"string"}},{"description":"Organization Identifier for the Entity.","in":"query","name":"orgIdentifier","required":false,"schema":{"type":"string"}},{"description":"Project Identifier for the Entity.","in":"query","name":"projectIdentifier","required":false,"schema":{"type":"string"}},{"description":"The git reference (branch / tag / commitID) that will be used to retrieve the data. If no value is provided the default branch of the repository is used.","in":"query","name":"git_ref","required":false,"schema":{"default":"{Repository Default Branch}","type":"string"}},{"in":"path","name":"repo_identifier","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"text/plain":{"schema":{"type":"string"}}},"description":"OK"},"304":{"description":"Not Modified"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Not Found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Unprocessable Entity"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Internal Server Error"}},"summary":"Get raw code owners file","tags":["repository"]}}}}
```

## GET /repos/{repo\_identifier}/codeowners/validate

> Validate code owners file

```json
{"openapi":"3.0.0","info":{"title":"API Specification","version":"1.111.0"},"servers":[{"url":"gateway/code/api/v1"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"scheme":"bearer","type":"http"}},"schemas":{"UsererrorError":{"properties":{"message":{"type":"string"},"values":{"additionalProperties":{},"type":"object"}},"type":"object"}}},"paths":{"/repos/{repo_identifier}/codeowners/validate":{"get":{"operationId":"codeOwnersValidate","parameters":[{"description":"Account Identifier for the Entity.","in":"query","name":"accountIdentifier","required":true,"schema":{"type":"string"}},{"description":"Organization Identifier for the Entity.","in":"query","name":"orgIdentifier","required":false,"schema":{"type":"string"}},{"description":"Project Identifier for the Entity.","in":"query","name":"projectIdentifier","required":false,"schema":{"type":"string"}},{"description":"The git reference (branch / tag / commitID) that will be used to retrieve the data. If no value is provided the default branch of the repository is used.","in":"query","name":"git_ref","required":false,"schema":{"default":"{Repository Default Branch}","type":"string"}},{"in":"path","name":"repo_identifier","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Not Found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Unprocessable Entity"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Internal Server Error"}},"summary":"Validate code owners file","tags":["repository"]}}}}
```

## GET /repos/{repo\_identifier}/commits

> List commits

```json
{"openapi":"3.0.0","info":{"title":"API Specification","version":"1.111.0"},"servers":[{"url":"gateway/code/api/v1"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"scheme":"bearer","type":"http"}},"schemas":{"TypesListCommitResponse":{"properties":{"commits":{"items":{"$ref":"#/components/schemas/TypesCommit"},"nullable":true,"type":"array"},"rename_details":{"items":{"$ref":"#/components/schemas/TypesRenameDetails"},"nullable":true,"type":"array"},"total_commits":{"type":"integer"}},"type":"object"},"TypesCommit":{"properties":{"author":{"$ref":"#/components/schemas/TypesSignature"},"committer":{"$ref":"#/components/schemas/TypesSignature"},"message":{"type":"string"},"parent_shas":{"items":{"$ref":"#/components/schemas/ShaSHA"},"type":"array"},"sha":{"$ref":"#/components/schemas/ShaSHA"},"signature":{"$ref":"#/components/schemas/TypesGitSignatureResult"},"stats":{"$ref":"#/components/schemas/TypesCommitStats"},"title":{"type":"string"}},"type":"object"},"TypesSignature":{"properties":{"identity":{"$ref":"#/components/schemas/TypesIdentity"},"when":{"format":"date-time","type":"string"}},"type":"object"},"TypesIdentity":{"properties":{"email":{"type":"string"},"name":{"type":"string"}},"type":"object"},"ShaSHA":{"description":"Git object hash","type":"string"},"TypesGitSignatureResult":{"nullable":true,"properties":{"created":{"type":"integer"},"key_fingerprint":{"type":"string"},"key_id":{"type":"string"},"key_scheme":{"$ref":"#/components/schemas/EnumPublicKeyScheme"},"result":{"$ref":"#/components/schemas/EnumGitSignatureResult"},"updated":{"type":"integer"}},"type":"object"},"EnumPublicKeyScheme":{"enum":["pgp","ssh"],"type":"string"},"EnumGitSignatureResult":{"enum":["bad","good","invalid","key_expired","revoked","unsupported","unverified"],"type":"string"},"TypesCommitStats":{"properties":{"files":{"items":{"$ref":"#/components/schemas/TypesCommitFileStats"},"type":"array"},"total":{"$ref":"#/components/schemas/TypesChangeStats"}},"type":"object"},"TypesCommitFileStats":{"properties":{"changes":{"type":"integer"},"deletions":{"type":"integer"},"insertions":{"type":"integer"},"old_path":{"type":"string"},"path":{"type":"string"},"status":{"$ref":"#/components/schemas/EnumFileDiffStatus"}},"type":"object"},"EnumFileDiffStatus":{"type":"string"},"TypesChangeStats":{"properties":{"changes":{"type":"integer"},"deletions":{"type":"integer"},"insertions":{"type":"integer"}},"type":"object"},"TypesRenameDetails":{"properties":{"commit_sha_after":{"type":"string"},"commit_sha_before":{"type":"string"},"new_path":{"type":"string"},"old_path":{"type":"string"}},"type":"object"},"UsererrorError":{"properties":{"message":{"type":"string"},"values":{"additionalProperties":{},"type":"object"}},"type":"object"}}},"paths":{"/repos/{repo_identifier}/commits":{"get":{"operationId":"listCommits","parameters":[{"description":"Account Identifier for the Entity.","in":"query","name":"accountIdentifier","required":true,"schema":{"type":"string"}},{"description":"Organization Identifier for the Entity.","in":"query","name":"orgIdentifier","required":false,"schema":{"type":"string"}},{"description":"Project Identifier for the Entity.","in":"query","name":"projectIdentifier","required":false,"schema":{"type":"string"}},{"description":"The git reference (branch / tag / commitID) that will be used to retrieve the data. If no value is provided the default branch of the repository is used.","in":"query","name":"git_ref","required":false,"schema":{"default":"{Repository Default Branch}","type":"string"}},{"description":"The result should only contain commits that occurred after the provided reference.","in":"query","name":"after","required":false,"schema":{"type":"string"}},{"description":"Path for which commit information should be retrieved","in":"query","name":"path","required":false,"schema":{"default":"","type":"string"}},{"description":"Epoch timestamp since when commit information should be retrieved.","in":"query","name":"since","required":false,"schema":{"type":"integer"}},{"description":"Epoch timestamp until when commit information should be retrieved.","in":"query","name":"until","required":false,"schema":{"type":"integer"}},{"description":"Committer pattern for which commit information should be retrieved.","in":"query","name":"committer","required":false,"schema":{"type":"string"}},{"description":"Committer principal IDs list for which commit information should be retrieved.","explode":true,"in":"query","name":"committer_id","required":false,"schema":{"items":{"type":"integer"},"type":"array"},"style":"form"},{"description":"Author pattern for which commit information should be retrieved.","in":"query","name":"author","required":false,"schema":{"type":"string"}},{"description":"Author principal IDs for which commit information should be retrieved.","explode":true,"in":"query","name":"author_id","required":false,"schema":{"items":{"type":"integer"},"type":"array"},"style":"form"},{"description":"The page to return.","in":"query","name":"page","required":false,"schema":{"default":1,"minimum":1,"type":"integer"}},{"description":"The maximum number of results to return.","in":"query","name":"limit","required":false,"schema":{"default":30,"maximum":100,"minimum":1,"type":"integer"}},{"description":"Indicates whether optional stats should be included in the response.","in":"query","name":"include_stats","required":false,"schema":{"default":false,"type":"boolean"}},{"in":"path","name":"repo_identifier","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TypesListCommitResponse"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Not Found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Internal Server Error"}},"summary":"List commits","tags":["repository"]}}}}
```

## POST /repos/{repo\_identifier}/commits

> Commit files

```json
{"openapi":"3.0.0","info":{"title":"API Specification","version":"1.111.0"},"servers":[{"url":"gateway/code/api/v1"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"scheme":"bearer","type":"http"}},"schemas":{"OpenapiCommitFilesRequest":{"properties":{"actions":{"items":{"$ref":"#/components/schemas/RepoCommitFileAction"},"nullable":true,"type":"array"},"author":{"$ref":"#/components/schemas/GitIdentity"},"branch":{"type":"string"},"bypass_rules":{"type":"boolean"},"dry_run_rules":{"type":"boolean"},"message":{"type":"string"},"new_branch":{"type":"string"},"title":{"type":"string"}},"type":"object"},"RepoCommitFileAction":{"properties":{"action":{"$ref":"#/components/schemas/GitFileAction"},"encoding":{"$ref":"#/components/schemas/EnumContentEncodingType"},"path":{"type":"string"},"payload":{"type":"string"},"sha":{"$ref":"#/components/schemas/ShaSHA"}},"type":"object"},"GitFileAction":{"enum":["CREATE","UPDATE","DELETE","MOVE","PATCH_TEXT"],"type":"string"},"EnumContentEncodingType":{"enum":["base64","utf8"],"type":"string"},"ShaSHA":{"description":"Git object hash","type":"string"},"GitIdentity":{"nullable":true,"properties":{"email":{"type":"string"},"name":{"type":"string"}},"type":"object"},"TypesCommitFilesResponse":{"properties":{"changed_files":{"items":{"$ref":"#/components/schemas/TypesFileReference"},"nullable":true,"type":"array"},"commit_id":{"$ref":"#/components/schemas/ShaSHA"},"dry_run_rules":{"type":"boolean"},"rule_violations":{"items":{"$ref":"#/components/schemas/TypesRuleViolations"},"type":"array"}},"type":"object"},"TypesFileReference":{"properties":{"blob_sha":{"$ref":"#/components/schemas/ShaSHA"},"path":{"type":"string"}},"type":"object"},"TypesRuleViolations":{"properties":{"bypassable":{"type":"boolean"},"bypassed":{"type":"boolean"},"rule":{"$ref":"#/components/schemas/TypesRuleInfo"},"violations":{"items":{"$ref":"#/components/schemas/TypesViolation"},"nullable":true,"type":"array"}},"type":"object"},"TypesRuleInfo":{"properties":{"identifier":{"type":"string"},"repo_path":{"type":"string"},"space_path":{"type":"string"},"state":{"$ref":"#/components/schemas/EnumRuleState"},"type":{"$ref":"#/components/schemas/EnumRuleType"}},"type":"object"},"EnumRuleState":{"enum":["active","disabled","monitor"],"nullable":true,"type":"string"},"EnumRuleType":{"enum":["branch","push","tag"],"type":"string"},"TypesViolation":{"properties":{"code":{"type":"string"},"message":{"type":"string"},"params":{"items":{},"nullable":true,"type":"array"}},"type":"object"},"UsererrorError":{"properties":{"message":{"type":"string"},"values":{"additionalProperties":{},"type":"object"}},"type":"object"},"TypesRulesViolations":{"properties":{"message":{"type":"string"},"violations":{"items":{"$ref":"#/components/schemas/TypesRuleViolations"},"nullable":true,"type":"array"}},"type":"object"}}},"paths":{"/repos/{repo_identifier}/commits":{"post":{"operationId":"commitFiles","parameters":[{"description":"Account Identifier for the Entity.","in":"query","name":"accountIdentifier","required":true,"schema":{"type":"string"}},{"description":"Organization Identifier for the Entity.","in":"query","name":"orgIdentifier","required":false,"schema":{"type":"string"}},{"description":"Project Identifier for the Entity.","in":"query","name":"projectIdentifier","required":false,"schema":{"type":"string"}},{"in":"path","name":"repo_identifier","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenapiCommitFilesRequest"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TypesCommitFilesResponse"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Bad Request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Not Found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TypesRulesViolations"}}},"description":"Unprocessable Entity"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Internal Server Error"}},"summary":"Commit files","tags":["repository"]}}}}
```

## GET /repos/{repo\_identifier}/commits/{commit\_sha}

> Get commit

```json
{"openapi":"3.0.0","info":{"title":"API Specification","version":"1.111.0"},"servers":[{"url":"gateway/code/api/v1"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"scheme":"bearer","type":"http"}},"schemas":{"TypesCommit":{"properties":{"author":{"$ref":"#/components/schemas/TypesSignature"},"committer":{"$ref":"#/components/schemas/TypesSignature"},"message":{"type":"string"},"parent_shas":{"items":{"$ref":"#/components/schemas/ShaSHA"},"type":"array"},"sha":{"$ref":"#/components/schemas/ShaSHA"},"signature":{"$ref":"#/components/schemas/TypesGitSignatureResult"},"stats":{"$ref":"#/components/schemas/TypesCommitStats"},"title":{"type":"string"}},"type":"object"},"TypesSignature":{"properties":{"identity":{"$ref":"#/components/schemas/TypesIdentity"},"when":{"format":"date-time","type":"string"}},"type":"object"},"TypesIdentity":{"properties":{"email":{"type":"string"},"name":{"type":"string"}},"type":"object"},"ShaSHA":{"description":"Git object hash","type":"string"},"TypesGitSignatureResult":{"nullable":true,"properties":{"created":{"type":"integer"},"key_fingerprint":{"type":"string"},"key_id":{"type":"string"},"key_scheme":{"$ref":"#/components/schemas/EnumPublicKeyScheme"},"result":{"$ref":"#/components/schemas/EnumGitSignatureResult"},"updated":{"type":"integer"}},"type":"object"},"EnumPublicKeyScheme":{"enum":["pgp","ssh"],"type":"string"},"EnumGitSignatureResult":{"enum":["bad","good","invalid","key_expired","revoked","unsupported","unverified"],"type":"string"},"TypesCommitStats":{"properties":{"files":{"items":{"$ref":"#/components/schemas/TypesCommitFileStats"},"type":"array"},"total":{"$ref":"#/components/schemas/TypesChangeStats"}},"type":"object"},"TypesCommitFileStats":{"properties":{"changes":{"type":"integer"},"deletions":{"type":"integer"},"insertions":{"type":"integer"},"old_path":{"type":"string"},"path":{"type":"string"},"status":{"$ref":"#/components/schemas/EnumFileDiffStatus"}},"type":"object"},"EnumFileDiffStatus":{"type":"string"},"TypesChangeStats":{"properties":{"changes":{"type":"integer"},"deletions":{"type":"integer"},"insertions":{"type":"integer"}},"type":"object"},"UsererrorError":{"properties":{"message":{"type":"string"},"values":{"additionalProperties":{},"type":"object"}},"type":"object"}}},"paths":{"/repos/{repo_identifier}/commits/{commit_sha}":{"get":{"operationId":"getCommit","parameters":[{"description":"Account Identifier for the Entity.","in":"query","name":"accountIdentifier","required":true,"schema":{"type":"string"}},{"description":"Organization Identifier for the Entity.","in":"query","name":"orgIdentifier","required":false,"schema":{"type":"string"}},{"description":"Project Identifier for the Entity.","in":"query","name":"projectIdentifier","required":false,"schema":{"type":"string"}},{"in":"path","name":"repo_identifier","required":true,"schema":{"type":"string"}},{"in":"path","name":"commit_sha","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TypesCommit"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Not Found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Internal Server Error"}},"summary":"Get commit","tags":["repository"]}}}}
```

## GET /repos/{repo\_identifier}/commits/{commit\_sha}/diff

> Get raw git diff of a commit

```json
{"openapi":"3.0.0","info":{"title":"API Specification","version":"1.111.0"},"servers":[{"url":"gateway/code/api/v1"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"scheme":"bearer","type":"http"}},"schemas":{"UsererrorError":{"properties":{"message":{"type":"string"},"values":{"additionalProperties":{},"type":"object"}},"type":"object"}}},"paths":{"/repos/{repo_identifier}/commits/{commit_sha}/diff":{"get":{"operationId":"getCommitDiff","parameters":[{"description":"Account Identifier for the Entity.","in":"query","name":"accountIdentifier","required":true,"schema":{"type":"string"}},{"description":"Organization Identifier for the Entity.","in":"query","name":"orgIdentifier","required":false,"schema":{"type":"string"}},{"description":"Project Identifier for the Entity.","in":"query","name":"projectIdentifier","required":false,"schema":{"type":"string"}},{"in":"path","name":"repo_identifier","required":true,"schema":{"type":"string"}},{"in":"path","name":"commit_sha","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"text/plain":{"schema":{"type":"string"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Not Found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Internal Server Error"}},"summary":"Get raw git diff of a commit","tags":["repository"]}}}}
```

## POST /repos/{repo\_identifier}/commits/calculate-divergence

> Get commit divergence

```json
{"openapi":"3.0.0","info":{"title":"API Specification","version":"1.111.0"},"servers":[{"url":"gateway/code/api/v1"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"scheme":"bearer","type":"http"}},"schemas":{"OpenapiCalculateCommitDivergenceRequest":{"properties":{"max_count":{"type":"integer"},"requests":{"items":{"$ref":"#/components/schemas/RepoCommitDivergenceRequest"},"nullable":true,"type":"array"}},"type":"object"},"RepoCommitDivergenceRequest":{"properties":{"from":{"type":"string"},"to":{"type":"string"}},"type":"object"},"TypesCommitDivergence":{"properties":{"ahead":{"type":"integer"},"behind":{"type":"integer"}},"type":"object"},"UsererrorError":{"properties":{"message":{"type":"string"},"values":{"additionalProperties":{},"type":"object"}},"type":"object"}}},"paths":{"/repos/{repo_identifier}/commits/calculate-divergence":{"post":{"operationId":"calculateCommitDivergence","parameters":[{"description":"Account Identifier for the Entity.","in":"query","name":"accountIdentifier","required":true,"schema":{"type":"string"}},{"description":"Organization Identifier for the Entity.","in":"query","name":"orgIdentifier","required":false,"schema":{"type":"string"}},{"description":"Project Identifier for the Entity.","in":"query","name":"projectIdentifier","required":false,"schema":{"type":"string"}},{"in":"path","name":"repo_identifier","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenapiCalculateCommitDivergenceRequest"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/TypesCommitDivergence"},"type":"array"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Not Found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Internal Server Error"}},"summary":"Get commit divergence","tags":["repository"]}}}}
```

## GET /repos/{repo\_identifier}/content/{path}

> Get content of a file

```json
{"openapi":"3.0.0","info":{"title":"API Specification","version":"1.111.0"},"servers":[{"url":"gateway/code/api/v1"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"scheme":"bearer","type":"http"}},"schemas":{"OpenapiGetContentOutput":{"properties":{"content":{"$ref":"#/components/schemas/OpenapiContent"},"latest_commit":{"$ref":"#/components/schemas/TypesCommit"},"name":{"type":"string"},"path":{"type":"string"},"sha":{"type":"string"},"type":{"$ref":"#/components/schemas/OpenapiContentType"}},"type":"object"},"OpenapiContent":{"oneOf":[{"$ref":"#/components/schemas/RepoFileContent"},{"$ref":"#/components/schemas/OpenapiDirContent"},{"$ref":"#/components/schemas/RepoSymlinkContent"},{"$ref":"#/components/schemas/RepoSubmoduleContent"}],"type":"object"},"RepoFileContent":{"properties":{"data":{"type":"string"},"data_size":{"type":"integer"},"encoding":{"$ref":"#/components/schemas/EnumContentEncodingType"},"lfs_object_id":{"type":"string"},"lfs_object_size":{"type":"integer"},"size":{"type":"integer"}},"type":"object"},"EnumContentEncodingType":{"enum":["base64","utf8"],"type":"string"},"OpenapiDirContent":{"properties":{"entries":{"items":{"$ref":"#/components/schemas/OpenapiContentInfo"},"nullable":true,"type":"array"}},"type":"object"},"OpenapiContentInfo":{"properties":{"latest_commit":{"$ref":"#/components/schemas/TypesCommit"},"name":{"type":"string"},"path":{"type":"string"},"sha":{"type":"string"},"type":{"$ref":"#/components/schemas/OpenapiContentType"}},"type":"object"},"TypesCommit":{"properties":{"author":{"$ref":"#/components/schemas/TypesSignature"},"committer":{"$ref":"#/components/schemas/TypesSignature"},"message":{"type":"string"},"parent_shas":{"items":{"$ref":"#/components/schemas/ShaSHA"},"type":"array"},"sha":{"$ref":"#/components/schemas/ShaSHA"},"signature":{"$ref":"#/components/schemas/TypesGitSignatureResult"},"stats":{"$ref":"#/components/schemas/TypesCommitStats"},"title":{"type":"string"}},"type":"object"},"TypesSignature":{"properties":{"identity":{"$ref":"#/components/schemas/TypesIdentity"},"when":{"format":"date-time","type":"string"}},"type":"object"},"TypesIdentity":{"properties":{"email":{"type":"string"},"name":{"type":"string"}},"type":"object"},"ShaSHA":{"description":"Git object hash","type":"string"},"TypesGitSignatureResult":{"nullable":true,"properties":{"created":{"type":"integer"},"key_fingerprint":{"type":"string"},"key_id":{"type":"string"},"key_scheme":{"$ref":"#/components/schemas/EnumPublicKeyScheme"},"result":{"$ref":"#/components/schemas/EnumGitSignatureResult"},"updated":{"type":"integer"}},"type":"object"},"EnumPublicKeyScheme":{"enum":["pgp","ssh"],"type":"string"},"EnumGitSignatureResult":{"enum":["bad","good","invalid","key_expired","revoked","unsupported","unverified"],"type":"string"},"TypesCommitStats":{"properties":{"files":{"items":{"$ref":"#/components/schemas/TypesCommitFileStats"},"type":"array"},"total":{"$ref":"#/components/schemas/TypesChangeStats"}},"type":"object"},"TypesCommitFileStats":{"properties":{"changes":{"type":"integer"},"deletions":{"type":"integer"},"insertions":{"type":"integer"},"old_path":{"type":"string"},"path":{"type":"string"},"status":{"$ref":"#/components/schemas/EnumFileDiffStatus"}},"type":"object"},"EnumFileDiffStatus":{"type":"string"},"TypesChangeStats":{"properties":{"changes":{"type":"integer"},"deletions":{"type":"integer"},"insertions":{"type":"integer"}},"type":"object"},"OpenapiContentType":{"enum":["file","dir","symlink","submodule"],"type":"string"},"RepoSymlinkContent":{"properties":{"size":{"type":"integer"},"target":{"type":"string"}},"type":"object"},"RepoSubmoduleContent":{"properties":{"commit_sha":{"type":"string"},"url":{"type":"string"}},"type":"object"},"UsererrorError":{"properties":{"message":{"type":"string"},"values":{"additionalProperties":{},"type":"object"}},"type":"object"}}},"paths":{"/repos/{repo_identifier}/content/{path}":{"get":{"operationId":"getContent","parameters":[{"description":"Account Identifier for the Entity.","in":"query","name":"accountIdentifier","required":true,"schema":{"type":"string"}},{"description":"Organization Identifier for the Entity.","in":"query","name":"orgIdentifier","required":false,"schema":{"type":"string"}},{"description":"Project Identifier for the Entity.","in":"query","name":"projectIdentifier","required":false,"schema":{"type":"string"}},{"description":"The git reference (branch / tag / commitID) that will be used to retrieve the data. If no value is provided the default branch of the repository is used.","in":"query","name":"git_ref","required":false,"schema":{"default":"{Repository Default Branch}","type":"string"}},{"description":"Indicates whether optional commit information should be included in the response.","in":"query","name":"include_commit","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Flatten directories that contain just one subdirectory.","in":"query","name":"flatten_directories","required":false,"schema":{"default":false,"type":"boolean"}},{"in":"path","name":"repo_identifier","required":true,"schema":{"type":"string"}},{"in":"path","name":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenapiGetContentOutput"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Not Found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Internal Server Error"}},"summary":"Get content of a file","tags":["repository"]}}}}
```

## POST /repos/{repo\_identifier}/default-branch

> Update default branch

```json
{"openapi":"3.0.0","info":{"title":"API Specification","version":"1.111.0"},"servers":[{"url":"gateway/code/api/v1"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"scheme":"bearer","type":"http"}},"schemas":{"OpenapiUpdateDefaultBranchRequest":{"properties":{"name":{"type":"string"}},"type":"object"},"RepoRepositoryOutput":{"properties":{"archived":{"type":"boolean"},"created":{"type":"integer"},"created_by":{"type":"integer"},"default_branch":{"type":"string"},"deleted":{"nullable":true,"type":"integer"},"description":{"type":"string"},"fork_id":{"type":"integer"},"git_ssh_url":{"type":"string"},"git_url":{"type":"string"},"id":{"type":"integer"},"identifier":{"type":"string"},"import_failed":{"type":"boolean"},"importing":{"type":"boolean"},"is_empty":{"type":"boolean"},"is_favorite":{"type":"boolean"},"is_public":{"type":"boolean"},"language":{"type":"string"},"last_git_push":{"type":"integer"},"loc":{"description":"source lines of code on the default branch","type":"integer"},"num_closed_pulls":{"type":"integer"},"num_forks":{"type":"integer"},"num_merged_pulls":{"type":"integer"},"num_open_pulls":{"type":"integer"},"num_pulls":{"type":"integer"},"parent_id":{"type":"integer"},"path":{"type":"string"},"repo_type":{"$ref":"#/components/schemas/EnumRepoType"},"root_space_id":{"type":"integer"},"root_space_identifier":{"type":"string"},"size":{"description":"size of the repository in KiB","type":"integer"},"size_lfs":{"description":"size of the repository LFS in KiB","type":"integer"},"size_updated":{"type":"integer"},"state":{"$ref":"#/components/schemas/EnumRepoState"},"tags":{},"updated":{"type":"integer"},"upstream":{"$ref":"#/components/schemas/TypesRepositoryCore"}},"type":"object"},"EnumRepoType":{"type":"string"},"EnumRepoState":{"nullable":true,"type":"integer"},"TypesRepositoryCore":{"properties":{"default_branch":{"type":"string"},"fork_id":{"type":"integer"},"id":{"type":"integer"},"identifier":{"type":"string"},"parent_id":{"type":"integer"},"path":{"type":"string"},"type":{"$ref":"#/components/schemas/EnumRepoType"}},"type":"object"},"UsererrorError":{"properties":{"message":{"type":"string"},"values":{"additionalProperties":{},"type":"object"}},"type":"object"}}},"paths":{"/repos/{repo_identifier}/default-branch":{"post":{"operationId":"updateDefaultBranch","parameters":[{"description":"Account Identifier for the Entity.","in":"query","name":"accountIdentifier","required":true,"schema":{"type":"string"}},{"description":"Organization Identifier for the Entity.","in":"query","name":"orgIdentifier","required":false,"schema":{"type":"string"}},{"description":"Project Identifier for the Entity.","in":"query","name":"projectIdentifier","required":false,"schema":{"type":"string"}},{"in":"path","name":"repo_identifier","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenapiUpdateDefaultBranchRequest"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RepoRepositoryOutput"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Bad Request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Not Found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Internal Server Error"}},"summary":"Update default branch","tags":["repository"]}}}}
```

## GET /repos/{repo\_identifier}/diff-stats/{range}

> Get diff stats

```json
{"openapi":"3.0.0","info":{"title":"API Specification","version":"1.111.0"},"servers":[{"url":"gateway/code/api/v1"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"scheme":"bearer","type":"http"}},"schemas":{"TypesDiffStats":{"properties":{"additions":{"nullable":true,"type":"integer"},"commits":{"nullable":true,"type":"integer"},"deletions":{"nullable":true,"type":"integer"},"files_changed":{"nullable":true,"type":"integer"}},"type":"object"},"UsererrorError":{"properties":{"message":{"type":"string"},"values":{"additionalProperties":{},"type":"object"}},"type":"object"}}},"paths":{"/repos/{repo_identifier}/diff-stats/{range}":{"get":{"operationId":"diffStats","parameters":[{"description":"Account Identifier for the Entity.","in":"query","name":"accountIdentifier","required":true,"schema":{"type":"string"}},{"description":"Organization Identifier for the Entity.","in":"query","name":"orgIdentifier","required":false,"schema":{"type":"string"}},{"description":"Project Identifier for the Entity.","in":"query","name":"projectIdentifier","required":false,"schema":{"type":"string"}},{"description":"provide path for diff operation","in":"query","name":"path","schema":{"description":"provide path for diff operation","items":{"type":"string"},"type":"array"}},{"in":"path","name":"repo_identifier","required":true,"schema":{"type":"string"}},{"in":"path","name":"range","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TypesDiffStats"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Forbidden"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Internal Server Error"}},"summary":"Get diff stats","tags":["repository"]}}}}
```

## GET /repos/{repo\_identifier}/diff/{range}

> Get raw diff

```json
{"openapi":"3.0.0","info":{"title":"API Specification","version":"1.111.0"},"servers":[{"url":"gateway/code/api/v1"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"scheme":"bearer","type":"http"}},"schemas":{"GitFileDiff":{"properties":{"additions":{"type":"integer"},"changes":{"type":"integer"},"deletions":{"type":"integer"},"is_binary":{"type":"boolean"},"is_submodule":{"type":"boolean"},"old_path":{"type":"string"},"old_sha":{"type":"string"},"patch":{"items":{"minimum":0,"type":"integer"},"type":"array"},"path":{"type":"string"},"sha":{"type":"string"},"status":{"$ref":"#/components/schemas/EnumFileDiffStatus"}},"type":"object"},"EnumFileDiffStatus":{"type":"string"},"UsererrorError":{"properties":{"message":{"type":"string"},"values":{"additionalProperties":{},"type":"object"}},"type":"object"}}},"paths":{"/repos/{repo_identifier}/diff/{range}":{"get":{"operationId":"rawDiff","parameters":[{"description":"Account Identifier for the Entity.","in":"query","name":"accountIdentifier","required":true,"schema":{"type":"string"}},{"description":"Organization Identifier for the Entity.","in":"query","name":"orgIdentifier","required":false,"schema":{"type":"string"}},{"description":"Project Identifier for the Entity.","in":"query","name":"projectIdentifier","required":false,"schema":{"type":"string"}},{"description":"provide path for diff operation","in":"query","name":"path","schema":{"description":"provide path for diff operation","items":{"type":"string"},"type":"array"}},{"in":"path","name":"repo_identifier","required":true,"schema":{"type":"string"}},{"in":"path","name":"range","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/GitFileDiff"},"type":"array"}},"text/plain":{"schema":{"type":"string"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Forbidden"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Internal Server Error"}},"summary":"Get raw diff","tags":["repository"]}}}}
```

## POST /repos/{repo\_identifier}/diff/{range}

> Get raw diff

```json
{"openapi":"3.0.0","info":{"title":"API Specification","version":"1.111.0"},"servers":[{"url":"gateway/code/api/v1"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"scheme":"bearer","type":"http"}},"schemas":{"OpenapiPostRawDiffRequest":{"items":{"$ref":"#/components/schemas/ApiFileDiffRequest"},"nullable":true,"type":"array"},"ApiFileDiffRequest":{"properties":{"path":{"type":"string"},"start_line":{"type":"integer"}},"type":"object"},"GitFileDiff":{"properties":{"additions":{"type":"integer"},"changes":{"type":"integer"},"deletions":{"type":"integer"},"is_binary":{"type":"boolean"},"is_submodule":{"type":"boolean"},"old_path":{"type":"string"},"old_sha":{"type":"string"},"patch":{"items":{"minimum":0,"type":"integer"},"type":"array"},"path":{"type":"string"},"sha":{"type":"string"},"status":{"$ref":"#/components/schemas/EnumFileDiffStatus"}},"type":"object"},"EnumFileDiffStatus":{"type":"string"},"UsererrorError":{"properties":{"message":{"type":"string"},"values":{"additionalProperties":{},"type":"object"}},"type":"object"}}},"paths":{"/repos/{repo_identifier}/diff/{range}":{"post":{"operationId":"rawDiffPost","parameters":[{"description":"Account Identifier for the Entity.","in":"query","name":"accountIdentifier","required":true,"schema":{"type":"string"}},{"description":"Organization Identifier for the Entity.","in":"query","name":"orgIdentifier","required":false,"schema":{"type":"string"}},{"description":"Project Identifier for the Entity.","in":"query","name":"projectIdentifier","required":false,"schema":{"type":"string"}},{"in":"path","name":"repo_identifier","required":true,"schema":{"type":"string"}},{"in":"path","name":"range","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenapiPostRawDiffRequest"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/GitFileDiff"},"type":"array"}},"text/plain":{"schema":{"type":"string"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Forbidden"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Internal Server Error"}},"summary":"Get raw diff","tags":["repository"]}}}}
```

## POST /repos/{repo\_identifier}/fork

>

```json
{"openapi":"3.0.0","info":{"title":"API Specification","version":"1.111.0"},"servers":[{"url":"gateway/code/api/v1"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"scheme":"bearer","type":"http"}},"schemas":{"RepoRepositoryOutput":{"properties":{"archived":{"type":"boolean"},"created":{"type":"integer"},"created_by":{"type":"integer"},"default_branch":{"type":"string"},"deleted":{"nullable":true,"type":"integer"},"description":{"type":"string"},"fork_id":{"type":"integer"},"git_ssh_url":{"type":"string"},"git_url":{"type":"string"},"id":{"type":"integer"},"identifier":{"type":"string"},"import_failed":{"type":"boolean"},"importing":{"type":"boolean"},"is_empty":{"type":"boolean"},"is_favorite":{"type":"boolean"},"is_public":{"type":"boolean"},"language":{"type":"string"},"last_git_push":{"type":"integer"},"loc":{"description":"source lines of code on the default branch","type":"integer"},"num_closed_pulls":{"type":"integer"},"num_forks":{"type":"integer"},"num_merged_pulls":{"type":"integer"},"num_open_pulls":{"type":"integer"},"num_pulls":{"type":"integer"},"parent_id":{"type":"integer"},"path":{"type":"string"},"repo_type":{"$ref":"#/components/schemas/EnumRepoType"},"root_space_id":{"type":"integer"},"root_space_identifier":{"type":"string"},"size":{"description":"size of the repository in KiB","type":"integer"},"size_lfs":{"description":"size of the repository LFS in KiB","type":"integer"},"size_updated":{"type":"integer"},"state":{"$ref":"#/components/schemas/EnumRepoState"},"tags":{},"updated":{"type":"integer"},"upstream":{"$ref":"#/components/schemas/TypesRepositoryCore"}},"type":"object"},"EnumRepoType":{"type":"string"},"EnumRepoState":{"nullable":true,"type":"integer"},"TypesRepositoryCore":{"properties":{"default_branch":{"type":"string"},"fork_id":{"type":"integer"},"id":{"type":"integer"},"identifier":{"type":"string"},"parent_id":{"type":"integer"},"path":{"type":"string"},"type":{"$ref":"#/components/schemas/EnumRepoType"}},"type":"object"},"UsererrorError":{"properties":{"message":{"type":"string"},"values":{"additionalProperties":{},"type":"object"}},"type":"object"}}},"paths":{"/repos/{repo_identifier}/fork":{"post":{"operationId":"forkCreate","parameters":[{"description":"Account Identifier for the Entity.","in":"query","name":"accountIdentifier","required":true,"schema":{"type":"string"}},{"description":"Organization Identifier for the Entity.","in":"query","name":"orgIdentifier","required":false,"schema":{"type":"string"}},{"description":"Project Identifier for the Entity.","in":"query","name":"projectIdentifier","required":false,"schema":{"type":"string"}},{"in":"path","name":"repo_identifier","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"fork_branch":{"type":"string"},"identifier":{"type":"string"},"parent_ref":{"type":"string"}},"type":"object"}}}},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RepoRepositoryOutput"}}},"description":"Created"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Bad Request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Not Found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Internal Server Error"}},"tags":["repository"]}}}}
```

## POST /repos/{repo\_identifier}/fork-sync

>

```json
{"openapi":"3.0.0","info":{"title":"API Specification","version":"1.111.0"},"servers":[{"url":"gateway/code/api/v1"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"scheme":"bearer","type":"http"}},"schemas":{"ShaSHA":{"description":"Git object hash","type":"string"},"TypesForkSyncOutput":{"properties":{"already_ancestor":{"type":"boolean"},"new_commit_sha":{"$ref":"#/components/schemas/ShaSHA"}},"type":"object"},"UsererrorError":{"properties":{"message":{"type":"string"},"values":{"additionalProperties":{},"type":"object"}},"type":"object"},"TypesForkSyncConflict":{"properties":{"conflict_files":{"items":{"type":"string"},"nullable":true,"type":"array"},"message":{"type":"string"}},"type":"object"}}},"paths":{"/repos/{repo_identifier}/fork-sync":{"post":{"operationId":"forkSyncBranch","parameters":[{"description":"Account Identifier for the Entity.","in":"query","name":"accountIdentifier","required":true,"schema":{"type":"string"}},{"description":"Organization Identifier for the Entity.","in":"query","name":"orgIdentifier","required":false,"schema":{"type":"string"}},{"description":"Project Identifier for the Entity.","in":"query","name":"projectIdentifier","required":false,"schema":{"type":"string"}},{"in":"path","name":"repo_identifier","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"branch":{"type":"string"},"branch_commit_sha":{"$ref":"#/components/schemas/ShaSHA"},"branch_upstream":{"type":"string"}},"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TypesForkSyncOutput"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Bad Request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Not Found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TypesForkSyncConflict"}}},"description":"Conflict"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Internal Server Error"}},"tags":["repository"]}}}}
```

## GET /repos/{repo\_identifier}/languages

> Get repository language statistics

```json
{"openapi":"3.0.0","info":{"title":"API Specification","version":"1.111.0"},"servers":[{"url":"gateway/code/api/v1"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"scheme":"bearer","type":"http"}},"schemas":{"TypesRepoLangStat":{"type":"object"},"UsererrorError":{"properties":{"message":{"type":"string"},"values":{"additionalProperties":{},"type":"object"}},"type":"object"}}},"paths":{"/repos/{repo_identifier}/languages":{"get":{"operationId":"getRepoLanguages","parameters":[{"description":"Account Identifier for the Entity.","in":"query","name":"accountIdentifier","required":true,"schema":{"type":"string"}},{"description":"Organization Identifier for the Entity.","in":"query","name":"orgIdentifier","required":false,"schema":{"type":"string"}},{"description":"Project Identifier for the Entity.","in":"query","name":"projectIdentifier","required":false,"schema":{"type":"string"}},{"in":"path","name":"repo_identifier","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/TypesRepoLangStat"},"type":"array"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Not Found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Internal Server Error"}},"summary":"Get repository language statistics","tags":["repository"]}}}}
```

## GET /repos/{repo\_identifier}/linked/source

>

```json
{"openapi":"3.0.0","info":{"title":"API Specification","version":"1.111.0"},"servers":[{"url":"gateway/code/api/v1"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"scheme":"bearer","type":"http"}},"schemas":{"RepoLinkedSourceOutput":{"properties":{"url":{"type":"string"}},"type":"object"},"UsererrorError":{"properties":{"message":{"type":"string"},"values":{"additionalProperties":{},"type":"object"}},"type":"object"}}},"paths":{"/repos/{repo_identifier}/linked/source":{"get":{"operationId":"getLinkedSource","parameters":[{"description":"Account Identifier for the Entity.","in":"query","name":"accountIdentifier","required":true,"schema":{"type":"string"}},{"description":"Organization Identifier for the Entity.","in":"query","name":"orgIdentifier","required":false,"schema":{"type":"string"}},{"description":"Project Identifier for the Entity.","in":"query","name":"projectIdentifier","required":false,"schema":{"type":"string"}},{"in":"path","name":"repo_identifier","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RepoLinkedSourceOutput"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Bad Request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Not Found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Internal Server Error"}},"tags":["repository"]}}}}
```

## POST /repos/{repo\_identifier}/linked/sync

>

```json
{"openapi":"3.0.0","info":{"title":"API Specification","version":"1.111.0"},"servers":[{"url":"gateway/code/api/v1"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"scheme":"bearer","type":"http"}},"schemas":{"RepoLinkedSyncOutput":{"properties":{"branches":{"items":{"$ref":"#/components/schemas/HookReferenceUpdate"},"nullable":true,"type":"array"}},"type":"object"},"HookReferenceUpdate":{"properties":{"new":{"$ref":"#/components/schemas/ShaSHA"},"old":{"$ref":"#/components/schemas/ShaSHA"},"ref":{"type":"string"}},"type":"object"},"ShaSHA":{"description":"Git object hash","type":"string"},"UsererrorError":{"properties":{"message":{"type":"string"},"values":{"additionalProperties":{},"type":"object"}},"type":"object"}}},"paths":{"/repos/{repo_identifier}/linked/sync":{"post":{"operationId":"linkedSync","parameters":[{"description":"Account Identifier for the Entity.","in":"query","name":"accountIdentifier","required":true,"schema":{"type":"string"}},{"description":"Organization Identifier for the Entity.","in":"query","name":"orgIdentifier","required":false,"schema":{"type":"string"}},{"description":"Project Identifier for the Entity.","in":"query","name":"projectIdentifier","required":false,"schema":{"type":"string"}},{"in":"path","name":"repo_identifier","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"branches":{"items":{"type":"string"},"nullable":true,"type":"array"}},"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RepoLinkedSyncOutput"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Bad Request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Not Found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Internal Server Error"}},"tags":["repository"]}}}}
```

## POST /repos/{repo\_identifier}/merge-check/{range}

> Check mergeability

```json
{"openapi":"3.0.0","info":{"title":"API Specification","version":"1.111.0"},"servers":[{"url":"gateway/code/api/v1"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"scheme":"bearer","type":"http"}},"schemas":{"RepoMergeCheck":{"properties":{"conflict_files":{"items":{"type":"string"},"type":"array"},"mergeable":{"type":"boolean"}},"type":"object"},"UsererrorError":{"properties":{"message":{"type":"string"},"values":{"additionalProperties":{},"type":"object"}},"type":"object"}}},"paths":{"/repos/{repo_identifier}/merge-check/{range}":{"post":{"operationId":"mergeCheck","parameters":[{"description":"Account Identifier for the Entity.","in":"query","name":"accountIdentifier","required":true,"schema":{"type":"string"}},{"description":"Organization Identifier for the Entity.","in":"query","name":"orgIdentifier","required":false,"schema":{"type":"string"}},{"description":"Project Identifier for the Entity.","in":"query","name":"projectIdentifier","required":false,"schema":{"type":"string"}},{"description":"provide path for diff operation","in":"query","name":"path","schema":{"description":"provide path for diff operation","items":{"type":"string"},"type":"array"}},{"in":"path","name":"repo_identifier","required":true,"schema":{"type":"string"}},{"in":"path","name":"range","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RepoMergeCheck"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Forbidden"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Internal Server Error"}},"summary":"Check mergeability","tags":["repository"]}}}}
```

## POST /repos/{repo\_identifier}/merge-commit

> Creates a merge commit on the head branch with changes from the base

```json
{"openapi":"3.0.0","info":{"title":"API Specification","version":"1.111.0"},"servers":[{"url":"gateway/code/api/v1"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"scheme":"bearer","type":"http"}},"schemas":{"ShaSHA":{"description":"Git object hash","type":"string"},"TypesMergeCommitResponse":{"properties":{"already_ancestor":{"type":"boolean"},"conflict_files":{"items":{"type":"string"},"type":"array"},"dry_run":{"type":"boolean"},"dry_run_rules":{"type":"boolean"},"new_head_branch_sha":{"$ref":"#/components/schemas/ShaSHA"},"rule_violations":{"items":{"$ref":"#/components/schemas/TypesRuleViolations"},"type":"array"}},"type":"object"},"TypesRuleViolations":{"properties":{"bypassable":{"type":"boolean"},"bypassed":{"type":"boolean"},"rule":{"$ref":"#/components/schemas/TypesRuleInfo"},"violations":{"items":{"$ref":"#/components/schemas/TypesViolation"},"nullable":true,"type":"array"}},"type":"object"},"TypesRuleInfo":{"properties":{"identifier":{"type":"string"},"repo_path":{"type":"string"},"space_path":{"type":"string"},"state":{"$ref":"#/components/schemas/EnumRuleState"},"type":{"$ref":"#/components/schemas/EnumRuleType"}},"type":"object"},"EnumRuleState":{"enum":["active","disabled","monitor"],"nullable":true,"type":"string"},"EnumRuleType":{"enum":["branch","push","tag"],"type":"string"},"TypesViolation":{"properties":{"code":{"type":"string"},"message":{"type":"string"},"params":{"items":{},"nullable":true,"type":"array"}},"type":"object"},"UsererrorError":{"properties":{"message":{"type":"string"},"values":{"additionalProperties":{},"type":"object"}},"type":"object"},"TypesMergeViolations":{"properties":{"conflict_files":{"items":{"type":"string"},"type":"array"},"message":{"type":"string"},"rule_violations":{"items":{"$ref":"#/components/schemas/TypesRuleViolations"},"type":"array"}},"type":"object"}}},"paths":{"/repos/{repo_identifier}/merge-commit":{"post":{"operationId":"mergeCommit","parameters":[{"description":"Account Identifier for the Entity.","in":"query","name":"accountIdentifier","required":true,"schema":{"type":"string"}},{"description":"Organization Identifier for the Entity.","in":"query","name":"orgIdentifier","required":false,"schema":{"type":"string"}},{"description":"Project Identifier for the Entity.","in":"query","name":"projectIdentifier","required":false,"schema":{"type":"string"}},{"in":"path","name":"repo_identifier","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"base_branch":{"type":"string"},"base_commit_sha":{"$ref":"#/components/schemas/ShaSHA"},"bypass_rules":{"type":"boolean"},"dry_run":{"type":"boolean"},"dry_run_rules":{"type":"boolean"},"head_branch":{"type":"string"},"head_commit_sha":{"$ref":"#/components/schemas/ShaSHA"},"message":{"type":"string"},"title":{"type":"string"}},"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TypesMergeCommitResponse"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Bad Request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Not Found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TypesMergeViolations"}}},"description":"Unprocessable Entity"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Internal Server Error"}},"summary":"Creates a merge commit on the head branch with changes from the base","tags":["repository"]}}}}
```

## GET /repos/{repo\_identifier}/mergequeue/{branch\_name}

>

```json
{"openapi":"3.0.0","info":{"title":"API Specification","version":"1.111.0"},"servers":[{"url":"gateway/code/api/v1"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"scheme":"bearer","type":"http"}},"schemas":{"RepoMergeQueueFullInfo":{"properties":{"active":{"type":"boolean"},"entries":{"items":{"$ref":"#/components/schemas/TypesMergeQueueListItem"},"nullable":true,"type":"array"},"setup":{"$ref":"#/components/schemas/ProtectionMergeQueueSetup"}},"type":"object"},"TypesMergeQueueListItem":{"properties":{"merge_queue_info":{"$ref":"#/components/schemas/TypesMergeQueueInfo"},"pull_request":{"$ref":"#/components/schemas/TypesPullReq"}},"type":"object"},"TypesMergeQueueInfo":{"nullable":true,"properties":{"checks":{"items":{"$ref":"#/components/schemas/TypesPullReqCheck"},"nullable":true,"type":"array"},"checks_commit_sha":{"$ref":"#/components/schemas/ShaSHA"},"merge_commit_sha":{"$ref":"#/components/schemas/ShaSHA"},"merge_method":{"$ref":"#/components/schemas/EnumMergeMethod"},"pull_requests_ahead":{"type":"integer"},"state":{"$ref":"#/components/schemas/EnumMergeQueueEntryState"}},"type":"object"},"TypesPullReqCheck":{"properties":{"bypassable":{"type":"boolean"},"check":{"$ref":"#/components/schemas/TypesCheck"},"required":{"type":"boolean"}},"type":"object"},"TypesCheck":{"properties":{"bypassed_by":{"$ref":"#/components/schemas/TypesPrincipalInfo"},"created":{"type":"integer"},"ended":{"type":"integer"},"id":{"type":"integer"},"identifier":{"type":"string"},"link":{"type":"string"},"metadata":{},"payload":{"$ref":"#/components/schemas/TypesCheckPayload"},"reported_by":{"$ref":"#/components/schemas/TypesPrincipalInfo"},"started":{"type":"integer"},"status":{"$ref":"#/components/schemas/EnumCheckStatus"},"summary":{"type":"string"},"updated":{"type":"integer"}},"type":"object"},"TypesPrincipalInfo":{"nullable":true,"properties":{"created":{"type":"integer"},"display_name":{"type":"string"},"email":{"type":"string"},"id":{"type":"integer"},"type":{"$ref":"#/components/schemas/EnumPrincipalType"},"uid":{"type":"string"},"updated":{"type":"integer"}},"type":"object"},"EnumPrincipalType":{"enum":["service","serviceaccount","user"],"type":"string"},"TypesCheckPayload":{"properties":{"data":{},"kind":{"$ref":"#/components/schemas/EnumCheckPayloadKind"},"version":{"type":"string"}},"type":"object"},"EnumCheckPayloadKind":{"enum":["","markdown","pipeline","raw"],"type":"string"},"EnumCheckStatus":{"enum":["error","failure","failure_ignored","pending","running","success"],"type":"string"},"ShaSHA":{"description":"Git object hash","type":"string"},"EnumMergeMethod":{"enum":["fast-forward","merge","rebase","squash"],"type":"string"},"EnumMergeQueueEntryState":{"enum":["checks_in_progress","checks_pending","merge_group","merge_pending"],"type":"string"},"TypesPullReq":{"properties":{"author":{"$ref":"#/components/schemas/TypesPrincipalInfo"},"check_summary":{"$ref":"#/components/schemas/TypesCheckCountSummary"},"closed":{"nullable":true,"type":"integer"},"created":{"type":"integer"},"description":{"type":"string"},"edited":{"type":"integer"},"is_draft":{"type":"boolean"},"labels":{"items":{"$ref":"#/components/schemas/TypesLabelPullReqAssignmentInfo"},"type":"array"},"merge_base_sha":{"type":"string"},"merge_check_status":{"$ref":"#/components/schemas/EnumMergeCheckStatus"},"merge_conflicts":{"items":{"type":"string"},"type":"array"},"merge_method":{"$ref":"#/components/schemas/EnumMergeMethod"},"merge_target_sha":{"nullable":true,"type":"string"},"merge_violations_bypassed":{"nullable":true,"type":"boolean"},"merged":{"nullable":true,"type":"integer"},"merger":{"$ref":"#/components/schemas/TypesPrincipalInfo"},"number":{"type":"integer"},"pullreq_type":{"$ref":"#/components/schemas/EnumPullReqType"},"rebase_check_status":{"$ref":"#/components/schemas/EnumMergeCheckStatus"},"rebase_conflicts":{"items":{"type":"string"},"type":"array"},"root_space_id":{"type":"integer"},"root_space_identifier":{"type":"string"},"rules":{"items":{"$ref":"#/components/schemas/TypesRuleInfo"},"type":"array"},"source_branch":{"type":"string"},"source_repo":{"$ref":"#/components/schemas/TypesRepositoryCore"},"source_repo_id":{"nullable":true,"type":"integer"},"source_sha":{"type":"string"},"state":{"$ref":"#/components/schemas/EnumPullReqState"},"stats":{"$ref":"#/components/schemas/TypesPullReqStats"},"substate":{"$ref":"#/components/schemas/EnumPullReqSubState"},"target_branch":{"type":"string"},"target_repo_id":{"type":"integer"},"title":{"type":"string"},"updated":{"type":"integer"}},"type":"object"},"TypesCheckCountSummary":{"properties":{"error":{"type":"integer"},"failure":{"type":"integer"},"failure_ignored":{"type":"integer"},"pending":{"type":"integer"},"running":{"type":"integer"},"success":{"type":"integer"}},"type":"object"},"TypesLabelPullReqAssignmentInfo":{"properties":{"color":{"$ref":"#/components/schemas/EnumLabelColor"},"id":{"type":"integer"},"key":{"type":"string"},"scope":{"type":"integer"},"value":{"nullable":true,"type":"string"},"value_color":{"$ref":"#/components/schemas/EnumLabelColor"},"value_count":{"type":"integer"},"value_id":{"nullable":true,"type":"integer"}},"type":"object"},"EnumLabelColor":{"enum":["blue","brown","cyan","green","indigo","lime","mint","orange","pink","purple","red","violet","yellow"],"type":"string"},"EnumMergeCheckStatus":{"type":"string"},"EnumPullReqType":{"nullable":true,"type":"string"},"TypesRuleInfo":{"properties":{"identifier":{"type":"string"},"repo_path":{"type":"string"},"space_path":{"type":"string"},"state":{"$ref":"#/components/schemas/EnumRuleState"},"type":{"$ref":"#/components/schemas/EnumRuleType"}},"type":"object"},"EnumRuleState":{"enum":["active","disabled","monitor"],"nullable":true,"type":"string"},"EnumRuleType":{"enum":["branch","push","tag"],"type":"string"},"TypesRepositoryCore":{"properties":{"default_branch":{"type":"string"},"fork_id":{"type":"integer"},"id":{"type":"integer"},"identifier":{"type":"string"},"parent_id":{"type":"integer"},"path":{"type":"string"},"type":{"$ref":"#/components/schemas/EnumRepoType"}},"type":"object"},"EnumRepoType":{"type":"string"},"EnumPullReqState":{"enum":["closed","merged","open"],"type":"string"},"TypesPullReqStats":{"properties":{"additions":{"nullable":true,"type":"integer"},"commits":{"nullable":true,"type":"integer"},"conversations":{"type":"integer"},"deletions":{"nullable":true,"type":"integer"},"files_changed":{"nullable":true,"type":"integer"},"unresolved_count":{"type":"integer"}},"type":"object"},"EnumPullReqSubState":{"enum":["","auto_merge","merge_queue"],"type":"string"},"ProtectionMergeQueueSetup":{"properties":{"checks_concurrency":{"type":"integer"},"group_size":{"type":"integer"},"max_check_duration_seconds":{"type":"integer"},"required_checks":{"items":{"type":"string"},"nullable":true,"type":"array"}},"type":"object"},"UsererrorError":{"properties":{"message":{"type":"string"},"values":{"additionalProperties":{},"type":"object"}},"type":"object"}}},"paths":{"/repos/{repo_identifier}/mergequeue/{branch_name}":{"get":{"operationId":"mergeQueueListEntries","parameters":[{"description":"Account Identifier for the Entity.","in":"query","name":"accountIdentifier","required":true,"schema":{"type":"string"}},{"description":"Organization Identifier for the Entity.","in":"query","name":"orgIdentifier","required":false,"schema":{"type":"string"}},{"description":"Project Identifier for the Entity.","in":"query","name":"projectIdentifier","required":false,"schema":{"type":"string"}},{"in":"path","name":"repo_identifier","required":true,"schema":{"type":"string"}},{"in":"path","name":"branch_name","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RepoMergeQueueFullInfo"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Bad Request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Not Found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Internal Server Error"}},"tags":["repository"]}}}}
```

## DELETE /repos/{repo\_identifier}/mergequeue/{branch\_name}

>

```json
{"openapi":"3.0.0","info":{"title":"API Specification","version":"1.111.0"},"servers":[{"url":"gateway/code/api/v1"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"scheme":"bearer","type":"http"}},"schemas":{"UsererrorError":{"properties":{"message":{"type":"string"},"values":{"additionalProperties":{},"type":"object"}},"type":"object"}}},"paths":{"/repos/{repo_identifier}/mergequeue/{branch_name}":{"delete":{"operationId":"mergeQueueClear","parameters":[{"description":"Account Identifier for the Entity.","in":"query","name":"accountIdentifier","required":true,"schema":{"type":"string"}},{"description":"Organization Identifier for the Entity.","in":"query","name":"orgIdentifier","required":false,"schema":{"type":"string"}},{"description":"Project Identifier for the Entity.","in":"query","name":"projectIdentifier","required":false,"schema":{"type":"string"}},{"in":"path","name":"repo_identifier","required":true,"schema":{"type":"string"}},{"in":"path","name":"branch_name","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"No Content"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Bad Request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Not Found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Internal Server Error"}},"tags":["repository"]}}}}
```

## POST /repos/{repo\_identifier}/path-details

> Get commit details

```json
{"openapi":"3.0.0","info":{"title":"API Specification","version":"1.111.0"},"servers":[{"url":"gateway/code/api/v1"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"scheme":"bearer","type":"http"}},"schemas":{"OpenapiPathsDetailsRequest":{"properties":{"paths":{"items":{"type":"string"},"nullable":true,"type":"array"}},"type":"object"},"RepoPathsDetailsOutput":{"properties":{"details":{"items":{"$ref":"#/components/schemas/TypesPathDetails"},"nullable":true,"type":"array"}},"type":"object"},"TypesPathDetails":{"properties":{"last_commit":{"$ref":"#/components/schemas/TypesCommit"},"path":{"type":"string"}},"type":"object"},"TypesCommit":{"properties":{"author":{"$ref":"#/components/schemas/TypesSignature"},"committer":{"$ref":"#/components/schemas/TypesSignature"},"message":{"type":"string"},"parent_shas":{"items":{"$ref":"#/components/schemas/ShaSHA"},"type":"array"},"sha":{"$ref":"#/components/schemas/ShaSHA"},"signature":{"$ref":"#/components/schemas/TypesGitSignatureResult"},"stats":{"$ref":"#/components/schemas/TypesCommitStats"},"title":{"type":"string"}},"type":"object"},"TypesSignature":{"properties":{"identity":{"$ref":"#/components/schemas/TypesIdentity"},"when":{"format":"date-time","type":"string"}},"type":"object"},"TypesIdentity":{"properties":{"email":{"type":"string"},"name":{"type":"string"}},"type":"object"},"ShaSHA":{"description":"Git object hash","type":"string"},"TypesGitSignatureResult":{"nullable":true,"properties":{"created":{"type":"integer"},"key_fingerprint":{"type":"string"},"key_id":{"type":"string"},"key_scheme":{"$ref":"#/components/schemas/EnumPublicKeyScheme"},"result":{"$ref":"#/components/schemas/EnumGitSignatureResult"},"updated":{"type":"integer"}},"type":"object"},"EnumPublicKeyScheme":{"enum":["pgp","ssh"],"type":"string"},"EnumGitSignatureResult":{"enum":["bad","good","invalid","key_expired","revoked","unsupported","unverified"],"type":"string"},"TypesCommitStats":{"properties":{"files":{"items":{"$ref":"#/components/schemas/TypesCommitFileStats"},"type":"array"},"total":{"$ref":"#/components/schemas/TypesChangeStats"}},"type":"object"},"TypesCommitFileStats":{"properties":{"changes":{"type":"integer"},"deletions":{"type":"integer"},"insertions":{"type":"integer"},"old_path":{"type":"string"},"path":{"type":"string"},"status":{"$ref":"#/components/schemas/EnumFileDiffStatus"}},"type":"object"},"EnumFileDiffStatus":{"type":"string"},"TypesChangeStats":{"properties":{"changes":{"type":"integer"},"deletions":{"type":"integer"},"insertions":{"type":"integer"}},"type":"object"},"UsererrorError":{"properties":{"message":{"type":"string"},"values":{"additionalProperties":{},"type":"object"}},"type":"object"}}},"paths":{"/repos/{repo_identifier}/path-details":{"post":{"operationId":"pathDetails","parameters":[{"description":"Account Identifier for the Entity.","in":"query","name":"accountIdentifier","required":true,"schema":{"type":"string"}},{"description":"Organization Identifier for the Entity.","in":"query","name":"orgIdentifier","required":false,"schema":{"type":"string"}},{"description":"Project Identifier for the Entity.","in":"query","name":"projectIdentifier","required":false,"schema":{"type":"string"}},{"description":"The git reference (branch / tag / commitID) that will be used to retrieve the data. If no value is provided the default branch of the repository is used.","in":"query","name":"git_ref","required":false,"schema":{"default":"{Repository Default Branch}","type":"string"}},{"in":"path","name":"repo_identifier","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenapiPathsDetailsRequest"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RepoPathsDetailsOutput"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Not Found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Internal Server Error"}},"summary":"Get commit details","tags":["repository"]}}}}
```

## GET /repos/{repo\_identifier}/paths

> List all paths

```json
{"openapi":"3.0.0","info":{"title":"API Specification","version":"1.111.0"},"servers":[{"url":"gateway/code/api/v1"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"scheme":"bearer","type":"http"}},"schemas":{"RepoListPathsOutput":{"properties":{"directories":{"items":{"type":"string"},"type":"array"},"files":{"items":{"type":"string"},"type":"array"}},"type":"object"},"UsererrorError":{"properties":{"message":{"type":"string"},"values":{"additionalProperties":{},"type":"object"}},"type":"object"}}},"paths":{"/repos/{repo_identifier}/paths":{"get":{"operationId":"listPaths","parameters":[{"description":"Account Identifier for the Entity.","in":"query","name":"accountIdentifier","required":true,"schema":{"type":"string"}},{"description":"Organization Identifier for the Entity.","in":"query","name":"orgIdentifier","required":false,"schema":{"type":"string"}},{"description":"Project Identifier for the Entity.","in":"query","name":"projectIdentifier","required":false,"schema":{"type":"string"}},{"description":"The git reference (branch / tag / commitID) that will be used to retrieve the data. If no value is provided the default branch of the repository is used.","in":"query","name":"git_ref","required":false,"schema":{"default":"{Repository Default Branch}","type":"string"}},{"description":"Indicates whether directories should be included in the response.","in":"query","name":"include_directories","required":false,"schema":{"default":false,"type":"boolean"}},{"in":"path","name":"repo_identifier","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RepoListPathsOutput"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Not Found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Internal Server Error"}},"summary":"List all paths","tags":["repository"]}}}}
```

## POST /repos/{repo\_identifier}/purge

> Purge repository

```json
{"openapi":"3.0.0","info":{"title":"API Specification","version":"1.111.0"},"servers":[{"url":"gateway/code/api/v1"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"scheme":"bearer","type":"http"}},"schemas":{"UsererrorError":{"properties":{"message":{"type":"string"},"values":{"additionalProperties":{},"type":"object"}},"type":"object"}}},"paths":{"/repos/{repo_identifier}/purge":{"post":{"operationId":"purgeRepository","parameters":[{"description":"Account Identifier for the Entity.","in":"query","name":"accountIdentifier","required":true,"schema":{"type":"string"}},{"description":"Organization Identifier for the Entity.","in":"query","name":"orgIdentifier","required":false,"schema":{"type":"string"}},{"description":"Project Identifier for the Entity.","in":"query","name":"projectIdentifier","required":false,"schema":{"type":"string"}},{"description":"The exact time the resource was delete at in epoch format.","in":"query","name":"deleted_at","required":true,"schema":{"type":"integer"}},{"in":"path","name":"repo_identifier","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"No Content"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Not Found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Internal Server Error"}},"summary":"Purge repository","tags":["repository"]}}}}
```

## GET /repos/{repo\_identifier}/raw/{path}

> Get raw file content

```json
{"openapi":"3.0.0","info":{"title":"API Specification","version":"1.111.0"},"servers":[{"url":"gateway/code/api/v1"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"scheme":"bearer","type":"http"}},"schemas":{"UsererrorError":{"properties":{"message":{"type":"string"},"values":{"additionalProperties":{},"type":"object"}},"type":"object"}}},"paths":{"/repos/{repo_identifier}/raw/{path}":{"get":{"operationId":"getRaw","parameters":[{"description":"Account Identifier for the Entity.","in":"query","name":"accountIdentifier","required":true,"schema":{"type":"string"}},{"description":"Organization Identifier for the Entity.","in":"query","name":"orgIdentifier","required":false,"schema":{"type":"string"}},{"description":"Project Identifier for the Entity.","in":"query","name":"projectIdentifier","required":false,"schema":{"type":"string"}},{"description":"The git reference (branch / tag / commitID) that will be used to retrieve the data. If no value is provided the default branch of the repository is used.","in":"query","name":"git_ref","required":false,"schema":{"default":"{Repository Default Branch}","type":"string"}},{"in":"path","name":"repo_identifier","required":true,"schema":{"type":"string"}},{"in":"path","name":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Not Found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Internal Server Error"}},"summary":"Get raw file content","tags":["repository"]}}}}
```

## POST /repos/{repo\_identifier}/rebase

> Rebase a branch relative to another branch or a commit

```json
{"openapi":"3.0.0","info":{"title":"API Specification","version":"1.111.0"},"servers":[{"url":"gateway/code/api/v1"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"scheme":"bearer","type":"http"}},"schemas":{"ShaSHA":{"description":"Git object hash","type":"string"},"TypesRebaseResponse":{"properties":{"already_ancestor":{"type":"boolean"},"conflict_files":{"items":{"type":"string"},"type":"array"},"dry_run":{"type":"boolean"},"dry_run_rules":{"type":"boolean"},"new_head_branch_sha":{"$ref":"#/components/schemas/ShaSHA"},"rule_violations":{"items":{"$ref":"#/components/schemas/TypesRuleViolations"},"type":"array"}},"type":"object"},"TypesRuleViolations":{"properties":{"bypassable":{"type":"boolean"},"bypassed":{"type":"boolean"},"rule":{"$ref":"#/components/schemas/TypesRuleInfo"},"violations":{"items":{"$ref":"#/components/schemas/TypesViolation"},"nullable":true,"type":"array"}},"type":"object"},"TypesRuleInfo":{"properties":{"identifier":{"type":"string"},"repo_path":{"type":"string"},"space_path":{"type":"string"},"state":{"$ref":"#/components/schemas/EnumRuleState"},"type":{"$ref":"#/components/schemas/EnumRuleType"}},"type":"object"},"EnumRuleState":{"enum":["active","disabled","monitor"],"nullable":true,"type":"string"},"EnumRuleType":{"enum":["branch","push","tag"],"type":"string"},"TypesViolation":{"properties":{"code":{"type":"string"},"message":{"type":"string"},"params":{"items":{},"nullable":true,"type":"array"}},"type":"object"},"UsererrorError":{"properties":{"message":{"type":"string"},"values":{"additionalProperties":{},"type":"object"}},"type":"object"},"TypesMergeViolations":{"properties":{"conflict_files":{"items":{"type":"string"},"type":"array"},"message":{"type":"string"},"rule_violations":{"items":{"$ref":"#/components/schemas/TypesRuleViolations"},"type":"array"}},"type":"object"}}},"paths":{"/repos/{repo_identifier}/rebase":{"post":{"operationId":"rebaseBranch","parameters":[{"description":"Account Identifier for the Entity.","in":"query","name":"accountIdentifier","required":true,"schema":{"type":"string"}},{"description":"Organization Identifier for the Entity.","in":"query","name":"orgIdentifier","required":false,"schema":{"type":"string"}},{"description":"Project Identifier for the Entity.","in":"query","name":"projectIdentifier","required":false,"schema":{"type":"string"}},{"in":"path","name":"repo_identifier","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"base_branch":{"type":"string"},"base_commit_sha":{"$ref":"#/components/schemas/ShaSHA"},"bypass_rules":{"type":"boolean"},"dry_run":{"type":"boolean"},"dry_run_rules":{"type":"boolean"},"head_branch":{"type":"string"},"head_commit_sha":{"$ref":"#/components/schemas/ShaSHA"}},"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TypesRebaseResponse"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Bad Request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Not Found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TypesMergeViolations"}}},"description":"Unprocessable Entity"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Internal Server Error"}},"summary":"Rebase a branch relative to another branch or a commit","tags":["repository"]}}}}
```

## POST /repos/{repo\_identifier}/restore

> Restore repository

```json
{"openapi":"3.0.0","info":{"title":"API Specification","version":"1.111.0"},"servers":[{"url":"gateway/code/api/v1"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"scheme":"bearer","type":"http"}},"schemas":{"OpenapiRestoreRequest":{"properties":{"new_identifier":{"nullable":true,"type":"string"},"new_parent_ref":{"nullable":true,"type":"string"}},"type":"object"},"RepoRepositoryOutput":{"properties":{"archived":{"type":"boolean"},"created":{"type":"integer"},"created_by":{"type":"integer"},"default_branch":{"type":"string"},"deleted":{"nullable":true,"type":"integer"},"description":{"type":"string"},"fork_id":{"type":"integer"},"git_ssh_url":{"type":"string"},"git_url":{"type":"string"},"id":{"type":"integer"},"identifier":{"type":"string"},"import_failed":{"type":"boolean"},"importing":{"type":"boolean"},"is_empty":{"type":"boolean"},"is_favorite":{"type":"boolean"},"is_public":{"type":"boolean"},"language":{"type":"string"},"last_git_push":{"type":"integer"},"loc":{"description":"source lines of code on the default branch","type":"integer"},"num_closed_pulls":{"type":"integer"},"num_forks":{"type":"integer"},"num_merged_pulls":{"type":"integer"},"num_open_pulls":{"type":"integer"},"num_pulls":{"type":"integer"},"parent_id":{"type":"integer"},"path":{"type":"string"},"repo_type":{"$ref":"#/components/schemas/EnumRepoType"},"root_space_id":{"type":"integer"},"root_space_identifier":{"type":"string"},"size":{"description":"size of the repository in KiB","type":"integer"},"size_lfs":{"description":"size of the repository LFS in KiB","type":"integer"},"size_updated":{"type":"integer"},"state":{"$ref":"#/components/schemas/EnumRepoState"},"tags":{},"updated":{"type":"integer"},"upstream":{"$ref":"#/components/schemas/TypesRepositoryCore"}},"type":"object"},"EnumRepoType":{"type":"string"},"EnumRepoState":{"nullable":true,"type":"integer"},"TypesRepositoryCore":{"properties":{"default_branch":{"type":"string"},"fork_id":{"type":"integer"},"id":{"type":"integer"},"identifier":{"type":"string"},"parent_id":{"type":"integer"},"path":{"type":"string"},"type":{"$ref":"#/components/schemas/EnumRepoType"}},"type":"object"},"UsererrorError":{"properties":{"message":{"type":"string"},"values":{"additionalProperties":{},"type":"object"}},"type":"object"}}},"paths":{"/repos/{repo_identifier}/restore":{"post":{"operationId":"restoreRepository","parameters":[{"description":"Account Identifier for the Entity.","in":"query","name":"accountIdentifier","required":true,"schema":{"type":"string"}},{"description":"Organization Identifier for the Entity.","in":"query","name":"orgIdentifier","required":false,"schema":{"type":"string"}},{"description":"Project Identifier for the Entity.","in":"query","name":"projectIdentifier","required":false,"schema":{"type":"string"}},{"description":"The exact time the resource was delete at in epoch format.","in":"query","name":"deleted_at","required":true,"schema":{"type":"integer"}},{"in":"path","name":"repo_identifier","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenapiRestoreRequest"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RepoRepositoryOutput"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Bad Request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Not Found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Internal Server Error"}},"summary":"Restore repository","tags":["repository"]}}}}
```

## GET /repos/{repo\_identifier}/settings/general

> Get general settings

```json
{"openapi":"3.0.0","info":{"title":"API Specification","version":"1.111.0"},"servers":[{"url":"gateway/code/api/v1"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"scheme":"bearer","type":"http"}},"schemas":{"SettingsGeneralSettings":{"properties":{"auto_merge_enabled":{"nullable":true,"type":"boolean"},"file_size_limit":{"description":"file size limit in bytes","nullable":true,"type":"integer"},"git_lfs_enabled":{"nullable":true,"type":"boolean"}},"type":"object"},"UsererrorError":{"properties":{"message":{"type":"string"},"values":{"additionalProperties":{},"type":"object"}},"type":"object"}}},"paths":{"/repos/{repo_identifier}/settings/general":{"get":{"operationId":"findGeneralSettings","parameters":[{"description":"Account Identifier for the Entity.","in":"query","name":"accountIdentifier","required":true,"schema":{"type":"string"}},{"description":"Organization Identifier for the Entity.","in":"query","name":"orgIdentifier","required":false,"schema":{"type":"string"}},{"description":"Project Identifier for the Entity.","in":"query","name":"projectIdentifier","required":false,"schema":{"type":"string"}},{"in":"path","name":"repo_identifier","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SettingsGeneralSettings"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Bad Request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Not Found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Internal Server Error"}},"summary":"Get general settings","tags":["repository"]}}}}
```

## PATCH /repos/{repo\_identifier}/settings/general

> Update general settings

```json
{"openapi":"3.0.0","info":{"title":"API Specification","version":"1.111.0"},"servers":[{"url":"gateway/code/api/v1"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"scheme":"bearer","type":"http"}},"schemas":{"OpenapiGeneralSettingsRequest":{"properties":{"auto_merge_enabled":{"nullable":true,"type":"boolean"},"file_size_limit":{"description":"file size limit in bytes","nullable":true,"type":"integer"},"git_lfs_enabled":{"nullable":true,"type":"boolean"}},"type":"object"},"SettingsGeneralSettings":{"properties":{"auto_merge_enabled":{"nullable":true,"type":"boolean"},"file_size_limit":{"description":"file size limit in bytes","nullable":true,"type":"integer"},"git_lfs_enabled":{"nullable":true,"type":"boolean"}},"type":"object"},"UsererrorError":{"properties":{"message":{"type":"string"},"values":{"additionalProperties":{},"type":"object"}},"type":"object"}}},"paths":{"/repos/{repo_identifier}/settings/general":{"patch":{"operationId":"updateGeneralSettings","parameters":[{"description":"Account Identifier for the Entity.","in":"query","name":"accountIdentifier","required":true,"schema":{"type":"string"}},{"description":"Organization Identifier for the Entity.","in":"query","name":"orgIdentifier","required":false,"schema":{"type":"string"}},{"description":"Project Identifier for the Entity.","in":"query","name":"projectIdentifier","required":false,"schema":{"type":"string"}},{"in":"path","name":"repo_identifier","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenapiGeneralSettingsRequest"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SettingsGeneralSettings"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Bad Request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Not Found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Internal Server Error"}},"summary":"Update general settings","tags":["repository"]}}}}
```

## GET /repos/{repo\_identifier}/settings/security

> Get security settings

```json
{"openapi":"3.0.0","info":{"title":"API Specification","version":"1.111.0"},"servers":[{"url":"gateway/code/api/v1"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"scheme":"bearer","type":"http"}},"schemas":{"SettingsSecuritySettings":{"properties":{"principal_committer_match":{"nullable":true,"type":"boolean"},"secret_scanning_enabled":{"nullable":true,"type":"boolean"},"vulnerability_scanning_mode":{"$ref":"#/components/schemas/SettingsVulnerabilityScanningMode"}},"type":"object"},"SettingsVulnerabilityScanningMode":{"enum":["disabled","detect","block","strict"],"nullable":true,"type":"string"},"UsererrorError":{"properties":{"message":{"type":"string"},"values":{"additionalProperties":{},"type":"object"}},"type":"object"}}},"paths":{"/repos/{repo_identifier}/settings/security":{"get":{"operationId":"findSecuritySettings","parameters":[{"description":"Account Identifier for the Entity.","in":"query","name":"accountIdentifier","required":true,"schema":{"type":"string"}},{"description":"Organization Identifier for the Entity.","in":"query","name":"orgIdentifier","required":false,"schema":{"type":"string"}},{"description":"Project Identifier for the Entity.","in":"query","name":"projectIdentifier","required":false,"schema":{"type":"string"}},{"in":"path","name":"repo_identifier","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SettingsSecuritySettings"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Bad Request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Not Found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Internal Server Error"}},"summary":"Get security settings","tags":["repository"]}}}}
```

## PATCH /repos/{repo\_identifier}/settings/security

> Update security settings

```json
{"openapi":"3.0.0","info":{"title":"API Specification","version":"1.111.0"},"servers":[{"url":"gateway/code/api/v1"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"scheme":"bearer","type":"http"}},"schemas":{"OpenapiSecuritySettingsRequest":{"properties":{"principal_committer_match":{"nullable":true,"type":"boolean"},"secret_scanning_enabled":{"nullable":true,"type":"boolean"},"vulnerability_scanning_mode":{"$ref":"#/components/schemas/SettingsVulnerabilityScanningMode"}},"type":"object"},"SettingsVulnerabilityScanningMode":{"enum":["disabled","detect","block","strict"],"nullable":true,"type":"string"},"SettingsSecuritySettings":{"properties":{"principal_committer_match":{"nullable":true,"type":"boolean"},"secret_scanning_enabled":{"nullable":true,"type":"boolean"},"vulnerability_scanning_mode":{"$ref":"#/components/schemas/SettingsVulnerabilityScanningMode"}},"type":"object"},"UsererrorError":{"properties":{"message":{"type":"string"},"values":{"additionalProperties":{},"type":"object"}},"type":"object"}}},"paths":{"/repos/{repo_identifier}/settings/security":{"patch":{"operationId":"updateSecuritySettings","parameters":[{"description":"Account Identifier for the Entity.","in":"query","name":"accountIdentifier","required":true,"schema":{"type":"string"}},{"description":"Organization Identifier for the Entity.","in":"query","name":"orgIdentifier","required":false,"schema":{"type":"string"}},{"description":"Project Identifier for the Entity.","in":"query","name":"projectIdentifier","required":false,"schema":{"type":"string"}},{"in":"path","name":"repo_identifier","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenapiSecuritySettingsRequest"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SettingsSecuritySettings"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Bad Request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Not Found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Internal Server Error"}},"summary":"Update security settings","tags":["repository"]}}}}
```

## POST /repos/{repo\_identifier}/squash

> Squashes commits in a branch relative to another branch or a commit

```json
{"openapi":"3.0.0","info":{"title":"API Specification","version":"1.111.0"},"servers":[{"url":"gateway/code/api/v1"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"scheme":"bearer","type":"http"}},"schemas":{"ShaSHA":{"description":"Git object hash","type":"string"},"TypesSquashResponse":{"properties":{"conflict_files":{"items":{"type":"string"},"type":"array"},"dry_run":{"type":"boolean"},"dry_run_rules":{"type":"boolean"},"new_head_branch_sha":{"$ref":"#/components/schemas/ShaSHA"},"rule_violations":{"items":{"$ref":"#/components/schemas/TypesRuleViolations"},"type":"array"}},"type":"object"},"TypesRuleViolations":{"properties":{"bypassable":{"type":"boolean"},"bypassed":{"type":"boolean"},"rule":{"$ref":"#/components/schemas/TypesRuleInfo"},"violations":{"items":{"$ref":"#/components/schemas/TypesViolation"},"nullable":true,"type":"array"}},"type":"object"},"TypesRuleInfo":{"properties":{"identifier":{"type":"string"},"repo_path":{"type":"string"},"space_path":{"type":"string"},"state":{"$ref":"#/components/schemas/EnumRuleState"},"type":{"$ref":"#/components/schemas/EnumRuleType"}},"type":"object"},"EnumRuleState":{"enum":["active","disabled","monitor"],"nullable":true,"type":"string"},"EnumRuleType":{"enum":["branch","push","tag"],"type":"string"},"TypesViolation":{"properties":{"code":{"type":"string"},"message":{"type":"string"},"params":{"items":{},"nullable":true,"type":"array"}},"type":"object"},"UsererrorError":{"properties":{"message":{"type":"string"},"values":{"additionalProperties":{},"type":"object"}},"type":"object"},"TypesMergeViolations":{"properties":{"conflict_files":{"items":{"type":"string"},"type":"array"},"message":{"type":"string"},"rule_violations":{"items":{"$ref":"#/components/schemas/TypesRuleViolations"},"type":"array"}},"type":"object"}}},"paths":{"/repos/{repo_identifier}/squash":{"post":{"operationId":"squashBranch","parameters":[{"description":"Account Identifier for the Entity.","in":"query","name":"accountIdentifier","required":true,"schema":{"type":"string"}},{"description":"Organization Identifier for the Entity.","in":"query","name":"orgIdentifier","required":false,"schema":{"type":"string"}},{"description":"Project Identifier for the Entity.","in":"query","name":"projectIdentifier","required":false,"schema":{"type":"string"}},{"in":"path","name":"repo_identifier","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"base_branch":{"type":"string"},"base_commit_sha":{"$ref":"#/components/schemas/ShaSHA"},"bypass_rules":{"type":"boolean"},"dry_run":{"type":"boolean"},"dry_run_rules":{"type":"boolean"},"head_branch":{"type":"string"},"head_commit_sha":{"$ref":"#/components/schemas/ShaSHA"},"message":{"type":"string"},"title":{"type":"string"}},"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TypesSquashResponse"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Bad Request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Not Found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TypesMergeViolations"}}},"description":"Unprocessable Entity"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Internal Server Error"}},"summary":"Squashes commits in a branch relative to another branch or a commit","tags":["repository"]}}}}
```

## GET /repos/{repo\_identifier}/summary

> Get repository summary

```json
{"openapi":"3.0.0","info":{"title":"API Specification","version":"1.111.0"},"servers":[{"url":"gateway/code/api/v1"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"scheme":"bearer","type":"http"}},"schemas":{"TypesRepositorySummary":{"properties":{"branch_count":{"type":"integer"},"default_branch_commit_count":{"type":"integer"},"loc":{"description":"source lines of code on the default branch","type":"integer"},"pull_req_summary":{"$ref":"#/components/schemas/TypesRepositoryPullReqSummary"},"size":{"description":"size of the repository in KiB","type":"integer"},"tag_count":{"type":"integer"}},"type":"object"},"TypesRepositoryPullReqSummary":{"properties":{"closed_count":{"type":"integer"},"merged_count":{"type":"integer"},"open_count":{"type":"integer"}},"type":"object"},"UsererrorError":{"properties":{"message":{"type":"string"},"values":{"additionalProperties":{},"type":"object"}},"type":"object"}}},"paths":{"/repos/{repo_identifier}/summary":{"get":{"operationId":"summary","parameters":[{"description":"Account Identifier for the Entity.","in":"query","name":"accountIdentifier","required":true,"schema":{"type":"string"}},{"description":"Organization Identifier for the Entity.","in":"query","name":"orgIdentifier","required":false,"schema":{"type":"string"}},{"description":"Project Identifier for the Entity.","in":"query","name":"projectIdentifier","required":false,"schema":{"type":"string"}},{"in":"path","name":"repo_identifier","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TypesRepositorySummary"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Bad Request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Not Found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Internal Server Error"}},"summary":"Get repository summary","tags":["repository"]}}}}
```

## GET /repos/{repo\_identifier}/tags

> List tags

```json
{"openapi":"3.0.0","info":{"title":"API Specification","version":"1.111.0"},"servers":[{"url":"gateway/code/api/v1"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"scheme":"bearer","type":"http"}},"schemas":{"TypesCommitTag":{"properties":{"commit":{"$ref":"#/components/schemas/TypesCommit"},"is_annotated":{"type":"boolean"},"message":{"type":"string"},"name":{"type":"string"},"sha":{"$ref":"#/components/schemas/ShaSHA"},"signature":{"$ref":"#/components/schemas/TypesGitSignatureResult"},"tagger":{"$ref":"#/components/schemas/TypesSignature"},"title":{"type":"string"}},"type":"object"},"TypesCommit":{"properties":{"author":{"$ref":"#/components/schemas/TypesSignature"},"committer":{"$ref":"#/components/schemas/TypesSignature"},"message":{"type":"string"},"parent_shas":{"items":{"$ref":"#/components/schemas/ShaSHA"},"type":"array"},"sha":{"$ref":"#/components/schemas/ShaSHA"},"signature":{"$ref":"#/components/schemas/TypesGitSignatureResult"},"stats":{"$ref":"#/components/schemas/TypesCommitStats"},"title":{"type":"string"}},"type":"object"},"TypesSignature":{"properties":{"identity":{"$ref":"#/components/schemas/TypesIdentity"},"when":{"format":"date-time","type":"string"}},"type":"object"},"TypesIdentity":{"properties":{"email":{"type":"string"},"name":{"type":"string"}},"type":"object"},"ShaSHA":{"description":"Git object hash","type":"string"},"TypesGitSignatureResult":{"nullable":true,"properties":{"created":{"type":"integer"},"key_fingerprint":{"type":"string"},"key_id":{"type":"string"},"key_scheme":{"$ref":"#/components/schemas/EnumPublicKeyScheme"},"result":{"$ref":"#/components/schemas/EnumGitSignatureResult"},"updated":{"type":"integer"}},"type":"object"},"EnumPublicKeyScheme":{"enum":["pgp","ssh"],"type":"string"},"EnumGitSignatureResult":{"enum":["bad","good","invalid","key_expired","revoked","unsupported","unverified"],"type":"string"},"TypesCommitStats":{"properties":{"files":{"items":{"$ref":"#/components/schemas/TypesCommitFileStats"},"type":"array"},"total":{"$ref":"#/components/schemas/TypesChangeStats"}},"type":"object"},"TypesCommitFileStats":{"properties":{"changes":{"type":"integer"},"deletions":{"type":"integer"},"insertions":{"type":"integer"},"old_path":{"type":"string"},"path":{"type":"string"},"status":{"$ref":"#/components/schemas/EnumFileDiffStatus"}},"type":"object"},"EnumFileDiffStatus":{"type":"string"},"TypesChangeStats":{"properties":{"changes":{"type":"integer"},"deletions":{"type":"integer"},"insertions":{"type":"integer"}},"type":"object"},"UsererrorError":{"properties":{"message":{"type":"string"},"values":{"additionalProperties":{},"type":"object"}},"type":"object"}}},"paths":{"/repos/{repo_identifier}/tags":{"get":{"operationId":"listTags","parameters":[{"description":"Account Identifier for the Entity.","in":"query","name":"accountIdentifier","required":true,"schema":{"type":"string"}},{"description":"Organization Identifier for the Entity.","in":"query","name":"orgIdentifier","required":false,"schema":{"type":"string"}},{"description":"Project Identifier for the Entity.","in":"query","name":"projectIdentifier","required":false,"schema":{"type":"string"}},{"description":"Indicates whether optional commit information should be included in the response.","in":"query","name":"include_commit","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"The substring by which the tags are filtered.","in":"query","name":"query","required":false,"schema":{"type":"string"}},{"description":"The order of the output.","in":"query","name":"order","required":false,"schema":{"default":"asc","enum":["asc","desc"],"type":"string"}},{"description":"The data by which the tags are sorted.","in":"query","name":"sort","required":false,"schema":{"default":"name","enum":["name","date"],"type":"string"}},{"description":"The page to return.","in":"query","name":"page","required":false,"schema":{"default":1,"minimum":1,"type":"integer"}},{"description":"The maximum number of results to return.","in":"query","name":"limit","required":false,"schema":{"default":30,"maximum":100,"minimum":1,"type":"integer"}},{"in":"path","name":"repo_identifier","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/TypesCommitTag"},"type":"array"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Not Found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Internal Server Error"}},"summary":"List tags","tags":["repository"]}}}}
```

## POST /repos/{repo\_identifier}/tags

> Create tag

```json
{"openapi":"3.0.0","info":{"title":"API Specification","version":"1.111.0"},"servers":[{"url":"gateway/code/api/v1"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"scheme":"bearer","type":"http"}},"schemas":{"OpenapiCreateTagRequest":{"properties":{"bypass_rules":{"type":"boolean"},"dry_run_rules":{"type":"boolean"},"message":{"type":"string"},"name":{"type":"string"},"target":{"type":"string"}},"type":"object"},"TypesCommitTag":{"properties":{"commit":{"$ref":"#/components/schemas/TypesCommit"},"is_annotated":{"type":"boolean"},"message":{"type":"string"},"name":{"type":"string"},"sha":{"$ref":"#/components/schemas/ShaSHA"},"signature":{"$ref":"#/components/schemas/TypesGitSignatureResult"},"tagger":{"$ref":"#/components/schemas/TypesSignature"},"title":{"type":"string"}},"type":"object"},"TypesCommit":{"properties":{"author":{"$ref":"#/components/schemas/TypesSignature"},"committer":{"$ref":"#/components/schemas/TypesSignature"},"message":{"type":"string"},"parent_shas":{"items":{"$ref":"#/components/schemas/ShaSHA"},"type":"array"},"sha":{"$ref":"#/components/schemas/ShaSHA"},"signature":{"$ref":"#/components/schemas/TypesGitSignatureResult"},"stats":{"$ref":"#/components/schemas/TypesCommitStats"},"title":{"type":"string"}},"type":"object"},"TypesSignature":{"properties":{"identity":{"$ref":"#/components/schemas/TypesIdentity"},"when":{"format":"date-time","type":"string"}},"type":"object"},"TypesIdentity":{"properties":{"email":{"type":"string"},"name":{"type":"string"}},"type":"object"},"ShaSHA":{"description":"Git object hash","type":"string"},"TypesGitSignatureResult":{"nullable":true,"properties":{"created":{"type":"integer"},"key_fingerprint":{"type":"string"},"key_id":{"type":"string"},"key_scheme":{"$ref":"#/components/schemas/EnumPublicKeyScheme"},"result":{"$ref":"#/components/schemas/EnumGitSignatureResult"},"updated":{"type":"integer"}},"type":"object"},"EnumPublicKeyScheme":{"enum":["pgp","ssh"],"type":"string"},"EnumGitSignatureResult":{"enum":["bad","good","invalid","key_expired","revoked","unsupported","unverified"],"type":"string"},"TypesCommitStats":{"properties":{"files":{"items":{"$ref":"#/components/schemas/TypesCommitFileStats"},"type":"array"},"total":{"$ref":"#/components/schemas/TypesChangeStats"}},"type":"object"},"TypesCommitFileStats":{"properties":{"changes":{"type":"integer"},"deletions":{"type":"integer"},"insertions":{"type":"integer"},"old_path":{"type":"string"},"path":{"type":"string"},"status":{"$ref":"#/components/schemas/EnumFileDiffStatus"}},"type":"object"},"EnumFileDiffStatus":{"type":"string"},"TypesChangeStats":{"properties":{"changes":{"type":"integer"},"deletions":{"type":"integer"},"insertions":{"type":"integer"}},"type":"object"},"UsererrorError":{"properties":{"message":{"type":"string"},"values":{"additionalProperties":{},"type":"object"}},"type":"object"},"TypesRulesViolations":{"properties":{"message":{"type":"string"},"violations":{"items":{"$ref":"#/components/schemas/TypesRuleViolations"},"nullable":true,"type":"array"}},"type":"object"},"TypesRuleViolations":{"properties":{"bypassable":{"type":"boolean"},"bypassed":{"type":"boolean"},"rule":{"$ref":"#/components/schemas/TypesRuleInfo"},"violations":{"items":{"$ref":"#/components/schemas/TypesViolation"},"nullable":true,"type":"array"}},"type":"object"},"TypesRuleInfo":{"properties":{"identifier":{"type":"string"},"repo_path":{"type":"string"},"space_path":{"type":"string"},"state":{"$ref":"#/components/schemas/EnumRuleState"},"type":{"$ref":"#/components/schemas/EnumRuleType"}},"type":"object"},"EnumRuleState":{"enum":["active","disabled","monitor"],"nullable":true,"type":"string"},"EnumRuleType":{"enum":["branch","push","tag"],"type":"string"},"TypesViolation":{"properties":{"code":{"type":"string"},"message":{"type":"string"},"params":{"items":{},"nullable":true,"type":"array"}},"type":"object"}}},"paths":{"/repos/{repo_identifier}/tags":{"post":{"operationId":"createTag","parameters":[{"description":"Account Identifier for the Entity.","in":"query","name":"accountIdentifier","required":true,"schema":{"type":"string"}},{"description":"Organization Identifier for the Entity.","in":"query","name":"orgIdentifier","required":false,"schema":{"type":"string"}},{"description":"Project Identifier for the Entity.","in":"query","name":"projectIdentifier","required":false,"schema":{"type":"string"}},{"in":"path","name":"repo_identifier","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenapiCreateTagRequest"}}}},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TypesCommitTag"}}},"description":"Created"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Bad Request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Forbidden"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Conflict"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TypesRulesViolations"}}},"description":"Unprocessable Entity"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Internal Server Error"}},"summary":"Create tag","tags":["repository"]}}}}
```

## DELETE /repos/{repo\_identifier}/tags/{tag\_name}

> Delete tag

```json
{"openapi":"3.0.0","info":{"title":"API Specification","version":"1.111.0"},"servers":[{"url":"gateway/code/api/v1"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"scheme":"bearer","type":"http"}},"schemas":{"UsererrorError":{"properties":{"message":{"type":"string"},"values":{"additionalProperties":{},"type":"object"}},"type":"object"},"TypesRulesViolations":{"properties":{"message":{"type":"string"},"violations":{"items":{"$ref":"#/components/schemas/TypesRuleViolations"},"nullable":true,"type":"array"}},"type":"object"},"TypesRuleViolations":{"properties":{"bypassable":{"type":"boolean"},"bypassed":{"type":"boolean"},"rule":{"$ref":"#/components/schemas/TypesRuleInfo"},"violations":{"items":{"$ref":"#/components/schemas/TypesViolation"},"nullable":true,"type":"array"}},"type":"object"},"TypesRuleInfo":{"properties":{"identifier":{"type":"string"},"repo_path":{"type":"string"},"space_path":{"type":"string"},"state":{"$ref":"#/components/schemas/EnumRuleState"},"type":{"$ref":"#/components/schemas/EnumRuleType"}},"type":"object"},"EnumRuleState":{"enum":["active","disabled","monitor"],"nullable":true,"type":"string"},"EnumRuleType":{"enum":["branch","push","tag"],"type":"string"},"TypesViolation":{"properties":{"code":{"type":"string"},"message":{"type":"string"},"params":{"items":{},"nullable":true,"type":"array"}},"type":"object"}}},"paths":{"/repos/{repo_identifier}/tags/{tag_name}":{"delete":{"operationId":"deleteTag","parameters":[{"description":"Account Identifier for the Entity.","in":"query","name":"accountIdentifier","required":true,"schema":{"type":"string"}},{"description":"Organization Identifier for the Entity.","in":"query","name":"orgIdentifier","required":false,"schema":{"type":"string"}},{"description":"Project Identifier for the Entity.","in":"query","name":"projectIdentifier","required":false,"schema":{"type":"string"}},{"description":"Bypass rule violations if possible.","in":"query","name":"bypass_rules","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Dry run rules for operations","in":"query","name":"dry_run_rules","required":false,"schema":{"default":false,"type":"boolean"}},{"in":"path","name":"repo_identifier","required":true,"schema":{"type":"string"}},{"in":"path","name":"tag_name","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"No Content"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Not Found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Conflict"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TypesRulesViolations"}}},"description":"Unprocessable Entity"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Internal Server Error"}},"summary":"Delete tag","tags":["repository"]}}}}
```

## POST /repos/import

> Import repository

```json
{"openapi":"3.0.0","info":{"title":"API Specification","version":"1.111.0"},"servers":[{"url":"gateway/code/api/v1"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"scheme":"bearer","type":"http"}},"schemas":{"ImporterPipelineOption":{"enum":["convert","ignore"],"type":"string"},"ImporterProvider":{"properties":{"host":{"type":"string"},"password":{"type":"string"},"type":{"$ref":"#/components/schemas/ImporterProviderType"},"username":{"type":"string"}},"type":"object"},"ImporterProviderType":{"enum":["github","gitlab","bitbucket","stash","gitea","gogs","azure","harness"],"type":"string"},"RepoRepositoryOutput":{"properties":{"archived":{"type":"boolean"},"created":{"type":"integer"},"created_by":{"type":"integer"},"default_branch":{"type":"string"},"deleted":{"nullable":true,"type":"integer"},"description":{"type":"string"},"fork_id":{"type":"integer"},"git_ssh_url":{"type":"string"},"git_url":{"type":"string"},"id":{"type":"integer"},"identifier":{"type":"string"},"import_failed":{"type":"boolean"},"importing":{"type":"boolean"},"is_empty":{"type":"boolean"},"is_favorite":{"type":"boolean"},"is_public":{"type":"boolean"},"language":{"type":"string"},"last_git_push":{"type":"integer"},"loc":{"description":"source lines of code on the default branch","type":"integer"},"num_closed_pulls":{"type":"integer"},"num_forks":{"type":"integer"},"num_merged_pulls":{"type":"integer"},"num_open_pulls":{"type":"integer"},"num_pulls":{"type":"integer"},"parent_id":{"type":"integer"},"path":{"type":"string"},"repo_type":{"$ref":"#/components/schemas/EnumRepoType"},"root_space_id":{"type":"integer"},"root_space_identifier":{"type":"string"},"size":{"description":"size of the repository in KiB","type":"integer"},"size_lfs":{"description":"size of the repository LFS in KiB","type":"integer"},"size_updated":{"type":"integer"},"state":{"$ref":"#/components/schemas/EnumRepoState"},"tags":{},"updated":{"type":"integer"},"upstream":{"$ref":"#/components/schemas/TypesRepositoryCore"}},"type":"object"},"EnumRepoType":{"type":"string"},"EnumRepoState":{"nullable":true,"type":"integer"},"TypesRepositoryCore":{"properties":{"default_branch":{"type":"string"},"fork_id":{"type":"integer"},"id":{"type":"integer"},"identifier":{"type":"string"},"parent_id":{"type":"integer"},"path":{"type":"string"},"type":{"$ref":"#/components/schemas/EnumRepoType"}},"type":"object"},"UsererrorError":{"properties":{"message":{"type":"string"},"values":{"additionalProperties":{},"type":"object"}},"type":"object"}}},"paths":{"/repos/import":{"post":{"operationId":"importRepository","parameters":[{"description":"Account Identifier for the Entity.","in":"query","name":"accountIdentifier","required":true,"schema":{"type":"string"}},{"description":"Organization Identifier for the Entity.","in":"query","name":"orgIdentifier","required":false,"schema":{"type":"string"}},{"description":"Project Identifier for the Entity.","in":"query","name":"projectIdentifier","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"description":{"type":"string"},"identifier":{"type":"string"},"parent_ref":{"type":"string"},"pipelines":{"$ref":"#/components/schemas/ImporterPipelineOption"},"provider":{"$ref":"#/components/schemas/ImporterProvider"},"provider_repo":{"type":"string"},"uid":{"deprecated":true,"type":"string"}},"type":"object"}}}},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RepoRepositoryOutput"}}},"description":"Created"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Bad Request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Forbidden"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Internal Server Error"}},"summary":"Import repository","tags":["repository"]}}}}
```

## POST /repos/link

>

```json
{"openapi":"3.0.0","info":{"title":"API Specification","version":"1.111.0"},"servers":[{"url":"gateway/code/api/v1"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"scheme":"bearer","type":"http"}},"schemas":{"RepoRepositoryOutput":{"properties":{"archived":{"type":"boolean"},"created":{"type":"integer"},"created_by":{"type":"integer"},"default_branch":{"type":"string"},"deleted":{"nullable":true,"type":"integer"},"description":{"type":"string"},"fork_id":{"type":"integer"},"git_ssh_url":{"type":"string"},"git_url":{"type":"string"},"id":{"type":"integer"},"identifier":{"type":"string"},"import_failed":{"type":"boolean"},"importing":{"type":"boolean"},"is_empty":{"type":"boolean"},"is_favorite":{"type":"boolean"},"is_public":{"type":"boolean"},"language":{"type":"string"},"last_git_push":{"type":"integer"},"loc":{"description":"source lines of code on the default branch","type":"integer"},"num_closed_pulls":{"type":"integer"},"num_forks":{"type":"integer"},"num_merged_pulls":{"type":"integer"},"num_open_pulls":{"type":"integer"},"num_pulls":{"type":"integer"},"parent_id":{"type":"integer"},"path":{"type":"string"},"repo_type":{"$ref":"#/components/schemas/EnumRepoType"},"root_space_id":{"type":"integer"},"root_space_identifier":{"type":"string"},"size":{"description":"size of the repository in KiB","type":"integer"},"size_lfs":{"description":"size of the repository LFS in KiB","type":"integer"},"size_updated":{"type":"integer"},"state":{"$ref":"#/components/schemas/EnumRepoState"},"tags":{},"updated":{"type":"integer"},"upstream":{"$ref":"#/components/schemas/TypesRepositoryCore"}},"type":"object"},"EnumRepoType":{"type":"string"},"EnumRepoState":{"nullable":true,"type":"integer"},"TypesRepositoryCore":{"properties":{"default_branch":{"type":"string"},"fork_id":{"type":"integer"},"id":{"type":"integer"},"identifier":{"type":"string"},"parent_id":{"type":"integer"},"path":{"type":"string"},"type":{"$ref":"#/components/schemas/EnumRepoType"}},"type":"object"},"UsererrorError":{"properties":{"message":{"type":"string"},"values":{"additionalProperties":{},"type":"object"}},"type":"object"}}},"paths":{"/repos/link":{"post":{"operationId":"linkedCreate","parameters":[{"description":"Account Identifier for the Entity.","in":"query","name":"accountIdentifier","required":true,"schema":{"type":"string"}},{"description":"Organization Identifier for the Entity.","in":"query","name":"orgIdentifier","required":false,"schema":{"type":"string"}},{"description":"Project Identifier for the Entity.","in":"query","name":"projectIdentifier","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"connector_ref":{"type":"string"},"description":{"type":"string"},"identifier":{"type":"string"},"is_public":{"type":"boolean"},"parent_ref":{"type":"string"},"repo_identifier":{"type":"string"}},"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RepoRepositoryOutput"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Bad Request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Not Found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsererrorError"}}},"description":"Internal Server Error"}},"tags":["repository"]}}}}
```
