POST /primary_ips

Create a new Primary IP.

Can optionally be assigned to a resource by providing an assignee_id and assignee_type.

If not assigned to a resource the datacenter key needs to be provided. This can be either the ID or the name of the Datacenter this Primary IP shall be created in.

A Primary IP can only be assigned to resource in the same Datacenter later on.

Call specific error codes

CodeDescription
server_not_stoppedThe specified Server is running, but needs to be powered off
server_has_ipv4The Server already has an ipv4 address
server_has_ipv6The Server already has an ipv6 address

Servers

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
datacenter String No

Datacenter ID or name.

The Primary IP will be bound to this Datacenter. Omit if assignee_id/assignee_type is provided.

name String Yes

Name of the Resource. Must be unique per Project.

auto_delete Boolean No

Auto deletion state.

If enabled the Primary IP will be deleted once the assigned resource gets deleted.

Default value: false

labels Object No

User-defined labels (key/value pairs) for the Resource. For more information, see "Labels".

assignee_id Integer No

ID of resource to assign the Primary IP to.

Omitted if the Primary IP should not get assigned.

assignee_type String Yes

Type of resource the Primary IP can get assigned to.

Currently Primary IPs can only be assigned to Servers, therefore this field must be set to server.

Possible values:

  • "server"
type String Yes

Primary IP type.

Possible values:

  • "ipv6"
  • "ipv4"

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.