snapshots.branches.list
List the snapshot branches configured for your account. Branches are survey variants targeted at different audiences, such as software engineers or product managers. Use the returned IDs as branch_ids filters on the snapshot score methods.
Facts
| Method | GET https://api.getdx.com/snapshots.branches.list |
| Required scope | snapshots:read |
Arguments
| Name | Type | Description |
|---|---|---|
token |
Token |
Auth token passed as an HTTP header. |
Example request
This is a typical request:
curl -X GET https://api.getdx.com/snapshots.branches.list \
-H 'Accept: application/json' \
-H 'Authorization: Bearer xxxx-xxxxxxxxx-xxxx'
Example response
This is a typical success response:
{
"ok": true,
"branches": [
{
"id": "NTIxNDc",
"name": "Software Engineers",
"prompt": "Software Engineers",
"position": 1,
"main": true,
"audience": "software_engineers"
},
{
"id": "NTIzMTM",
"name": "Product Management",
"prompt": "Product managers and product owners",
"position": 2,
"main": false,
"audience": "product_management"
},
{
"id": "NTI5Njc",
"name": "Platform Partners",
"prompt": "Platform and infrastructure partners",
"position": 3,
"main": false,
"audience": null
}
]
}
Response fields
| Field | Type | Description |
|---|---|---|
id |
String |
The unique branch ID. Pass it in branch_ids on the snapshot score methods. |
name |
String |
The internal label for the branch, as shown in DX settings. |
prompt |
String |
The respondent-facing text shown when a respondent selects their branch in the survey. |
position |
Integer |
The display order of the branch. Sort by this field to match the order shown in DX. |
main |
Boolean |
Whether this is the account’s main branch. Only one branch is main. snapshots.dxiScores requires it in any branch_ids filter. |
audience |
String or null |
The preset audience the branch is based on: software_engineers, product_management, or design. null for custom branches. |
Branches and past snapshots
This method returns the branches currently configured for the account, not the branches that were published for a particular snapshot. A branch deleted after a snapshot ran no longer appears here but is still accepted as a branch_ids filter for that snapshot. A branch created after a snapshot ran was never published for it, so the score methods return invalid_arguments when it is passed in branch_ids.
Errors
Check ok in every response. If it is false, use the error code to identify the problem.
| Error | Description |
|---|---|
not_authed |
The authentication token is missing or invalid. |
not_authorized |
The token lacks the required snapshots:read scope. |