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
| Name | Type | Description |
|---|---|---|
| serverrequired | string | The 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
| Name | Type | Description |
|---|---|---|
| objectrequired | string | |
| datarequired | array of object | |
| data[].objectrequired | string | |
| data[].attributesrequired | object | |
| data[].attributes.idrequired | integer | |
| data[].attributes.iprequired | string | The IP address the port is on. |
| data[].attributes.ip_aliasrequired | string | null | A hostname to show instead of the IP, if one is set. |
| data[].attributes.portrequired | integer | |
| data[].attributes.notesrequired | string | null | |
| data[].attributes.is_defaultrequired | boolean | Whether 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
| Name | Type | Description |
|---|---|---|
| serverrequired | string | The 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
| Name | Type | Description |
|---|---|---|
| objectrequired | string | |
| attributesrequired | object | |
| attributes.idrequired | integer | |
| attributes.iprequired | string | The IP address the port is on. |
| attributes.ip_aliasrequired | string | null | A hostname to show instead of the IP, if one is set. |
| attributes.portrequired | integer | |
| attributes.notesrequired | string | null | |
| attributes.is_defaultrequired | boolean | Whether 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-Afterheader, 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
| Name | Type | Description |
|---|---|---|
| serverrequired | string | The server's 8-character identifier, as shown in the panel, or its full UUID. |
| allocationrequired | integer | The allocation's numeric ID, from listAllocations. |
Body
| Name | Type | Description |
|---|---|---|
| notesrequired | string | 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
| Name | Type | Description |
|---|---|---|
| objectrequired | string | |
| attributesrequired | object | |
| attributes.idrequired | integer | |
| attributes.iprequired | string | The IP address the port is on. |
| attributes.ip_aliasrequired | string | null | A hostname to show instead of the IP, if one is set. |
| attributes.portrequired | integer | |
| attributes.notesrequired | string | null | |
| attributes.is_defaultrequired | boolean | Whether 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_fieldnames 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
| Name | Type | Description |
|---|---|---|
| serverrequired | string | The server's 8-character identifier, as shown in the panel, or its full UUID. |
| allocationrequired | integer | The 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
| Name | Type | Description |
|---|---|---|
| serverrequired | string | The server's 8-character identifier, as shown in the panel, or its full UUID. |
| allocationrequired | integer | The 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
| Name | Type | Description |
|---|---|---|
| objectrequired | string | |
| attributesrequired | object | |
| attributes.idrequired | integer | |
| attributes.iprequired | string | The IP address the port is on. |
| attributes.ip_aliasrequired | string | null | A hostname to show instead of the IP, if one is set. |
| attributes.portrequired | integer | |
| attributes.notesrequired | string | null | |
| attributes.is_defaultrequired | boolean | Whether 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.