Skip to main content

Access requests API

Workspace join requests (requester side).

This page lists 4 endpoints (OpenAPI tag access-requests). It is generated from openapi.json; see the REST API overview for authentication, CSRF and error conventions.

MethodPathOperation idNotes
POST/api/access-requestscreate_access_request
GET/api/access-requests/joinablelist_joinable
GET/api/access-requests/minelist_my_access_requests
POST/api/access-requests/{id}/cancelcancel_access_request

POST /api/access-requests​

Operation id: create_access_request. Auth: Session cookie and X-Egret-CSRF header.

Request body (application/json): CreateAccessRequest

FieldTypeRequiredDescription
workspace_idstring (uuid)yes
rolestring, nullableno
reasonstring, nullableno

Response 201 (application/json): AccessRequestDto

FieldTypeRequiredDescription
idstringyes
workspace_idstringyes
workspace_namestring, nullableno
requester_idstringyes
requester_namestring, nullableno
requested_rolestringyes
reasonstringyes
statusstringyes
decided_bystring, nullableno
decided_atstring, nullableno
decision_notestring, nullableno
expires_atstring, nullableno
created_atstringyes
StatusMeaning
201Join request filed
400Already a member or workspace not joinable
401Not authenticated
409A pending request for this workspace already exists
500Internal error

GET /api/access-requests/joinable​

Operation id: list_joinable. Auth: Session cookie.

Response 200 (application/json): array of JoinableWorkspaceDto

FieldTypeRequiredDescription
idstringyes
slugstringyes
namestringyes
StatusMeaning
200Active workspaces the caller may request to join
401Not authenticated
500Internal error

GET /api/access-requests/mine​

Operation id: list_my_access_requests. Auth: Session cookie.

Response 200 (application/json): array of AccessRequestDto

FieldTypeRequiredDescription
idstringyes
workspace_idstringyes
workspace_namestring, nullableno
requester_idstringyes
requester_namestring, nullableno
requested_rolestringyes
reasonstringyes
statusstringyes
decided_bystring, nullableno
decided_atstring, nullableno
decision_notestring, nullableno
expires_atstring, nullableno
created_atstringyes
StatusMeaning
200The caller's own join requests, newest first
401Not authenticated
500Internal error

POST /api/access-requests/{id}/cancel​

Operation id: cancel_access_request. Auth: Session cookie and X-Egret-CSRF header.

ParameterInTypeRequiredDescription
idpathstring (uuid)yesAccess-request id

Response 200 (application/json): Ack

FieldTypeRequiredDescription
okbooleanyes
StatusMeaning
200Request cancelled
401Not authenticated
404No pending request to cancel for this user
500Internal error