REST API: Segments List
This GET endpoint retrieves a list of all applications registered in Push0. It returns each app’s basic details, including ID, name, and state, allowing clients to display or view their applications.
GET API url -> /api/v1/segments
Query Parameters
The following query parameters are possible:
| Field | Type | Description | Required |
|---|---|---|---|
| id | String | If provided - returns single list element with appId | ❌ |
| name | String | If provided - returns sgments with name | ❌ |
| page | Int | Specifies the page number of the results to retrieve. Used for pagination. Must be a positive integer. Required if id is not provided. |
Optional |
| limit | Int | Determines the maximum number of items returned per page. Used to control pagination size. Must be a positive integer, often capped by the API (e.g., 100). Default: 50. Max: 100. Required if id is not provided. |
Optional |
Response Examples
[
{
"id": "sg_wsviVjvLoorS5GKOZpznH",
"name": "All",
"description": "Targeting all devices",
"constraints": [],
"updatedAt": null,
"createdAt": 1771851312573
},
{
"id": "sg_zZG8UFfAunqsk17xZh3lh",
"name": "All Samsung devices",
"description": "Targeting all Samsung devices",
"constraints": [
{
"type": "OR",
"constraints": [
{
"field": "deviceManufacturer",
"relation": "==",
"value": "Samsung"
}
]
}
],
"updatedAt": 1771853394601,
"createdAt": 1771851312575
},
{
"id": "sg_etKA0w3vW9O0BaUIpOCKt",
"name": "updated_segment_UguxU",
"description": "updated_description_UguxU",
"constraints": [
{
"type": "OR",
"constraints": [
{
"field": "deviceModel",
"relation": "!=",
"value": "Galaxy_XXXXX"
}
]
},
{
"type": "OR",
"constraints": [
{
"field": "deviceManufacturer",
"relation": "!=",
"value": "Samsung"
},
{
"field": "deviceModel",
"relation": "!=",
"value": "Magic"
}
]
},
{
"type": "OR",
"constraints": [
{
"field": "deviceManufacturer",
"relation": "!=",
"value": "Red"
}
]
}
],
"updatedAt": 1771853394601,
"createdAt": 1771853363417
}
]