Get API key metadata
GET
/api/v1/admin/api-keys/{key_id}
const url = 'https://example.com/api/v1/admin/api-keys/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0';const options = {method: 'GET', headers: {'X-Label-Hub-Key': '<X-Label-Hub-Key>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://example.com/api/v1/admin/api-keys/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0 \ --header 'X-Label-Hub-Key: <X-Label-Hub-Key>'Returns metadata for a single API key. key_hash and plaintext are never included.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”key_id
required
Key Id
string format: uuid
Responses
Section titled “Responses”Successful Response
Media typeapplication/json
ApiKeyRead
Metadata-only view — no key_hash, no plaintext.
object
allowed_printer_ids
required
Allowed Printer Ids
Array<string>
created_at
required
Created At
string
enabled
required
Enabled
boolean
id
required
Id
string format: uuid
key_prefix
required
Key Prefix
string
name
required
Name
string
rate_limit_per_minute
required
Rate Limit Per Minute
integer
scopes
required
Scopes
Array<string>
Example generated
{ "allowed_printer_ids": [ "example" ], "created_at": "example", "enabled": true, "expires_at": "example", "id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "key_prefix": "example", "last_used_at": "example", "last_used_ip": "example", "name": "example", "notes": "example", "rate_limit_per_minute": 1, "scopes": [ "example" ]}Validation Error
Media typeapplication/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationErrorobject
ctx
Context
object
input
Input
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
Example generated
{ "detail": [ { "ctx": {}, "input": "example", "loc": [ "example" ], "msg": "example", "type": "example" } ]}