Dailyrun and zones
9. DailyRun API¶
The DailyRun API controls and monitors the nightly ETL pipeline that refreshes your org's lake. It is accessed at api.{orgname}.{region-domain}/superset.
Note — The
DailyRunenabled flag only controls the scheduled nightly kickoff. You can always trigger a manual run viaPOST /dailyRun/start_executionregardless of the flag.
9.1 GET /dailyRun/dailyRun_enabled¶
Returns whether the scheduled nightly ETL run is enabled for this org.
Required scope: dailyrun:enabled:read
Request¶
GET https://api.{orgname}.{region-domain}/superset/dailyRun/dailyRun_enabled
Authorization: Bearer {access_token}
Responses¶
| Status | Body | Meaning |
|---|---|---|
200 OK | {"dailyRun": true} or {"dailyRun": false} | Current enabled state. |
404 Not Found | {"message": "DailyRun not found"} | The org metadata record has no DailyRun attribute yet. |
500 | {"message": "Error reading ClientMetaData"} | Internal server error. |
200 example
{ "dailyRun": true }
9.2 POST /dailyRun/dailyRun_enabled¶
Enables or disables the scheduled nightly ETL run.
Required scope: dailyrun:enabled:write
Request¶
POST https://api.{orgname}.{region-domain}/superset/dailyRun/dailyRun_enabled
Authorization: Bearer {access_token}
Content-Type: application/json
| Field | Type | Required | Description |
|---|---|---|---|
dailyRun | boolean | yes | true to enable, false to disable. Also accepts "true" / "false" / 1 / 0 / "yes" / "no" as strings. |
Example request body
{ "dailyRun": true }
Responses¶
| Status | Body | Meaning |
|---|---|---|
200 OK | {"dailyRun": <value>} | Successfully updated. Returns the value that was written. |
400 Bad Request | {"message": "Body must be valid JSON with 'dailyRun' set to true or false."} | Missing body, invalid JSON, or unrecognised value. |
500 | {"message": "Error updating ClientMetaData"} | Internal server error. |
200 example
{ "dailyRun": true }
9.3 GET /dailyRun/execution_status¶
Returns execution records for this org's nightly pipeline.
Required scope: dailyrun:execution:read
Request¶
GET https://api.{orgname}.{region-domain}/superset/dailyRun/execution_status
Authorization: Bearer {access_token}
Query parameters¶
| Parameter | Default | Description |
|---|---|---|
mode | list | One of list, latest, last_successful (case-insensitive). |
limit | 50 | Max executions to return when mode=list. Clamped to 1–200. |
mode values¶
mode | Returns |
|---|---|
list | An array of up to limit executions, most recent first. |
latest | A single execution object (the most recent), or null if none. |
last_successful | A single execution object with status: "SUCCEEDED", or a message object if none found. |
Execution object fields¶
| Field | Type | Description |
|---|---|---|
name | string | Execution name, format DailyScheduledETL_{orgname}_{timestamp}. |
status | string | Execution status: RUNNING, SUCCEEDED, FAILED, TIMED_OUT, ABORTED. |
startDate | string (ISO 8601) | When the execution started, e.g. "2025-04-01T02:00:00.000000+00:00". |
stopDate | string (ISO 8601) or null | When the execution finished; null if still running. |
Responses¶
200 — mode=list
{
"executions": [
{
"name": "DailyScheduledETL_<org>_20250401T020000Z",
"status": "SUCCEEDED",
"startDate": "2025-04-01T02:00:00.000000+00:00",
"stopDate": "2025-04-01T02:14:37.000000+00:00"
}
]
}
200 — mode=latest
{
"name": "DailyScheduledETL_<org>_20250401T020000Z",
"status": "SUCCEEDED",
"startDate": "2025-04-01T02:00:00.000000+00:00",
"stopDate": "2025-04-01T02:14:37.000000+00:00"
}
(Returns null body when no executions exist.)
200 — mode=last_successful (none found)
{ "message": "No successful Daily ETL executions found." }
400 — invalid mode
{
"message": "mode is not valid, mode should be one of: list, latest, last_successful"
}
9.4 POST /dailyRun/start_execution¶
Manually starts a new pipeline execution for this org. The pipeline input is constructed automatically from your org's configuration — you do not supply it.
Required scope: dailyrun:execution:write
Request¶
POST https://api.{orgname}.{region-domain}/superset/dailyRun/start_execution
Authorization: Bearer {access_token}
No request body required.
Responses¶
| Status | Body | Meaning |
|---|---|---|
200 OK | Success object (see below) | Execution started. |
409 Conflict | Conflict object (see below) | A DailyETLPipeline run is already RUNNING for this org. |
500 | {"message": "Error starting Daily ETL pipeline execution"} | Internal server error. |
200 success body
{
"message": "Daily ETL pipeline execution started.",
"started": true,
"executionArn": "arn:aws:states:eu-west-1:...:execution:DailyETLPipeline:DailyScheduledETL_<org>_20250401T020000Z",
"startDate": "2025-04-01T02:00:00.000000+00:00",
"executionName": "DailyScheduledETL_<org>_20250401T020000Z",
"stateMachineArn": "arn:aws:states:eu-west-1:...:stateMachine:DailyETLPipeline"
}
executionArnandstateMachineArnare included for reference; treat them as opaque strings. They are not needed for normal polling — useGET /dailyRun/execution_status?mode=latestto track progress.
409 conflict body
{
"message": "Daily ETL pipeline is already running for this client; no execution started.",
"started": false,
"executionName": null,
"runningExecution": {
"name": "DailyScheduledETL_<org>_20250401T020000Z",
"status": "RUNNING",
"startDate": "2025-04-01T02:00:00.000000+00:00"
},
"stateMachineArn": "arn:aws:states:eu-west-1:...:stateMachine:DailyETLPipeline"
}
Typical polling flow¶
POST /dailyRun/start_execution
→ 200 { "executionName": "DailyScheduledETL_<org>_..." }
Loop:
GET /dailyRun/execution_status?mode=latest
→ { "status": "RUNNING", ... } ← keep polling
→ { "status": "SUCCEEDED", ... } ← done
→ { "status": "FAILED", ... } ← check logs
10. Zone API¶
A zone is a separate data area inside your org with its own lake, its own AWS account, and its own API host. The Zone API has the same query and load endpoints as the Org API, but with the following differences.
10.1 Host¶
https://{zonename}.{orgname}.api.{region-domain}/v2/
Example: https://<zone>.<org>.api.comodash.io/v2/
10.2 Audience and scopes¶
| Aspect | Org API | Zone API |
|---|---|---|
| JWT audience | dash_api | dash_api_{zonename} |
| Scope prefix | none | {zonename}: |
Zone scopes follow the pattern {zonename}:{action}. Examples for a zone named <zone>:
| Operation | Scope |
|---|---|
| Run a query | <zone>:query:write |
| Poll / read query | <zone>:query:read |
| Start a load | <zone>:load:write |
| Poll / read load | <zone>:load:read |
You must request a token with the correct audience (dash_api_<zone>) and scope against the same ComoAuth realm (https://auth.comotion.us/auth/realms/{orgname}).
10.3 Available endpoints¶
The Zone API exposes only query and load endpoints:
| Endpoint | Supported |
|---|---|
GET /identity/security_metadata | ✗ Org API only |
POST /query | ✓ |
GET /query/{query_id} | ✓ |
DELETE /query/{query_id} | ✓ |
GET /query/{query_id}/result | ✓ |
GET /query/{query_id}/csv | ✓ |
POST /load | ✓ |
POST /load/{load_id}/file | ✓ |
POST /load/{load_id}/commit | ✓ |
GET /load/{load_id} | ✓ |
DailyRun endpoints | ✗ Frontend API only |
10.4 Base path¶
The Zone API base path is /v2 (not /v1 as on the Org API).
11. Error reference¶
All error responses use the shape:
{ "message": "Human-readable description" }
HTTP status codes¶
| Status | When |
|---|---|
400 Bad Request | Missing or invalid input parameter. |
404 Not Found | Resource (query, load, DailyRun record) does not exist. |
409 Conflict | Concurrency conflict — load already committed, pipeline already executing. |
202 Accepted | Asynchronous operation started. |
500 Internal Server Error | Unexpected AWS service error. A request code is included where possible — quote it to support. |
Load error types (recap)¶
error_type | Root cause |
|---|---|
CHECKSUM_MISMATCH | Row counts or null counts differ from the check_sum you supplied. |
COLUMN_TYPE_MISMATCH | Parquet column types differ from the existing lake table. |
MISSING_COLUMN | A column present in the lake table is absent from the uploaded file. |
UNEXPECTED_COLUMN | A column in the uploaded file does not exist in the lake table. |
MISSING_FILE | A committed file_key was never successfully uploaded. |
INVALID_PARQUET | The uploaded file is not valid Parquet. |
SERVICE_CLIENT_MISMATCH | Row-level service_client_id values violate the token's scoping rules. |
INTERNAL_ERROR | Unexpected pipeline failure — contact support with the load ID. |