| GET | /api/policies/my-access |
| POST | /api/policies/evaluate |
| GET | /api/policies |
| POST | /api/policies |
| GET | /api/policies/:id |
| PUT | /api/policies/:id |
| GET | /api/policies/:id/delete-impact |
| DELETE | /api/policies/:id |
Servers the caller can access
GET/api/policies/my-access
Authentication: bearer token.
Permission: any signed-in user.
curl -X GET "https://shellius.example.com/api/policies/my-access" \
-H "Authorization: Bearer $SHELLIUS_TOKEN"200 OK
{ "success": true, "data": { … } }Dry-run policy evaluation for any user/server
POST/api/policies/evaluate
Debugging/admin tool Must be registered before /:id for the same reason.
Authentication: bearer token.
Permission: policies.view.
Request body
| Name | Type | Required | Notes |
|---|---|---|---|
userId | string | Yes | |
serverId | string | Yes | |
requestedPrincipal | string | No | |
policyId | string | No | |
policy | object | No |
curl -X POST "https://shellius.example.com/api/policies/evaluate" \
-H "Authorization: Bearer $SHELLIUS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"userId": "…",
"serverId": "…"
}'200 OK
{ "success": true, "data": { … } }List policies
GET/api/policies
Authentication: bearer token.
Permission: policies.view.
Query parameters
| Name | Type | Required | Notes |
|---|---|---|---|
customerId | string | No | |
effect | string | No | |
isActive | boolean | No | |
page | number | No | Default 1. At least 1. |
pageSize | number | No | Default 25. 1–100. |
curl -X GET "https://shellius.example.com/api/policies" \
-H "Authorization: Bearer $SHELLIUS_TOKEN"200 OK
{ "success": true, "data": { … } }Create policy
POST/api/policies
Authentication: bearer token.
Permission: policies.manage.
Request body
| Name | Type | Required | Notes |
|---|---|---|---|
name | string | Yes | 1–255 characters. |
description | string | No | At most 1000 characters. May be null. |
effect | string | Yes | |
customerId | string | No | May be null. |
targetEnvironments | array | No | Default []. |
targetLabels | object | No | |
targetServerIds | array | No | Default []. |
allowedPrincipals | array | No | Default []. |
maxSessionDuration | number | Yes | 60–604800. |
requireApproval | boolean | No | Default false. |
autoApprove | boolean | No | Default false. |
isActive | boolean | No | Default true. |
priority | number | No | Default 100. 1–9999. |
osProvisioning | object | No | |
allowKeyDownload | boolean | No | Default false. |
isBreakGlass | boolean | No | Default false. |
approverGroupId | string | No | May be null. |
approverRoles | array | No | Default []. At most 100. |
approverUserIds | array | No | Default []. |
subjects | array | No | Default []. |
curl -X POST "https://shellius.example.com/api/policies" \
-H "Authorization: Bearer $SHELLIUS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "…",
"effect": "…",
"maxSessionDuration": 0
}'201 Created
{ "success": true, "data": { … } }Get policy
GET/api/policies/:id
Authentication: bearer token.
Permission: policies.view.
Path parameters
| Name | Type | Notes |
|---|---|---|
id | string |
curl -X GET "https://shellius.example.com/api/policies/{id}" \
-H "Authorization: Bearer $SHELLIUS_TOKEN"200 OK
{ "success": true, "data": { … } }Update policy
PUT/api/policies/:id
Authentication: bearer token.
Permission: policies.manage.
Path parameters
| Name | Type | Notes |
|---|---|---|
id | string |
Request body
| Name | Type | Required | Notes |
|---|---|---|---|
name | string | No | 1–255 characters. |
description | string | No | At most 1000 characters. May be null. |
effect | string | No | |
customerId | string | No | May be null. |
targetEnvironments | array | No | |
targetLabels | object | No | |
targetServerIds | array | No | |
allowedPrincipals | array | No | |
maxSessionDuration | number | No | 60–604800. |
requireApproval | boolean | No | |
autoApprove | boolean | No | |
isActive | boolean | No | |
priority | number | No | 1–9999. |
osProvisioning | object | No | |
allowKeyDownload | boolean | No | |
isBreakGlass | boolean | No | |
approverGroupId | string | No | May be null. |
approverRoles | array | No | At most 100. |
approverUserIds | array | No | |
subjects | array | No |
curl -X PUT "https://shellius.example.com/api/policies/{id}" \
-H "Authorization: Bearer $SHELLIUS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "…",
"description": "…",
"effect": "…"
}'200 OK
{ "success": true, "data": { … } }Preview policy delete
GET/api/policies/:id/delete-impact
Authentication: bearer token.
Permission: policies.manage.
Path parameters
| Name | Type | Notes |
|---|---|---|
id | string |
curl -X GET "https://shellius.example.com/api/policies/{id}/delete-impact" \
-H "Authorization: Bearer $SHELLIUS_TOKEN"200 OK
{ "success": true, "data": { … } }Delete policy
DELETE/api/policies/:id
Authentication: bearer token.
Permission: policies.manage.
Path parameters
| Name | Type | Notes |
|---|---|---|
id | string |
curl -X DELETE "https://shellius.example.com/api/policies/{id}" \
-H "Authorization: Bearer $SHELLIUS_TOKEN"200 OK
{ "success": true, "data": { … } }