ChaosSearch API Key Endpoints
Users can also manage their ChaosSearch API keys using three API endpoints.
Creating a ChaosSearch API Key
To create an API access key and its associated secret key, you can use the apiKey/create
endpoint. Make sure that you have your user authorization and security values, which you can get in several ways, including by creating a JWT.
https://domain.chaossearch.io/user/credential/apiKey/create
POST : provision
Response: 201 CREATED
Body { “keyId” : String , “secretKey” : String }
OR
503 Internal Server Error
Example:
curl 'https://<mycompany>.chaossearch.io/User/credential/apiKey/create' \
{"keyId":"EFGKEY4SQQUUTBBMXVWD","secretKey":"dhABCFszdhwcqR4Ni+tO5yQzGW2vGmirf7nI9ALW"}
Listing the ChaosSearch API Keys
To display a list of all the key IDs associated with your user account, you use the apiKeys/list
endpoint:
https://domain.chaossearch.io/user/credential/apiKey/list
GET : enumerate
Response: 200 OK
Body: { “keyIds”: [ id : String ] }
OR
503 Internal Server Error
If you are authenticated as the tenant user, the list command displays a list of all of the keys created for all subaccount users and the root user. A subaccount user sees a list of the keys created specifically for their subaccount.
curl 'https://sumo.chaossearch.io/User/credential/apiKey/list' \
-X GET \
{"keyIds":["XYZ6UW7G3R8XHGZROABC","ABCX08KS0A3MTQCJPVXC",
"EFGKEY4SQQUUTBBMXVWD"]}
NOTE:
The list command displays only the key IDs, never the secret keys.
Deleting a ChaosSearch API Key
To delete a ChaosSearch API key and its associated secret key, you use the apiKey/delete
endpoint:
https://domain.chaossearch.io/user/credential/apiKey/delete?keyId=<keyId>
DELETE : deprovision
PATH : keyId=<STRING>
The keyId
is the ID string that you want to remove (deprovision)
Response: 200 OK
| 404 Not Found
curl 'https://sumo.chaossearch.io/User/credential/apiKey/delete?keyId=EFGKEY4SQQUUTBBMXVWD' \
-X DELETE \
{"keyId":"EFGKEY4SQQUUTBBMXVWD"}
When you delete a key, a successful response displays the key ID value. If you list the keys, the deleted key should no longer appear in the list of keys for your user account.
Updated about 1 year ago