Mprove
.json
DuplicateMconfigAndQuery

DuplicateMconfigAndQuery

POST/api/ToBackendDuplicateMconfigAndQuery

Duplicate an mconfig and its associated query

Request Body

application/json

Response Body

application/json

curl -X POST "http://localhost:3000/api/ToBackendDuplicateMconfigAndQuery" \  -H "Content-Type: application/json" \  -d '{    "info": {      "name": "api/ToBackendDuplicateMconfigAndQuery",      "traceId": "string",      "idempotencyKey": "string"    },    "payload": {      "projectId": "string",      "repoId": "string",      "branchId": "string",      "envId": "string",      "oldMconfigId": "string"    }  }'
{
  "info": {
    "path": "/api/ToBackendDuplicateMconfigAndQuery",
    "method": "POST",
    "mproveVersion": "string",
    "duration": 0,
    "status": "Ok",
    "traceId": "string",
    "error": null
  },
  "payload": {
    "mconfig": {
      "structId": "string",
      "mconfigId": "string",
      "queryId": "string",
      "modelId": "string",
      "modelType": "Store",
      "parentType": "Dashboard",
      "parentId": "string",
      "dateRangeIncludesRightSide": true,
      "storePart": {
        "reqTemplate": "string",
        "reqFunction": "string",
        "reqJsonParts": "string",
        "reqBody": "string",
        "reqUrlPath": "string"
      },
      "modelLabel": "string",
      "modelFilePath": "string",
      "malloyQueryStable": "string",
      "malloyQueryExtra": "string",
      "compiledQuery": null,
      "select": [
        "string"
      ],
      "sortings": [
        {
          "fieldId": "string",
          "desc": true
        }
      ],
      "sorts": "string",
      "timezone": "string",
      "limit": 0,
      "filters": [
        {
          "fieldId": "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
            }
          ]
        }
      ],
      "appliedGivens": {
        "property1": "string",
        "property2": "string"
      },
      "chart": {
        "isValid": true,
        "type": "table",
        "title": "string",
        "xField": "string",
        "yFields": [
          "string"
        ],
        "multiField": "string",
        "sizeField": "string",
        "format": true,
        "xAxis": {
          "scale": true
        },
        "yAxis": [
          {
            "scale": true
          }
        ],
        "series": [
          {
            "dataField": "string",
            "dataRowId": "string",
            "type": "table",
            "yAxisIndex": -9007199254740991
          }
        ]
      },
      "serverTs": -9007199254740991,
      "fields": [
        {
          "id": "string",
          "malloyFieldName": "string",
          "malloyFieldPath": [
            "string"
          ],
          "malloyBaseFieldId": "string",
          "malloyTags": [
            {
              "key": "string",
              "value": "string"
            }
          ],
          "mproveTags": [
            {
              "key": "string",
              "value": "string"
            }
          ],
          "hidden": true,
          "required": true,
          "maxFractions": 0,
          "label": "string",
          "fieldClass": "dimension",
          "fieldFileName": "string",
          "fieldFilePath": "string",
          "result": "day_of_week",
          "fieldLineNum": -9007199254740991,
          "suggestModelDimension": "string",
          "sqlName": "string",
          "topId": "string",
          "topLabel": "string",
          "description": "string",
          "type": "count_distinct",
          "groupId": "string",
          "groupLabel": "string",
          "groupDescription": "string",
          "formatNumber": "string",
          "currencyPrefix": "string",
          "currencySuffix": "string",
          "buildMetrics": true,
          "isTimeframeBase": true,
          "timeframe": "string",
          "detail": "timestamps",
          "sorting": {
            "fieldId": "string",
            "desc": true
          },
          "sortingNumber": 0
        }
      ],
      "extendedFilters": [
        {
          "fieldId": "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
            }
          ],
          "field": null
        }
      ]
    },
    "query": {
      "projectId": "string",
      "envId": "string",
      "connectionId": "string",
      "connectionType": "PostgreSQL",
      "queryId": "string",
      "reportId": "string",
      "reportStructId": "string",
      "sql": "string",
      "apiMethod": "POST",
      "apiUrl": "string",
      "apiBody": null,
      "status": "New",
      "data": null,
      "lastRunBy": "string",
      "lastRunTs": -9007199254740991,
      "lastCancelTs": -9007199254740991,
      "lastCompleteTs": -9007199254740991,
      "lastCompleteDuration": 0,
      "lastErrorMessage": "string",
      "lastErrorTs": -9007199254740991,
      "queryJobId": "string",
      "bigqueryQueryJobId": "string",
      "bigqueryConsecutiveErrorsGetJob": -9007199254740991,
      "bigqueryConsecutiveErrorsGetResults": -9007199254740991,
      "serverTs": -9007199254740991
    }
  }
}

GroupMetricByDimension

POST/api/ToBackendGroupMetricByDimension

Group a metric by dimension

Request Body

application/json

Response Body

application/json

curl -X POST "http://localhost:3000/api/ToBackendGroupMetricByDimension" \  -H "Content-Type: application/json" \  -d '{    "info": {      "name": "api/ToBackendGroupMetricByDimension",      "traceId": "string",      "idempotencyKey": "string"    },    "payload": {      "projectId": "string",      "repoId": "string",      "branchId": "string",      "envId": "string",      "timezone": "string",      "mconfigId": "string",      "groupByFieldId": "string"    }  }'
{
  "info": {
    "path": "/api/ToBackendGroupMetricByDimension",
    "method": "POST",
    "mproveVersion": "string",
    "duration": 0,
    "status": "Ok",
    "traceId": "string",
    "error": null
  },
  "payload": {
    "mconfig": {
      "structId": "string",
      "mconfigId": "string",
      "queryId": "string",
      "modelId": "string",
      "modelType": "Store",
      "parentType": "Dashboard",
      "parentId": "string",
      "dateRangeIncludesRightSide": true,
      "storePart": {
        "reqTemplate": "string",
        "reqFunction": "string",
        "reqJsonParts": "string",
        "reqBody": "string",
        "reqUrlPath": "string"
      },
      "modelLabel": "string",
      "modelFilePath": "string",
      "malloyQueryStable": "string",
      "malloyQueryExtra": "string",
      "compiledQuery": null,
      "select": [
        "string"
      ],
      "sortings": [
        {
          "fieldId": "string",
          "desc": true
        }
      ],
      "sorts": "string",
      "timezone": "string",
      "limit": 0,
      "filters": [
        {
          "fieldId": "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
            }
          ]
        }
      ],
      "appliedGivens": {
        "property1": "string",
        "property2": "string"
      },
      "chart": {
        "isValid": true,
        "type": "table",
        "title": "string",
        "xField": "string",
        "yFields": [
          "string"
        ],
        "multiField": "string",
        "sizeField": "string",
        "format": true,
        "xAxis": {
          "scale": true
        },
        "yAxis": [
          {
            "scale": true
          }
        ],
        "series": [
          {
            "dataField": "string",
            "dataRowId": "string",
            "type": "table",
            "yAxisIndex": -9007199254740991
          }
        ]
      },
      "serverTs": -9007199254740991,
      "fields": [
        {
          "id": "string",
          "malloyFieldName": "string",
          "malloyFieldPath": [
            "string"
          ],
          "malloyBaseFieldId": "string",
          "malloyTags": [
            {
              "key": "string",
              "value": "string"
            }
          ],
          "mproveTags": [
            {
              "key": "string",
              "value": "string"
            }
          ],
          "hidden": true,
          "required": true,
          "maxFractions": 0,
          "label": "string",
          "fieldClass": "dimension",
          "fieldFileName": "string",
          "fieldFilePath": "string",
          "result": "day_of_week",
          "fieldLineNum": -9007199254740991,
          "suggestModelDimension": "string",
          "sqlName": "string",
          "topId": "string",
          "topLabel": "string",
          "description": "string",
          "type": "count_distinct",
          "groupId": "string",
          "groupLabel": "string",
          "groupDescription": "string",
          "formatNumber": "string",
          "currencyPrefix": "string",
          "currencySuffix": "string",
          "buildMetrics": true,
          "isTimeframeBase": true,
          "timeframe": "string",
          "detail": "timestamps",
          "sorting": {
            "fieldId": "string",
            "desc": true
          },
          "sortingNumber": 0
        }
      ],
      "extendedFilters": [
        {
          "fieldId": "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
            }
          ],
          "field": null
        }
      ]
    },
    "query": {
      "projectId": "string",
      "envId": "string",
      "connectionId": "string",
      "connectionType": "PostgreSQL",
      "queryId": "string",
      "reportId": "string",
      "reportStructId": "string",
      "sql": "string",
      "apiMethod": "POST",
      "apiUrl": "string",
      "apiBody": null,
      "status": "New",
      "data": null,
      "lastRunBy": "string",
      "lastRunTs": -9007199254740991,
      "lastCancelTs": -9007199254740991,
      "lastCompleteTs": -9007199254740991,
      "lastCompleteDuration": 0,
      "lastErrorMessage": "string",
      "lastErrorTs": -9007199254740991,
      "queryJobId": "string",
      "bigqueryQueryJobId": "string",
      "bigqueryConsecutiveErrorsGetJob": -9007199254740991,
      "bigqueryConsecutiveErrorsGetResults": -9007199254740991,
      "serverTs": -9007199254740991
    }
  }
}

SuggestDimensionValues

POST/api/ToBackendSuggestDimensionValues

Build a query to suggest values for a dimension

Request Body

application/json

Response Body

application/json

curl -X POST "http://localhost:3000/api/ToBackendSuggestDimensionValues" \  -H "Content-Type: application/json" \  -d '{    "info": {      "name": "api/ToBackendSuggestDimensionValues",      "traceId": "string",      "idempotencyKey": "string"    },    "payload": {      "projectId": "string",      "repoId": "string",      "branchId": "string",      "envId": "string",      "structId": "string",      "modelId": "string",      "fieldId": "string"    }  }'
{
  "info": {
    "path": "/api/ToBackendSuggestDimensionValues",
    "method": "POST",
    "mproveVersion": "string",
    "duration": 0,
    "status": "Ok",
    "traceId": "string",
    "error": null
  },
  "payload": {
    "matchedValues": [
      {
        "value": "string",
        "count": -9007199254740991
      }
    ],
    "matchedValuesMessage": "string",
    "errorMessage": "string"
  }
}

On this page