Data -- Queries
Create Query
Creates a new query under the given project. Supports plain and materialized query types. Optionally accepts a path to place the query in a folder hierarchy. A MATERIALIZED query is materialized immediately on create and its result is queryable as "peaka"."mtquery"."<name>"; an optional schedule keeps it refreshed. To materialize an existing query, send inputQueryRefId with the source query's id instead of inputQuery: a snapshot of the source SQL is taken at create time and stored as the new query's own inputQuery (the source query is left untouched, and later changes to it do not propagate).
post/data/projects/{projectId}/queries
Request
- Base URL: https://partner.peaka.studio/api/v1
- URL: https://partner.peaka.studio/api/v1/data/projects/{projectId}/queries
- Auth: HTTP bearer
Path parameters
projectIdstring required
ID of the Project
Query parameters
checkSchemaExistsboolean
Request body
Example request
{
"displayName": "sampleQuery",
"schedule": {
"type": "cron",
"cronExpression": "0 0 * * *",
"timezone": "UTC"
},
"inputQueryRefId": "709922802836177297",
"path": "/reports/monthly"
}Response
Query created
Example response
{
"schedule": {
"type": "cron",
"cronExpression": "0 0 * * *",
"timezone": "UTC"
}
}Changes
No recorded changes to this operation across all 1 revision of this API.