Network commands
Network commands are action-oriented endpoints that operate on existing resources rather than managing them as collections. They follow the /v1/commands/ prefix pattern.
Attach and detach operations queue network updates and return the updated floating IP. Suspension commands require staff access and are outside the public API.
All request bodies are required. IDs in request bodies are strings.
See Asynchronous operations for workflow polling conventions.
Attach an IP
/v1/commands/attach-ipAttach an IP to an instanceConnects a floating IP to an instance. We queue a network update for the instance. The IP must be unlocked and belong to the same workspace and region as the instance. The IP must already be allocated and must not be attached to another instance. See Search IPs for existing addresses.
Request body
| Field | Type | Required | Description |
|---|---|---|---|
ip | string | yes | Floating IP ID |
instance | string | yes | Instance ID |
curl -X POST https://api.galaxygate.net/v1/commands/attach-ip \
-H "Authorization: Bearer $GALAXYGATE_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"ip": "9001",
"instance": "101"
}'Returns 200 OK with the updated floating IP object with instance populated.
Detach an IP
/v1/commands/detach-ipDetach an IP from an instanceDisconnects a floating IP from whichever instance it is currently attached to. We queue a network update for the instance. An IP bundled with an instance cannot be detached independently.
Request body
| Field | Type | Required | Description |
|---|---|---|---|
ip | string | yes | Floating IP ID |
Returns 200 OK with the updated floating IP object with instance cleared.
Auto-attach network
/v1/commands/network-auto-attachAutomatically attach missing IPs to an instanceFinds and attaches matching IPs already allocated to the workspace. The instance must be available and unlocked. We return the allocation results and queue an asynchronous network update.
Request body
| Field | Type | Required | Description |
|---|---|---|---|
instance | string | yes | Instance ID |
skip_duplicate | boolean | yes | When true, skip attachment for each requested family that already has a matching IP |
v4 | object or null | no | IPv4 options (see below). Omit to skip IPv4. |
v6 | object or null | no | IPv6 options (see below). Omit to skip IPv6. |
v4 and v6 object
| Field | Type | Required | Description |
|---|---|---|---|
filtered | boolean | yes | When true, restrict candidate IPs to filtered (DDoS-protected) addresses |
Returns 200 OK with a WorkflowWithDataAttachResult object:
| Field | Type | Description |
|---|---|---|
workflow | object | WorkflowData for the queued network update |
data | object | AttachResult containing v4 and v6 results |
Each family result contains operation, optional nullable ip, and optional nullable message. The ip is a string ID. The operation is IGNORED, FOUND_EXISTING, ATTACHED_EXISTING, NO_AVAILABLE, ATTACHED_NEW, or FAILED.