Skip to content

Policy API

GET/v1/sprites/{name}/policy/network

Get the current network policy configuration.

StatusDescription
200Success
404Not Found - Resource not found
500Internal Server Error
Request
Response
{
"rules": [
{
"action": "allow",
"domain": "github.com"
},
{
"action": "allow",
"domain": "*.npmjs.org"
},
{
"action": "deny",
"domain": "*"
}
]
}

POST/v1/sprites/{name}/policy/network

Update the network policy configuration.

Request Body

rules:NetworkPolicyRule[]

List of network policy rules

StatusDescription
200Success
400Bad Request - Invalid request body
404Not Found - Resource not found
500Internal Server Error
Request
Response
{
"rules": [
{
"action": "allow",
"domain": "github.com"
}
]
}

GET/v1/sprites/{name}/policy/privileges

Get the current privileges policy configuration (capability and device restrictions).

StatusDescription
200Success
404Not Found - Resource not found
500Internal Server Error
Request

POST/v1/sprites/{name}/policy/privileges

Update the privileges policy configuration to restrict capabilities or devices.

StatusDescription
200Success
400Bad Request - Invalid request body
404Not Found - Resource not found
500Internal Server Error
Request

DELETE/v1/sprites/{name}/policy/privileges

Remove privileges policy to revert to default (unrestricted) behavior.

StatusDescription
200Success
400Bad Request - Invalid request body
404Not Found - Resource not found
500Internal Server Error
Request