Node
1. List
GET api/v1/nodes/
List node,We can look up nodes from three dimensions, network, organizaton, agent.
Body Parameters | Type | Note |
---|---|---|
page | int | |
per_page | int | |
note_type | string | |
organization_id | uuid | |
agent_it | uuid |
Example Response Body
{ "data": { "data": [ { "id": "4b66c1a8-bf86-4502-8dd5-365b69fa7744", "type": "peer", "name": "peer0", "urls": "http://peer0.org1.cello.com", "created_at": "2021-12-10T05:51:14.248562Z", "network_id": null, "organization": "76ebf68b-019f-45ff-abef-67e3a3d1752f", "ports": [ { "external": 29691, "internal": 7051 }, { "external": 30706, "internal": 7053 } ] }, { "id": "efdcbc5b-2695-40fa-93ea-c20bc5eabdcd", "type": "orderer", "name": "orderer0", "urls": "http://orderer0.org1.cello.com", "created_at": "2021-12-10T05:51:11.767810Z", "network_id": null, "organization": "76ebf68b-019f-45ff-abef-67e3a3d1752f", "ports": [ { "external": 62689, "internal": 7050 } ] } ], "total": 2 }, "msg": null, "status": "successful" }
2. Create
POST api/v1/nodes/
Create an node with the given parameters.
Body Parameters | Type | Note |
---|---|---|
name | string | |
type | string | |
num | int |
Example Requst Body
{ "name": "orderer", "type": "orderer", "num": 1 }
Example Response Body
{ "data": { "id": "efdcbc5b-2695-40fa-93ea-c20bc5eabdcd" }, "msg": null, "status": "successful" }
3. Operation
POST api/v1/nodes/{id}/operations/
Operating node with start, stop, restart, etc.Â
Path Parameters | Type | Note |
---|---|---|
id | UUID | Node id |
Body Parameters | Type | Note |
---|---|---|
action | string |
4. Delete
DELETE api/v1/nodes/{id}/
Delete node with gived id
Path Parameters | Type | Note |
---|---|---|
id | UUID | Node id |
5. Update
PUT api/v1/nodes/{id}/
Update the node with the id
Path Parameters | Type | Note |
---|---|---|
id | UUID | Node id |
6. Get Config
GET api/v1/nodes/{id}/config/
Get the config file of a node
Path Parameters | Type | Note |
---|---|---|
id | UUID | Node id |
7. Update Config
POSTÂ api/v1/nodes/{id}/config/
Get the config file of a node
Path Parameters | Type | Note |
---|---|---|
id | UUID | Node id |
Example Request Body
Required Content-Type: "multipart/form-data" { "file": /xxx/xxx/orderer.yaml }
8. Query
GET api/v1/nodes/{id}/
Get the node status
Path Parameters | Type | Note |
---|---|---|
id | UUID | Node id |