Request Examples¶
This article lists examples of some Open API requests.
GET Request¶
Example: Get Dashboard List¶
Request:
curl "https://openapi.truewatch.com/api/v1/dashboards/list?pageIndex=1&pageSize=10" \
-H "Content-Type: application/json" \
-H "DF-API-KEY: ${DF_API_KEY}" \
--compressed \
--insecure
Response:
{
"code":200,
"content":[
{Object}
],
"errorCode":"",
"message":"",
"pageInfo":{
"count":10,
"pageIndex":1,
"pageSize":10,
"totalCount":836
},
"success":true,
"traceId":"1749091119335873001"
}
POST Request¶
Example: Delete Dashboard¶
Request:
curl "https://openapi.truewatch.com/api/v1/dashboards/${dashboard_uuid}/delete" \
-X "POST" \
-H "Content-Type: application/json" \
-H "DF-API-KEY: ${DF_API_KEY}" \
--compressed \
--insecure
Response:
{
"code":200,
"content":true,
"errorCode":"",
"message":"",
"success":true,
"traceId":"4250149955169518608"
}
Notes¶
${DF_API_KEY}: The API key of the caller. For details on how to obtain it, see API Key Management.