List API keys
GET /v1/apikeys: Requires LIST_API_KEY on the singleton instance, then retrieves one UUID-ordered page containing only credentials that independently pass READ_API_KEY.
Requires LIST_API_KEY on the singleton instance, then retrieves one UUID-ordered page containing only credentials that independently pass READ_API_KEY. Both gates use the authenticated principal's live authority and any scoped-key ceiling. Subject, owner, and lifecycle filters are applied after authorization. FULL includes complete immutable ceilings; BASIC omits them, sets ceilingOmitted=true, and permits larger pages. Raw key values and key hashes are never returned.
ApiKeyAuthx-api-key<token>subjectPrincipalId?stringFilter by exact subject-principal UUID
ownerPrincipalId?stringFilter by exact administrative-owner UUID
lifecycleState?stringFilter by precise lifecycle state
"NOT_YET_VALID""USABLE""EXPIRED""REVOKED"view?stringMetadata projection; omission defaults to FULL
"FULL""FULL""BASIC"maxResults?integerPage size; FULL defaults to 10 and permits at most 20, while BASIC defaults to 50 and permits at most 1,000
int32nextToken?stringOpaque continuation token returned by the preceding page
GoodMem-Timeout-Ms?integerOptional waiting budget in milliseconds, measured from REST servlet ingress and shared across all internal gRPC calls. Supply one decimal integer from 1 to 86400000. Omission adds no deadline. Existing shorter deadlines still apply. Expiry returns HTTP 504 before streaming starts; after streaming starts, no successful completion event is sent. Use SSE or opt into GoodMem-Stream-Terminal for an explicit terminal outcome. Retrieval work is cooperatively cancelled. An accepted mutation may still commit after timeout or disconnect; a failed response does not imply rollback.
int641 <= value <= 86400000Successfully retrieved API keys
application/json- response
One page of API keys discoverable to the authenticated principal.
keys*array<>API keys in stable UUID order.
nextToken?|Opaque token for retrieving the next page; omitted on the last page.
curl -X GET 'https://your-goodmem-server.example.com/v1/apikeys?subjectPrincipalId=70e025f6-76ca-4cbe-b8fc-7dab8e84590a&ownerPrincipalId=b3303d0a-1a4a-493f-b9bf-38e37153b5a2&maxResults=10' \ -H 'GoodMem-Timeout-Ms: 30000'{ "keys": [ { "apiKeyId": "550e8400-e29b-41d4-a716-446655440000", "subjectPrincipalId": "70e025f6-76ca-4cbe-b8fc-7dab8e84590a", "ownerPrincipalId": "b3303d0a-1a4a-493f-b9bf-38e37153b5a2", "keyPrefix": "gm_12345...", "status": "ACTIVE", "expiresAt": 1672531200000, "validFrom": 1640908800000, "revokedAt": 1640995200000, "revokedById": "b3303d0a-1a4a-493f-b9bf-38e37153b5a2", "lastUsedAt": 1640995200000, "createdAt": 1640908800000, "updatedAt": 1640908800000, "createdById": "b3303d0a-1a4a-493f-b9bf-38e37153b5a2", "updatedById": "b3303d0a-1a4a-493f-b9bf-38e37153b5a2" } ], "nextToken": "string"}