POST /primary_ips/{id}/actions/assign

Assign a Primary IP to a resource.

A Server can only have one Primary IP of type ipv4 and one of type ipv6 assigned. If you need more IPs use Floating IPs.

A Server must be powered off (status off) in order for this operation to succeed.

Error Codes specific to this Call

CodeDescription
server_not_stoppedThe Server is running, but needs to be powered off
primary_ip_already_assignedPrimary IP is already assigned to a different Server
server_has_ipv4The Server already has an IPv4 address
server_has_ipv6The Server already has an IPv6 address

Servers

Path parameters

Name Type Required Description
id Integer Yes

ID of the Primary IP.

Request headers

Name Type Required Description
Content-Type String Yes The media type of the request body.

Default value: "application/json"

Request body fields

Name Type Required Description
assignee_id Integer Yes

ID of a resource of type assignee_type

assignee_type String Yes

Type of resource assigning the Primary IP to

Possible values:

  • "server"

How to start integrating

  1. Add HTTP Task to your workflow definition.
  2. Search for the API you want to integrate with and click on the name.
    • This loads the API reference documentation and prepares the Http request settings.
  3. Click Test request to test run your request to the API and see the API's response.