Use these endpoints to create or delete an API key.
Management ofadminAPI keys will be movingAs a part of integrating with Harness,
adminAPI keys will soon be managed by general Harness systems. We recommend against creating any new integrations that manageadminAPI keys with this endpoint unless it is for a temporary purpose.The
server_sideandclient_sideSDK API keys will continue to be managed using this endpoint.For more information, go to Before and After Guide: API for Split Admins. You can also contact us at [email protected] and we will be happy to guide you to the best path forward.
When creating an API key, the key itself is returned in the response body.
Keep your server_side and admin keys privateNever expose
adminandserver_sideAPI keys in untrusted contexts.Do not put your
adminorserver_sideAPI keys in client-side JavaScript or mobile SDKs. Split has specialclient_sideAPI keys that you can use in JavaScript, Android, and iOS.If you accidentally expose your API key, revoke it in the APIs tab in Account settings or using the Delete an API key endpoint.
Be sure to copy your Admin API key once it's generated. For security purposes, you wonāt see the key again.
In addition to API keys, you can authenticate with Harness personal access tokens (PATs). For more information, see Authentication.
API key types
There are three types of keys that can be created:
adminAPI keys are used for access to the Split Admin API endpoints.server_sideAPI keys are recommended to use with SDKs that live in your infrastructure (for example, your servers).client_sideAPI keys are for SDKs living in public environments (for example, browsers or mobile clients).
Admin API key roles
Roles aim to limit the access and operations a key can perform within Split within two functional areas - Administrative Permissions and Resource (Feature Flag & Segment) Permissions.
Here is a brief overview of the new roles introduced that can be specified while creating an Admin API key using Split API:
Important
- Roles are not editable, once assigned, they cannot be changed.
- A valid Admin API key cannot create another Admin API key with more roles than it contains.
- Roles can be combined.
Role | Description | |
|---|---|---|
Administrative Permissions |
| A key with this role grants access to all of your Account's settings and resources via Split API. |
| A key with this role allows the creation and deletion of other API keys. | |
| Reduced Admin capabilities. | |
| Admin capabilities within a project (formerly known as workspace), similar to | |
Resource Permissions |
| View-only access to |
| Grants access to all | |
Resource Permissions |
| View-only access to |
| Grants access to all |
Admin API key scopes
Admin API keys can be scoped to different levels of access:
Global- access to all current and future resources across the org.Workspace- access to all current and future resources across a single project (formerly known as workspace).Environment- access to all current and future resources across the environments selected.
