Get Segments
GET /segments
Get list of user counts for single asset-based or label-based segments.
Request Parameters
Query Parameters
Name | Type | Description |
---|---|---|
segment_type | Default: growth | |
segment_basis | Default: labels | |
min_weight | number | Default: 0.5 |
force_refresh | boolean | Default: False |
page | integer | Default: 1 |
size | integer | Default: 50 |
Header Parameters
Name | Type | Description |
---|---|---|
program-id required | string |
Responses
200
Successful Response
PageSegmentCount | application/json
Name | Type | Properties |
---|---|---|
items required | array | items: {'$ref': '#/components/schemas/SegmentCount'} |
total required | integer | minimum: 0.0 |
page required | integer | minimum: 1.0 |
size required | integer | minimum: 1.0 |
SegmentCount | application/json
Name | Type | Properties |
---|---|---|
segment_type required | string | description: Either |
segment_basis required | string | description: Ether |
segment_basis_id required | string | description: Ether the |
action_type required | string | description: Recommended event_type |
name required | string | |
user_count required | integer | description: The number of users in the segment |
strength required | number | description: The average of the user weights in the segment |
min_weight required | number | description: The cutoff weight for including in the segment |
Response Example
{
"items": [
{
"segment_type": "string",
"segment_basis": "string",
"segment_basis_id": "string",
"action_type": "string",
"name": "string",
"user_count": "integer",
"strength": "number",
"min_weight": "number"
}
],
"total": "integer",
"page": "integer",
"size": "integer"
}
422
Validation Error
HTTPValidationError | application/json
Name | Type | Properties |
---|---|---|
detail | array | items: {'$ref': '#/components/schemas/ValidationError'} |
ValidationError | application/json
Name | Type | Properties |
---|---|---|
loc required | array | items: {'anyOf': [{'type': 'string'}, {'type': 'integer'}]} |
msg required | string | |
type required | string |