GoodMemGoodMem
ReferenceAPIREST APIAPI Keys

Get an API key

GET /v1/apikeys/{id}: Returns complete non-secret metadata for one existing credential after requiring effective READ_API_KEY authority.

GET
/v1/apikeys/{id}

Returns complete non-secret metadata for one existing credential after requiring effective READ_API_KEY authority. The immutable ceiling is always complete and ceilingOmitted is false. Raw key material and hashes are never returned.

Authorization

ApiKeyAuth
headerx-api-key<token>

Path Parameters

id*string

API-key UUID

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

API-key metadata returned

application/json
  1. response

API key metadata without sensitive information.

apiKeyId*string

Unique identifier for the API key.

Formatuuid
Example"550e8400-e29b-41d4-a716-446655440000"
subjectPrincipalId*string

Principal authenticated by this API key.

Formatuuid
Example"70e025f6-76ca-4cbe-b8fc-7dab8e84590a"
ownerPrincipalId*string

Principal that administratively owns this API key.

Formatuuid
Example"b3303d0a-1a4a-493f-b9bf-38e37153b5a2"
authorityMode*ApiKeyAuthorityMode

Immutable authority derivation mode.

Value in"INHERIT_SUBJECT""SCOPED"
ceiling?array<>|

Complete immutable issuance ceiling; omitted only when ceilingOmitted is true.

ceilingOmitted*boolean

True only when a BASIC list projection intentionally omitted the immutable ceiling.

keyPrefix*string

First few characters of the key for display/identification purposes.

Example"gm_12345..."
status*string

Compatibility usability status. ACTIVE means USABLE; INACTIVE combines NOT_YET_VALID, EXPIRED, and REVOKED.

Example"ACTIVE"
Value in"ACTIVE""INACTIVE"
lifecycleState*string

Precise lifecycle state at the response evaluation instant.

Value in"NOT_YET_VALID""USABLE""EXPIRED""REVOKED"
labels*

User-defined labels for organization and filtering.

Example
{  "purpose": "production",  "service": "recommendation-engine"}
expiresAt?|

Expiration timestamp in milliseconds since epoch. If not provided, the key does not expire.

Formatint64
Example1672531200000
validFrom*integer

Inclusive activation time in milliseconds since epoch.

Formatint64
Example1640908800000
revokedAt?|

Permanent revocation time in milliseconds since epoch.

Formatint64
Example1640995200000
revokedById?|

Exact audit actor UUID that revoked this key.

Formatuuid
Example"b3303d0a-1a4a-493f-b9bf-38e37153b5a2"
lastUsedAt?|

Last time this API key was used, in milliseconds since epoch.

Formatint64
Example1640995200000
createdAt*integer

When the API key was created, in milliseconds since epoch.

Formatint64
Example1640908800000
updatedAt*integer

When the API key was last updated, in milliseconds since epoch.

Formatint64
Example1640908800000
createdById*string

Exact principal or API-key actor that created this API key.

Formatuuid
Example"b3303d0a-1a4a-493f-b9bf-38e37153b5a2"
updatedById*string

Exact principal or API-key actor that last updated this API key.

Formatuuid
Example"b3303d0a-1a4a-493f-b9bf-38e37153b5a2"
Example Request
curl -X GET 'https://your-goodmem-server.example.com/v1/apikeys/550e8400-e29b-41d4-a716-446655440000' \  -H 'GoodMem-Timeout-Ms: 30000'
Example Response
{  "apiKeyId": "550e8400-e29b-41d4-a716-446655440000",  "subjectPrincipalId": "70e025f6-76ca-4cbe-b8fc-7dab8e84590a",  "ownerPrincipalId": "b3303d0a-1a4a-493f-b9bf-38e37153b5a2",  "authorityMode": "INHERIT_SUBJECT",  "ceiling": [    {      "assignedResource": {        "resourceId": "550e8400-e29b-41d4-a716-446655440000"      }    }  ],  "ceilingOmitted": true,  "keyPrefix": "gm_12345...",  "status": "ACTIVE",  "lifecycleState": "NOT_YET_VALID",  "labels": {    "purpose": "production",    "service": "recommendation-engine"  },  "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"}