CancelQueries
CancelQueries
POST
/api/ToBackendCancelQueriesCancel running queries for specified mconfigs
Request Body
application/json
Response Body
application/json
curl -X POST "http://localhost:3000/api/ToBackendCancelQueries" \ -H "Content-Type: application/json" \ -d '{ "info": { "name": "api/ToBackendCancelQueries", "traceId": "string", "idempotencyKey": "string" }, "payload": { "projectId": "string", "repoId": "string", "branchId": "string", "envId": "string", "mconfigIds": [ "string" ] } }'{
"info": {
"path": "/api/ToBackendCancelQueries",
"method": "POST",
"mproveVersion": "string",
"duration": 0,
"status": "Ok",
"traceId": "string",
"error": null
},
"payload": {
"queries": [
{
"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
}
]
}
}GetQueries
POST
/api/ToBackendGetQueriesGet queries for specified mconfigs
Request Body
application/json
Response Body
application/json
curl -X POST "http://localhost:3000/api/ToBackendGetQueries" \ -H "Content-Type: application/json" \ -d '{ "info": { "name": "api/ToBackendGetQueries", "traceId": "string", "idempotencyKey": "string" }, "payload": { "projectId": "string", "repoId": "string", "branchId": "string", "envId": "string", "mconfigIds": [ "string" ], "skipData": true } }'{
"info": {
"path": "/api/ToBackendGetQueries",
"method": "POST",
"mproveVersion": "string",
"duration": 0,
"status": "Ok",
"traceId": "string",
"error": null
},
"payload": {
"queries": [
{
"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
}
]
}
}GetQuery
POST
/api/ToBackendGetQueryGet a query
Request Body
application/json
Response Body
application/json
curl -X POST "http://localhost:3000/api/ToBackendGetQuery" \ -H "Content-Type: application/json" \ -d '{ "info": { "name": "api/ToBackendGetQuery", "traceId": "string", "idempotencyKey": "string" }, "payload": { "projectId": "string", "repoId": "string", "branchId": "string", "envId": "string", "mconfigId": "string", "queryId": "string" } }'{
"info": {
"path": "/api/ToBackendGetQuery",
"method": "POST",
"mproveVersion": "string",
"duration": 0,
"status": "Ok",
"traceId": "string",
"error": null
},
"payload": {
"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
}
}
}GetQueryInfo
POST
/api/ToBackendGetQueryInfoGet 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
]
}
]
}
}
}RunQueries
POST
/api/ToBackendRunQueriesRun queries for specified mconfigs
Request Body
application/json
Response Body
application/json
curl -X POST "http://localhost:3000/api/ToBackendRunQueries" \ -H "Content-Type: application/json" \ -d '{ "info": { "name": "api/ToBackendRunQueries", "traceId": "string", "idempotencyKey": "string" }, "payload": { "projectId": "string", "repoId": "string", "branchId": "string", "envId": "string", "mconfigIds": [ "string" ] } }'{
"info": {
"path": "/api/ToBackendRunQueries",
"method": "POST",
"mproveVersion": "string",
"duration": 0,
"status": "Ok",
"traceId": "string",
"error": null
},
"payload": {
"runningQueries": [
{
"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
}
],
"startedQueryIds": [
"string"
]
}
}RunQueriesDry
POST
/api/ToBackendRunQueriesDryDry-run queries
Request Body
application/json
Response Body
application/json
curl -X POST "http://localhost:3000/api/ToBackendRunQueriesDry" \ -H "Content-Type: application/json" \ -d '{ "info": { "name": "api/ToBackendRunQueriesDry", "traceId": "string", "idempotencyKey": "string" }, "payload": { "projectId": "string", "repoId": "string", "branchId": "string", "envId": "string", "mconfigIds": [ "string" ], "dryId": "string" } }'{
"info": {
"path": "/api/ToBackendRunQueriesDry",
"method": "POST",
"mproveVersion": "string",
"duration": 0,
"status": "Ok",
"traceId": "string",
"error": null
},
"payload": {
"dryId": "string",
"validQueryEstimates": [
{
"queryId": "string",
"estimate": -9007199254740991,
"lastRunDryTs": 0
}
],
"errorQueries": [
{
"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
}
]
}
}