Skip to content

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 ​

POST/v1/commands/attach-ipAttach an IP to an instance

Connects 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

FieldTypeRequiredDescription
ipstringyesFloating IP ID
instancestringyesInstance ID
bash
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 ​

POST/v1/commands/detach-ipDetach an IP from an instance

Disconnects 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

FieldTypeRequiredDescription
ipstringyesFloating IP ID

Returns 200 OK with the updated floating IP object with instance cleared.

Auto-attach network ​

POST/v1/commands/network-auto-attachAutomatically attach missing IPs to an instance

Finds 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

FieldTypeRequiredDescription
instancestringyesInstance ID
skip_duplicatebooleanyesWhen true, skip attachment for each requested family that already has a matching IP
v4object or nullnoIPv4 options (see below). Omit to skip IPv4.
v6object or nullnoIPv6 options (see below). Omit to skip IPv6.

v4 and v6 object

FieldTypeRequiredDescription
filteredbooleanyesWhen true, restrict candidate IPs to filtered (DDoS-protected) addresses

Returns 200 OK with a WorkflowWithDataAttachResult object:

FieldTypeDescription
workflowobjectWorkflowData for the queued network update
dataobjectAttachResult 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.