API Reference

Uptimer API Reference #

RESTful API for uptime monitoring. Manage workspaces, rules, and regions.

Base URL #

https://your-uptimer-instance.com/api

Key Features #

  • HTTP response code always 200 - If not 200, it’s a HTTP communication problem or invalid URL
  • Persistent response format - Consistent JSON structure across all endpoints
  • Object identifier for deserialization - All objects include a kind field for easy client-side handling

Authentication #

Include JWT token in Authorization header.

Authorization: Bearer YOUR_JWT_TOKEN

Response Format #

All responses return HTTP 200. Other status codes indicate HTTP communication problems.

Success Response #

{
  "result": {
    // Response data here
  },
  "error": null,
  "meta": {
    // Optional metadata
  }
}

Error Response #

{
  "result": null,
  "error": {
    "code": 2001,
    "error_type": "validation_error",
    "message": "Invalid input",
    "details": "Field 'name' is required"
  },
  "meta": null
}

Error Handling #

All endpoints return HTTP 200, even for errors.

Error Types #

Error TypeDescriptionCode Range
access_deniedAuthentication/authorization errors1001-1999
validation_errorInput validation errors2001
not_foundResource not found2002
forbiddenPermission denied2003
internal_errorServer errors500

Common Error Codes #

  • 1001 - Missing Authorization header
  • 1002 - Invalid Authorization header format
  • 1003 - Invalid token
  • 2001 - Validation error
  • 2002 - Resource not found
  • 2005 - Access denied

Object Kind Identification #

All objects include a kind field for client identification:

{
  "id": "rule_123456",
  "name": "Website Health Check",
  "kind": "rule"
}

Available Endpoints #

  • Version - Get API version information
  • Workspaces - Manage workspaces and view workspace information
  • Rules - Manage monitoring rules within workspaces
  • Regions - Get information about available monitoring regions
  • Examples - Practical API usage examples and best practices
  • SDKs & Libraries - Official and community SDKs for different programming languages