snapshots.allocationPercentages
Get allocation percentages for a completed snapshot.
The response contains one result per allocation question, with percentages for each item. Percentages are averaged over numeric answers and rounded to one decimal place, with a rounding adjustment so they total 100.
Questions remain in the response when unanswered, with null percentages when hidden. A snapshot with no allocation questions returns an empty results array.
Facts
| Method | GET https://api.getdx.com/snapshots.allocationPercentages |
| Required scope | snapshots:read |
Arguments
Required arguments
| Name | Type | Description |
|---|---|---|
token |
Token |
Auth token passed in the Authorization: Bearer HTTP header. |
snapshot_id |
Text |
ID of a completed snapshot belonging to the account. |
Optional arguments
| Name | Type | Description |
|---|---|---|
team_ids |
Array<Text> |
Comma-separated team IDs. Each team must be represented in the snapshot. Includes descendants in the snapshot hierarchy. |
snapshot_team_ids |
Array<Text> |
Comma-separated snapshot team IDs. Each must belong to the snapshot. Includes descendants. |
group_ids |
Array<Text> |
Comma-separated user group IDs belonging to the account. |
branch_ids |
Array<Text> |
Comma-separated branch IDs belonging to the snapshot. |
attribute_ids |
Array<Text> |
Comma-separated attribute value IDs. Values must belong to the account and be accessible to the token. |
Filtering behavior
With no population filters, results cover the organization. Values within a filter are combined with OR; different filter types are combined with AND. When both team_ids and snapshot_team_ids are supplied, the selected subtrees are intersected. Disjoint selections match no people.
Attribute values are combined with OR within each attribute group and AND across groups. For example, two Location values and one Role value match people in either location who also have the selected role.
The response includes only the selected filter values. filters.snapshot.completed_count and total_count describe the filtered population, not the whole snapshot. total_count includes eligible recipients and people who completed the snapshot even if excluded from the recipient list.
Example request
curl -X GET 'https://api.getdx.com/snapshots.allocationPercentages?snapshot_id=MjUyNbaY' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer xxxx-xxxxxxxxx-xxxx'
Example response
This example uses an account minimum response threshold of 3.
{
"ok": true,
"filters": {
"snapshot": {
"id": "MjUyNbaY",
"scheduled_for": "2026-08-02",
"completed_at": "2026-08-16T14:00:00.000Z",
"completed_count": 4,
"total_count": 6
},
"teams": [],
"snapshot_teams": [],
"groups": [],
"branches": [],
"attribute_groups": []
},
"results": [
{
"question": {
"id": "NjAx",
"prompt": "How was time spent?",
"core": true,
"custom": false,
"target_role": "dev"
},
"items": [
{
"id": "NjAy",
"name": "Innovation",
"description": null,
"bucket": "innovation",
"percentage": 73.3
},
{
"id": "NjAz",
"name": "KTLO",
"description": "Keeping the lights on",
"bucket": "ktlo",
"percentage": 26.7
}
],
"total_respondents": 4,
"na_count": 1,
"hidden": false
}
]
}
Response fields
| Field | Type | Description |
|---|---|---|
ok |
Boolean |
Whether the request succeeded. |
filters |
Object |
The snapshot, applied population filters, and any breakdown selection. |
results |
Array<Object> |
Results for the requested population. |
Filters object
| Field | Type | Description |
|---|---|---|
snapshot |
Object |
id, scheduled_for (YYYY-MM-DD), completed_at (ISO 8601), completed_count, and total_count. Counts reflect the applied population filters. |
teams |
Array<Object> |
Selected teams, each with id and name; empty when not filtered. |
snapshot_teams |
Array<Object> |
Selected snapshot teams, each with id and name; empty when not filtered. |
groups |
Array<Object> |
Selected user groups, each with id and name; empty when not filtered. |
branches |
Array<Object> |
Selected branches, each with id and name; empty when not filtered. |
attribute_groups |
Array<Object> |
Groups represented in attribute_ids. Each has id, name, type, and attributes containing only the selected values (id and name). See management types. |
Result object
| Field | Type | Description |
|---|---|---|
question |
Object |
Allocation question metadata. |
items |
Array<Object> |
Allocation items in their configured order, each with a percentage. |
total_respondents |
Integer |
Numeric and N/A responses to this allocation question. |
na_count |
Integer |
N/A responses to this allocation question. Included in total_respondents; available even when results are hidden. |
hidden |
Boolean |
Whether the result is suppressed by the account’s minimum response threshold. |
Question object
| Field | Type | Description |
|---|---|---|
id |
String |
The allocation question ID. |
prompt |
String |
The allocation question text. |
core |
Boolean |
Whether this is the core allocation question. |
custom |
Boolean |
Whether this is a custom question. |
target_role |
String |
Audience: dev, nondev, or all. |
Item object
| Field | Type | Description |
|---|---|---|
id |
String |
The allocation item ID. |
name |
String |
The item name, including account label overrides for core items. |
description |
String or null |
The item description. |
bucket |
String or null |
The allocation bucket, such as innovation or ktlo. |
percentage |
Number or null |
Average allocation percentage calculated from numeric answers only, rounded to one decimal place and adjusted so available item percentages total 100. null when hidden or no numeric answers exist. |
Privacy and missing data
A result is hidden when total_respondents is below the account’s minimum response threshold. Numeric and N/A responses both count toward this threshold. N/A applies to the whole allocation question, not an individual item. The number of numeric responses is total_respondents - na_count.
When hidden, every item’s percentage is null; metadata, total_respondents, and na_count remain available. If every response is N/A, percentages are null even when the threshold is met and hidden is false.
For example, at a threshold of five, one numeric response and four N/A responses produce total_respondents: 5, na_count: 4, and hidden: false. Percentages are calculated from the one numeric response.
Errors
Check ok in every response. When it is false, read error and any error_details.
| Field | HTTP status | Description |
|---|---|---|
not_authed |
401 |
The authentication token is missing or invalid. |
not_authorized |
403 |
The token does not have access to this method, including the required snapshots:read scope. |
invalid_arguments |
400 |
A required argument is missing or a filter or breakdown argument is invalid. error_details identifies the argument. |
not_found |
404 |
The snapshot is unknown, belongs to another account, is deleted, or is not completed. |