Skip to main content

Get a workspace

GET 

/api/v2/workspace/:workspaceId

Returns a workspace with the saved elements you can reuse through the API and the surveys attached to it.

Get workspaceId from GET /api/v2/workspaces.

Element lists​

PropertyContainsUse the element id with
tabulationsSaved tabulations, including trend tablesGET /api/v2/workspace/{workspaceId}/survey/{surveyCode}/tabulation/{elementId}, GET /api/v2/workspace/{workspaceId}/element/{elementId}
reachTablesSaved Reach tablesGET /api/v2/workspace/{workspaceId}/element/{elementId}
targetsSaved targets (audiences)target.id in table, ranking, evaluation and optimization requests; PUT /api/v2/workspace/{workspaceId}/survey/{surveyCode}/target/{elementId}
userVarsUser-defined variablesGET /api/v2/workspace/{workspaceId}/survey/{surveyCode}/user-vars, which returns the ids to use in CUSTOM_VAR axis items

Saved studies (rankings, evaluations, breakdowns and duplications) are not listed.

Filtering with type​

Repeat type once per element type to keep only those lists, for example ?type=TABULATION&type=TARGET. Lists that are not requested are omitted from the response. Without type, all four lists are returned. type does not filter surveys, which is omitted when no survey is attached to the workspace. Comma-separated values are not split. A value that is not an element type returns AE_ERR_401.

Surveys​

surveyCode and surveyDescription identify the survey currently active in the workspace; they are empty strings when none is active. surveys lists every survey attached to the workspace, including surveys you can no longer query (for example, no longer contracted), and does not include availableReach. Check them against GET /api/v2/users/surveys before using one.

Surveys are named as in GET /api/v2/users/surveys: description is the name you see (your alias, or the catalog name when there is none) and originalDescription is the catalog name. surveyDescription takes the name of the matching entry in surveys; if the active survey is not among them, it is the name saved with the workspace.

Errors​

StatuserrorCodeWhen
400WS_ERR_403The workspace exists but is neither owned by nor shared with the caller.
400AE_ERR_401type contains a value that is not an element type. Values are case-sensitive.
400TW_ERR_500The X-API-Key value does not identify a TOM user.
401E401The X-API-Key header is missing or empty.
500GEN_ERR_500Unexpected error. A workspaceId that does not exist is also answered with 500, not 404.

Request​

Responses​

The workspace, its element lists (filtered by type when given) and its attached surveys. surveys is omitted when no survey is attached.