Search Message Rules¶
Search message rules.
Request Format¶
POST https://{apigw-address}/app-portal-service/v2.2/message-service/rule/search
Request Parameters (Header)¶
Name |
Mandatory/Optional |
Data Type |
Description |
---|---|---|---|
Authorization |
Optional |
String |
User identification |
Request Parameters (URI)¶
Name |
Mandatory/Optional |
Data Type |
Description |
---|---|---|---|
orgId |
Mandatory |
String |
OU ID |
Request Parameters (Body)¶
Name |
Mandatory/Optional |
Data Type |
Description |
---|---|---|---|
appId |
Optional |
String |
Application ID |
identifier |
Optional |
String |
The ID of user or user group |
identifierType |
Optional |
Integer |
Object type0 for user, 1 for user group |
ruleIds |
Mandatory |
List |
The list of message rule IDs |
createdBy |
Optional |
String |
The creator of the message rule. |
Response Parameters¶
Name |
Data Type |
Description |
---|---|---|
messageRuleList |
MessageRuleDTO Struct |
Message rule lists |
MessageRuleDTO Struct¶
Name |
Data Type |
Description |
---|---|---|
appId |
String |
Application ID |
ruleId |
String |
Message rule ID |
ruleName |
String |
Message rule name |
relations |
RelationDTO Struct |
The users or user groups associated with the message rule |
messageRule |
Object |
Message rules |
isEnable |
Integer |
Whether the rule is enabled |
createdBy |
String |
The user who creates the message rule |
createdAt |
String |
The time when user creates the message rule |
updatedBy |
String |
The user who updates the message rule |
updatedAt |
String |
The time when user updates the message rule |
deletedBy |
String |
The user who deletes the message rule |
deletedAt |
String |
The time when user deletes the message rule |
RelationDTO Struct¶
Name |
Data Type |
Description |
---|---|---|
type |
Integer |
Type. 0 for user, 1 for user group |
identifiers |
List |
The ID of user or user group |
Error Codes¶
Error Code |
Description |
---|---|
31400 |
OU ID is required. |
31404 |
OU, application or message rule does not exist, or the OU does not acquire the application |
31600 |
message rule error |
31601 |
The number of message rules exceeds the limit |
31602 |
The number of marks in the message rule exceeds the limit |
31603 |
The message rule does not match |
31604 |
Message rule marks are required |
31607 |
Organization structure error |
Samples¶
Request Sample¶
url: https://{apigw-address}/app-portal-service/v2.2/message-service/rule/search?orgId=your_org_id
method: POST
requestBody:
{
"appId": "your_app_id",
"ruleIds": ["your_rule_id_1","your_rule_id_2"],
"identifier": "your_user_id",
"identifierType": 0,
"createdBy": "your_user_id"
}
Return Sample¶
{
"code": 0,
"message": "OK",
"data": {
"messageRuleList": [
{
"appId": "",
"ruleId": "",
"ruleName": "",
"relations": [
{
"type": 0,
"identifiers": ["your_user_id_1","your_user_id_2"]
},
{
"type": 1,
"identifiers": ["your_user_group_id"]
}
],
"messageRule": {
"mark1": ["siteA","siteB"],
"mark2": ["deviceA","deviceB"],
"mark3": ["fault"],
"mark4": [""],
"mark6": null
},
"isEnable": 1,
"createdBy": "your_user_id",
"createdAt": "2021-01-01 00:00:00",
"updatedBy": "your_user_id",
"updatedAt": "2021-01-01 00:00:00",
"deletedAt": null,
"deletedBy": null
}
]
}
}