Skip to content

AI Work Assistant

1. Preparation

Base URL: https://api.rokid.com

Before you start:

  • Prepare a valid API key (API_KEY) for authentication.
  • Make sure your enterprise already has AI Work Assistant task records and generated work documents for query and download testing.

2. Overview

The AI Work Assistant module currently provides paginated work task record querying. Developers can query work records by user, task name, and execution time range.

2.1 Query AI work task records with pagination

Endpoint: https://api.rokid.com/ar/flow/openapi/record/page?uid={$uid}&pageNum={$pageNum}&pageSize={$pageSize}&taskName={$taskName}&gmtStart={$gmtStart}&gmtEnd={$gmtEnd}

Method: GET

Request Content-Type: application/x-www-form-urlencoded

Response Content-Type: */*

Description: Query AI work task records by user ID, task name, and execution time range.

Request parameters:

NameDescriptionRequiredType
uidUser IDtruestring
pageNumPage number, default 1falseint
pageSizePage size, default 10falseint
taskNameTask name, fuzzy matchfalsestring
gmtStartExecution start time, format yyyy-MM-dd HH:mm:ssfalsestring
gmtEndExecution end time, format yyyy-MM-dd HH:mm:ssfalsestring

Response fields:

NameDescriptionRequiredType
pageNumCurrent page numbertrueint
pageSizePage sizetrueint
totalTotal counttruelong
listWork record listtruearray
taskIdWork task IDtruestring
taskNameTask namefalsestring
sessionIdSession IDfalsestring
planIdPlan IDfalsestring
ticketIdTicket IDfalsestring
ticketFlowTypeTicket flow typefalsestring
companyIdCompany IDfalsestring
uidUser IDfalsestring
userNameUser namefalsestring
chatContentChat contentfalsestring
resultTask resultfalsestring
taskProgressTask progress: 0 not started, 1 in progress, 2 report generating, 3 task exception, 4 completed, 5 pending signaturefalseint
videoUrlVideo URLfalsestring
uploadTimeUpload timefalsestring
gmtCreatedCreated timefalsestring
gmtModifiedModified timefalsestring
gmtCreatedStartStart timefalsestring
gmtCreatedEndEnd timefalsestring
deletedDelete flag: 0 not deleted, 1 deletedfalseint
signUrlSignature URLfalsestring
flowTypeFlow typefalsestring
reportUrlWork document URLfalsestring

Request example:

bash
curl -X GET "https://api.rokid.com/ar/flow/openapi/record/page?uid=E9985178CD6C4207BDB30608FF90B909&pageNum=1&pageSize=10&taskName=inspection&gmtStart=2026-06-01%2000:00:00&gmtEnd=2026-06-17%2023:59:59" \
-H "Authorization: Bearer $API_KEY"

Response example:

json
{
  "code": 0,
  "message": "OK",
  "data": {
    "pageNum": 1,
    "pageSize": 10,
    "total": 1,
    "list": [
      {
        "taskId": "0c0d7fc3f4a04b9caf2f4a534c6b5b10",
        "taskName": "Daily Inspection",
        "sessionId": "conversation_001",
        "planId": "plan_001",
        "ticketId": "ticket_001",
        "ticketFlowType": "custom",
        "companyId": "7A15F74ED76542678825CA7DE5F18E03",
        "uid": "E9985178CD6C4207BDB30608FF90B909",
        "userName": "Zhang San",
        "chatContent": "Today's inspection task is complete",
        "result": "{}",
        "taskProgress": 4,
        "videoUrl": "",
        "uploadTime": "",
        "gmtCreated": "2026-06-17T10:00:00.000+08:00",
        "gmtModified": "2026-06-17T10:30:00.000+08:00",
        "gmtCreatedStart": "2026-06-17T10:00:00.000+08:00",
        "gmtCreatedEnd": "2026-06-17T10:30:00.000+08:00",
        "deleted": 0,
        "signUrl": "",
        "flowType": "custom",
        "reportUrl": "https://cdn.rokid.com/reports/work-record-001.docx"
      }
    ]
  },
  "success": true
}