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) |
Required/Optional |
Data Type |
Description |
---|---|---|---|---|
locale |
Query |
Optional |
String |
Specifies the language for returning service request query results. For example, assign |
Request Parameters (Header)¶
Name |
Required/Optional |
Data Type |
Description |
---|---|---|---|
authorization |
Required |
String |
Access token. Refer to Log In or Refresh Access Token to learn how to get the access token. |
Request Parameters (Body)¶
Name |
Required/Optional |
Data Type |
Description |
---|---|---|---|
startTime |
Required |
String |
Start Time, format: yyyy-MM-dd HH:mm:ss |
endTime |
Required |
String |
End Time, format: yyyy-MM-dd HH:mm:ss |
siteIds |
Required |
List of String |
Site ID List |
deviceIds |
Optional |
String |
The specified device ID, separated by commas |
woStatus |
Optional |
List of Integer |
Work Order Status Code |
priority |
Optional |
List of String |
Work Order priority. You can assign values as follows:
|
workTypes |
Optional |
List of Integer |
Work Order Type List |
assigneeIds |
Optional |
List of String |
Assignee ID List |
queryTodo |
Optional |
Boolean |
Specifies whether to query to-do task information based on the |
plannedEndTime |
Optional |
String |
This field is used to specify the filter criteria for task scheduled completion time. You can assign values as follows:
|
plannedEndTimeFrom |
Optional |
String |
plannedEndTime Start Time. Must be used together with |
plannedEndTimeTo |
Optional |
String |
plannedEndTime End Time. Must be used together with |
dueDate |
Optional |
String |
This field specifies the filter condition for task due dates. You can assign values as follows:
|
dueDateFrom |
Optional |
String |
dueDate Start Time. Must be used together with |
dueDateTo |
Optional |
String |
dueDate End Time. Must be used together with |
createUserIds |
Optional |
List of String |
Creator User ID List |
sortName |
Optional |
String |
Sort fields. Supports sorting by the following fields.
The default sorting is by work order number. |
sortType |
Optional |
String |
Sort order. Supports the following values:
The default sorting is by descending order. |
keyword |
Optional |
String |
Search Keyword |
customizedParam |
Optional |
List of Param Struct |
Search keywords supporting multiple conditional queries. Example: [{“key”: “subType”,”value”: “defect”},{“key”: “subType”,”value”: “failure”}]. For more information about Param Struct, see Param Struct. Note: Custom query fields can be configured in Work Management > Settings > Work Order Settings. |
plannedStartTimeFrom |
Optional |
String |
The start time point for filtering based on planned start time. |
plannedStartTimeTo |
Optional |
String |
The end time point for filtering based on planned start time. |
actualStartTimeFrom |
Optional |
String |
The start time point for filtering based on actual start time. |
actualStartTimeTo |
Optional |
String |
The ending time point for filtering based on actual start time. |
actualEndTimeFrom |
Optional |
String |
The start time point for filtering based on actual end time. |
actualEndTimeTo |
Optional |
String |
The end time point for filtering based on actual 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. |
value |
String |
The value of the queried field. |
Response Parameters¶
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-cmms/v1.0/s-taskmgmtds/cmms/work-order/list
method: POST
Header:
authorization: Bearer your_token
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
}
}