apiKey
Requires at least one of the permissions settings:api:read or settings:tenant:read.
Get details of a specific API key
Errors: a failed call returns a GraphQL errors entry, not a field on the result, and data may be null or partial. Read the entry's extensions.code and message; every shape and code is in the Error reference.
Example:
- GraphQL
- cURL
query ApiKey($id: String!) {
apiKey(id: $id) {
id
name
createdAt
allowedIps
expiresAt
isActive
}
}
curl -X POST "https://<api-host>/graphql" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
--data @- <<'EOF'
{
"query": "query ApiKey($id: String!) {\n apiKey(id: $id) {\n id\n name\n createdAt\n allowedIps\n expiresAt\n isActive\n }\n}",
"variables": {
"id": "string"
}
}
EOF
Variables:
{
"id": "string"
}
Response:
{
"data": {
"apiKey": {
"id": "id",
"name": "string",
"createdAt": "2025-01-15T00:00:00Z",
"allowedIps": [
"string"
],
"expiresAt": "2025-01-15T00:00:00Z",
"isActive": true
}
}
}
apiKey(
id: String!
): ApiKeyResult
Arguments
apiKey.id ● String! non-null scalar
The ID of the API key.
Type
ApiKeyResult object
An API key. The full key is never shown again after it is created.