Overview
kapptivate has a complete set of API that can be used to integrate with external systems. For instance, you can use kapptivate API to trigger a test campaign from your CI/CD system or you can export raw metrics exposed by the tool.
API Keys Generation
By default, no API keys are generated. A manual action is needed to generate one.
API Key Listing
To do so, just click on Create credentials button. You must then give a name to this API Key and then click on Create.
API Key Name
Now you must absolutely note down the content of the key and save it in a secure place as you will never be able to read it from kapptivate administration interface again.
API Key Value
Once you go back to API keys listing, you will now see your key but its content will be hidden.
API Key Listing with key
Regenerate API Key value
If you forget the value of the key, you will not be able to read it in kapptivate administration. The only solution is to generate a new value. To do so, just click on the double arrow button in the interface.
Generating a new value
Give rights to your API Keys
API Keys behave like users of kapptivate platform and need to have permissions given to them. By default, a key has absolutely no permissions, which means you can't use any of kapptivate APIs with it. To give permissions to an API key, you just have to click the edit icon at the right of your newly created key. Then, you can associate roles and groups, like described in the Roles and Groups section.
API Key Permissions
How to use my API Keys
At the moment, the API provided by kapptivate are sent when requested by the customer. When we will share API specifications with you, you will notice that we will require you to insert in the headers of your request a token like this:
Authorization JWT <>TOKEN_VALUE<></></>
This TOKEN_VALUE is in fact generated by the API key value that you just created and stored somewhere safely. To generate the short lived token used to query kapptivate API, you have to use the following endpoint and make a POST request:
POST /api/auth/refresh-token/
Headers Content-Type: application/json
Body: {"refresh_token":"XXXXXXX"}