Harness Labels API

The labels API from Harness — 10 operation(s) for labels.

Operations 21

Each operation below carries the questions people ask an LLM about it and the instructions they give an agent to run it. Generated by API Evangelist overlay

GET /code/api/v1/labels List labels defined for an account, org or project · List labels at account, org or project level #
Ask an LLM
“What labels are defined for my Harness Code project?”
“Can I include labels inherited from the org and account when listing project labels?”
Tell an agent
List the labels defined in project {project} of org {org}.
Show account {account}'s labels matching {search}, including inherited ones.
POST /code/api/v1/labels Create a new label at account, org or project level · Create label at account, org or project level #
Ask an LLM
“How do I create a new pull request label that every repo in my project can use?”
“Can a label defined at the org level have its own color and description?”
Tell an agent
Create a project-level label {key} colored {color} in project {project}.
Define a new account-wide label {key} described as {description}.
PUT /code/api/v1/labels Save a label and its values in one call at a scope · Save label and values at account, org or project level #
Ask an LLM
“Can I create or overwrite a project label together with all its values in a single request?”
“What's the quickest way to upsert an org-level label along with its allowed values?”
Tell an agent
Save label {label} with values {values} at the project {project} level in one go.
Upsert the account-wide label definition {label} and its full value list.
DELETE /code/api/v1/labels/{key} Delete a label defined at account, org or project · Delete label at account, org or project level #
Ask an LLM
“Can I remove a label that was defined for the whole project rather than one repo?”
“What happens when I delete an org-level label from Harness Code?”
Tell an agent destructive · confirm first
Delete the project-level label {key} from project {project}.
Remove account label {key} entirely.
PATCH /code/api/v1/labels/{key} Update an account, org or project label · Update label at account, org or project level #
Ask an LLM
“Can I rename or recolor a label that's shared across my whole project?”
“Is it possible to change the description of an existing org-level label?”
Tell an agent
Change the color of project label {key} to {color}.
Update the description of account-wide label {key} to {description}.
GET /code/api/v1/labels/{key}/values List the values of a project, org or account label · List label values at account, org or project level #
Ask an LLM
“What values are allowed for a label defined at the project level?”
“Which options can people pick for an org-wide label?”
Tell an agent
List the allowed values of project label {key}.
Show the values for account-level label {key} in account {account}.
POST /code/api/v1/labels/{key}/values Add a value to an account, org or project label · Create label value at account, org or project level #
Ask an LLM
“Can I add a new option to an existing project-wide label?”
“Does each value on an org-level label get its own color?”
Tell an agent
Add value {value} to project label {key}.
Create value {value} with color {color} on account label {key}.
DELETE /code/api/v1/labels/{key}/values/{value} Delete a value from an account, org or project label · Delete label value at account, org or project level #
Ask an LLM
“Can I remove one option from a project-wide label without deleting the label itself?”
“Is there a way to drop an outdated value from an org-level label?”
Tell an agent destructive · confirm first
Delete value {value} from project label {key}.
Remove the {value} option from account-wide label {key}.
PATCH /code/api/v1/labels/{key}/values/{value} Update a value on an account, org or project label · Update label value at account, org or project level #
Ask an LLM
“Can I rename a single value of a project-level label?”
“How can I change the color of one option on an org-wide label?”
Tell an agent
Rename value {value} of project label {key} to {new_value}.
Set the color of value {value} on account label {key} to {color}.
GET /code/api/v1/repos/{repo_identifier}/labels List the labels available in a repository · List labels at repo level #
Ask an LLM
“Which labels are defined on a specific Harness Code repository?”
“Can I see repo labels alongside the ones inherited from its project?”
Tell an agent
List the labels in repository {repo}.
Find labels in repo {repo} matching {search}, including inherited ones.
POST /code/api/v1/repos/{repo_identifier}/labels Create a label scoped to one repository · Create label at repo level #
Ask an LLM
“How do I add a label that only exists in one repository?”
“Can a repository-only label have its own color and description?”
Tell an agent
Create label {key} in repository {repo}.
Define repo-only label {key} with color {color} in {repo}.
PUT /code/api/v1/repos/{repo_identifier}/labels Save a repo label and its values in one call · Save label and values at repo level #
Ask an LLM
“Can I upsert a repository label along with all of its values at once?”
“What's the single-request way to define a repo label and its option list?”
Tell an agent
Save label {label} with values {values} on repository {repo}.
Upsert repo {repo}'s label definition {label} including its values.
DELETE /code/api/v1/repos/{repo_identifier}/labels/{key} Delete a label from a repository · Delete label at repo level #
Ask an LLM
“Can I delete a label that was defined only on one repository?”
“How do I get rid of an unused repo-level label?”
Tell an agent destructive · confirm first
Delete label {key} from repository {repo}.
Remove the repo-level label {key} in {repo}.
PATCH /code/api/v1/repos/{repo_identifier}/labels/{key} Update a repository-level label · Update label at repo level #
Ask an LLM
“Can I change the color or description of a label that belongs to one repo?”
“Is it possible to rename a repository label's key?”
Tell an agent
Recolor label {key} in repository {repo} to {color}.
Update repo {repo} label {key} description to {description}.
GET /code/api/v1/repos/{repo_identifier}/labels/{key}/values List the values of a repository label · List label values at repo level #
Ask an LLM
“What values can be chosen for a label defined in one repository?”
“Which options exist for a repo-only label?”
Tell an agent
List the values of label {key} in repository {repo}.
Show the options for repo {repo}'s label {key}.
POST /code/api/v1/repos/{repo_identifier}/labels/{key}/values Add a value to a repository label · Create label value at repo level #
Ask an LLM
“Can I add a new option to a label that lives in a single repository?”
“Does a value on a repo label accept its own color?”
Tell an agent
Add value {value} to label {key} in repository {repo}.
Create value {value} colored {color} on repo {repo} label {key}.
DELETE /code/api/v1/repos/{repo_identifier}/labels/{key}/values/{value} Delete a value from a repository label · Delete label value at repo level #
Ask an LLM
“Can I drop one value from a repo label and keep the rest?”
“How would I remove an obsolete option from a repository's label?”
Tell an agent destructive · confirm first
Delete value {value} from label {key} in repository {repo}.
Remove option {value} of repo {repo} label {key}.
PATCH /code/api/v1/repos/{repo_identifier}/labels/{key}/values/{value} Update a value on a repository label · Update label value at repo level #
Ask an LLM
“Can I rename one value of a label defined in a repository?”
“Is changing the color of a single repo label value supported?”
Tell an agent
Rename value {value} of label {key} in repository {repo} to {new_value}.
Set color {color} on value {value} of repo {repo} label {key}.
GET /code/api/v1/repos/{repo_identifier}/pullreq/{pullreq_number}/labels List the labels on a pull request · List labels assigned to pull request #
Ask an LLM
“Which labels are currently attached to a pull request?”
“Can I see which labels are still assignable to a pull request?”
Tell an agent
Show the labels on pull request {number} in repository {repo}.
List assignable labels for PR {number} in {repo}.
PUT /code/api/v1/repos/{repo_identifier}/pullreq/{pullreq_number}/labels Assign a label to a pull request · Assign label to pull request #
Ask an LLM
“How do I tag a pull request with a label?”
“Can I set a specific label value when labeling a pull request?”
Tell an agent
Add label {label_id} to pull request {number} in repository {repo}.
Label PR {number} in {repo} with {label_id} set to {value}.
DELETE /code/api/v1/repos/{repo_identifier}/pullreq/{pullreq_number}/labels/{label_id} Remove a label from a pull request · Unassign label from pull request #
Ask an LLM
“Can I take a label off a pull request without deleting the label?”
“What's the way to unlabel a PR that was tagged by mistake?”
Tell an agent destructive · confirm first
Remove label {label_id} from pull request {number} in repository {repo}.
Unassign {label_id} from PR {number} in {repo}.

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:harness-labels-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-labels-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Harness Labels 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 (57 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/harness/refs/heads/main/openapi/harness-labels-api-openapi.yml