An API Key is specific to a user and allows access to the API with the key replacing the usage of user credentials for authentication.
The REST API provides support for a number of operations:
Creates a new API key for a user.
/api/v1/apikey
POST
Authorization
, Content-Type: application/json
{
"username": "myLdapUsername"
}
Content-Type: application/json
{
"ok": true,
"id": "...",
"key": "..."
}
curl -u myLdapUser \
-H "Content-Type: application/json" -d '{ "username": "myLdapUser" }' \
http://concord.example.com/api/v1/apikey
Lists any existing API keys for the user. Only returns metadata, not actual keys.
/api/v1/apikey
GET
Authorization
, Content-Type: application/json
Content-Type: application/json
[
{
"id" : "2505acba-314d-11e9-adf9-0242ac110002",
"name" : "key#1"
}, {
"id" : "efd12c7a-3162-11e9-b9c0-0242ac110002",
"name" : "myCustomApiKeyName"
}
]
curl -u myLdapUser \
-H "Content-Type: application/json" \
http://concord.example.com/api/v1/apikey
Removes an existing API key.
/api/v1/apikey/${id}
DELETE
Authorization
Content-Type: application/json
{
"ok": true
}