GoodMemGoodMem
ReferenceAPIREST APIAPI Keys

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.

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. 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.

Authorization

ApiKeyAuth
headerx-api-key<token>

Query Parameters

subjectPrincipalId?string

Filter by exact subject-principal UUID

ownerPrincipalId?string

Filter by exact administrative-owner UUID

lifecycleState?string

Filter by precise lifecycle state

Value in"NOT_YET_VALID""USABLE""EXPIRED""REVOKED"
view?string

Metadata projection; omission defaults to FULL

Default"FULL"
Value in"FULL""BASIC"
maxResults?integer

Page size; FULL defaults to 10 and permits at most 20, while BASIC defaults to 50 and permits at most 1,000

Formatint32
nextToken?string

Opaque continuation token returned by the preceding page

Header Parameters

GoodMem-Timeout-Ms?integer

Optional 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.

Formatint64
Range1 <= value <= 86400000

Response Body

Successfully retrieved API keys

application/json
  1. 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.

Example Request
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'
Example Response
{  "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"}