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)

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

srStatus

Optional

List of Integer

Status List

priority

Optional

List of String

Service Request Priority

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.

expectedCompletionDate

Optional

String

Expected Completion Date. Time period: expectedCompletionDateFrom ~ expectedCompletionDateTo field
  • Keywords: expectedCompletionDate field. Supported keyword ranges: notNull: isNotNull; null: isNull; expired: Expired.

expectedCompletionDateFrom

Optional

String

expectedCompletionDate Start Time

expectedCompletionDateTo

Optional

String

expectedCompletionDate End Time

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. - srNum: Number (default) - srStatus: Status - priority: Priority - expectedCompletionDate: Expected Completion Date - sourceType: Source Type - 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.

startTimeFrom

Optional

String

The start point of the start time

startTimeTo

Optional

String

Cut-off time point for start time

endTimeFrom

Optional

String

The end point of the start time

endTimeTo

Optional

String

Cut-off time point for end 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, 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 ServiceRequest Struct

Service Request Object 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/v1.0/service-request/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": [
      {
        "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
  }
}