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-keyheader on every request. Go to Manage API keys to create a key and token.Account, organization, and project IDs: Send
accountIdentifieras a query parameter on almost every request. AddorgIdentifierandprojectIdentifierwhen 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 /organizationsandGET /projects, and create a project withPOST /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/aggregateand user groups withGET /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 withPOST /apikey, then create a token withPOST /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/secretsand create one withPOST /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 /connectorsand create one withPOST /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/listDelegatesand create a delegate token withPOST /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, andGET /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/listand create one withPOST /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?