Get Service Request List¶
Get service request list.
Request Format¶
POST https://{apigw-address}/work-management/v1.0/s-taskmgmtds/cmms/service-request/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. The format of the parameter’s string is Bearer {your 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  | 
Work Order Start Time, format: yyyy-MM-dd HH:mm:ss  | 
endTime  | 
Required  | 
String  | 
Work Order End Time, format: yyyy-MM-dd HH:mm:ss  | 
siteIds  | 
Required  | 
List of String  | 
Site ID List  | 
srStatus  | 
Optional  | 
List of Integer  | 
Service Request Status Code  | 
priority  | 
Optional  | 
List of String  | 
Service Request Priority. You can assign values as follows: 
  | 
assigneeIds  | 
Optional  | 
List of String  | 
Assignee ID List  | 
queryTodo  | 
Optional  | 
Boolean  | 
Specifies whether to query to-do task information based on the   | 
expectedCompletionDate  | 
Optional  | 
String  | 
This field is used to specify the filter criteria for task scheduled completion dates. You can assign values as follows: 
  | 
expectedCompletionDateFrom  | 
Optional  | 
String  | 
expectedCompletionDate Start Time. Must be used together with   | 
expectedCompletionDateTo  | 
Optional  | 
String  | 
expectedCompletionDate End Time. Must be used together with   | 
createUserIds  | 
Optional  | 
List of String  | 
Creator User ID List  | 
sourceTypes  | 
Optional  | 
List of Integer  | 
Source Type List  | 
sortName  | 
Optional  | 
String  | 
Sort fields. Supports sorting by the following fields. 
 The default sorting is by service request number.  | 
sortType  | 
Optional  | 
String  | 
Sort order. Supports the following values: 
 The default sorting is by descending order.  | 
keyword  | 
Optional  | 
String  | 
Search Keyword. Only one field can be entered. Fuzzy matching fields: title, description, srNum, srId, sourceId.  | 
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.  | 
startTimeFrom  | 
Optional  | 
String  | 
The start time point for filtering work orders based on their start time.  | 
startTimeTo  | 
Optional  | 
String  | 
The end time point for filtering work orders based on their start time.  | 
endTimeFrom  | 
Optional  | 
String  | 
The start time point for filtering work orders based on their end time.  | 
endTimeTo  | 
Optional  | 
String  | 
The end time point for filtering work orders based on their completion time.  | 
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  | 
ServiceRequest Struct  | 
Service Request List.For more information about ServiceRequest Struct, see ServiceRequest Struct.  | 
ServiceRequest Struct ¶
Name  | 
Data Type  | 
Description  | 
|---|---|---|
orgId  | 
String  | 
OU ID  | 
srId  | 
String  | 
Service Request ID  | 
srNum  | 
String  | 
Service Request Number  | 
title  | 
String  | 
Service Request Title  | 
description  | 
String  | 
Service Request Description  | 
srStatus  | 
Integer  | 
Service Request Status Code  | 
siteId  | 
String  | 
Site ID  | 
siteName  | 
String  | 
Site Name  | 
priority  | 
Integer  | 
Service Request Priority  | 
assigneeName  | 
String  | 
Assignee Name  | 
assigneeId  | 
String  | 
Assignee ID  | 
assignee  | 
User Struct  | 
Assignee. For more information about User Struct, see User Struct.  | 
createUserId  | 
String  | 
Creator ID  | 
createUser  | 
String  | 
Creator Name  | 
createTime  | 
String  | 
Ticket Creation Time  | 
createLocalTime  | 
String  | 
Ticket Creation Local Time  | 
updateUserId  | 
String  | 
Ticket Updater ID  | 
updateUser  | 
String  | 
Ticket Updater Name  | 
updateTime  | 
String  | 
Ticket Update Time  | 
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).  | 
expectedCompletionDate  | 
String  | 
Expected Completion Date  | 
customizedParam  | 
List of Param Struct  | 
Custom Field. For more information about Param Struct, see Param Struct.  | 
timezone  | 
String  | 
Site Time Zone  | 
deviceId  | 
String  | 
Device ID list  | 
relatedIssue  | 
Integer  | 
Number of associated ticket  | 
actualCause  | 
String  | 
Actual Cause  | 
completionNote  | 
String  | 
Ticket Completion Note  | 
expired  | 
Boolean  | 
Whether the ticket is overdue  | 
remainingTime  | 
String  | 
Ticket remaining time (ms)  | 
estimateEffort  | 
Integer  | 
Estimated work hours for ticket  | 
processInstanceId  | 
String  | 
Process ID  | 
requestType  | 
Integer  | 
Request Type  | 
User Struct¶
Name  | 
Data Type  | 
Description  | 
|---|---|---|
userId  | 
String  | 
User ID  | 
username  | 
String  | 
User Name  | 
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/service-request/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": [
      {
        "id": id,
        "orgId": "orgId",
        "srId": "srId",
        "srNum": "srNum",
        "title": "test jimmy",
        "description": "description",
        "srStatus": 30,
        "siteId": "siteId",
        "siteName": "siteName",
        "priority": 4,
        "assigneeName": "assigneeName",
        "assigneeId": "assigneeId",
        "assignee": {
          "userId": "userId",
          "username": "username"
        },
        "createUserId": "createUserId",
        "createUser": "createUser",
        "createTime": "2022-05-18 15:47:08",
        "createLocalTime": "2022-05-18 15:47:08",
        "updateUserId": "updateUserId",
        "updateUser": "updateUser",
        "updateTime": "2022-05-25 10:31:23",
        "sourceType": 4,
        "expectedCompletionDate": "2022-05-19",
        "customizedParam": [
          {
            "key": "key",
            "value": "value",
            "label": null,
            "section": null,
            "displayOrder": null
          }
        ],
        "timezone": "+08:00",
        "status": 1,
        "deviceId": "deviceId1,deviceId2",
        "relatedIssue": 2,
        "note": "",
        "actualCause": "reason test",
        "completionNote": "note test",
        "expired": true,
        "remainingTime": "0",
        "estimateEffort": 8,
        "processInstanceId": "processInstanceId",
        "requestType": 1
      }
    ],
    "pageNo": 1,
    "pageSize": 1,
    "total": 14488
  }
}