Skip to content

Get a specific API key by ID

GET /api/v1/api-keys/{id}

GET /maas/api/v1/api-keys/{id}

Returns metadata for a single API key by its ID.

Authorization

Parameters

Name In Type Required Description
id path string Yes

ID of the API key to retrieve

Responses

Status Description Response body
200 OK

OK response.

ApiKey

application/json

401 Unauthorized

Unauthorized response.

None
404 Not Found

Not Found. API key not found.

None
500 Internal Server Error

Internal Server Error

None

Example request

curl -X GET "/maas/api/v1/api-keys/{id}" \
  -H "Authorization: Bearer $TOKEN"

Example response

200 OK, application/json

{
  "id": "string",
  "name": "string",
  "description": "string",
  "username": "string",
  "groups": ["string"],
  "creationDate": "2024-01-31T09:30:00Z",
  "expirationDate": "2024-01-31T09:30:00Z",
  "status": "active",
  "lastUsedAt": "2024-01-31T09:30:00Z",
  "subscription": "premium-team-sub"
}