API - Smart Rule Group

Description
These APIs are used to perform CRUD operations on the Smart Rule Group.
Get Smart Rule Groups by Strategy
GET /Campaign/api/interact/rest/v2/channels/{icIdOrName}/strategies/{strategyIdOrName}/ruleGroups?page=0&size=50
Request Parameters
Parameters Description Default Values
page

number, nth page to retrieve records.

0
size number of records per page. 50
Output
Table 1. Response Codes
Success 200 Ok
Error 400 Inputs provided for the API are not valid.
Server Error 500 Internal Server Error. For more details, check the logs.
Example: Content-Type: application/json
{
    "content": [
        {
            "id": 0,
            "name": "String",
            "strategyId": 0,
            "ruleGroupType": "String",
            "description": "String",
            "createDate": 0,
            "createBy": 0,
            "updateDate": 0,
            "updateBy": 0,
            "ruleIdList": ["0","0"]
        }
    ],
    "page": {
        "pageNumber": 0,
        "totalElements": 0,
        "totalPages": 0,
        "size": 0,
        "hasNext": false,
        "hasPrev": false
    }
}
Get Smart Rule Groups by Rule
GET /Campaign/api/interact/rest/v2/channels/{icIdOrName}/strategies/{strategyIdOrName}/ruleGroups/{ruleIdOrName}?page=0&size=50
Request Parameters
Parameters Description Default Values
page

number, nth page to retrieve records.

0
size number of records per page. 50
Output
Table 2. Response Codes
Success 200 Ok
Error 400 Inputs provided for the API are not valid.
Server Error 500 Internal Server Error. For more details, check the logs.
Example: Content-Type: application/json
{
    "content": [
        {
            "id": 0,
            "name": "String",
            "strategyId": 0,
            "ruleGroupType": "String",
            "description": "String",
            "createDate": 0,
            "createBy": 0,
            "updateDate": 0,
            "updateBy": 0,
            "ruleIdList": ["0","0"]
        }
    ],
    "page": {
        "pageNumber": 0,
        "totalElements": 0,
        "totalPages": 0,
        "size": 0,
        "hasNext": false,
        "hasPrev": false
    }
}
Create
POST /Campaign/api/interact/rest/v2/channels/{icIdOrName}/strategies/{strategyIdOrName}/ruleGroups
Input
Body Parameter – Content-Type:application/json
{
    "name": "String",
    "strategyId": 0,
    "description": "String",
    "ruleIdList": []
}
Output
Table 3. Response Codes
Success 201 Created
Error 400 Bad Request
Server Error 500 Internal /Server Error
Example: Content-Type: application/json
{
    "id": 0,
    "name": "String",
    "strategyId": 0,
    "description": "String",
    "ruleIdList": []
}
Update
PUT /Campaign/api/interact/rest/v2/channels/{icIdOrName}/strategies/{strategyIdOrName}/ruleGroups/{ruleGroupIdOrName}
Input
Body Parameter – Content-Type:application/json
{
    "id": 0,
    "name": "String",
    "strategyId": 0,
    "description": "String",
    "ruleIdList": []
}
Output
Table 4. Response Codes
Success 202 Accepted
Error 400 Bad Request
Server Error 500 Internal/Server Error
{
    "id": 0,
    "name": "String",
    "strategyId": 0,
    "ruleGroupType": "String",
    "description": "String",
    "createDate": 0,
    "createBy": 0,
    "updateDate": 0,
    "updateBy": 0,
    "ruleIdList": []
}
Delete
DELETE /Campaign/api/interact/rest/v2/channels/{icIdOrName}/strategies/{strategyIdOrName}/ruleGroups/{ruleGroupIdOrName}
Output
Table 5. Response Codes
Success 200 Ok
Error 400 Bad Request
Server Error 500 Internal/Server Error