Employee Identity (EIAM)
Create To-Do
API
# Permissions
The Identity Management API is authorized at the application level. Before calling the interface, you need to set interface permissions for different applications. For details, please refer to API Permissions.
| Permission Code | Description |
|---|---|
| app_todo_msg | Application-side to-do management permission |
| all | Full interface read-write permission |
# Request Specification
POST https://{your_domain}/api/v2/tenant/todo/task
# Request Headers
| Parameter Name | Chinese Name | Required | Type | Description |
|---|---|---|---|---|
| Authorization | Authorization | Yes | String | Format: Bearer {access_token} |
| Content-Type | Content-Type | Yes | String | Fixed value: application/json; charset=utf-8 |
# Request Example
{
"title": "To-Do Title",
"content": "To-Do Content",
"message_type": "TEXT",
"ending_at": "2022-08-14 12:00:00",
"user_name": "zhangsan",
"external_id": "123fdsafsafdsafdsa-fdas",
"detail_url": {
"web_url": "https://imczhangyu001.idaas-test-alpha.bccastle.com",
"mobile_url": "https://imczhangyu001.idaas-test-alpha.bccastle.com"
}
}
1
2
3
4
5
6
7
8
9
10
11
12
2
3
4
5
6
7
8
9
10
11
12
# Request Parameters
| Parameter Name | Chinese Name | Required | Type | Description |
|---|---|---|---|---|
| title | To-Do Title | Yes | String | Cannot be empty, length not exceeding 100 |
| content | To-Do Content | Yes | String | Cannot be empty, length not exceeding 1024 |
| message_type | Message Type | Yes | String | TEXT=text MARKDOWN=markdown |
| ending_at | Deadline | Yes | String | Format yyyy-MM-dd HH:mm:ss |
| user_name | Username | Yes | String | Fill in the username |
| external_id | External To-Do ID | Yes | String | To-Do ID generated by the third-party application, length not exceeding 255 |
| detail_url | Detail URL | Yes | Map | Contains the to-do task URL for PC and mobile |
| --web_url | PC URL | Yes | String | PC URL |
| --mobile_url | Mobile URL | Yes | String | Mobile URL |
# Response Example
Success Example:
HTTP/1.1 200 OK
Content-Type: application/json
{
"todo_id": "20220809162630548-9D52-E085BA68A"
}
Error Example:
HTTP/1.1 400 Bad Request
{
"error_code": "USER.0001",
"error_msg": "User does not exist"
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
2
3
4
5
6
7
8
9
10
11
12
13
14
# Response Parameters
| Parameter Name | Chinese Name | Type | Description |
|---|---|---|---|
| todo_id | Todo Task ID | String |
# Error Codes
| Status Code | Error Code | Error Message | Handling Action |
|---|---|---|---|
| 400 | COM.0601 | Parameter error, missing parameter or incorrect parameter type | Please check if the input parameters comply with the validation rules |
| Parameter missing or incorrect parameter type | |||
| 400 | USER.0001 | User does not exist | Please check if the corresponding user exists |
| User does not exist | |||
| 400 | TODOTASK.0002 | Todo already exists | Please check if the corresponding todo exists |
| Todo already exists | |||
| 400 | TODOTASK.0004 | Todo title cannot be empty | Please check if the todo title field in the input parameters is empty |
| Todo title cannot be empty | |||
| 400 | TODOTASK.0005 | Todo content cannot be empty | Please check if the todo content field in the input parameters is empty |
| Todo content cannot be empty | |||
| 400 | TODOTASK.0006 | Todo message type cannot be empty | Please check if the todo message type field in the input parameters is empty |
| Todo message type cannot be empty | |||
| 400 | TODOTASK.0007 | External todo ID cannot be empty | Please check if the external todo ID field in the input parameters is empty |
| External todo ID cannot be empty | |||
| 400 | TODOTASK.0008 | The deadline cannot be empty | Please check if the deadline field in the input parameters is empty |
| The deadline cannot be empty | |||
| 400 | TODOTASK.0009 | Detail URL cannot be empty | Please check if the detail URL field in the input parameters is empty |
| Detail URL cannot be empty | |||
| 400 | TODOTASK.0010 | Web URL cannot be empty | Please check if the web URL field in the input parameters is empty |
| Web URL cannot be empty | |||
| 400 | TODOTASK.0011 | Mobile URL cannot be empty | Please check if the mobile URL field in the input parameters is empty |
| Mobile URL cannot be empty | |||
| 400 | TODOTASK.0013 | Todo title does not meet verification rules | Please check if the todo title field in the input parameters complies with the validation rules |
| Todo title does not meet verification rules | |||
| 400 | TODOTASK.0014 | Todo content does not meet verification rules | Please check if the todo content field in the input parameters complies with the validation rules |
| Todo content does not meet verification rules | |||
| 400 | TODOTASK.0016 | The external todo ID does not meet the verification rules | Please check if the external todo ID field in the input parameters complies with the verification rules |
| The external todo ID does not meet the verification rules |
Please provide the Markdown content you need translated.
