Skip to content

Policy API

Get Network Policy

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": "*"
}
]
}

Set Network Policy

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"
}
]
}