Request Example¶
This article lists some examples of requests for the Open API.
GET Request¶
Take getting the dashboard list interface as an example¶
The request is as follows
curl "https://openapi.guance.com/api/v1/dashboards/list?pageIndex=1&pageSize=10" \
-H "Content-Type: application/json" \
-H "DF-API-KEY: ${DF_API_KEY}" \
--compressed \
--insecure
Response result:
{
"code":200,
"content":[
{Object}
],
"errorCode":"",
"message":"",
"pageInfo":{
"count":10,
"pageIndex":1,
"pageSize":10,
"totalCount":836
},
"success":true,
"traceId":"1749091119335873001"
}
POST Request¶
Take removing the dashboard interface as an example¶
The request is as follows
curl "https://openapi.guance.com/api/v1/dashboards/${dashboard_uuid}/delete" \
-X "POST" \
-H "Content-Type: application/json" \
-H "DF-API-KEY: ${DF_API_KEY}" \
--compressed \
--insecure
Response result:
{
"code":200,
"content":true,
"errorCode":"",
"message":"",
"success":true,
"traceId":"4250149955169518608"
}
Description¶
${DF_API_KEY}: Indicate the caller API Key. See API Key management