Updated on 2025-03-31 GMT+08:00

Querying the Task List

Description

This interface is invoked to query the task list based on conditions. Fuzzy query by name, filtering based on the status, priority, and handler, and pagination query are supported. By default, a maximum of 100 records can be displayed on each page.

Method

POST

URI

https://Domain name/service/AICC__Case/1.0.0/openapi/task/list (For example, the domain name is service.besclouds.com.)

Request Description

Table 1 Request header parameters

No.

Parameter

Type

Mandatory or Not

Description

1

Content-Type

String

Yes

Request body type, which is JSON

2

access-token

String

Yes

Token for a user to access a tenant space. For details, see 2.

Table 2 Request body parameters

No.

Parameter

Type

Length (Bytes)

Mandatory or Not

Description

1

title

String

128

No

Task name for fuzzy query

2

status

String

128

No

Task status

dataType: SingleSelect

Value range:

  • Completed
  • Pending
  • Processing

3

priority

String

128

No

Priority

dataType: SingleSelect

Value range:

  • Critical
  • High
  • Medium
  • Low

4

ownerId

String

20

No

Task owner ID

5

type

String

-

No

Associated type

Value range:

  • Case

6

relateId

String

20

No

If the associated task type is set, this parameter must also be set.

7

start

Number

-

Yes

Start row number (minimum value: 0)

8

limit

Number

-

Yes

Number of rows returned for the query (minimum value: 1; maximum value: 100)

9

classification

String

128

No

Task category, which can be Todo, Processed, or Created

10

contactId

String

20

No

Contact ID

11

creatorId

String

20

Yes

Creator ID

12

startTime

String

-

No

Creation start time

Format: YYYY-MM-DD HH:mm:ss

13

endTime

String

-

No

Creation end time

Format: YYYY-MM-DD HH:mm:ss

Response Description

  • Status code: 200
Table 3 Response body parameters

No.

Parameter

Type

Mandatory or Not

Description

1

taskList

TaskList[]

Yes

Task information. For details about the parameters of this object, see Table 4.

2

count

Number

Yes

Total number of records that meet conditions

Table 4 Tasklist parameters

No.

Parameter

Type

Mandatory or Not

Description

1

taskId

String

Yes

Task ID

2

taskNo

String

Yes

Task No.

3

title

String

Yes

Task title

4

ownerId

String

Yes

Handler ID

5

priority

String

No

Priority

dataType: SingleSelect

Value range:

  • Critical
  • High
  • Medium
  • Low

6

dueDate

Datetime

No

Deadline, in YYYY-MM-DD HH:mm:ss format

7

status

String

Yes

Task status

8

description

String

No

Task description

9

creatorName

String

Yes

Creator name

10

ownerName

String

No

Handler name

11

creatorId

String

Yes

Creator ID

Example

Scenario: Query the task list.

URL: https://Domain name/service/AICC__Case/1.0.0/openapi/task/list

  • Request header
{
 "Content-Type": "application/json",
 "access-token": "0000000000************7bm63KsRmEztTvyA="
}
  • Request body
{
 "limit": 1,"start": 0
}
  • Response header
{ "connection": "keep-alive",
 "Content-Length": "16",
"Content-Type": "application/json%3Bcharset=UTF-8"}
  • Response parameters
{
    "resCode": "0",
    "resMsg": "Success",
    "result": {
        "count": 1,
        "taskList": [
            {
                "closedDate": null,
                "contactId": "ciIy0000013y7cC8T2rA",
                "createdDate": "2023-07-07T06:51:35.000Z",
                "creatorId": "10gg00000148QvgpaLAm",
                "creatorName": "liuhuqiong001",
                "description": "test001",
                "dueDate": "2023-07-08 00:00:00",
                "id": "ccqG0000014iXvGKONQO",
                "ownerId": "10gg00000148QvgpaLAm",
                "ownerName": "liuhuqiong001",
                "priority": "Low",
                "relateId": "c6m80000014iXKHqDw3c",
                "status": "Pending",
                "stayDate": null,
                "taskId": "ccqG0000014iXvGKONQO",
                "taskNo": "000000000000000000000000001002",
                "title": "show0612",
                "type": "Case"
            }
        ]
    }
}