Employee Identity (EIAM)
Update To-Do
API
# Permissions {/examples/}
The Identity Management API is authorized at the application dimension. 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 task and to-do management permission |
| all | Full interface read and write permissions |
# Request Specification {/examples/}
PUT https://{your_domain}/api/v2/tenant/todo/task/{todo_id}
# Request Headers {/examples/}
| 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 {/examples/}
{
"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 {/examples/}
| Parameter Name | Chinese Name | Required | Type | Description |
|---|---|---|---|---|
| todo_id | Todo ID | Yes | String | Todo ID, cannot be changed |
| title | Todo Title | Yes | String | Cannot be empty, length not exceeding 100 |
| content | Todo 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 |
| external_id | External Todo ID | Yes | String | Todo ID generated by the third-party application, cannot be changed |
| detail_url | Detail URL | Yes | Map | Contains the todo event 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
{
"code": "0",
"data": true,
"message": null
}
Error Example:
HTTP/1.1 400 Bad Request
{
"error_code": "TODOTASK.0001",
"error_msg": "待办不存在"
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
# Response Parameters
| Parameter Name | Chinese Name | Type | Description |
|---|---|---|---|
| todo_id | Todo Task ID | String |
# Error Codes
| Status Code | Error Code | Error Message | Handling Measure |
|---|---|---|---|
| 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 | TODOTASK.0001 | Todo does not exist | Please check if the corresponding todo exists |
| Todo 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.0015 | Todo message type does not meet verification rules | Please check if the todo message type field in the input parameters complies with the validation rules |
| Todo message type 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 validation rules |
| The external todo ID does not meet the verification rules |
Please provide the Markdown content you would like me to translate.
