Skip to main content

Get Segments

GET /segments

Get list of user counts for single asset-based or label-based segments.

Request Parameters

Query Parameters

NameTypeDescription
segment_type

Default: growth
Indicates if the segment should consider all growth values (default), only values matching a user history (base), or only values that are net new for the user (discovery). See product documentation for more details about segment types

segment_basis

Default: labels
Specifies whether the segments should be broken out by asset or label.

min_weightnumber

Default: 0.5
Minimum weight allowable for asset and label recommendations to qualify for the segment.

force_refreshboolean

Default: False
Recalculate the segment counts and do not use the cache

pageinteger

Default: 1

sizeinteger

Default: 50

Header Parameters

NameTypeDescription
program-id requiredstring

Responses

200 Successful Response

PageSegmentCount | application/json

NameTypeProperties
items requiredarray

items: {'$ref': '#/components/schemas/SegmentCount'}

total requiredinteger

minimum: 0.0

page requiredinteger

minimum: 1.0

size requiredinteger

minimum: 1.0

SegmentCount | application/json

NameTypeProperties
segment_type requiredstring

description: Either growth (actions to drive overall engagement), discovery (actions for exploration), or base (actions for repeat behaviors).

segment_basis requiredstring

description: Ether label or asset

segment_basis_id requiredstring

description: Ether the label or asset id

action_type requiredstring

description: Recommended event_type

name requiredstring
user_count requiredinteger

description: The number of users in the segment

strength requirednumber

description: The average of the user weights in the segment

min_weight requirednumber

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

NameTypeProperties
detailarray

items: {'$ref': '#/components/schemas/ValidationError'}

ValidationError | application/json

NameTypeProperties
loc requiredarray

items: {'anyOf': [{'type': 'string'}, {'type': 'integer'}]}

msg requiredstring
type requiredstring