Skip to main content

GET /resources/wrappers//monitoring

Get type-specific monitoring details for a wrapper. This is a universal endpoint with a flexible response structure that adapts to the wrapper type (API, CSV, XLSX) and provides detailed operational metrics.

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 monitor

Response

wrapper_id
string
The wrapper ID being monitored
health_status
string
Current health status: HEALTHY, STALLED, DEGRADED, CRASHED, or UNKNOWN
monitoring_details
object
Type-specific monitoring information. The structure varies based on wrapper type and source.

Example Request

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

Example Response (API Wrapper)

{
  "wrapper_id": "550e8400-e29b-41d4-a716-446655440000",
  "health_status": "HEALTHY",
  "monitoring_details": {
    "process_id": 12345,
    "uptime_seconds": 3600,
    "memory_mb": 45.2,
    "cpu_percent": 2.5,
    "last_poll_time": "2026-03-03T11:30:00Z",
    "poll_count": 60,
    "error_count": 0
  }
}

Example Response (CSV Wrapper)

{
  "wrapper_id": "660e8400-e29b-41d4-a716-446655440001",
  "health_status": "HEALTHY",
  "monitoring_details": {
    "file_path": "/uploads/air_quality_2026.csv",
    "file_size_bytes": 102400,
    "rows_processed": 365,
    "processing_time_seconds": 2.8
  }
}

Example Response (Wrapper Not Found)

{
  "wrapper_id": "invalid-wrapper-id",
  "health_status": "UNKNOWN",
  "monitoring_details": {
    "error": "Wrapper not found"
  }
}

Error Responses

503 Service Unavailable
Service unavailable getting monitoring details:
  • Connection error to monitoring service
  • Timeout querying wrapper metrics
{
  "detail": "Service unavailable"
}

Monitoring Metrics by Type

API Wrappers (Continuous Execution):
  • Process-level metrics (PID, uptime, memory, CPU)
  • Polling statistics (last poll time, poll count)
  • Error tracking
  • Network connection status
CSV/XLSX Wrappers (Batch Execution):
  • File information (path, size)
  • Processing statistics (rows processed, processing time)
  • Completion status
  • Data quality metrics

Use Cases

  • Monitor wrapper performance and resource usage
  • Track data collection frequency and reliability
  • Identify performance bottlenecks
  • Set up alerting based on error counts or health status
  • Capacity planning based on memory and CPU usage
  • Debugging execution issues with detailed operational metrics

Build docs developers (and LLMs) love