Obtaining the Status of a Staking Node in a Specified Period
Description
This API is used to obtain the status of a staking node in a specified period, including its synchronization status, peer, and block height.
URI
POST /v1/{project_id}/node-provider/nodes/{node_id}/status
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
Project ID. Minimum length: 32 characters Maximum length: 32 characters |
node_id |
Yes |
String |
Node ID. Minimum length: 36 characters Maximum length: 45 characters |
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
X-Auth-Token |
Yes |
String |
User token. Minimum length: 1 character Maximum length: 65,535 characters |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
time_range |
Yes |
String |
Query time range. For example, -1.-1.30 indicates the latest 30 minutes. Minimum length: 0 characters Maximum length: 100 characters |
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
node_status |
Array of BeaconNodeStatus objects |
Node status. |
count |
Integer |
Number of nodes. Minimum value: 0 Maximum value: 1000 |
Parameter |
Type |
Description |
---|---|---|
node_info |
Array of NodeInfoResult objects |
Number of inbound and outbound peers. |
Parameter |
Type |
Description |
---|---|---|
timestamp |
String |
Timestamp. Minimum length: 0 characters Maximum length: 100 characters |
inbound |
Integer |
Number of inbound peers. Minimum value: 0 Maximum value: 10,000 |
outbound |
Integer |
Number of outbound peers. Minimum value: 0 Maximum value: 10,000 |
block_height |
Integer |
Block height. Minimum value: 0 Maximum value: 2,147,483,647 |
Status code: 400
Parameter |
Type |
Description |
---|---|---|
code |
String |
Status code. Minimum length: 3 characters Maximum length: 3 characters |
error_code |
String |
Error code. Minimum length: 12 characters Maximum length: 12 characters |
error_msg |
String |
Error message. Minimum length: 1 character Maximum length: 65,535 characters |
message |
String |
Error details. Minimum length: 0 characters Maximum length: 65,535 characters |
Status code: 401
Parameter |
Type |
Description |
---|---|---|
code |
String |
Status code. Minimum length: 3 characters Maximum length: 3 characters |
error_code |
String |
Error code. Minimum length: 12 characters Maximum length: 12 characters |
error_msg |
String |
Error message. Minimum length: 1 character Maximum length: 65,535 characters |
message |
String |
Error details. Minimum length: 0 characters Maximum length: 65,535 characters |
Status code: 500
Parameter |
Type |
Description |
---|---|---|
code |
String |
Status code. Minimum length: 3 characters Maximum length: 3 characters |
error_code |
String |
Error code. Minimum length: 12 characters Maximum length: 12 characters |
error_msg |
String |
Error message. Minimum length: 1 character Maximum length: 65,535 characters |
message |
String |
Error details. Minimum length: 0 characters Maximum length: 65,535 characters |
Example Request
{ "time_range" : "-1.-1.30" }
Example Response
Status code: 200
Request successful.
{ "node_status" : [ { "node_info" : [ { "timestamp" : "2023-05-09T10:00:24.775Z", "inbound" : 45, "outbound" : 32, "block_height" : 17222778 } ] } ], "count" : 1 }
Status code: 400
Verify parameter failed.
{ "code" : 400, "error_code" : "BCS.03400001", "error_msg" : "Invalid request.", "message" : "unmarshal request data error" }
Status code: 401
Authentication failed.
{ "code" : 401, "error_code" : "BCS.03401001", "error_msg" : "Authorization failed.", "message" : "request token is not valid" }
Status code: 500
Internal service error.
{ "code" : 500, "error_code" : "BCS.03500001", "error_msg" : "Internal error.", "message" : "project [xxx] node [xxx] get service bearer user token error" }
Status Code
Status Code |
Description |
---|---|
200 |
Request successful. |
400 |
Verify parameter failed. |
401 |
Authentication failed. |
500 |
Internal service error. |
Error Code
For details, see Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot