GoodMemGoodMem
ReferenceAPIREST APIUsers

Get a human-user enrollment

GET /v1/users/{userId}/enrollments/{enrollmentId}: Returns non-secret metadata for one current or historical enrollment.

GET
/v1/users/{userId}/enrollments/{enrollmentId}

Returns non-secret metadata for one current or historical enrollment. The target user is resolved before the enrollment, and MANAGE_USER_ENROLLMENT with ANY or EXACT authority on that user is required. Raw enrollment tokens are never returned.

Authorization

ApiKeyAuth
headerx-api-key<token>

Path Parameters

userId*string

Human-user UUID

enrollmentId*string

Enrollment 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

Enrollment metadata returned

application/json
  1. response

Non-secret lifecycle metadata for a human user's one-time enrollment credential.

enrollmentId*string

OUTPUT_ONLY; immutable enrollment UUID.

Formatuuid
Example"0198b9f4-c42f-7ae3-8c56-44d827ea03bd"
userId*string

OUTPUT_ONLY; UUID of the human user invited to enroll.

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

OUTPUT_ONLY; non-secret prefix that identifies the enrollment credential safely.

Match^gme_[a-z2-7]{6}$
Length10 <= length <= 10
Example"gme_mzxw6y"
status*string

OUTPUT_ONLY; current derived enrollment lifecycle state.

Example"PENDING"
Value in"PENDING""EXPIRED""CONSUMED""REVOKED"
expiresAt*integer

OUTPUT_ONLY; exclusive completion deadline in milliseconds since epoch.

Formatint64
Example1786752000000
consumedApiKeyId?|

OUTPUT_ONLY; initial API-key UUID, present after consumption.

Formatuuid
Example"550e8400-e29b-41d4-a716-446655440000"
createdAt*integer

OUTPUT_ONLY; enrollment issuance time in milliseconds since epoch.

Formatint64
Example1786665600000
consumedAt?|

OUTPUT_ONLY; first-completion time, absent before consumption.

Formatint64
Example1786669200000
revokedAt?|

OUTPUT_ONLY; permanent revocation time, absent while unrevoked.

Formatint64
Example1786669200000
createdById*string

OUTPUT_ONLY; exact principal or API-key actor that issued the enrollment.

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

OUTPUT_ONLY; exact revoking actor UUID, absent while unrevoked.

Formatuuid
Example"b3303d0a-1a4a-493f-b9bf-38e37153b5a2"
Example Request
curl -X GET 'https://your-goodmem-server.example.com/v1/users/70e025f6-76ca-4cbe-b8fc-7dab8e84590a/enrollments/0198b9f4-c42f-7ae3-8c56-44d827ea03bd' \  -H 'GoodMem-Timeout-Ms: 30000'
Example Response
{  "enrollmentId": "0198b9f4-c42f-7ae3-8c56-44d827ea03bd",  "userId": "70e025f6-76ca-4cbe-b8fc-7dab8e84590a",  "credentialPrefix": "gme_mzxw6y",  "status": "PENDING",  "expiresAt": 1786752000000,  "consumedApiKeyId": "550e8400-e29b-41d4-a716-446655440000",  "createdAt": 1786665600000,  "consumedAt": 1786669200000,  "revokedAt": 1786669200000,  "createdById": "b3303d0a-1a4a-493f-b9bf-38e37153b5a2",  "revokedById": "b3303d0a-1a4a-493f-b9bf-38e37153b5a2"}