Policy API
Get Network Policy
Section titled "Get Network Policy"GET
/v1/sprites/{name}/policy/networkGet the current network policy configuration.
Responses
Section titled “Responses”| Status | Description |
|---|---|
200 | Success |
404 | Not Found - Resource not found |
500 | Internal Server Error |
Request
Response
{"rules": [ { "action": "allow", "domain": "github.com" }, { "action": "allow", "domain": "*.npmjs.org" }, { "action": "deny", "domain": "*" }]}Set Network Policy
Section titled "Set Network Policy"POST
/v1/sprites/{name}/policy/networkUpdate the network policy configuration.
Request Body
rules:NetworkPolicyRule[]
List of network policy rules
Responses
Section titled “Responses”| Status | Description |
|---|---|
200 | Success |
400 | Bad Request - Invalid request body |
404 | Not Found - Resource not found |
500 | Internal Server Error |
Request
Response
{"rules": [ { "action": "allow", "domain": "github.com" }]}Get Privileges Policy
Section titled "Get Privileges Policy"GET
/v1/sprites/{name}/policy/privilegesGet the current privileges policy configuration (capability and device restrictions).
Responses
Section titled “Responses”| Status | Description |
|---|---|
200 | Success |
404 | Not Found - Resource not found |
500 | Internal Server Error |
Request
Set Privileges Policy
Section titled "Set Privileges Policy"POST
/v1/sprites/{name}/policy/privilegesUpdate the privileges policy configuration to restrict capabilities or devices.
Responses
Section titled “Responses”| Status | Description |
|---|---|
200 | Success |
400 | Bad Request - Invalid request body |
404 | Not Found - Resource not found |
500 | Internal Server Error |
Request
Delete Privileges Policy
Section titled "Delete Privileges Policy"DELETE
/v1/sprites/{name}/policy/privilegesRemove privileges policy to revert to default (unrestricted) behavior.
Responses
Section titled “Responses”| Status | Description |
|---|---|
200 | Success |
400 | Bad Request - Invalid request body |
404 | Not Found - Resource not found |
500 | Internal Server Error |
Request