Skip to content

Online Datakit List



GET /api/v1/datakit/list

Overview

Query Request Parameters

Parameter Name Type Required Description
workspaceUUID string Yes Workspace UUID
Example: wksp_xxxxx
Can be empty: False
version string Yes Datakit version
Example: xxx
Can be empty: False
search string Yes Search by hostname, runtime ID, or IP
Can be empty: False
searchKeys string Yes Specify fields to search, default is hostName,extend.ip,extend.runtime_id
Example: xxx
Can be empty: False
isOnline boolean Yes Whether active on the current day
Example: xxx
Can be empty: False
lastHeartbeatTime integer Yes Time range of the last data report, in seconds
Can be empty: False
Example: 600
$minValue: 1
pageIndex integer Yes Page number
Can be empty: False
Example: 10
$minValue: 1
pageSize integer Yes Number of items per page
Can be empty: False
Example: 10
$minValue: 1

Additional Parameter Notes

Request Example

curl '<Endpoint>/api/v1/datakit/list?version=1.14.2&pageIndex=1&pageSize=10' \
  -H 'Content-Type: application/json' \
  -H 'X-Df-Access-Key: <AK key>' \
  -H 'X-Df-Nonce: <random characters>' \
  -H 'X-Df-Signature: <signature>' \
  -H 'X-Df-Timestamp: <timestamp>'

Response

{
    "code": 200,
    "content": {
        "data": [
            {
                "arch": "amd64",
                "createAt": 1715326420,
                "creator": "",
                "deleteAt": -1,
                "extend": {
                    "arch": "amd64",
                    "cpu_cores": 0,
                    "datakit_version": "1.14.2",
                    "hostname": "izxxxx",
                    "ip": "",
                    "online_time": 0,
                    "os": "linux",
                    "run_in_container": false,
                    "run_mode": "",
                    "runtime_id": "",
                    "token": "",
                    "upgrader_server": "",
                    "uptime": 0,
                    "usage_cores": 1,
                    "wsuuid": "wksp_4b5xxx"
                },
                "hostName": "izxxxx",
                "id": 10,
                "lastUpdateTime": 1729763119,
                "onlineTime": 816415,
                "os": "linux",
                "status": 0,
                "updateAt": 1729763119,
                "updator": "",
                "usageCores": 1,
                "version": "1.14.2",
                "workspaceName": "[Doris] Development and Testing Together",
                "workspaceUUID": "wksp_4b5xxx"
            }
        ],
        "pageInfo": {
            "count": 1,
            "pageIndex": 1,
            "pageSize": 10,
            "totalCount": 1
        }
    },
    "errorCode": "",
    "message": "",
    "success": true,
    "traceId": "11166663346088761547"
} 

Feedback

Is this page helpful? ×