Mprove
.json
GetCharts
POST/api/ToBackendGetCharts

List charts the user can access

Request Body

application/json

Response Body

application/json

curl -X POST "http://localhost:3000/api/ToBackendGetCharts" \  -H "Content-Type: application/json" \  -d '{    "info": {      "name": "api/ToBackendGetCharts",      "traceId": "string",      "idempotencyKey": "string"    },    "payload": {      "projectId": "string",      "repoId": "string",      "branchId": "string",      "envId": "string"    }  }'
{
  "info": {
    "path": "/api/ToBackendGetCharts",
    "method": "POST",
    "mproveVersion": "string",
    "duration": 0,
    "status": "Ok",
    "traceId": "string",
    "error": null
  },
  "payload": {
    "needValidate": true,
    "struct": {
      "projectId": "string",
      "structId": "string",
      "errors": [
        {
          "title": "string",
          "message": "string",
          "lines": [
            {
              "fileId": "string",
              "fileName": "string",
              "lineNumber": -9007199254740991
            }
          ]
        }
      ],
      "metrics": [
        {
          "modelId": "string",
          "modelType": "Store",
          "connectionType": "PostgreSQL",
          "fieldId": "string",
          "fieldClass": "dimension",
          "fieldResult": "day_of_week",
          "timeFieldId": "string",
          "structId": "string",
          "filePath": "string",
          "fieldLineNum": -9007199254740991,
          "type": "Model",
          "metricId": "string",
          "topNode": "string",
          "label": "string",
          "topLabel": "string",
          "partNodeLabel": "string",
          "partFieldLabel": "string",
          "partLabel": "string",
          "timeNodeLabel": "string",
          "timeFieldLabel": "string",
          "timeLabel": "string",
          "description": "string",
          "formatNumber": "string",
          "currencyPrefix": "string",
          "currencySuffix": "string",
          "serverTs": -9007199254740991,
          "hasAccessToModel": true
        }
      ],
      "presets": [
        {
          "presetId": "string",
          "label": "string",
          "path": "string",
          "parsedContent": null
        }
      ],
      "mproveConfig": {
        "mproveDirValue": "string",
        "caseSensitiveStringFilters": true,
        "weekStart": "Sunday",
        "allowTimezones": true,
        "defaultTimezone": "string",
        "formatNumber": "string",
        "currencyPrefix": "string",
        "currencySuffix": "string",
        "thousandsSeparator": "string"
      },
      "mproveVersion": "string",
      "serverTs": -9007199254740991
    },
    "userMember": {
      "projectId": "string",
      "memberId": "string",
      "email": "string",
      "alias": "string",
      "firstName": "string",
      "lastName": "string",
      "fullName": "string",
      "avatarSmall": "string",
      "roles": [
        "string"
      ],
      "isAdmin": true,
      "isEditor": true,
      "isExplorer": true,
      "serverTs": -9007199254740991
    },
    "models": [
      {
        "structId": "string",
        "modelId": "string",
        "type": "Store",
        "source": "string",
        "connectionId": "string",
        "connectionType": "PostgreSQL",
        "filePath": "string",
        "fileText": "string",
        "storeContent": null,
        "dateRangeIncludesRightSide": true,
        "accessRoles": [
          "string"
        ],
        "label": "string",
        "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"
          }
        ],
        "nodes": [
          {
            "id": "string",
            "label": "string",
            "description": "string",
            "nodeClass": "dimension",
            "viewName": "string",
            "isField": true,
            "fieldFileName": "string",
            "viewFilePath": "string",
            "fieldFilePath": "string",
            "fieldResult": "day_of_week",
            "fieldLineNum": -9007199254740991,
            "hidden": true,
            "required": true,
            "children": [
              {
                "id": "string",
                "label": "string",
                "description": "string",
                "nodeClass": "dimension",
                "viewName": "string",
                "isField": true,
                "fieldFileName": "string",
                "viewFilePath": "string",
                "fieldFilePath": "string",
                "fieldResult": "day_of_week",
                "fieldLineNum": -9007199254740991,
                "hidden": true,
                "required": true,
                "children": []
              }
            ]
          }
        ],
        "malloyModelDef": null,
        "serverTs": -9007199254740991,
        "hasAccess": true
      }
    ],
    "charts": [
      {
        "structId": "string",
        "chartId": "string",
        "draft": true,
        "isExplorer": true,
        "sessionId": "string",
        "chartYaml": "string",
        "creatorId": "string",
        "title": "string",
        "modelId": "string",
        "modelLabel": "string",
        "filePath": "string",
        "tiles": [
          {
            "modelId": "string",
            "modelLabel": "string",
            "modelFilePath": "string",
            "mconfigId": "string",
            "queryId": "string",
            "trackChangeId": "string",
            "listen": {
              "property1": "string",
              "property2": "string"
            },
            "deletedFilterFieldIds": [
              "string"
            ],
            "title": "string",
            "plateWidth": 0,
            "plateHeight": 0,
            "plateX": 0,
            "plateY": 0,
            "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": 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": 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
            },
            "hasAccessToModel": true
          }
        ],
        "serverTs": -9007199254740991,
        "author": "string",
        "canEditOrDeleteChart": true,
        "chartType": "table",
        "iconPath": "string"
      }
    ]
  }
}