Networking

Assign IPs to Linodes

post
https://api.linode.com/v4/networking/ipv4/assign

Assign multiple IPs to multiple Linodes in one Region. This allows swapping, shuffling, or otherwise reorganizing IPv4 Addresses to your Linodes. When the assignment is finished, all Linodes must end up with at least one public IPv4 and no more than one private IPv4.

Authorizations

Personal Access Token
OAuth: ( ips:read_writelinodes:read_write)

Request Body Schema

assignments
Required
array

The list of assignments to make. You must have read_write access to all IPs being assigned and all Linodes being assigned to in order for the assignments to succeed.

region
Required
string

The ID of the Region in which these assignments are to take place. All IPs and Linodes must exist in this Region.

Request Samples

curl -H "Content-Type: application/json" \
    -H "Authorization: Bearer $TOKEN" \
    -X POST -d '{
      "region": "us-east",
      "assignments": [
        {
          "address": "12.34.56.100",
          "linode_id": 123
        },
        {
          "address": "23.45.67.200",
          "linode_id": 234
        }
      ]
    }' \
    https://api.linode.com/v4/networking/ipv4/assign

Response Samples

{}

Responses

200: All assignments completed successfully.

default: Error

errors
array of objects
reason
string

What happened to cause this error. In most cases, this can be fixed immediately by changing the data you sent in the request, but in some cases you will be instructed to open a Support Ticket or perform some other action before you can complete the request successfully.

field
string

The field in the request that caused this error. This may be a path, separated by periods in the case of nested fields. In some cases this may come back as "null" if the error is not specific to any single element of the request.