Get Pipeline Run Logs

Get logs for a specific pipeline run

Overview

Retrieve the execution logs for a specific pipeline run. This is useful for debugging failed pipelines or monitoring execution progress.

Tip: Logs can also be downloaded through the Dadosfera interface. Even pipelines created via the API are visible in the UI, where you can view and download logs directly.

Path Parameters

ParameterTypeRequiredDescription
runIdstringYesThe pipeline run ID

Run ID Format

The runId is a 32-character hexadecimal identifier returned from pipeline executions.

Example: 3f1a4d12ddbe456c85a48ee653e66475

You can obtain the run ID from:

Examples

Get Logs for a Pipeline Run

GET /platform/pipeline/pipeline_run/3f1a4d12ddbe456c85a48ee653e66475/logs

Response (200 OK):

{
  "status": true,
  "data": {
    "run_id": "3f1a4d12ddbe456c85a48ee653e66475",
    "logs": [
      {
        "timestamp": "2024-12-18T10:30:01Z",
        "level": "INFO",
        "task_id": "extract_orders",
        "message": "Starting extraction from PostgreSQL"
      },
      {
        "timestamp": "2024-12-18T10:30:15Z",
        "level": "INFO",
        "task_id": "extract_orders",
        "message": "Extracted 50000 rows"
      },
      {
        "timestamp": "2024-12-18T10:31:00Z",
        "level": "INFO",
        "task_id": "load_snowflake",
        "message": "Loading data to Snowflake"
      },
      {
        "timestamp": "2024-12-18T10:31:30Z",
        "level": "INFO",
        "task_id": "load_snowflake",
        "message": "Successfully loaded 50000 rows to PUBLIC.orders"
      }
    ],
    "total_lines": 4
  }
}

Python Example

import requests

BASE_URL = "https://maestro.dadosfera.ai"
RUN_ID = "3f1a4d12ddbe456c85a48ee653e66475"

# Get pipeline run logs
response = requests.get(
    f"{BASE_URL}/platform/pipeline/pipeline_run/{RUN_ID}/logs",
    headers=headers
)

logs = response.json()['data']['logs']
for log in logs:
    print(f"[{log['level']}] {log['timestamp']} - {log['message']}")

Response Structure

FieldTypeDescription
run_idstringPipeline run identifier
logsarrayList of log entries
total_linesintegerTotal number of log lines

Log Entry Object

FieldTypeDescription
timestampstringISO 8601 timestamp
levelstringLog level: INFO, WARNING, ERROR
task_idstringAirflow task that generated the log
messagestringLog message content

Error Responses

404 Not Found

{
  "detail": {
    "status": false,
    "exception_type": "PipelineRunNotFound",
    "traceback": "Pipeline run with id 3f1a4d12ddbe456c85a48ee653e66475 not found",
    "data": null
  }
}

Common Error Messages

Error MessageCauseSolution
Connection timeoutDatabase unreachableCheck network/VPN configuration
OutOfMemoryErrorInsufficient memoryIncrease memory via /pipeline/{id}/memory
Authentication failedInvalid credentialsUpdate connection credentials
Table not foundSource table missingVerify table exists in source

Accessing Logs via UI

Pipelines created via the API are fully visible in the Dadosfera interface. To download logs:

  1. Navigate to Coletar > Pipelines
  2. Find your pipeline in the list
  3. Click on the pipeline to view runs
  4. Select the specific run
  5. Click Download Logs to get the full log file

Notes

  • Run IDs can be obtained from GET /platform/pipeline/:pipelineId/pipeline_run
Language
Credentials
Header
Click Try It! to start a request and see the response here!