api-keys

List

Machine credentials visible to the caller: their own keys, or — for a tenant admin — every key issued in their tenant. The plaintext secret is never returned here or anywhere after creation; only id, name, key_prefix, active and last_used_at are exposed. Filters only narrow that scope; total counts the rows matching every filter. q searches name and key_prefix only. expires_before uses the to grammar: YYYY-MM-DD includes that whole UTC day, RFC3339 is an exact (exclusive) instant; keys that never expire never match. A malformed active or expires_before is a 400; an unknown sort falls back to created.

get/api-keys

Request

  • Base URL: https://api.instruxi.dev/api/v1/enforcer
  • URL: https://api.instruxi.dev/api/v1/enforcer/api-keys
  • Auth: one of:
    • API key in header Authorization
    • API key in header X-API-Key

Query parameters

qstring

case-insensitive substring of name or key_prefix

activeboolean

only active (true) or revoked (false) keys; anything but true/false is 400 invalid_active

expires_beforestring

only keys with an expiry before this bound: YYYY-MM-DD (inclusive day) or RFC3339 (exclusive); malformed is 400 invalid_expires_before

sort'created' | 'name' | 'last_used' | 'expires'

sort field (name, last_used and expires order NULLS LAST)

sort_dir'asc' | 'desc'

sort direction (id breaks ties in the same direction)

limitinteger

page size

offsetinteger

page offset

tenant_idstring uuid

list this tenant instead of your own (default: the caller's own tenant, platform admins included). Another tenant requires the cross_tenant grant — 403 otherwise

all_tenantsboolean

list EVERY tenant (platform-wide admin view). Requires the cross_tenant grant — 403 otherwise. Mutually exclusive with tenant_id (400 conflicting_tenant_scope)

Response

OK

limitinteger
offsetinteger
successboolean
totalinteger

Example response

{
  "success": true
}

Changes

No recorded changes to this operation across all 1 revision of this API.