Skip to content

Access requests

Request access, review requests, revoke them, and fetch the credentials an approved request grants.

POST/api/access-requests
GET/api/access-requests
GET/api/access-requests/by-server/:serverId/active
GET/api/access-requests/intent
GET/api/access-requests/intents
POST/api/access-requests/break-glass/start
POST/api/access-requests/break-glass/verify
POST/api/access-requests/break-glass
GET/api/access-requests/:id
PATCH/api/access-requests/:id/review
POST/api/access-requests/:id/revoke
POST/api/access-requests/:id/ssh-credentials
POST/api/access-requests/:id/rdp-credentials
POST/api/access-requests/:id/rdp-token
POST/api/access-requests/:id/connect

Submit access request ​

POST/api/access-requests

Authentication: bearer token.
Permission: any signed-in user.

Request body

NameTypeRequiredNotes
serverIdstringYes
reasonstringYesAt least 10 characters.
requestedDurationnumberYesAt least 60.
requestedPrincipalstringNoMay be null.
protocolstringNoDefault SSH.
bash
curl -X POST "https://shellius.example.com/api/access-requests" \
  -H "Authorization: Bearer $SHELLIUS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "serverId": "…",
    "reason": "…",
    "requestedDuration": 0
  }'

201 Created

json
{ "success": true, "data": { … } }

List requests ​

GET/api/access-requests

Authentication: bearer token.
Permission: any signed-in user.

Query parameters

NameTypeRequiredNotes
tabstringNoOne of mine, to-review, all. Default mine.
statusstringNoOne of PENDING, APPROVED, DENIED, EXPIRED, REVOKED.
pagenumberNoDefault 1. At least 1.
limitnumberNoDefault 25. 1–100.
bash
curl -X GET "https://shellius.example.com/api/access-requests" \
  -H "Authorization: Bearer $SHELLIUS_TOKEN"

200 OK

json
{ "success": true, "data": { … } }

Caller's active AR for a server ​

GET/api/access-requests/by-server/:serverId/active

Authentication: bearer token.
Permission: any signed-in user.

Path parameters

NameTypeNotes
serverIdstring
bash
curl -X GET "https://shellius.example.com/api/access-requests/by-server/{serverId}/active" \
  -H "Authorization: Bearer $SHELLIUS_TOKEN"

200 OK

json
{ "success": true, "data": { … } }

UI intent for one server ​

GET/api/access-requests/intent

MUST be registered BEFORE /:id so Express doesn't match "intent" as an id.

Authentication: bearer token.
Permission: any signed-in user.

Query parameters

NameTypeRequiredNotes
serverId—No
bash
curl -X GET "https://shellius.example.com/api/access-requests/intent" \
  -H "Authorization: Bearer $SHELLIUS_TOKEN"

200 OK

json
{ "success": true, "data": { … } }

Bulk intents ​

GET/api/access-requests/intents

Bulk sibling of /intent MUST be registered BEFORE /:id. Max 50 ids to bound query cost.

Authentication: bearer token.
Permission: any signed-in user.

Query parameters

NameTypeRequiredNotes
serverIds—No
bash
curl -X GET "https://shellius.example.com/api/access-requests/intents" \
  -H "Authorization: Bearer $SHELLIUS_TOKEN"

200 OK

json
{ "success": true, "data": { … } }

Break glass start ​

POST/api/access-requests/break-glass/start

Step 1: validate + issue a step-up verification challenge. Grants nothing by itself.

Authentication: bearer token.
Permission: access.break_glass.

Request body

NameTypeRequiredNotes
serverIdstringYes
reasonstringYes20–1000 characters.
durationSecondsnumberNoAt least 300.
methodstringNoOne of totp, email.
bash
curl -X POST "https://shellius.example.com/api/access-requests/break-glass/start" \
  -H "Authorization: Bearer $SHELLIUS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "serverId": "…",
    "reason": "…"
  }'

201 Created

json
{ "success": true, "data": { … } }

Break glass verify ​

POST/api/access-requests/break-glass/verify

Step 2: burn the challenge against the code and, on success, create the pre-approved AccessRequest.

Authentication: bearer token.
Permission: access.break_glass.

Request body

NameTypeRequiredNotes
challengeIdstringYes
codestringYes
bash
curl -X POST "https://shellius.example.com/api/access-requests/break-glass/verify" \
  -H "Authorization: Bearer $SHELLIUS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "challengeId": "…",
    "code": "…"
  }'

201 Created

json
{ "success": true, "data": { … } }

Self-approved emergency access ​

POST/api/access-requests/break-glass

Authentication: bearer token.
Permission: access.break_glass.

Request body

NameTypeRequiredNotes
serverIdstringYes
reasonstringYes20–1000 characters.
durationSecondsnumberNo300–3600.
bash
curl -X POST "https://shellius.example.com/api/access-requests/break-glass" \
  -H "Authorization: Bearer $SHELLIUS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "serverId": "…",
    "reason": "…"
  }'

200 OK

json
{ "success": true, "data": { … } }

Get request ​

GET/api/access-requests/:id

Requester, reviewer, or admin+ Access control enforced in service via callerId/callerRole.

Authentication: bearer token.
Permission: any signed-in user.

Path parameters

NameTypeNotes
idstring
bash
curl -X GET "https://shellius.example.com/api/access-requests/{id}" \
  -H "Authorization: Bearer $SHELLIUS_TOKEN"

200 OK

json
{ "success": true, "data": { … } }

Approve/deny a PENDING request ​

PATCH/api/access-requests/:id/review

Reviewer only (service enforces)

Authentication: bearer token.
Permission: any signed-in user.

Path parameters

NameTypeNotes
idstring

Request body

NameTypeRequiredNotes
decisionstringYesOne of approve, deny.
approvedDurationstringNoAt least 60.
deniedReasonstringYesAt least 5.
bash
curl -X PATCH "https://shellius.example.com/api/access-requests/{id}/review" \
  -H "Authorization: Bearer $SHELLIUS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "decision": "approve",
    "deniedReason": "…"
  }'

200 OK

json
{ "success": true, "data": { … } }

Revoke request ​

POST/api/access-requests/:id/revoke

Admin+ OR reviewer (service enforces)

Authentication: bearer token.
Permission: any signed-in user.

Path parameters

NameTypeNotes
idstring

Request body

NameTypeRequiredNotes
reasonstringNoAt least 1 characters.
bash
curl -X POST "https://shellius.example.com/api/access-requests/{id}/revoke" \
  -H "Authorization: Bearer $SHELLIUS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "reason": "…"
  }'

200 OK

json
{ "success": true, "data": { … } }

Ephemeral key + cert download ​

POST/api/access-requests/:id/ssh-credentials

Requester only SECURITY: This endpoint returns an ephemeral Ed25519 private key. The private key crosses the wire exactly once here and is NEVER stored server-side. Callers must set Cache-Control: no-store on their end; we enforce it here via response headers.

Authentication: bearer token.
Permission: any signed-in user.

Path parameters

NameTypeNotes
idstring
bash
curl -X POST "https://shellius.example.com/api/access-requests/{id}/ssh-credentials" \
  -H "Authorization: Bearer $SHELLIUS_TOKEN"

200 OK

json
{ "success": true, "data": { … } }

.rdp file for approved RDP request ​

POST/api/access-requests/:id/rdp-credentials

Requester only.

Authentication: bearer token.
Permission: any signed-in user.

Path parameters

NameTypeNotes
idstring
bash
curl -X POST "https://shellius.example.com/api/access-requests/{id}/rdp-credentials" \
  -H "Authorization: Bearer $SHELLIUS_TOKEN"

200 OK

json
{ "success": true, "data": { … } }

5-min Guacamole gateway token ​

POST/api/access-requests/:id/rdp-token

Requester only Returns a short-lived gateway JWT (5 min) that the frontend passes as ?token= on the WebSocket RDP connection.

Authentication: bearer token.
Permission: any signed-in user.

Path parameters

NameTypeNotes
idstring
bash
curl -X POST "https://shellius.example.com/api/access-requests/{id}/rdp-token" \
  -H "Authorization: Bearer $SHELLIUS_TOKEN"

200 OK

json
{ "success": true, "data": { … } }

Stub web-terminal URL ​

POST/api/access-requests/:id/connect

Requester only TODO(phase-8): Wire to web terminal WebSocket session. Currently returns a stub URL for the xterm.js terminal page.

Authentication: bearer token.
Permission: any signed-in user.

Path parameters

NameTypeNotes
idstring
bash
curl -X POST "https://shellius.example.com/api/access-requests/{id}/connect" \
  -H "Authorization: Bearer $SHELLIUS_TOKEN"

200 OK

json
{ "success": true, "data": { … } }
Was this page helpful?No, tell us why