Skip to main content

POST /resources/wrappers//execute

Execute a generated wrapper to fetch data from its configured source and send it to the destination. This endpoint triggers the wrapper’s data collection and transmission process.

Authentication

This endpoint requires authentication. Include your API key in the request headers.

Path Parameters

wrapper_id
string
required
The unique identifier of the wrapper to execute

Response

wrapper_id
string
The wrapper ID that was executed
success
boolean
Whether the execution completed successfully
message
string
Human-readable message describing the execution result
data_points_sent
integer
Number of data points successfully transmitted (null if execution failed)
execution_time
string
ISO 8601 timestamp when the execution completed

Example Request

cURL
curl -X POST https://api.example.com/resources/wrappers/550e8400-e29b-41d4-a716-446655440000/execute \
  -H "Authorization: Bearer YOUR_API_KEY"

Example Response (Success)

{
  "wrapper_id": "550e8400-e29b-41d4-a716-446655440000",
  "success": true,
  "message": "Wrapper executed successfully",
  "data_points_sent": 127,
  "execution_time": "2026-03-03T10:35:22Z"
}

Example Response (Failure)

{
  "wrapper_id": "550e8400-e29b-41d4-a716-446655440000",
  "success": false,
  "message": "Failed to connect to data source",
  "data_points_sent": null,
  "execution_time": "2026-03-03T10:35:22Z"
}

Error Responses

400 Bad Request
Wrapper execution error. Common causes:
  • Wrapper not found
  • Invalid wrapper configuration
  • File not found for CSV/XLSX wrappers
  • Data source connection failed
{
  "detail": "Execution error: Wrapper file not found"
}
503 Service Unavailable
Service unavailable during execution:
  • Connection error to data source
  • Timeout fetching data
  • Network communication failure
{
  "detail": "Service unavailable: Connection timeout"
}

Behavior Notes

  • The endpoint updates the wrapper’s status in the database based on execution results
  • For successful executions, the status is updated to completed
  • For failed executions, the status is updated to error with an error message
  • Execution logs are appended to the wrapper’s execution_log array
  • The wrapper’s last_data_sent timestamp and data_points_count are updated on success

Build docs developers (and LLMs) love