Skip to main content

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 for indexCombination, nextTableLink and previousTableLink.
    • sliceId: opaque identifier of the slice. Pass it unchanged in the sliceId query parameter. Do not build or parse it.
    • actual: true for the slice saved as current in the tabulation, which is the one returned when sliceId is omitted.
    • items: one entry per PLANES axis. axis is the label of the axis in the user's language (for example Statistics), not its id. variable holds the id and label of 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.

StatuserrorCodeWhen
400DB_ERR_106The element cannot be loaded, for example an unknown elementId or workspaceId.
400TB_ERR_104No variable of the tabulation is valid in surveyCode.
401E401The X-API-Key header is missing or empty.
401SO_ERR_203The survey is not in your profile or does not exist.
500GEN_ERR_500Unexpected error.

Request​

Responses​

The slices of the tabulation, in navigation order.