Skip to content
For the complete documentation index, see llms.txt. This page is also available as Markdown.

Core Platform

Manage organizations, projects, users, secrets, connectors, delegates, and other shared Harness resources with the Core Platform API.

The Core Platform API manages the resources every Harness module shares: the account structure, the people and service accounts in it, and the secrets, connectors, and delegates that pipelines use.

Request basics

  • API key token: Send it in the x-api-key header on every request. Go to Manage API keys to create a key and token.

  • Account, organization, and project IDs: Send accountIdentifier as a query parameter on almost every request. Add orgIdentifier and projectIdentifier when the resource sits in an organization or project. Go to Organizations and projects to find these identifiers.

  • Base URL: Send requests to https://app.harness.io/gateway/ng/api, followed by the endpoint path.

Example request

List the projects in your account:

curl "https://app.harness.io/gateway/ng/api/projects?accountIdentifier=ACCOUNT_ID" \
  -H "x-api-key: $HARNESS_API_KEY"

Replace ACCOUNT_ID with your own values, and set HARNESS_API_KEY to your API key token.

Find an endpoint

Endpoint paths are relative to the base URL.

  • Organizations and projects: The containers that group your pipelines, resources, and people. List them with GET /organizations and GET /projects, and create a project with POST /projects. Go to Organizations & Projects to create and manage them.

  • Users and user groups: The people in your account and the groups you use to give them access together. List users with POST /user/aggregate and user groups with GET /user-groups. Go to Manage users to add and manage users.

  • Service accounts, API keys, and tokens: Non-human identities for integrations, and the keys and tokens that authenticate them. Create a service account with POST /serviceaccount, add a key with POST /apikey, then create a token with POST /token. Go to Manage service accounts to set up a service account.

  • Secrets: Encrypted values, such as passwords and SSH keys, that pipelines and connectors reference by name. List secrets with GET /v2/secrets and create one with POST /v2/secrets. Go to Secrets to add and reference secrets.

  • Connectors: Saved connections to your cloud providers, Git providers, artifact repositories, and other tools. List connectors with GET /connectors and create one with POST /connectors. Go to Connectors to choose and configure a connector.

  • Delegates: The service you run in your own infrastructure to carry out tasks for Harness. The API covers setup, tokens, and tags. List delegates with POST /delegate-setup/listDelegates and create a delegate token with POST /delegate-token-ng. Go to Delegates to install and manage delegates.

  • Services, environments, and overrides: The deployment building blocks: what you deploy, where you deploy it, and per-environment changes. List them with GET /servicesV2, GET /environmentsV2, and GET /environmentsV2/serviceOverrides. Go to Services to define services for deployment.

  • Variables: Account, organization, and project values that pipelines can reference in expressions. List variables with GET /variables. Go to Variables & Expressions to use variables in pipelines.

  • Authentication settings: How people sign in to your account, including SSO with SAML, OIDC, OAuth, or LDAP. Read the current settings with GET /authentication-settings. Go to Single Sign-On (SSO) with OpenID Connect (OIDC) to configure single sign-on.

  • Deployment freeze windows: Periods when Harness blocks deployments, such as a holiday change freeze. List freeze windows with POST /freeze/list and create one with POST /freeze. Go to Freeze deployments to schedule a freeze.

  • Settings: Account, organization, and project preferences that change how Harness behaves. Read the settings in a category with GET /settings. Go to Settings to review the default settings.

Last updated

Was this helpful?