Favicon

You are here: Home > API Reference > Workspace > Segment > Get segment counts by entity

Get segment counts by entity

Required Permission: base.organization.segment.counts

Get segment counts by entity

GET
/v1/organizations/:organizationId/segments/:segmentId/counts-by-entity/:entity
Copy to clipboard

Get segment counts by entity

Required Permission: base.organization.segment.counts

Get segment counts by entity

Request

Add parameter in header authorization
Example: Authorization: Bearer <token>
organizationId string
required
Match pattern: ^(([a-fA-F0-9]{24})|([a-zA-Z0-9\\-]{3,}))$
segmentId integer
required
entity string
required
device
expandTo string
optional
ancestorschildren

Responses

200 Response application/json
status boolean required
data object required
entity string required
segments array [object] required
segmentId number required
total number required
extra object optional
{
    "status": true,
    "data": {
        "entity": "string",
        "segments": [
            {
                "segmentId": 0,
                "total": 0,
                "extra": {}
            }
        ]
    }
}
401 Response application/json
status boolean optional
false
error object optional
code number optional
4004
message string optional
Invalid Token
{
    "status": false,
    "error": {
        "code": 4002,
        "message": "No auth token"
    }
}
404 Response application/json
status boolean optional
false
error object optional
code number optional
3001
message string optional
Entity not found
{
    "status": false,
    "error": {
        "code": 3001,
        "message": "Entity not found"
    }
}