Assign a scoped role
POST /v1/access-policy/role-assignments: Assigns one code-defined role to an active principal at INSTANCE or SPACE scope after requiring MANAGE_ACCESS. ROOT is maintained only by ownership workflows.
Assigns one code-defined role to an active principal at INSTANCE or SPACE scope after requiring MANAGE_ACCESS. ROOT is maintained only by ownership workflows.
ApiKeyAuthx-api-key<token>GoodMem-Timeout-Ms?integerOptional 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.
int641 <= value <= 86400000application/json- body
Assigns one code-defined role at an INSTANCE or SPACE boundary.
roleAssignmentId?|Optional caller-provided role-assignment UUID.
uuid"9f75bfdf-6c08-4ccc-b945-8688d91ef25d"principalId*stringActive principal receiving the role.
uuid"70e025f6-76ca-4cbe-b8fc-7dab8e84590a"role*stringCode-defined non-ROOT role to assign.
"ADMIN""USER""SPACE_VIEWER""SPACE_CONTRIBUTOR""SPACE_CONTENT_MANAGER""SPACE_ADMIN"assignedResource*INSTANCE or SPACE boundary receiving the assignment.
Role assigned
application/json- response
Current or historical scoped role assignment.
roleAssignmentId*stringDurable role-assignment UUID.
uuid"9f75bfdf-6c08-4ccc-b945-8688d91ef25d"principalId*stringAssigned principal UUID.
uuid"70e025f6-76ca-4cbe-b8fc-7dab8e84590a"role*RoleCode-defined assigned role.
"ROOT""ADMIN""USER""SPACE_VIEWER""SPACE_CONTRIBUTOR""SPACE_CONTENT_MANAGER""SPACE_ADMIN"assignedResource*INSTANCE or SPACE assignment boundary.
assignedAt*integerAssignment time in epoch milliseconds.
int64assignedById*stringExact audit actor that assigned the role.
uuid"114ad558-323d-4b76-85b8-37af103b8650"revokedAt?|Revocation time in epoch milliseconds, when revoked.
int64revokedById?|Exact audit actor that revoked the assignment, when revoked.
uuid"ab882e21-ea3f-4c29-9040-49be3cc93162"curl -X POST 'https://your-goodmem-server.example.com/v1/access-policy/role-assignments' \ -H 'GoodMem-Timeout-Ms: 30000' \ -H 'Content-Type: application/json' \ -d '{ "roleAssignmentId": "9f75bfdf-6c08-4ccc-b945-8688d91ef25d", "principalId": "70e025f6-76ca-4cbe-b8fc-7dab8e84590a", "assignedResource": { "resourceId": "550e8400-e29b-41d4-a716-446655440000" }}'{ "roleAssignmentId": "9f75bfdf-6c08-4ccc-b945-8688d91ef25d", "principalId": "70e025f6-76ca-4cbe-b8fc-7dab8e84590a", "role": "ROOT", "assignedResource": { "kind": "INSTANCE", "resourceId": "550e8400-e29b-41d4-a716-446655440000" }, "assignedAt": 0, "assignedById": "114ad558-323d-4b76-85b8-37af103b8650", "revokedAt": 0, "revokedById": "ab882e21-ea3f-4c29-9040-49be3cc93162"}Access Policy
Browse REST endpoints for authorization checks, direct grants, and scoped role assignments, including inspection, listing, and revocation.
Check effective authorization
POST /v1/access-policy:check: Evaluates 1 to 50 concrete operation-and-target checks under the authenticated caller's live authority and any API-key ceiling.