GetNodeList
Gets the dockers the account can use, including its own dockers and the platform's public dockers.
Examples
List all dockers and whether they are online.
python
# api() is the function in the Python example on the signature authentication page
r = api('GetNodeList')
for node in r['data']['result']['nodes']:
print(node['id'], node['name'], node['online'])Returns
| Type | Description |
object | On success |
Arguments
| Name | Type | Required | Description |
offset | number | No | Paging offset, 0 by default. |
limit | number | No | Page size; omitted or less than or equal to 0 returns all. |
Attributes
| Name | Type | Description |
all | number | Total number of dockers (public dockers included). |
nodes | array | Array of dockers; the fields of each element are in the rows below (self-explanatory fields are not listed). |
nodes[].id | number | Docker ID, the |
nodes[].build | string | Version number. |
nodes[].version | string | Detailed version information of the docker. |
nodes[].online | bool | Whether the docker is online. |
nodes[].is_owner | bool |
|
nodes[].public | number |
|
nodes[].loaded | number | Load: the number of strategy instances running on the docker. |
nodes[].city | string | City. |
nodes[].region | string | Region. |
nodes[].wd | number | Whether the offline alert is on; |
Remarks
Dockers rented with one click have extra fields starting with ecs_ and unit_, recording the server's provider, configuration and state, and the billing period and price.
Example response
json
{
"code": 0,
"data": {
"result": {
"all": 1,
"nodes": [{
"build": "3.7",
"city": "...",
"created": "2024-11-08 09:21:08",
"date": "2024-11-08 16:37:16",
"forward": "...",
"guid": "...",
"host": "node.fmz.com:9902",
"id": 123,
"ip": "...",
"is_owner": true,
"loaded": 0,
"name": "MacBook-Pro-2.local",
"online": true,
"os": "darwin/amd64",
"peer": "...",
"public": 0,
"region": "...",
"tunnel": false,
"version": "...",
"wd": 0
}]
},
"error": null
}
}