API Keys
To integrate Harness with some third-party apps, you need to register Harness with the app and then supply a Harness API key. The API key is a simple encrypted string that other applications can use to access Harness without a private Harness account.
Once you have generated an API key in Harness, deployment status can be tracked by making a REST call to Harness. For more information, see Get Deployment Status using REST.
Create an API Key
The following procedure creates, copies, and deletes an API Key.
To use a Harness API key, do the following:
- In Harness Manager, click Security, and then click Access Management.
- Click API Keys.
- Click Add API Key.
- In the Add API Key settings, enter a name and select your User Group.
- Click Submit. The new API key is created.
- To copy the API key, first click the Eye icon to reveal the key's value.
- Next, click the Copy icon beside the key. This copies the key's value to your clipboard.
- To delete an API key, click the Delete icon.
Edit an API Key
To edit a Harness API key, do the following:
- In Harness Manager, click Security, and then click Access Management.
- Click API Keys.
- Click the Edit icon beside the key. The Edit API Key settings appear.
- Edit the API key and click Submit.
Use an API Key and REST
You can use a RESt call to track the details of your Harness deployments. An API key is required in the call header in the REST call to Harness. The API key uniquely identifies your Harness account and authorizes access to your account data.
Once you have generated an API key in Harness, deployment status can be tracked by making a REST call to Harness. For more information, see Get Deployment Status using REST.
Troubleshooting
The Harness API has a usage rate limit of 1 query per second per API Key. If the rate limit is reached, you will receive this response in the API call:
Too Many requests. Throttled. Max QPS: 1.0