Skip to main content
GET
http://localhost:3000
/
api-keys
curl -X GET 'https://api.example.com/api-keys?tenantId=tenant_acme&status=active' \
  -H 'Authorization: Bearer YOUR_TOKEN'
[
  {
    "id": "apk_0190a1b2-c3d4-7e5f-8a9b-0c1d2e3f4a5b",
    "subjectId": "subject_api_key_001",
    "tenantId": "tenant_acme",
    "environmentId": "environment_prod",
    "name": "CI Pipeline",
    "description": "Used for automated deployments",
    "prefix": "qs_live_xxxx",
    "lastFour": "a1b2",
    "hashAlgo": "argon2id",
    "createdBySubjectId": "subject_jane",
    "createdAt": "2024-01-15T10:30:00Z",
    "expiresAt": "2025-01-15T10:30:00Z",
    "status": "active",
    "lastUsedAt": "2024-01-20T14:00:00Z",
    "lastUsedIp": "192.168.1.1",
    "intendedUse": "ci-cd"
  }
]

Query Parameters

tenantId
string
Filter by tenant ID
environmentId
string
Filter by environment ID
status
string
Filter by status. One of: active, revoked, expired
subjectId
string
Filter by associated subject ID

Response

Returns an array of API key objects. Note: The actual key value is never returned after creation.
curl -X GET 'https://api.example.com/api-keys?tenantId=tenant_acme&status=active' \
  -H 'Authorization: Bearer YOUR_TOKEN'
[
  {
    "id": "apk_0190a1b2-c3d4-7e5f-8a9b-0c1d2e3f4a5b",
    "subjectId": "subject_api_key_001",
    "tenantId": "tenant_acme",
    "environmentId": "environment_prod",
    "name": "CI Pipeline",
    "description": "Used for automated deployments",
    "prefix": "qs_live_xxxx",
    "lastFour": "a1b2",
    "hashAlgo": "argon2id",
    "createdBySubjectId": "subject_jane",
    "createdAt": "2024-01-15T10:30:00Z",
    "expiresAt": "2025-01-15T10:30:00Z",
    "status": "active",
    "lastUsedAt": "2024-01-20T14:00:00Z",
    "lastUsedIp": "192.168.1.1",
    "intendedUse": "ci-cd"
  }
]