Tools for Creating DeepSee Web Clients
POST /Data/MDXExecute
[Home] [Back] [Next]
InterSystems: The power behind what matters   
Class Reference   
Search:    

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:
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 (the default) or 1. If this property is 0, the server assumes the client wishes to wait for complete results before sending a response. If this property is 1, the server sends partial results.
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
Example Response
Response for MDX Query
{ 
   "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%"}
Note that POST /Data/PivotExecute returns 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.
For information that applies to all response objects, see the discussion at the start of this reference.
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
      },
      {
        "PatientID": "SUBJ_101107",
        "Age": 0,
        "Gender": "Female",
        "Home City": "Cedar Falls",
        "Test Score": ""
      },
      {
        "PatientID": "SUBJ_101239",
        "Age": 0,
        "Gender": "Female",
        "Home City": "Cedar Falls",
        "Test Score": ""
      },
      {
        "PatientID": "SUBJ_101480",
        "Age": 0,
        "Gender": "Female",
        "Home City": "Pine",
        "Test Score": 75
      },
      {
        "PatientID": "SUBJ_101681",
        "Age": 0,
        "Gender": "Female",
        "Home City": "Pine",
        "Test Score": 83
      },
      {
        "PatientID": "SUBJ_102020",
        "Age": 0,
        "Gender": "Female",
        "Home City": "Elm Heights",
        "Test Score": 50
      },
      {
        "PatientID": "SUBJ_102094",
        "Age": 0,
        "Gender": "Female",
        "Home City": "Centerville",
        "Test Score": 91
      },
      {
        "PatientID": "SUBJ_102464",
        "Age": 0,
        "Gender": "Female",
        "Home City": "Cypress",
        "Test Score": ""
      },
      {
        "PatientID": "SUBJ_102543",
        "Age": 0,
        "Gender": "Female",
        "Home City": "Centerville",
        "Test Score": ""
      },
      {
        "PatientID": "SUBJ_103056",
        "Age": 0,
        "Gender": "Female",
        "Home City": "Juniper",
        "Test Score": 88
      },
      {
        "PatientID": "SUBJ_103246",
        "Age": 0,
        "Gender": "Female",
        "Home City": "Spruce",
        "Test Score": 88
      },
      {
        "PatientID": "SUBJ_103508",
        "Age": 0,
        "Gender": "Female",
        "Home City": "Cypress",
        "Test Score": 68
      },
      {
        "PatientID": "SUBJ_103674",
        "Age": 0,
        "Gender": "Female",
        "Home City": "Elm Heights",
        "Test Score": 81
      },
      {
        "PatientID": "SUBJ_103710",
        "Age": 0,
        "Gender": "Female",
        "Home City": "Juniper",
        "Test Score": 88
      },
      {
        "PatientID": "SUBJ_103987",
        "Age": 0,
        "Gender": "Female",
        "Home City": "Juniper",
        "Test Score": ""
      },
      {
        "PatientID": "SUBJ_104009",
        "Age": 0,
        "Gender": "Female",
        "Home City": "Cedar Falls",
        "Test Score": 57
      },
      {
        "PatientID": "SUBJ_104090",
        "Age": 0,
        "Gender": "Female",
        "Home City": "Cedar Falls",
        "Test Score": 62
      },
      {
        "PatientID": "SUBJ_104342",
        "Age": 0,
        "Gender": "Female",
        "Home City": "Centerville",
        "Test Score": 72
      },
      {
        "PatientID": "SUBJ_104409",
        "Age": 0,
        "Gender": "Female",
        "Home City": "Pine",
        "Test Score": 98
      },
      {
        "PatientID": "SUBJ_104708",
        "Age": 0,
        "Gender": "Female",
        "Home City": "Cypress",
        "Test Score": 78
      },
      {
        "PatientID": "SUBJ_104875",
        "Age": 0,
        "Gender": "Female",
        "Home City": "Spruce",
        "Test Score": ""
      },
      {
        "PatientID": "SUBJ_104960",
        "Age": 0,
        "Gender": "Female",
        "Home City": "Juniper",
        "Test Score": ""
      },
      {
        "PatientID": "SUBJ_104987",
        "Age": 0,
        "Gender": "Female",
        "Home City": "Elm Heights",
        "Test Score": ""
      },
      {
        "PatientID": "SUBJ_105123",
        "Age": 0,
        "Gender": "Female",
        "Home City": "Juniper",
        "Test Score": 52
      },
      {
        "PatientID": "SUBJ_105336",
        "Age": 0,
        "Gender": "Female",
        "Home City": "Elm Heights",
        "Test Score": 51
      },
      {
        "PatientID": "SUBJ_105666",
        "Age": 0,
        "Gender": "Female",
        "Home City": "Redwood",
        "Test Score": 88
      },
      {
        "PatientID": "SUBJ_105705",
        "Age": 0,
        "Gender": "Female",
        "Home City": "Redwood",
        "Test Score": 82
      },
      {
        "PatientID": "SUBJ_106012",
        "Age": 0,
        "Gender": "Female",
        "Home City": "Spruce",
        "Test Score": 86
      },
      {
        "PatientID": "SUBJ_106067",
        "Age": 0,
        "Gender": "Female",
        "Home City": "Centerville",
        "Test Score": 79
      },
      {
        "PatientID": "SUBJ_106114",
        "Age": 0,
        "Gender": "Female",
        "Home City": "Juniper",
        "Test Score": 82
      },
      {
        "PatientID": "SUBJ_106153",
        "Age": 0,
        "Gender": "Female",
        "Home City": "Spruce",
        "Test Score": 73
      },
      {
        "PatientID": "SUBJ_106216",
        "Age": 0,
        "Gender": "Female",
        "Home City": "Redwood",
        "Test Score": ""
      },
      {
        "PatientID": "SUBJ_106243",
        "Age": 0,
        "Gender": "Female",
        "Home City": "Juniper",
        "Test Score": 91
      },
      {
        "PatientID": "SUBJ_106493",
        "Age": 0,
        "Gender": "Female",
        "Home City": "Magnolia",
        "Test Score": 79
      },
      {
        "PatientID": "SUBJ_106569",
        "Age": 0,
        "Gender": "Female",
        "Home City": "Centerville",
        "Test Score": 93
      },
      {
        "PatientID": "SUBJ_106795",
        "Age": 0,
        "Gender": "Female",
        "Home City": "Elm Heights",
        "Test Score": 56
      },
      {
        "PatientID": "SUBJ_107078",
        "Age": 0,
        "Gender": "Female",
        "Home City": "Centerville",
        "Test Score": ""
      },
      {
        "PatientID": "SUBJ_107314",
        "Age": 0,
        "Gender": "Female",
        "Home City": "Pine",
        "Test Score": 50
      },
      {
        "PatientID": "SUBJ_107564",
        "Age": 0,
        "Gender": "Female",
        "Home City": "Magnolia",
        "Test Score": 94
      },
      {
        "PatientID": "SUBJ_107568",
        "Age": 0,
        "Gender": "Female",
        "Home City": "Cypress",
        "Test Score": 56
      },
      {
        "PatientID": "SUBJ_107632",
        "Age": 0,
        "Gender": "Female",
        "Home City": "Spruce",
        "Test Score": ""
      },
      {
        "PatientID": "SUBJ_107921",
        "Age": 0,
        "Gender": "Female",
        "Home City": "Pine",
        "Test Score": 97
      },
      {
        "PatientID": "SUBJ_108152",
        "Age": 0,
        "Gender": "Female",
        "Home City": "Cedar Falls",
        "Test Score": 59
      },
      {
        "PatientID": "SUBJ_108593",
        "Age": 0,
        "Gender": "Female",
        "Home City": "Magnolia",
        "Test Score": 53
      },
      {
        "PatientID": "SUBJ_108822",
        "Age": 0,
        "Gender": "Female",
        "Home City": "Elm Heights",
        "Test Score": 54
      },
      {
        "PatientID": "SUBJ_108839",
        "Age": 0,
        "Gender": "Female",
        "Home City": "Pine",
        "Test Score": 94
      },
      {
        "PatientID": "SUBJ_108969",
        "Age": 0,
        "Gender": "Female",
        "Home City": "Elm Heights",
        "Test Score": 53
      },
      {
        "PatientID": "SUBJ_109002",
        "Age": 0,
        "Gender": "Female",
        "Home City": "Centerville",
        "Test Score": ""
      },
      {
        "PatientID": "SUBJ_109281",
        "Age": 0,
        "Gender": "Female",
        "Home City": "Cypress",
        "Test Score": 58
      },
      {
        "PatientID": "SUBJ_109309",
        "Age": 0,
        "Gender": "Female",
        "Home City": "Magnolia",
        "Test Score": 75
      },
      {
        "PatientID": "SUBJ_109328",
        "Age": 0,
        "Gender": "Female",
        "Home City": "Elm Heights",
        "Test Score": 98
      },
      {
        "PatientID": "SUBJ_109636",
        "Age": 0,
        "Gender": "Female",
        "Home City": "Elm Heights",
        "Test Score": 81
      },
      {
        "PatientID": "SUBJ_109691",
        "Age": 0,
        "Gender": "Female",
        "Home City": "Magnolia",
        "Test Score": 56
      },
      {
        "PatientID": "SUBJ_109697",
        "Age": 0,
        "Gender": "Female",
        "Home City": "Elm Heights",
        "Test Score": ""
      },
      {
        "PatientID": "SUBJ_109920",
        "Age": 0,
        "Gender": "Female",
        "Home City": "Redwood",
        "Test Score": ""
      },
      {
        "PatientID": "SUBJ_110246",
        "Age": 0,
        "Gender": "Female",
        "Home City": "Redwood",
        "Test Score": 73
      },
      {
        "PatientID": "SUBJ_110272",
        "Age": 0,
        "Gender": "Female",
        "Home City": "Centerville",
        "Test Score": ""
      },
      {
        "PatientID": "SUBJ_100326",
        "Age": 0,
        "Gender": "Male",
        "Home City": "Spruce",
        "Test Score": ""
      },
      {
        "PatientID": "SUBJ_100372",
        "Age": 0,
        "Gender": "Male",
        "Home City": "Cedar Falls",
        "Test Score": 72
      },
      {
        "PatientID": "SUBJ_100643",
        "Age": 0,
        "Gender": "Male",
        "Home City": "Pine",
        "Test Score": 75
      },
      {
        "PatientID": "SUBJ_100663",
        "Age": 0,
        "Gender": "Male",
        "Home City": "Redwood",
        "Test Score": ""
      },
      {
        "PatientID": "SUBJ_100820",
        "Age": 0,
        "Gender": "Male",
        "Home City": "Cedar Falls",
        "Test Score": 73
      },
      {
        "PatientID": "SUBJ_100865",
        "Age": 0,
        "Gender": "Male",
        "Home City": "Redwood",
        "Test Score": 56
      },
      {
        "PatientID": "SUBJ_101081",
        "Age": 0,
        "Gender": "Male",
        "Home City": "Elm Heights",
        "Test Score": ""
      },
      {
        "PatientID": "SUBJ_101208",
        "Age": 0,
        "Gender": "Male",
        "Home City": "Pine",
        "Test Score": 83
      },
      {
        "PatientID": "SUBJ_101242",
        "Age": 0,
        "Gender": "Male",
        "Home City": "Juniper",
        "Test Score": 93
      },
      {
        "PatientID": "SUBJ_101277",
        "Age": 0,
        "Gender": "Male",
        "Home City": "Juniper",
        "Test Score": 51
      },
      {
        "PatientID": "SUBJ_101490",
        "Age": 0,
        "Gender": "Male",
        "Home City": "Redwood",
        "Test Score": 74
      },
      {
        "PatientID": "SUBJ_101601",
        "Age": 0,
        "Gender": "Male",
        "Home City": "Elm Heights",
        "Test Score": 68
      },
      {
        "PatientID": "SUBJ_101630",
        "Age": 0,
        "Gender": "Male",
        "Home City": "Cedar Falls",
        "Test Score": 90
      },
      {
        "PatientID": "SUBJ_101708",
        "Age": 0,
        "Gender": "Male",
        "Home City": "Centerville",
        "Test Score": 99
      },
      {
        "PatientID": "SUBJ_101980",
        "Age": 0,
        "Gender": "Male",
        "Home City": "Centerville",
        "Test Score": 75
      },
      {
        "PatientID": "SUBJ_102121",
        "Age": 0,
        "Gender": "Male",
        "Home City": "Centerville",
        "Test Score": ""
      },
      {
        "PatientID": "SUBJ_102660",
        "Age": 0,
        "Gender": "Male",
        "Home City": "Centerville",
        "Test Score": ""
      },
      {
        "PatientID": "SUBJ_102803",
        "Age": 0,
        "Gender": "Male",
        "Home City": "Pine",
        "Test Score": ""
      },
      {
        "PatientID": "SUBJ_103042",
        "Age": 0,
        "Gender": "Male",
        "Home City": "Spruce",
        "Test Score": 92
      },
      {
        "PatientID": "SUBJ_103156",
        "Age": 0,
        "Gender": "Male",
        "Home City": "Pine",
        "Test Score": 83
      },
      {
        "PatientID": "SUBJ_103190",
        "Age": 0,
        "Gender": "Male",
        "Home City": "Elm Heights",
        "Test Score": 51
      },
      {
        "PatientID": "SUBJ_103348",
        "Age": 0,
        "Gender": "Male",
        "Home City": "Centerville",
        "Test Score": 64
      },
      {
        "PatientID": "SUBJ_103425",
        "Age": 0,
        "Gender": "Male",
        "Home City": "Elm Heights",
        "Test Score": 54
      },
      {
        "PatientID": "SUBJ_103941",
        "Age": 0,
        "Gender": "Male",
        "Home City": "Magnolia",
        "Test Score": 85
      },
      {
        "PatientID": "SUBJ_103963",
        "Age": 0,
        "Gender": "Male",
        "Home City": "Cedar Falls",
        "Test Score": 75
      },
      {
        "PatientID": "SUBJ_104672",
        "Age": 0,
        "Gender": "Male",
        "Home City": "Cedar Falls",
        "Test Score": 51
      },
      {
        "PatientID": "SUBJ_104990",
        "Age": 0,
        "Gender": "Male",
        "Home City": "Redwood",
        "Test Score": 81
      },
      {
        "PatientID": "SUBJ_105315",
        "Age": 0,
        "Gender": "Male",
        "Home City": "Redwood",
        "Test Score": ""
      },
      {
        "PatientID": "SUBJ_105517",
        "Age": 0,
        "Gender": "Male",
        "Home City": "Pine",
        "Test Score": ""
      },
      {
        "PatientID": "SUBJ_105654",
        "Age": 0,
        "Gender": "Male",
        "Home City": "Spruce",
        "Test Score": 96
      },
      {
        "PatientID": "SUBJ_105679",
        "Age": 0,
        "Gender": "Male",
        "Home City": "Spruce",
        "Test Score": 72
      },
      {
        "PatientID": "SUBJ_105961",
        "Age": 0,
        "Gender": "Male",
        "Home City": "Pine",
        "Test Score": 75
      },
      {
        "PatientID": "SUBJ_106088",
        "Age": 0,
        "Gender": "Male",
        "Home City": "Cypress",
        "Test Score": ""
      },
      {
        "PatientID": "SUBJ_106102",
        "Age": 0,
        "Gender": "Male",
        "Home City": "Centerville",
        "Test Score": ""
      },
      {
        "PatientID": "SUBJ_106185",
        "Age": 0,
        "Gender": "Male",
        "Home City": "Cedar Falls",
        "Test Score": 64
      },
      {
        "PatientID": "SUBJ_106424",
        "Age": 0,
        "Gender": "Male",
        "Home City": "Cypress",
        "Test Score": 65
      },
      {
        "PatientID": "SUBJ_106479",
        "Age": 0,
        "Gender": "Male",
        "Home City": "Centerville",
        "Test Score": 76
      },
      {
        "PatientID": "SUBJ_106602",
        "Age": 0,
        "Gender": "Male",
        "Home City": "Centerville",
        "Test Score": 61
      },
      {
        "PatientID": "SUBJ_106884",
        "Age": 0,
        "Gender": "Male",
        "Home City": "Centerville",
        "Test Score": 77
      },
      {
        "PatientID": "SUBJ_106887",
        "Age": 0,
        "Gender": "Male",
        "Home City": "Cypress",
        "Test Score": 54
      },
      {
        "PatientID": "SUBJ_107042",
        "Age": 0,
        "Gender": "Male",
        "Home City": "Juniper",
        "Test Score": 70
      }
    ]
  }
}