Employee Identity (EIAM)
Send In-Site Notification
API
# Permissions
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_notice_msg | Application-side message notification management permission |
| all | Full interface read/write permission |
# Request Specification
POST https://{your_domain}/api/v2/tenant/notice/insite/asyncSend
# 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": "Notification Title 66",
"content": "Content: Abnormal risk detected in your account. View anomaly details 66.",
"message_type": "TEXT",
"user_names": [
"ziceUser",
"zhangaaa01"
],
"org_codes": [
"10000"
],
"all": false
}
1
2
3
4
5
6
7
8
9
10
11
12
13
2
3
4
5
6
7
8
9
10
11
12
13
# Request Parameters
| Parameter Name | Chinese Name | Required | Type | Description |
|---|---|---|---|---|
| title | Notification Title | Yes | String | Not empty, length not exceeding 100 |
| content | Notification Content | Yes | String | Not empty, length not exceeding 1024 |
| message_type | Message Type | Yes | String | TEXT=text MARKDOWN=markdown |
| user_names | User Collection | No | List | Fill in usernames, up to 100 |
| org_codes | Organization Collection | No | List | Fill in organization codes, up to 20 |
| all | Send to All | No | Boolean | When false, either userNames or orgCodes must not be empty |
# Response Example
Success Example:
HTTP/1.1 200 OK
Content-Type: application/json
{
"noitce_id": "20220809161411767-9524-8618BA3BB"
}
Error Example:
HTTP/1.1 400 Bad Request
{
"error_code": "NOTICE.0004",
"error_msg": "通知标题不能为空"
}
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 |
|---|---|---|---|
| notice_id | Notification 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 | NOTICE.0004 | Notification title cannot be empty | Please check if the notification title field in the input parameters is empty |
| Notice title cannot be empty | |||
| 400 | NOTICE.0005 | Notification content cannot be empty | Please check if the notification content field in the input parameters is empty |
| Notice content cannot be empty | |||
| 400 | NOTICE.0006 | Notification message type cannot be empty | Please check if the notification message type field in the input parameters is empty |
| Notification message type cannot be empty | |||
| 400 | NOTICE.0007 | Notification title does not meet validation rules | Please check if the notification title field in the input parameters complies with the validation rules |
| Notice title does not meet verification rules | |||
| 400 | NOTICE.0008 | Notification content does not meet validation rules | Please check if the notification content field in the input parameters complies with the validation rules |
| Notice content does not meet verification rules | |||
| 400 | NOTICE.0010 | Number of notification usernames does not meet validation rules | Please check if the number of usernames in the input parameters complies with the validation rules |
| Notice that the number of usernames does not meet the verification rules | |||
| 400 | NOTICE.0011 | Number of notification organizations does not meet validation rules | Please check if the number of organizations in the input parameters complies with the validation rules |
| The number of notification organizations does not meet the verification rules | |||
| 400 | NOTICE.INSITE.0003 | The number of in-site notifications sent this time exceeds the specification limit | The number of notifications sent this time exceeds the limit, please send notifications again tomorrow |
| The number of in-site notifications sent this time exceeds the specification limit | |||
| 400 | NOTICE.INSITE.0004 | User or organization scope for in-site notifications cannot be empty | Please check if the user or organization scope in the input parameters is empty |
| User or organization scope for in-site notifications cannot be empty |
I am ready to receive the Markdown content for translation. Please paste the text.
