Skip to main content
PATCH
/
v1
/
machines
/
{id}
/
egress
Update the egress policy of a running machine
import requests

url = "https://api.13-215-85-171.sslip.io/v1/machines/{id}/egress"

payload = { "egress": {
        "allow_cidrs": ["<string>"],
        "deny_cidrs": ["<string>"],
        "rate_limit": {
            "kbit_per_sec": 2,
            "pps": 2,
            "burst": 2
        }
    } }
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.patch(url, json=payload, headers=headers)

print(response.text)
{
  "machine_id": "mch_a1b2c3d4",
  "egress": {
    "allow_cidrs": [
      "<string>"
    ],
    "deny_cidrs": [
      "<string>"
    ],
    "rate_limit": {
      "kbit_per_sec": 2,
      "pps": 2,
      "burst": 2
    }
  }
}

Authorizations

Authorization
string
header
required

API key passed as Bearer token

Path Parameters

id
string
required

Machine ID (e.g. mch_a1b2c3d4)

Body

application/json
egress
object
required

Typed per-machine egress policy. IPv4 only; no domain/DNS filtering. deny_all is fail-closed and cannot be weakened by other fields.

Response

Effective egress policy after the update

machine_id
string
required
Example:

"mch_a1b2c3d4"

egress
object
required

Typed per-machine egress policy. IPv4 only; no domain/DNS filtering. deny_all is fail-closed and cannot be weakened by other fields.