List API keys
GET /v1/apikeys: Retrieves one UUID-ordered page of API keys discoverable under the authenticated principal's effective API-key policy.
Retrieves one UUID-ordered page of API keys discoverable under the authenticated principal's effective API-key policy. 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.
In: header
Query Parameters
Filter by exact subject-principal UUID
Filter by exact administrative-owner UUID
Filter by precise lifecycle state
"NOT_YET_VALID" | "USABLE" | "EXPIRED" | "REVOKED"Metadata projection; omission defaults to FULL
"FULL""FULL" | "BASIC"Page size; FULL defaults to 10 and permits at most 20, while BASIC defaults to 50 and permits at most 1,000
int32Opaque continuation token returned by the preceding page
Response Body
curl -X GET "https://your-goodmem-server.example.com/v1/apikeys?subjectPrincipalId=70e025f6-76ca-4cbe-b8fc-7dab8e84590a&ownerPrincipalId=b3303d0a-1a4a-493f-b9bf-38e37153b5a2&lifecycleState=NOT_YET_VALID&view=FULL&maxResults=10&nextToken=string"{
"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"
}