Harness Token API

This contains APIs related to Token as defined in Harness

Operations 8

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

POST /ng/api/token Create an API key token · Create a Token #
Ask an LLM
“How do I create a new token under an API key in Harness?”
“Can I set an expiry date when creating a token?”
Tell an agent
Create token {name} with identifier {identifier} under API key {api_key}.
Create a token {identifier} named {name} valid until {valid_to}.
PUT /ng/api/token/{identifier} Update an existing token · Update a Token #
Ask an LLM
“How do I rename or change the description of an existing token?”
“Can I extend the validity window of a token I already created?”
Tell an agent
Update token {identifier} to have name {name}.
Change the expiry of existing token {identifier} to {valid_to}.
DELETE /ng/api/token/{identifier} Delete a token · Delete a Token #
Ask an LLM
“How do I delete a token so it can no longer be used?”
“What do I need to identify a token's parent and API key to delete it?”
Tell an agent destructive · confirm first
Delete token {identifier} from API key {api_key} owned by {parent}.
Remove {type} token {identifier} under key {api_key} for {parent}.
GET /ng/api/token/aggregate List tokens across API keys · List all Tokens #
Ask an LLM
“Which tokens exist for my service account API keys?”
“Can I list only tokens that are still active?”
Tell an agent
List all {type} tokens.
Show active {type} tokens under API key {api_key}.
POST /ng/api/token/rotate/{identifier} Rotate a token · Rotate a Token #
Ask an LLM
“How do I rotate a token without creating a new one from scratch?”
“Can I schedule when the old token expires after rotation?”
Tell an agent
Rotate token {identifier} under API key {api_key} for {parent}.
Rotate {type} token {identifier} of key {api_key} owned by {parent}, expiring the old one at {timestamp}.
POST /ng/api/token/validate Validate a token · Validate a Token #
Ask an LLM
“Is this Harness token still valid for my account?”
“Can I check a token before using it in automation?”
Tell an agent
Validate a token for account {account}.
Check whether my token is valid.
GET /sto/api/v2/token Issue a cross-service token for STO · Token#Issue token #
Ask an LLM
“How do I exchange my Harness token for a Security Testing Orchestration cross-service token?”
“Can I request an STO token for a specific audience?”
Tell an agent
Issue an STO cross-service token for audience {audience} using Harness token {harness_token}.
Get a security testing token for account {account} from {harness_token}.
GET /v1/token Issue a cross-service token (v1) · Issue a cross-service token #
Ask an LLM
“Is there a v1 endpoint for issuing a cross-service token?”
“What does the older /v1/token endpoint return for my account?”
Tell an agent
Issue a cross-service token from the v1 endpoint for account {account}.
Call the legacy v1 token issuer for {account}.

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