Skip to content

Get API key

Request

Get API key metadata. Secrets are never returned.

Security
api_key
Path
apiKeyIdstring, (uuid)required

The ID of the API key.

curl -i -X GET \
  'https://coreapi.hoxton.ai/_mock/v1/api-keys/{apiKeyId}' \
  -H 'Authorization: YOUR_API_KEY_HERE'

Responses

OK.

Bodyapplication/json
apiKeyIdstring, (uuid)read-onlyrequired
createdAtstring, (date-time)read-only
createdBystringread-only
expiresAtstring or null, (date-time)
lastUsedAtstring or null, (date-time)read-only
namestringrequired
organisationIdstring, (uuid)read-onlyrequired
prefixstringread-onlyrequired
revokedAtstring or null, (date-time)read-only
rolestringread-only

The role whose permissions the key is granted.

siteIdsArray of strings, (uuid)read-only

Sites the key is scoped to. Populated for member and analyst keys; empty for admin and manager keys.

Response
{ "apiKeyId": "37ba0474-c0bb-4910-bfb5-d6cebb614366", "createdAt": "2019-08-24T14:15:22Z", "createdBy": "string", "expiresAt": "2019-08-24T14:15:22Z", "lastUsedAt": "2019-08-24T14:15:22Z", "name": "string", "organisationId": "c9b3f279-e3b5-4204-ad99-646257417f98", "prefix": "string", "revokedAt": "2019-08-24T14:15:22Z", "role": "string", "siteIds": [ "497f6eca-6276-4993-bfeb-53cbbbba6f08" ] }