List all branches
Use this method to enumerate all branches (and total segments) in a Flex container.
Important: A branch can only exist if it contains at least one segment. If all segments are deleted from a branch, the branch will no longer exist in the container.
URL
(GET) /api/apps/wbflex/documents/{id}/branches
PARAMETERS
The URL parameters are:
id | Specify the Flex container ID | string, Mandatory |
RESULTS
A typical result is:
[
{
"branch": "v2",
"count": 300
},
{
"branch": "v1",
"count": 300
},
{
"branch": "v3",
"count": 320
}
]
The relevant properties are:
branch
is the branch name. It is ““ for segments without a branch value;count
is the total segments in the branch.
Segments that are not assigned any branch, are listed under the blank branch element:
[
{
"branch": "some-branch",
"count": 300
},
{
"branch": "",
"count": 300
}
]
Hint: This method leverages the more general-purpose aggregation API: Aggregations