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

Creating a Task

Description

This interface is invoked to create a task.

Method

POST

URI

https://Domain name/service/AICC__Case/1.0.0/openapi/task (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

taskInfo

TaskInfo

-

Yes

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

Table 3 TaskInfo parameters

No.

Parameter

Type

Length (Bytes)

Mandatory or Not

Description

1

title

String

128

Yes

Task title

2

description

String

20,000

No

Task description

3

type

String

-

No

Associated task type

Value range:

  • Case

4

relateId

String

20

No

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

5

ownerId

String

20

Yes

Handler ID

6

contactId

String

20

No

Contact ID

7

creatorId

String

20

Yes

Creator ID

8

priority

String

128

No

Priority

Value range:

  • Critical
  • High
  • Medium
  • Low

9

dueDate

Datetime

-

No

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

10

attachment

String

255

No

Task attachment

Response Description

  • Status code: 200
Table 4 Response body parameters

No.

Parameter

Type

Mandatory or Not

Description

1

taskId

String

Yes

Task ID

Example

Scenario: Create a task.

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

  • Request header
{
 "Content-Type": "application/json",
 "access-token": "0000000000************7bm63KsRmEztTvyA="
}
  • Request body
{
"taskInfo":{
    "title": "test002",
    "description": "test001",
    "type": "Case",
    "ownerId": "10gg00000148QvgpaLAm",
    "relateId": "c6m80000014iXKHqDw3c",
    "dueDate": "2023-07-08 00:00:00",
    "contactId": "ciIy0000013y7cC8T2rA",
    "priority": "Low",
    "creatorId": "10gg00000148QvgpaLAm"
    }
}
  • Response header
{ "connection": "keep-alive",
 "Content-Length": "16",
"Content-Type": "application/json%3Bcharset=UTF-8"}
  • Response parameters
{
  "resCode": "0",
  "resMsg": "Success",
  "result": {"taskId":"ccqG0000014iXvGKONQO"}
}