Get the SQL view of datasets on a document/dossier instance

GET {{baseUrl}}/api/dossiers/:id/instances/:instanceId/datasets/sqlView

Get the collection of datasets and their SQL statement from a document/dossier instance.

Request Params

KeyDatatypeRequiredDescription
fieldsnullComma-separated, top-level field whitelist that allows the client to selectively retrieve part of the response model. If specified, extra filtering is applied, and for top-level object (if root model is an array, each array element), only the listed fields are kept in the response. For example, "id,elements" keeps only the "id" field and whole "elements" array field, omitting all other fields in the top-level response model.

HEADERS

KeyDatatypeRequiredDescription
X-MSTR-AuthTokenstring(Required) Authorization token
X-MSTR-ProjectIDstring(Required) Project ID

RESPONSES

status: OK

{"datasets":[{"name":"retail-sample-data.xls","id":"643DFEB79149B0FCA89A1D9534D2AD33","sqlStatement":"\n\n[Analytical engine calculation steps:\n\t1.  Perform dynamic aggregation over \u003cCity, Item Category, Month\u003e\n\t2.  Calculate metric: \u003cProfit\u003e at original data level in the view\n\t3.  Calculate metric: \u003cProfit\u003e at subtotal levels in the view\n\t4.  Calculate subtotal: \u003cExtMin_Global\u003e \n\t5.  Calculate subtotal: \u003cExtMax_Global\u003e \n\t6.  Calculate subtotal: \u003cExtMin_S_Global\u003e \n\t7.  Calculate subtotal: \u003cExtMax_S_Global\u003e \n\t8.  Calculate subtotal: \u003cExtMin_S_Cell\u003e \n\t9.  Calculate subtotal: \u003cExtMax_S_Cell\u003e \n\t10.  Perform cross-tabbing\n]\n"}]}