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.
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
case-insensitive substring of name or key_prefix
only active (true) or revoked (false) keys; anything but true/false is 400 invalid_active
only keys with an expiry before this bound: YYYY-MM-DD (inclusive day) or RFC3339 (exclusive); malformed is 400 invalid_expires_before
sort field (name, last_used and expires order NULLS LAST)
sort direction (id breaks ties in the same direction)
page size
page offset
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
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
Example response
{
"success": true
}Changes
No recorded changes to this operation across all 1 revision of this API.