Pterodactyldocs
Application A P I

List node allocations

Returns a paginated list of allocations belonging to a node.

GET/api/application/nodes/{node_id}/allocations
AuthorizationBearer <token>

Application API requests require an application API token, or a client API token, that belongs to a root administrator. Admin API requests require a client API token that belongs to a root administrator, and reject application API tokens. Client API requests require a client API token.

In: header

Path Parameters

node_id*integer

The node ID.

Query Parameters

per_page?integer

Number of allocations to return per page, up to 100.

filter[ip]?string

Filter allocations by exact IP address.

filter[port]?integer

Filter allocations by exact port.

filter[ip_alias]?string

Filter allocations by IP alias.

filter[server_id]?string

Filter allocations by assigned server ID. Empty or non-numeric values return unassigned allocations.

include?string

Comma-separated relationships to include. Supports "node" and "server" when the key can read those resources.

Value in

  • "node"
  • "server"
  • "node,server"

Response Body

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/api/application/nodes/1/allocations?per_page=50&filter%5Bip%5D=192.0.2.10&filter%5Bport%5D=25565&filter%5Bip_alias%5D=minecraft.example.com&filter%5Bserver_id%5D=1&include=server"
{  "object": "list",  "data": [    {      "object": "allocation",      "attributes": {        "id": 9811,        "ip": "11.234.99.225",        "alias": "string",        "port": 1098,        "notes": "string",        "assigned": false      }    }  ],  "meta": {    "pagination": {      "total": 1,      "count": 1,      "per_page": 50,      "current_page": 1,      "total_pages": 1,      "links": {        "property1": "string",        "property2": "string"      }    }  }}