If you specify type = "crunch" for your custom app, it means that you know in advance your data schema. So you need to implement endpoint for getting the schema.

Request

Request body contains account and filter:

{
    "filter": {
        "query": "select * from test"
    },
    "account": {
    	"username": "test_user",
        "password": "test$user!",
        /*...*/
    }
}

Response

Response should contain data schema with the following format:

{
    "name": {
        id: "name"
        ignore: false
        name: "Name"
        readonly: false
        type: "text"
    },
    "age": {
        id: "age"
        ignore: false
        name: "Age"
        readonly: false
        type: "number"
    },
    /*...*/
}

Schema is JSON object where key is field and value if field description. Field description contains:

fielddescriptiontype
idField idstring
ignoreIs field visible in fields catalogboolean
nameField namestring
descriptionField descriptionstring
readonlyDisable modify field name and typeboolean
typeType of field"id" | "text" | "number" | "date" | "array[text]" | "array[number]" | "array[date]"