post https://rtm.imiconnect.io//rtmsAPI/api/v1/apps/$(appid)/segments
This API is used to create a segment. A segment can be created with or without criteria.
Request
The Create Segment request is specified as follows:
Request Headers
Request Header | Description |
---|---|
secretKey | Secret key generated in backend application |
content-type | application/json |
##Request Example
{
"name" : "News",
"criteria" : "News&Channels"
}
Request Body
Elements of the request body
Parameter | Type | Mandatory | Description |
---|---|---|---|
name | String | Yes | Specifies the name of the segment. |
criteria | String | No | It can be no criteria or combination of topic with operators (& |
Response Example
{
"id" : "594290eae4b0649ee1ef90be",
"trans_id" : "22a23dbc-af31-4c65-925e-8e74e115ef27",
"description" : "success",
"code" : 0
}