GoodMemGoodMem
ReferenceAPIREST APIAPI Keys

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.

GET
/v1/apikeys
x-api-key<token>

In: header

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

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"
}
Empty
Empty
Empty
Empty
Empty
Empty
Empty