Harness Repository API

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

Operations 49

GET /code/api/v1/repos List repositories #
POST /code/api/v1/repos Create repository #
DELETE /code/api/v1/repos/{repo_identifier} Soft delete repository #
GET /code/api/v1/repos/{repo_identifier} Get repository #
PATCH /code/api/v1/repos/{repo_identifier} Update repository #
GET /code/api/v1/repos/{repo_identifier}/activities List repository activities #
GET /code/api/v1/repos/{repo_identifier}/archive/{git_ref}.{format} Download repo in archived format #
GET /code/api/v1/repos/{repo_identifier}/blame/{path} Get git blame #
GET /code/api/v1/repos/{repo_identifier}/branches List branches #
POST /code/api/v1/repos/{repo_identifier}/branches Create branch #
DELETE /code/api/v1/repos/{repo_identifier}/branches/{branch_name} Delete branch #
GET /code/api/v1/repos/{repo_identifier}/branches/{branch_name} Get branch #
GET /code/api/v1/repos/{repo_identifier}/codeowners/validate Validate code owners file #
GET /code/api/v1/repos/{repo_identifier}/commits List commits #
POST /code/api/v1/repos/{repo_identifier}/commits Commit files #
GET /code/api/v1/repos/{repo_identifier}/commits/{commit_sha} Get commit #
GET /code/api/v1/repos/{repo_identifier}/commits/{commit_sha}/diff Get raw git diff of a commit #
POST /code/api/v1/repos/{repo_identifier}/commits/calculate-divergence Get commit divergence #
GET /code/api/v1/repos/{repo_identifier}/content/{path} Get content of a file #
POST /code/api/v1/repos/{repo_identifier}/default-branch Update default branch #
GET /code/api/v1/repos/{repo_identifier}/diff-stats/{range} Get diff stats #
GET /code/api/v1/repos/{repo_identifier}/diff/{range} Get raw diff #
POST /code/api/v1/repos/{repo_identifier}/diff/{range} Get raw diff #
POST /code/api/v1/repos/{repo_identifier}/fork Fork create #
POST /code/api/v1/repos/{repo_identifier}/fork-sync Fork sync branch #
GET /code/api/v1/repos/{repo_identifier}/languages Get repository language statistics #
GET /code/api/v1/repos/{repo_identifier}/linked/source Get linked source #
POST /code/api/v1/repos/{repo_identifier}/linked/sync Linked sync #
POST /code/api/v1/repos/{repo_identifier}/merge-check/{range} Check mergeability #
POST /code/api/v1/repos/{repo_identifier}/merge-commit Creates a merge commit on the head branch with changes from the base #
DELETE /code/api/v1/repos/{repo_identifier}/mergequeue/{branch_name} Merge queue clear #
GET /code/api/v1/repos/{repo_identifier}/mergequeue/{branch_name} Merge queue list entries #
POST /code/api/v1/repos/{repo_identifier}/path-details Get commit details #
GET /code/api/v1/repos/{repo_identifier}/paths List all paths #
POST /code/api/v1/repos/{repo_identifier}/purge Purge repository #
GET /code/api/v1/repos/{repo_identifier}/raw/{path} Get raw file content #
POST /code/api/v1/repos/{repo_identifier}/rebase Rebase a branch relative to another branch or a commit #
POST /code/api/v1/repos/{repo_identifier}/restore Restore repository #
GET /code/api/v1/repos/{repo_identifier}/settings/general Get general settings #
PATCH /code/api/v1/repos/{repo_identifier}/settings/general Update general settings #
GET /code/api/v1/repos/{repo_identifier}/settings/security Get security settings #
PATCH /code/api/v1/repos/{repo_identifier}/settings/security Update security settings #
POST /code/api/v1/repos/{repo_identifier}/squash Squashes commits in a branch relative to another branch or a commit #
GET /code/api/v1/repos/{repo_identifier}/summary Get repository summary #
GET /code/api/v1/repos/{repo_identifier}/tags List tags #
POST /code/api/v1/repos/{repo_identifier}/tags Create tag #
DELETE /code/api/v1/repos/{repo_identifier}/tags/{tag_name} Delete tag #
POST /code/api/v1/repos/import Import repository #
POST /code/api/v1/repos/link Linked create #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/harness-repository-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

harness-repository-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Harness Repository API
  version: '1.0'
  description: The Harness Software Delivery Platform uses OpenAPI Specification v3.0.
  contact:
    name: API Support
    email: contact@harness.io
    url: https://harness.io/
  x-logo:
    url: https://mma.prnewswire.com/media/779232/Harnes_logo_horizontal.jpg?p=facebook
    altText: Harness
  termsOfService: https://harness.io/terms-of-use/
servers:
- url: https://app.harness.io
  description: Harness host URL
- url: https://{vanity}
  description: Vanity URL
  variables:
    vanity:
      default: app.harness.io
security:
- x-api-key: []
tags:


# --- truncated at 32 KB (149 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/harness/refs/heads/main/openapi/harness-repository-api-openapi.yml