POST /Data/MDXExecute
URL Parameters
None. Note that a request body is required; see the next heading.
Request Body Details
This service uses the following properties of the request body:
MDX | Required. MDX SELECT QUERY. |
FILTERS | Optional. Any additional filters to add to the query. If specified, this property must be an array of strings, each of which specifies a filter value. |
WAIT | Optional. Specify 0 or 1 (the default). If this property is 0, the server sends partial results. If this property is 1, the server assumes the client wishes to wait for complete results before sending a response. |
TIMEOUT | Optional. Timeout for waiting for query results, in seconds. The default timeout for this wait is 2 seconds less than the session’s timeout setting. |
Example Request
Request Method:
POST
Request URL:
http://localhost:52773/api/deepsee/v1/Data/MDXExecute
For comments on the possible forms of the URL, see “Introduction to the Business Intelligence REST API” in the chapter “Introduction and Samples.”
Request Body:
{"MDX": "SELECT aged.[age group].MEMBERS ON 0 FROM PATIENTS"}
Copy code to clipboardFor another example:
{"MDX": "SELECT FROM PATIENTS"}
Copy code to clipboardFor another example:
{"MDX": "SELECT birthd.date.members on 0 FROM PATIENTS", "WAIT":1, "TIMEOUT":30}
Copy code to clipboardFor another example:
{ "MDX": "SELECT FROM PATIENTS", "FILTERS": [ "[HomeD].[H1].[ZIP].&[32006]","[HomeD].[H1].[ZIP].&[32007]"], "WAIT":1, "TIMEOUT":30 }
Copy code to clipboard
Example Response
Response for MDX Query
Note that POST /Data/PivotExecute and POST /Data/MDXUpdateResults return the same response body.
The Info.QueryID property contains the query ID, which you need as input for the POST /Data/MDXCancelQuery and POST /Data/MDXUpdateResults services. An Info.ResultsComplete property with a value of 1 indicates that the MDX query has completed. Note that if the Info.PendingResults property has a value of 1, plugins are still computing, although the rest of the query may have completed. An Info.PendingResults property with a value of 0 indicates that any plugins have finished computing.
For information that applies to all response objects, see the discussion at the start of this reference.
{ "Info":{ "Error":"", "MDXText":"SELECT [AGED].[AGE GROUP].MEMBERS ON 0 FROM [PATIENTS]", "QueryKey":"en2772997983", "CubeKey":"PATIENTS", "QueryID":"PATIENTS||en2772997983", "Cube":"PATIENTS", "ResultsComplete":1, "Pivot":"", "QueryType":"SELECT", "ListingSource":"", "ColCount":3, "RowCount":0, "TimeStamp":"2016-08-14 16:05:16"} ,"AxesInfo":[ {"%ID":"SlicerInfo","Text":""}, {"%ID":"AxisInfo_1","Text":"[AGED].[AGE GROUP].MEMBERS"}, {"%ID":"AxisInfo_2","Text":"[%SEARCH]"} ], "Result": {"Axes":[ {"%ID":"Axis_1","Tuples": [{"%ID":"Tuple_1", "Members":[{"%ID":"Member_1", "Name":"0 to 29"}], "MemberInfo": [{"%ID":"MemberInfo_1", "nodeNo":3,"text":"0 to 29", "dimName":"AgeD", "hierName":"H1", "levelName":"Age Group", "memberKey":"0 to 29", "dimNo":2, "hierNo":1, "levelNo":2, "aggregate":"", "orSpec":""}]}, {"%ID":"Tuple_2",...}, {"%ID":"Tuple_3",...}], "TupleInfo":[ {"%ID":"TupleInfo_1","childSpec":"[AgeD].[H1].[Age Group].&[0 to 29].children"}, {"%ID":"TupleInfo_2","childSpec":"[AgeD].[H1].[Age Group].&[30 to 59].children"} ...], "CellData":[ {"%ID":"Cell_1","ValueLogical":418,"Format":"","ValueFormatted":"418"}, {"%ID":"Cell_2","ValueLogical":421,"Format":"","ValueFormatted":"421"}, ...]} }
If the response is incomplete, it includes cell data objects like the following:
{"%ID":"Cell_9","ValueLogical":"@Computing 0.00%","Format":"","ValueFormatted":"@Computing 0.00%"}
Response for MDX DRILLTHROUGH Query
{ "Info": { "Error": "", "TimeStamp": "2017-09-26 15:31:23", "ResultsComplete": 1, "MDXText": "DRILLTHROUGH SELECT [AGED].[AGE GROUP].[0 TO 29] ON 0 FROM [PATIENTS]", "QueryKey": "en2983351588", "CubeKey": "PATIENTS", "QueryID": "PATIENTS||en2983351588", "Cube": "PATIENTS", "Pivot": "", "QueryType": "DRILLTHROUGH", "ListingSource": "source", "ColCount": 5, "RowCount": 0 }, "AxesInfo": [ { "%ID": "SlicerInfo", "Text": "" }, { "%ID": "AxisInfo_1", "Text": "[AGED].[AGE GROUP].[0 TO 29]" }, { "%ID": "AxisInfo_2", "Text": "[%SEARCH]" } ], "Result": { "children": [ { "PatientID": "SUBJ_100786", "Age": 0, "Gender": "Female", "Home City": "Centerville", "Test Score": 77 }, { "PatientID": "SUBJ_100960", "Age": 0, "Gender": "Female", "Home City": "Elm Heights", "Test Score": 62 }, { "PatientID": "SUBJ_100977", "Age": 0, "Gender": "Female", "Home City": "Elm Heights", "Test Score": 54 }, ...]} }