Get Work Order List¶
Get work order list.
Request Format¶
POST https://{apigw-address}/work-management/v1.0/s-taskmgmtds/cmms/work-order/list
Request Parameters (URI)¶
Name |
Location (Path/Query) |
Mandatory/Optional |
Data Type |
Description |
---|---|---|---|---|
locale |
Query |
Optional |
String |
Regional Information (Chinese: zh-CN, English: en-US) |
Request Parameters (Header)¶
Name |
Mandatory/Optional |
Data Type |
Description |
---|---|---|---|
authorization |
Mandatory |
String |
User Token information obtained from the Application Portal |
Request Parameters (Body)¶
Name |
Mandatory/Optional |
Data Type |
Description |
---|---|---|---|
startTime |
Mandatory |
String |
Start Time, format: yyyy-MM-dd HH:mm:ss |
endTime |
Mandatory |
String |
End Time, format: yyyy-MM-dd HH:mm:ss |
siteIds |
Mandatory |
List of String |
Site ID List |
woStatus |
Optional |
List of Integer |
Status List |
priority |
Optional |
List of String |
Source Business ID List |
workTypes |
Optional |
List of Integer |
Work Order Type List |
assigneeIds |
Optional |
List of String |
Assignee ID List |
queryTodo |
Optional |
Boolean |
Whether to query todo tasks (todo tasks for assigneeIds and the user group they belong to). Note: assigneeIds only supports todo for a single user for now. |
plannedEndTime |
Optional |
String |
|
plannedEndTimeFrom |
Optional |
String |
plannedEndTime Start Time |
plannedEndTimeTo |
Optional |
String |
plannedEndTime End Time |
dueDate |
Optional |
String |
|
dueDateFrom |
Optional |
String |
dueDate Start Time |
dueDateTo |
Optional |
String |
dueDate End Time |
createUserIds |
Optional |
List of String |
Creator User ID List |
sortName |
Optional |
String |
Sort fields. Supports sorting by the following fields. - woNum: Number (default) - woStatus: Status - priority: Priority - createTime: Creation Time - updateTime: Update Time |
sortType |
Optional |
String |
Sort by. ASC: ascending; DESC: descending (default). |
keyword |
Optional |
String |
Search Keyword |
customizedParam |
Optional |
List of Param Struct |
The keyword can be queried by multiple conditions. Example: [{“key”: “subType”,”value”: “defect”},{“key”: “subType”,”value”: “failure”}]. For more information about Param Struct, see Param Struct. |
plannedStartTimeFrom |
Optional |
String |
Planned start point of the start time |
plannedStartTimeTo |
Optional |
String |
Planned cut-off time point for start time |
actualStartTimeFrom |
Optional |
String |
Actual start point of the start time |
actualStartTimeTo |
Optional |
String |
Actual cut-off time point for start time |
actualEndTimeFrom |
Optional |
String |
Actual end point of the start time |
actualEndTimeTo |
Optional |
String |
Actual cut-off time point for end time |
followerIds |
Optional |
List of String |
Followers’ ID List |
pageNo |
Optional |
Integer |
Page number. Default value: 1 |
pageSize |
Optional |
Integer |
The number of records per page. Default value: 50, Max value: 1000 |
Param Struct¶
Name |
Data Type |
Description |
---|---|---|
key |
String |
Custom field identifier, required to be registered in the Work Management Form. |
value |
String |
The value of the queried field. |
Response Parameters¶
Name |
Data Type |
Description |
---|---|---|
data |
Data Struct |
The return message. For more information about Data Struct, see Data Struct. |
Data Struct¶
Name |
Data Type |
Description |
---|---|---|
pageNo |
Integer |
Page Number |
pageSize |
Integer |
The number of records per page |
total |
Integer |
The total number of the queried data |
list |
List of WorkOrder Struct |
WorkOrder Object List. For more information about WorkOrder Struct, see WorkOrder Struct. |
Work Order Struct¶
Name |
Data Type |
Description |
---|---|---|
orgId |
String |
OU ID |
woId |
String |
Work Order ID |
woNum |
String |
Work Order Number |
title |
String |
Work Order Title |
description |
String |
Work Order Description |
woStatus |
Integer |
Work Order Status Code |
siteId |
String |
Site ID |
siteName |
String |
Site Name |
workType |
Integer |
Work Order Type |
priority |
Integer |
Work Order Priority |
plannedStartTime |
String |
Planned Start Time |
plannedEndTime |
String |
Planned End Time |
assigneeName |
String |
Assignee Name |
assigneeId |
String |
Assignee ID |
createUserId |
String |
Creator ID |
createUser |
String |
Creator Name |
createTime |
String |
Ticket Creation Time |
createLocalTime |
String |
Ticket Creation Local Time |
dueDate |
String |
Due Date |
updateUserId |
String |
Ticket Updater ID |
updateUser |
String |
Ticket Updater Name |
updateTime |
String |
Ticket Update Time |
deviceId |
String |
Device ID |
deviceName |
String |
Device Name |
customizedParam |
List of Param Struct |
Custom Field. For more information about Param Struct, see Param Struct. |
timezone |
String |
Site Time Zone |
note |
String |
Note |
relatedIssue |
Integer |
Number of associated records |
relatedDowntime |
Integer |
Number of associated downtime records |
sourceType |
Integer |
Source type. This API accepts enumerated values. 1: Alert; 2: Alarm; 3: O&M Recommendation; 4: Manual; 5: Downtime Record; 6: O&M Plan (internal reserved value); 7: Service Request (internal reserved value). |
scheduleNum |
String |
O&M plan number |
expired |
Boolean |
Whether the ticket is overdue |
remainingTime |
String |
Ticket remaining time (ms) |
templateKey |
String |
Template Keyword |
templateValue |
String |
Template Value |
Error Codes¶
Code |
Description |
---|---|
96134 |
Invalid site ID |
96146 |
The custom field key does not support filtering, please check the configuration or change the parameter. |
Samples¶
Request Sample¶
url: https://{apigw-address}/work-management/v1.0/work-order/list
method: POST
requestBody:
{
"pageNo": 1,
"pageSize": 50,
"siteIds":["siteId1","siteId2"],
"startTime":"2021-05-09 16:28:39",
"endTime":"2021-06-09 16:28:39",
"keyword":""
}
Response Sample¶
{
"code": 0,
"data": {
"list": [
{
"orgId": "orgId",
"woId": "woId",
"woNum": "woNum",
"title": "title",
"description": "",
"woStatus": 20,
"siteId": "siteId",
"siteName": "siteName",
"workType": 1,
"priority": 1,
"plannedStartTime": "",
"plannedEndTime": "2022-01-25 05:14:00",
"assigneeName": "",
"assigneeId": "",
"createUserId": "createUserId",
"createUser": "createUser",
"createTime": "2022-01-20 13:14:00",
"createLocalTime": "2022-01-20 05:14:00",
"dueDate": "",
"updateUserId": "updateUserId",
"updateUser": "updateUserName",
"updateTime": "2022-08-18 22:54:21",
"status": 1,
"deviceId": "deviceId",
"deviceName": "deviceName",
"timezone": "+08:00",
"note": "",
"relatedIssue": 0,
"relatedDowntime": 0,
"sourceType": 1,
"scheduleNum": "",
"expired": true,
"remainingTime": "-22",
"templateKey": "workType",
"templateValue": "1"
}
],
"pageNo": 1,
"pageSize": 1,
"total": 15196
}
}