API reference

Network

The addresses and ports your server listens on.

← API docs5 endpointsUpdated

Browse the docs

Network

The IP address and port pairs (allocations) assigned to a server. Bots rarely need more than the one they were created with, and adding ports only works where an administrator has switched it on.

List allocations

GET/servers/{server}/network/allocations

Permission allocation.read

Returns every IP and port assigned to the server. is_default marks the primary one, which the server listens on by default. The list is not paginated.

Parameters

List allocations: parameters
NameTypeDescription
serverrequiredstringThe server's 8-character identifier, as shown in the panel, or its full UUID.

Example

curl "https://sillydev.co.uk/panel/api/client/servers/1a7ce997/network/allocations" \
  -H "Authorization: Bearer $SILLYDEV_API_KEY" \
  -H "Accept: application/json"

Response 200The server's allocations.

{
    "object": "list",
    "data": [
        {
            "object": "allocation",
            "attributes": {
                "id": 501,
                "ip": "203.0.113.10",
                "ip_alias": "node1.sillydev.co.uk",
                "port": 25565,
                "notes": null,
                "is_default": true
            }
        },
        {
            "object": "allocation",
            "attributes": {
                "id": 502,
                "ip": "203.0.113.10",
                "ip_alias": "node1.sillydev.co.uk",
                "port": 25566,
                "notes": "Web dashboard",
                "is_default": false
            }
        }
    ]
}
Every field in the response
List allocations: response
NameTypeDescription
objectrequiredstring
datarequiredarray of object
data[].objectrequiredstring
data[].attributesrequiredobject
data[].attributes.idrequiredinteger
data[].attributes.iprequiredstringThe IP address the port is on.
data[].attributes.ip_aliasrequiredstring | nullA hostname to show instead of the IP, if one is set.
data[].attributes.portrequiredinteger
data[].attributes.notesrequiredstring | null
data[].attributes.is_defaultrequiredbooleanWhether this is the server's primary allocation.

Errors

  • 401 No API key was sent, or it is wrong, expired or deleted.
  • 403 The key is valid but may not do this: it lacks the permission or account scope, it is limited to other servers or IP addresses, or the account may not do it at all.
  • 404 There is no such resource, or the key cannot see it. Features that are switched off answer 404 too.

Add an allocation

POST/servers/{server}/network/allocations

Permission allocation.createLimited to 2 per minute per server

Assigns another port on the same IP as the server's primary allocation, picking a free one at random. This only works where an administrator has switched on automatic allocations and given the server an allocation limit; otherwise it fails with a 400. Limited to 2 a minute per server, shared by everyone managing that server.

Parameters

Add an allocation: parameters
NameTypeDescription
serverrequiredstringThe server's 8-character identifier, as shown in the panel, or its full UUID.

Example

curl -X POST "https://sillydev.co.uk/panel/api/client/servers/1a7ce997/network/allocations" \
  -H "Authorization: Bearer $SILLYDEV_API_KEY" \
  -H "Accept: application/json"

Response 200The new allocation.

{
    "object": "allocation",
    "attributes": {
        "id": 502,
        "ip": "203.0.113.10",
        "ip_alias": "node1.sillydev.co.uk",
        "port": 25566,
        "notes": null,
        "is_default": false
    }
}
Every field in the response
Add an allocation: response
NameTypeDescription
objectrequiredstring
attributesrequiredobject
attributes.idrequiredinteger
attributes.iprequiredstringThe IP address the port is on.
attributes.ip_aliasrequiredstring | nullA hostname to show instead of the IP, if one is set.
attributes.portrequiredinteger
attributes.notesrequiredstring | null
attributes.is_defaultrequiredbooleanWhether this is the server's primary allocation.

Errors

  • 400 Automatic allocations are switched off, the server is at its allocation limit (or has none), or there are no free ports left in the range.
  • 401 No API key was sent, or it is wrong, expired or deleted.
  • 403 The key is valid but may not do this: it lacks the permission or account scope, it is limited to other servers or IP addresses, or the account may not do it at all.
  • 404 There is no such resource, or the key cannot see it. Features that are switched off answer 404 too.
  • 429 Too many requests. Wait for the number of seconds in the Retry-After header, then try again.

Set an allocation's notes

POST/servers/{server}/network/allocations/{allocation}

Permission allocation.update

Sets the free-text notes shown next to the allocation in the panel. notes must be sent; send null to clear them.

Parameters

Set an allocation's notes: parameters
NameTypeDescription
serverrequiredstringThe server's 8-character identifier, as shown in the panel, or its full UUID.
allocationrequiredintegerThe allocation's numeric ID, from listAllocations.

Body

Set an allocation's notes: request body
NameTypeDescription
notesrequiredstring | null

Example

curl -X POST "https://sillydev.co.uk/panel/api/client/servers/1a7ce997/network/allocations/{allocation}" \
  -H "Authorization: Bearer $SILLYDEV_API_KEY" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{"notes":"Web dashboard"}'

Response 200The updated allocation.

{
    "object": "allocation",
    "attributes": {
        "id": 502,
        "ip": "203.0.113.10",
        "ip_alias": "node1.sillydev.co.uk",
        "port": 25566,
        "notes": "Web dashboard",
        "is_default": false
    }
}
Every field in the response
Set an allocation's notes: response
NameTypeDescription
objectrequiredstring
attributesrequiredobject
attributes.idrequiredinteger
attributes.iprequiredstringThe IP address the port is on.
attributes.ip_aliasrequiredstring | nullA hostname to show instead of the IP, if one is set.
attributes.portrequiredinteger
attributes.notesrequiredstring | null
attributes.is_defaultrequiredbooleanWhether this is the server's primary allocation.

Errors

  • 401 No API key was sent, or it is wrong, expired or deleted.
  • 403 The key is valid but may not do this: it lacks the permission or account scope, it is limited to other servers or IP addresses, or the account may not do it at all.
  • 404 There is no such resource, or the key cannot see it. Features that are switched off answer 404 too.
  • 422 Some fields were missing or invalid. There is one error per problem, and meta.source_field names the field.

Remove an allocation

DELETE/servers/{server}/network/allocations/{allocation}

Permission allocation.delete

Takes the allocation away from the server and clears its notes. The primary allocation cannot be removed, and nothing can be removed from a server without an allocation limit.

Parameters

Remove an allocation: parameters
NameTypeDescription
serverrequiredstringThe server's 8-character identifier, as shown in the panel, or its full UUID.
allocationrequiredintegerThe allocation's numeric ID, from listAllocations.

Example

curl -X DELETE "https://sillydev.co.uk/panel/api/client/servers/1a7ce997/network/allocations/{allocation}" \
  -H "Authorization: Bearer $SILLYDEV_API_KEY" \
  -H "Accept: application/json"

Response 204Done. There is no response body.

Errors

  • 400 This is the primary allocation, or the server has no allocation limit.
  • 401 No API key was sent, or it is wrong, expired or deleted.
  • 403 The key is valid but may not do this: it lacks the permission or account scope, it is limited to other servers or IP addresses, or the account may not do it at all.
  • 404 There is no such resource, or the key cannot see it. Features that are switched off answer 404 too.

Make an allocation the primary one

POST/servers/{server}/network/allocations/{allocation}/primary

Permission allocation.update

Makes this allocation the server's primary (default) one. The server picks up the new primary port the next time it starts.

Parameters

Make an allocation the primary one: parameters
NameTypeDescription
serverrequiredstringThe server's 8-character identifier, as shown in the panel, or its full UUID.
allocationrequiredintegerThe allocation's numeric ID, from listAllocations.

Example

curl -X POST "https://sillydev.co.uk/panel/api/client/servers/1a7ce997/network/allocations/{allocation}/primary" \
  -H "Authorization: Bearer $SILLYDEV_API_KEY" \
  -H "Accept: application/json"

Response 200The allocation, now the primary one.

{
    "object": "allocation",
    "attributes": {
        "id": 502,
        "ip": "203.0.113.10",
        "ip_alias": "node1.sillydev.co.uk",
        "port": 25566,
        "notes": "Web dashboard",
        "is_default": true
    }
}
Every field in the response
Make an allocation the primary one: response
NameTypeDescription
objectrequiredstring
attributesrequiredobject
attributes.idrequiredinteger
attributes.iprequiredstringThe IP address the port is on.
attributes.ip_aliasrequiredstring | nullA hostname to show instead of the IP, if one is set.
attributes.portrequiredinteger
attributes.notesrequiredstring | null
attributes.is_defaultrequiredbooleanWhether this is the server's primary allocation.

Errors

  • 401 No API key was sent, or it is wrong, expired or deleted.
  • 403 The key is valid but may not do this: it lacks the permission or account scope, it is limited to other servers or IP addresses, or the account may not do it at all.
  • 404 There is no such resource, or the key cannot see it. Features that are switched off answer 404 too.