GetAllSegments
Gets the end-user segments for your app.
Segments are manually created on the brainCloud portal, on the Design | Segmentation | Segments page.
Results
Name | Description |
---|---|
segmentId | Unique id for the segmentId |
name | Readable name of the segmentId |
testersOnly | If segement only applies to end-users flagged as testersOnly |
description | Readable description of the segment |
Service | Operation |
---|---|
pushNotification | GET_ALL_SEGMENTS |
Usage
http://localhost:3000
- C#
- C++
- Objective-C
- Java
- JavaScript
- Dart
- Cloud Code
- Raw
// S2S call: to view example, switch to the Cloud Code or Raw tab.
// S2S call: to view example, switch to the Cloud Code or Raw tab.
// S2S call: to view example, switch to the Cloud Code or Raw tab.
// S2S call: to view example, switch to the Cloud Code or Raw tab.
// S2S call: to view example, switch to the Cloud Code or Raw tab.
// S2S call: to view example, switch to the Cloud Code or Raw tab.
var pushNotificationProxy = bridge.getPushNotificationServiceProxy();
var postResult = pushNotificationProxy.getAllSegments();
if (postResult.status == 200) {
// Success!
}
{
"service": "pushNotification",
"operation": "GET_ALL_SEGMENTS",
"data": {}
}
JSON Response
{
"packetId": 1,
"messageResponses": [
{
"data": {
"segments": [
{
"segmentId": 3,
"name": "New End-Users",
"testersOnly": false,
"description": "People that was started in the last 10 days."
},
{
"segmentId": 4,
"name": "Recurring End-Users",
"testersOnly": false,
"description": "People that have been active and have an account older than 10 days."
},
{
"segmentId": 5,
"name": "In-Active End-Users",
"testersOnly": false,
"description": "People that have been in-active and have an account older than 10 days."
}
]
},
"status": 200
}
]
}