Skip to main content

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

CODE
(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:

CODE
[
    {
        "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:

CODE
[
    {
        "branch": "some-branch",
        "count": 300
    },
    {
        "branch": "",
        "count": 300
    }
]

Hint: This method leverages the more general-purpose aggregation API: Aggregations

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.