Network
A machine’s outbound policy and its egress log. For what a locked network is and when to use one, see Locked network.
Base URL: https://api.sistemo.io · all requests require authentication.
Fields on the machine
Section titled “Fields on the machine”Every machine object carries its policy:
| Field | Always present | Notes |
|---|---|---|
network |
yes | open or locked |
allow |
yes | The locked machine’s hosts. [] on an open machine |
Set them at create with the same names — see Create a machine:
| Field | Type | Default | Notes |
|---|---|---|---|
network |
string | open |
open or locked |
allow |
string[] | [] |
Up to 64 host names, exact (pypi.org) or with one leading *. (*.pythonhosted.org — subdomains only). Lowercased and de-duplicated. An IP address, scheme, port, path or bare * is a 400, and so is allow without "network": "locked" |
A host that cannot enforce locked refuses the create with
503 no_host_available rather than booting the machine open. Retry.
Replace the policy
Section titled “Replace the policy”POST /v1/machines/{id}/networkScope: full. Replaces the whole policy: allow is the complete new list, not a
change to the old one.
curl -sS -X POST "https://api.sistemo.io/v1/machines/$MACHINE_ID/network" \ -H "Authorization: Bearer $SISTEMO_API_KEY" \ -H "Content-Type: application/json" \ -d '{"network":"locked","allow":["pypi.org","files.pythonhosted.org"]}'Returns 200 with the machine object, showing the
new policy.
| Machine state | Effect |
|---|---|
running |
Immediate, no restart. Open connections to a host no longer allowed are closed |
stopped |
Applied at the next start |
| Anything else | 409 — retry once the machine is running or stopped |
| Status | Meaning |
|---|---|
400 |
No network in the body (it is required here — an empty body never means open), an invalid entry in allow, or allow on an open policy. detail names it |
409 |
Not running or stopped, or the machine changed state during the call (retry) — or the change would strand a bound proxy secret: opening the network, or dropping one of its hosts. Unbind it first |
503 |
The host could not apply the change. The previous policy is still in force. Retry |
Recorded in the Activity log as machine.network_changed.
Read the egress log
Section titled “Read the egress log”GET /v1/machines/{id}/egress/activityScope: read or full. The hosts a locked machine reached or was refused, newest first, one row per host, result and minute.
| Parameter | Values | Notes |
|---|---|---|
action |
allowed, blocked |
Only this result |
limit |
1–500 | Default 100 |
curl -sS -G "https://api.sistemo.io/v1/machines/$MACHINE_ID/egress/activity" \ -H "Authorization: Bearer $SISTEMO_API_KEY" \ --data-urlencode 'action=blocked' \ --data-urlencode 'limit=50'{ "activity": [ { "host": "evil.example", "action": "blocked", "at": "2026-11-21T10:42:00Z" } ], "complete": true}| Field | Notes |
|---|---|
activity[].host |
The host name the machine asked for. Never a path, header or body |
activity[].action |
allowed or blocked |
activity[].at |
The start of the minute the attempts fell in |
complete |
false when rows may be missing — the log reached its size limit, the machine is not running, or it is open (open machines are not logged). An empty list means “no outbound calls” only when this is true |
This is not a paginated list: it is a bounded recent window kept with the
machine, and it ends when the machine does. For a record that outlives the machine,
refused calls are copied into the Activity log as egress.blocked
about a minute after they happen — filter with category=egress.
503 means the machine’s host did not answer. Retry.
Related
Section titled “Related”- Locked network — what a refused call looks like from inside
- Secrets
- Full reference (OpenAPI)