Mprove
.json
GetQueryInfo
POST/api/ToBackendGetQueryInfo

Get Malloy, SQL, and data

Request Body

application/json

Response Body

application/json

curl -X POST "http://localhost:3000/api/ToBackendGetQueryInfo" \  -H "Content-Type: application/json" \  -d '{    "info": {      "name": "api/ToBackendGetQueryInfo",      "traceId": "string",      "idempotencyKey": "string"    },    "payload": {      "projectId": "string",      "repoId": "string",      "branchId": "string",      "envId": "string",      "timezone": "string",      "getMalloy": true,      "getSql": true,      "getData": true,      "isFetch": true    }  }'
{
  "info": {
    "path": "/api/ToBackendGetQueryInfo",
    "method": "POST",
    "mproveVersion": "string",
    "duration": 0,
    "status": "Ok",
    "traceId": "string",
    "error": null
  },
  "payload": {
    "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": null,
        "malloy": "string",
        "sql": "string"
      }
    },
    "dashboard": {
      "title": "string",
      "dashboardId": "string",
      "url": "string",
      "tiles": [
        {
          "title": "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": null,
            "malloy": "string",
            "sql": "string"
          }
        }
      ]
    },
    "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": null,
                      "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": null,
                  "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": null,
                  "tsMomentType": "Literal",
                  "tsMomentUnit": "second",
                  "tsTimestampValue": "string",
                  "tsMomentAgoFromNowQuantity": 0,
                  "tsFromMoment": null,
                  "tsFromMomentType": "Literal",
                  "tsFromMomentUnit": "second",
                  "tsFromTimestampValue": "string",
                  "tsFromMomentAgoFromNowQuantity": 0,
                  "tsToMoment": null,
                  "tsToMomentType": "Literal",
                  "tsToMomentUnit": "second",
                  "tsToTimestampValue": "string",
                  "tsToMomentAgoFromNowQuantity": 0
                }
              ]
            }
          ],
          "query": {
            "connectionId": "string",
            "connectionType": "PostgreSQL",
            "queryId": "string",
            "status": "New",
            "lastRunBy": "string",
            "lastRunTs": 0,
            "lastCancelTs": 0,
            "lastCompleteTs": 0,
            "lastCompleteDuration": 0,
            "lastErrorMessage": "string",
            "lastErrorTs": 0,
            "data": null,
            "malloy": "string",
            "sql": "string"
          },
          "records": [
            null
          ]
        }
      ]
    }
  }
}