Mprove
get-query-info

Get query info for a chart, dashboard, or report. Returns query status, SQL, malloy and data.

Request Body

application/json

Response Body

application/json

Input

{
  "projectId": "string",
  "repoId": "string",
  "branchId": "string",
  "envId": "string",
  "chartId": "string",
  "dashboardId": "string",
  "tileIndex": 0,
  "reportId": "string",
  "rowId": "string",
  "timezone": "string",
  "timeSpec": "string",
  "timeRangeFractionBrick": "string",
  "getMalloy": true,
  "getSql": true,
  "getData": true,
  "isFetch": true
}

Output

{
  "chart": {
    "title": "string",
    "chartId": "string",
    "url": "string",
    "query": {
      "connectionId": "string",
      "connectionType": "PostgreSQL",
      "queryId": "string",
      "status": "New",
      "lastRunBy": "string",
      "lastRunTs": 0,
      "lastCancelTs": 0,
      "lastCompleteTs": 0,
      "lastCompleteDuration": 0,
      "lastErrorMessage": "string",
      "lastErrorTs": 0,
      "data": {},
      "malloy": "string",
      "sql": "string"
    }
  },
  "dashboard": {
    "title": "string",
    "dashboardId": "string",
    "url": "string",
    "tiles": [
      {
        "title": "string",
        "query": {}
      }
    ]
  },
  "report": {
    "title": "string",
    "reportId": "string",
    "url": "string",
    "rows": [
      {
        "rowId": "string",
        "name": "string",
        "rowType": "empty",
        "metricId": "string",
        "formula": "string",
        "parameters": [
          {
            "apply_to": "string",
            "listen": "string",
            "fractions": [
              {
                "controls": [
                  {
                    "options": [
                      {
                        "value": "string",
                        "label": "string"
                      }
                    ],
                    "value": {},
                    "label": "string",
                    "required": "string",
                    "name": "string",
                    "controlClass": "list_input",
                    "isMetricsDate": true
                  }
                ],
                "brick": "string",
                "parentBrick": "string",
                "operator": "Or",
                "logicGroup": "OR",
                "type": "StoreFraction",
                "storeFractionSubTypeOptions": [
                  {
                    "logicGroup": "OR",
                    "typeValue": "string",
                    "value": "string",
                    "label": "string"
                  }
                ],
                "storeFractionSubType": "string",
                "storeFractionSubTypeLabel": "string",
                "storeFractionLogicGroupWithSubType": "string",
                "meta": {},
                "storeResult": "string",
                "stringValue": "string",
                "numberValue1": 0,
                "numberValue2": 0,
                "numberValues": "string",
                "numberBetweenOption": "Inclusive",
                "yesnoValue": "Yes",
                "dayOfWeekValue": "Monday",
                "dayOfWeekIndexValues": "string",
                "monthNameValue": "January",
                "quarterOfYearValue": "q1",
                "tsDateYear": 0,
                "tsDateQuarter": 0,
                "tsDateMonth": 0,
                "tsDateDay": 0,
                "tsDateHour": 0,
                "tsDateMinute": 0,
                "tsDateToYear": 0,
                "tsDateToQuarter": 0,
                "tsDateToMonth": 0,
                "tsDateToDay": 0,
                "tsDateToHour": 0,
                "tsDateToMinute": 0,
                "tsForValue": 0,
                "tsForUnit": "seconds",
                "tsLastValue": 0,
                "tsLastUnit": "seconds",
                "tsLastCompleteOption": "CompleteWithCurrent",
                "tsNextValue": 0,
                "tsNextUnit": "seconds",
                "tsMoment": {},
                "tsMomentType": "Literal",
                "tsMomentUnit": "second",
                "tsTimestampValue": "string",
                "tsMomentAgoFromNowQuantity": 0,
                "tsFromMoment": {},
                "tsFromMomentType": "Literal",
                "tsFromMomentUnit": "second",
                "tsFromTimestampValue": "string",
                "tsFromMomentAgoFromNowQuantity": 0,
                "tsToMoment": {},
                "tsToMomentType": "Literal",
                "tsToMomentUnit": "second",
                "tsToTimestampValue": "string",
                "tsToMomentAgoFromNowQuantity": 0
              }
            ]
          }
        ],
        "query": {},
        "records": [
          {}
        ]
      }
    ]
  }
}

On this page