List the slices of a saved tabulation
GET/api/v2/workspace/:workspaceId/survey/:surveyCode/tabulation/:elementId/combinations
Lists every slice of a tabulation saved in a workspace.
A slice is one combination of items of the PLANES axes, for example the statistic Weighted total with the marital status Married. Each slice is a two-dimensional table that you get with GET /api/v2/workspace/{workspaceId}/survey/{surveyCode}/tabulation/{elementId}?sliceId={sliceId}.
Before you call it
Use the same identifiers as the tabulation operation: workspaceId (from GET /api/v2/workspaces), elementId (from tabulations in GET /api/v2/workspace/{workspaceId}) and the surveyCode of the workspace.
Response
combinations: the number of slices.itemCombinations: one entry per slice, in navigation order. The tabulation operation uses the same order forindexCombination,nextTableLinkandpreviousTableLink.sliceId: opaque identifier of the slice. Pass it unchanged in thesliceIdquery parameter. Do not build or parse it.actual:truefor the slice saved as current in the tabulation, which is the one returned whensliceIdis omitted.items: one entry perPLANESaxis.axisis the label of the axis in the user's language (for exampleStatistics), not its id.variableholds theidandlabelof the item of that axis in this slice: a statistic, a category or a total.
To relate a slice to the matrixList[].items of the tabulation operation, match by label: find the PLANES axis whose label equals items[].axis in the tabulation's dimensions; its id is the axis used in matrixList[].items. Then compare the item ids.
The call is read-only. The tabulation is validated and expanded on each call, so the list reflects the current definition and survey data.
Errors
errorMessage is meant for people and may be in the user's language. Base your error handling on errorCode.
| Status | errorCode | When |
|---|---|---|
| 400 | DB_ERR_106 | The element cannot be loaded, for example an unknown elementId or workspaceId. |
| 400 | TB_ERR_104 | No variable of the tabulation is valid in surveyCode. |
| 401 | E401 | The X-API-Key header is missing or empty. |
| 401 | SO_ERR_203 | The survey is not in your profile or does not exist. |
| 500 | GEN_ERR_500 | Unexpected error. |
Request
Responses
- 200
- 400
- 401
- 500
The slices of the tabulation, in navigation order.
The element cannot be loaded (DB_ERR_106), for example because elementId or workspaceId is unknown, or no variable of the tabulation is valid in surveyCode (TB_ERR_104).
The X-API-Key header is missing or empty (E401), or the survey is not in the user's profile or does not exist (SO_ERR_203).
Unexpected error.