Favicon

You are here: Home > API Reference > Workspace > Segment > Get visible segment tree for user

Get visible segment tree for user

Get visible segment tree for user

GET
/v1/organizations/:organizationId/segments/segment-tree
Copy to clipboard

Get visible segment tree for user

Get visible segment tree for user

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,}))$

Responses

200 Response application/json
status boolean required
data object required
organizationId string required
Match pattern: ^[a-fA-F0-9]{24}$
children array [object] required
id number required
name string required
≤ 256 characters
icon string optional
≤ 256 characters
color any optional
children array [object] required
{
    "status": true,
    "data": {
        "organizationId": "string",
        "children": [
            {
                "id": 0,
                "name": "string",
                "icon": "string",
                "color": "string",
                "children": [
                    {}
                ]
            }
        ]
    }
}
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"
    }
}