Stocks
API Methods¶
| Method | Action | Description |
|---|---|---|
list | get server list | Returns a list of available servers in inventory with the ability to filter by location and group. |
show | get server information | Returns detailed information about a specific server by its identifier. |
stocks/list¶
Returns a list of available servers in inventory with the ability to filter by location and group.
HTTP Method: POST
Parameters:
| Parameter | Required | Type | Description |
|---|---|---|---|
| action | ✅ | string | Method identifier: list |
| token | ❌ | string | Authorization token. Required for administrative actions, optional for public lists. |
| location | ❌ | string | Filter by server location (e.g., NL, DE). If not specified or equal to 'all', filters by all. |
| group | ❌ | string | Filter by server group. |
Example of a successful response
{
"result": "OK",
"action": "list",
"servers": [
{
"id": 1024,
"name": "srv-nl-01",
"location": "NL",
"group": "dedicated",
"status": "available",
"price": {
"EUR": 49.99,
"USD": 54.99,
"USD": 4500.0
},
"specs": {
"cpu": "Intel Xeon",
"ram": 32,
"disk": 1000
},
"created_at": "2024-01-15T10:30:00Z",
"server_group": "Dedicated Server",
"tags": [],
"deployment_eta": null,
"billing_plan": {}
}
]
}
Failure response
{
"code": -2,
"message": "stocks/list: invalid token, logout",
"description": "Invalid token or missing token when authorization is required."
}
stocks/show¶
Returns detailed information about a specific server by its identifier.
HTTP Method: POST
Parameters:
| Parameter | Required | Type | Description |
|---|---|---|---|
| action | ✅ | string | Method identifier: show |
| token | ❌ | string | Authorization token for API access |
| id | ✅ | int | Unique server identifier |
Example Request
Example of a successful response
{
"result": "OK",
"action": "show",
"server_data": {
"id": 1024,
"name": "srv-nl-01",
"location": "NL",
"group": "dedicated",
"status": "available",
"price": {
"EUR": 49.99,
"USD": 54.99,
"USD": 4500.0
},
"specs": {
"cpu": "Intel Xeon",
"ram": 32,
"disk": 1000
},
"created_at": "2024-01-15T10:30:00Z"
}
}