Skip to main content

POST /Data/MDXExecute

Executes an MDX query and obtains the results.

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:

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:


  • Request URL:


    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"}

    For another example:


    For another example:

    {"MDX": "SELECT on 0 FROM PATIENTS", "WAIT":1, "TIMEOUT":30}

    For another example:

                        "MDX": "SELECT FROM PATIENTS", 
                        "FILTERS": [ "[HomeD].[H1].[ZIP].&[32006]","[HomeD].[H1].[ZIP].&[32007]"],

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.

                    "MDXText":"SELECT [AGED].[AGE GROUP].MEMBERS ON 0 FROM [PATIENTS]",
                    "TimeStamp":"2016-08-14 16:05:16"
                    {"%ID":"AxisInfo_1","Text":"[AGED].[AGE GROUP].MEMBERS"},
                "Result": {
                        {"%ID":"Axis_1","Tuples": [
                                    {"%ID":"Member_1","Name":"0 to 29"}
                                "MemberInfo": [
                                    "nodeNo":3,"text":"0 to 29",
                                    "levelName":"Age Group",
                                    "memberKey":"0 to 29",
                                                       {"%ID":"TupleInfo_1","childSpec":"[AgeD].[H1].[Age Group].&[0 to 29].children"},
							{"%ID":"TupleInfo_2","childSpec":"[AgeD].[H1].[Age Group].&[30 to 59].children"}

If the response is incomplete, it includes cell data objects like the following:

            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},