English
API Reference
Components

Components API

Manage components programmatically.

Overview

Components represent services, systems, and infrastructure. The API supports:

  • CRUD operations
  • Type-specific configuration
  • Health check management
  • Cloning components

Endpoints

MethodEndpointDescription
GET/componentsList all components
POST/componentsCreate component
GET/components/{id}Get component
PATCH/components/{id}Update component
DELETE/components/{id}Delete component
POST/components/{id}/cloneClone component
POST/components/{id}/checkTrigger health check

List Components

GET /api/v1/components

Query Parameters

ParameterTypeDescription
typestringFilter by type: SERVICE, ENDPOINT, METRIC
statusstringFilter by status
parentIdstringFilter by parent component
topLevelOnlybooleanOnly top-level components
includeChecksbooleanInclude recent health checks
pagenumberPage number (default: 1)
pageSizenumberItems per page (default: 20)

Response

{
  "data": [
    {
      "id": "comp_123",
      "name": "API Server",
      "type": "ENDPOINT",
      "status": "operational",
      "description": "Main API endpoint",
      "url": "https://api.example.com/health",
      "checkInterval": 60,
      "uptimePercentage": 99.95,
      "createdAt": "2026-01-01T00:00:00Z",
      "updatedAt": "2026-01-22T10:00:00Z"
    }
  ],
  "meta": {
    "total": 15,
    "page": 1,
    "pageSize": 20
  }
}

Create Component

POST /api/v1/components

SERVICE Type

{
  "name": "Backend Services",
  "type": "SERVICE",
  "description": "Core backend infrastructure",
  "status": "operational"
}

ENDPOINT Type

{
  "name": "Health Check",
  "type": "ENDPOINT",
  "description": "API health endpoint",
  "url": "https://api.example.com/health",
  "method": "GET",
  "checkInterval": 60,
  "timeout": 5000,
  "headers": {
    "Authorization": "Bearer token"
  },
  "conditions": [
    {
      "type": "STATUS_CODE",
      "comparator": "EQUALS",
      "target": "200"
    },
    {
      "type": "RESPONSE_TIME",
      "comparator": "LESS_THAN",
      "target": "1000"
    }
  ],
  "autoCreateIncident": true,
  "failureThreshold": 3,
  "parentComponentId": "parent_id"
}

METRIC Type

{
  "name": "CPU Usage",
  "type": "METRIC",
  "description": "Server CPU utilization",
  "integrationId": "integration_id",
  "query": "avg:system.cpu.user{*}",
  "pollingInterval": 60,
  "warningThreshold": 70,
  "criticalThreshold": 90
}

Response

{
  "id": "comp_456",
  "name": "Health Check",
  "type": "ENDPOINT",
  "status": "operational",
  "isEnabled": true,
  "createdAt": "2026-01-22T10:00:00Z"
}

Get Component

GET /api/v1/components/{id}

Query Parameters

ParameterTypeDescription
includestringComma-separated: subComponents, monitors, checks

Response

{
  "id": "comp_123",
  "name": "API Server",
  "type": "ENDPOINT",
  "status": "operational",
  "description": "Main API endpoint",
  "url": "https://api.example.com/health",
  "method": "GET",
  "checkInterval": 60,
  "timeout": 5000,
  "conditions": [...],
  "uptimePercentage": 99.95,
  "averageResponseTime": 150,
  "lastCheckAt": "2026-01-22T10:00:00Z",
  "subComponents": [...],
  "createdAt": "2026-01-01T00:00:00Z",
  "updatedAt": "2026-01-22T10:00:00Z"
}

Update Component

PATCH /api/v1/components/{id}

Request Body

Only include fields to update:

{
  "name": "Updated Name",
  "status": "degraded_performance",
  "isEnabled": false,
  "isMuted": true
}

Muting

Set isMuted: true to suppress notifications while still monitoring:

{
  "isMuted": true
}

Delete Component

DELETE /api/v1/components/{id}
⚠️

Deleting a component also deletes:

  • All subcomponents
  • Historical uptime data
  • Associated metrics

Response

{
  "success": true
}

Clone Component

POST /api/v1/components/{id}/clone

Creates a copy with:

  • "(Copy)" suffix on name
  • isEnabled: false by default
  • Status reset to operational/unknown

Response

{
  "id": "comp_789",
  "name": "API Server (Copy)",
  "type": "ENDPOINT",
  "isEnabled": false
}

Trigger Health Check

POST /api/v1/components/{id}/check

Manually trigger a health check for ENDPOINT components.

Response

{
  "success": true,
  "result": {
    "status": "SUCCESS",
    "statusCode": 200,
    "responseTime": 145,
    "timestamp": "2026-01-22T10:00:00Z"
  }
}

Component Object

Common Fields

FieldTypeDescription
idstringUnique identifier
namestringDisplay name
typestringSERVICE, ENDPOINT, METRIC
statusstringCurrent status
descriptionstringOptional description
isEnabledbooleanWhether active
parentComponentIdstringParent component ID
iconstringCustom icon URL
showIconOnStatusPagebooleanShow icon publicly
ordernumberDisplay order
createdAtstringCreation timestamp
updatedAtstringLast update timestamp

ENDPOINT Fields

FieldTypeDescription
urlstringEndpoint URL
methodstringHTTP method
headersobjectRequest headers
bodystringRequest body
checkIntervalnumberCheck interval (seconds)
timeoutnumberRequest timeout (ms)
conditionsarrayHealth conditions
autoCreateIncidentbooleanCreate incident on failure
failureThresholdnumberFailures before incident
autoResolvebooleanResolve on recovery
recoveryThresholdnumberSuccesses before resolve
isMutedbooleanSuppress notifications

METRIC Fields

FieldTypeDescription
integrationIdstringIntegration ID
querystringMetrics query
pollingIntervalnumberPoll interval (seconds)
warningThresholdnumberWarning threshold
criticalThresholdnumberCritical threshold

Status Values

StatusDescription
operationalWorking normally
degraded_performanceSlower than normal
partial_outageSome features unavailable
major_outageService is down
under_maintenancePlanned maintenance

Condition Types

TypeDescription
STATUS_CODEHTTP status code
RESPONSE_TIMEResponse latency
JSON_PATHJSON value assertion
HEADERResponse header check
BODY_CONTAINSBody substring check

Comparators

ComparatorDescription
EQUALSExact match
NOT_EQUALSDoes not match
GREATER_THANAbove value
LESS_THANBelow value
CONTAINSContains substring
EXISTSField exists
NOT_EXISTSField doesn't exist

Error Responses

404 Not Found

{
  "error": {
    "code": "NOT_FOUND",
    "message": "Component not found"
  }
}

400 Bad Request

{
  "error": {
    "code": "VALIDATION_ERROR",
    "message": "Invalid component type",
    "details": {
      "field": "type",
      "expected": "SERVICE | ENDPOINT | METRIC"
    }
  }
}

Examples

Create Monitored API

curl -X POST https://your-domain.com/api/v1/components \
  -H "Authorization: Bearer sk_live_xxx" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Production API",
    "type": "ENDPOINT",
    "url": "https://api.example.com/health",
    "method": "GET",
    "checkInterval": 30,
    "conditions": [
      {"type": "STATUS_CODE", "comparator": "EQUALS", "target": "200"}
    ],
    "autoCreateIncident": true,
    "failureThreshold": 3
  }'

Update Status

curl -X PATCH https://your-domain.com/api/v1/components/comp_123 \
  -H "Authorization: Bearer sk_live_xxx" \
  -H "Content-Type: application/json" \
  -d '{
    "status": "degraded_performance"
  }'

Get with Subcomponents

curl "https://your-domain.com/api/v1/components/comp_123?include=subComponents" \
  -H "Authorization: Bearer sk_live_xxx"