API Reference

API Reference

Programmatically manage monitors, journeys, and alerts with the tracer REST API.

API Reference

The tracer API allows you to programmatically manage your monitoring infrastructure. Create monitors, trigger runs, fetch results, and integrate with your CI/CD pipelines.

Overview

  • Base URL: https://api.tracer/v1
  • Authentication: Bearer token
  • Format: JSON
  • Rate Limit: 100 requests/minute

Quick Start

1. Get Your API Key

  1. Go to Settings > API Keys
  2. Click Create API Key
  3. Copy your key (shown only once)

2. Make Your First Request

curl -X GET https://api.tracer/v1/monitors \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json"

3. Create a Monitor

curl -X POST https://api.tracer/v1/monitors \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Production API",
    "type": "url",
    "url": "https://api.example.com/health",
    "interval": 60,
    "locations": ["us-east", "eu-west"]
  }'

API Resources

Monitors

GET    /v1/monitors              List all monitors
POST   /v1/monitors              Create monitor
GET    /v1/monitors/:id          Get monitor details
PUT    /v1/monitors/:id          Update monitor
DELETE /v1/monitors/:id          Delete monitor
POST   /v1/monitors/:id/run      Trigger run
GET    /v1/monitors/:id/runs     Get run history

Journeys

GET    /v1/journeys              List all journeys
POST   /v1/journeys              Create journey
GET    /v1/journeys/:id          Get journey details
PUT    /v1/journeys/:id          Update journey
DELETE /v1/journeys/:id          Delete journey
POST   /v1/journeys/:id/run      Trigger run
GET    /v1/journeys/:id/runs     Get run history

Alerts

GET    /v1/alerts                List alerts
GET    /v1/alerts/:id            Get alert details
POST   /v1/alerts/:id/acknowledge  Acknowledge alert
POST   /v1/alerts/:id/resolve    Resolve alert
GET    /v1/alert-channels        List channels
POST   /v1/alert-channels        Create channel
GET    /v1/alert-rules           List rules
POST   /v1/alert-rules           Create rule

Organizations

GET    /v1/organization          Get org details
GET    /v1/organization/members  List members
POST   /v1/organization/invite   Invite member
DELETE /v1/organization/members/:id  Remove member

Response Format

All responses follow this format:

Success Response

{
  "success": true,
  "data": {
    "id": "mon_abc123",
    "name": "Production API",
    ...
  }
}

List Response

{
  "success": true,
  "data": [...],
  "meta": {
    "total": 25,
    "page": 1,
    "per_page": 20
  }
}

Error Response

{
  "success": false,
  "error": {
    "code": "VALIDATION_ERROR",
    "message": "URL is required",
    "details": {
      "field": "url",
      "constraint": "required"
    }
  }
}

Error Codes

CodeHTTP StatusDescription
UNAUTHORIZED401Invalid or missing API key
FORBIDDEN403Insufficient permissions
NOT_FOUND404Resource not found
VALIDATION_ERROR400Invalid request data
RATE_LIMITED429Too many requests
INTERNAL_ERROR500Server error

Rate Limiting

  • Limit: 100 requests per minute
  • Headers: Rate limit info in response headers
X-RateLimit-Limit: 100
X-RateLimit-Remaining: 95
X-RateLimit-Reset: 1705315800

When rate limited:

{
  "success": false,
  "error": {
    "code": "RATE_LIMITED",
    "message": "Rate limit exceeded. Try again in 30 seconds.",
    "retry_after": 30
  }
}

Pagination

List endpoints support pagination:

GET /v1/monitors?page=2&per_page=50
ParameterDefaultMax
page1-
per_page20100

Filtering

Filter list results:

GET /v1/monitors?type=url&status=active
GET /v1/runs?status=failed&from=2024-01-01

Webhooks

Receive real-time notifications:

  1. Go to Settings > Webhooks
  2. Add webhook URL
  3. Select events to receive

Events:

  • monitor.created
  • monitor.updated
  • run.completed
  • alert.triggered
  • alert.resolved

SDKs

Official SDKs coming soon:

  • Node.js
  • Python
  • Go

For now, use any HTTP client with the REST API.

Examples

CI/CD Integration

Run smoke tests after deployment:

# GitHub Actions
- name: Run Smoke Tests
  run: |
    curl -X POST https://api.tracer/v1/journeys/run-tag/smoke \
      -H "Authorization: Bearer ${{ secrets.IZLI_API_KEY }}"

Terraform Provider

Manage monitors as code:

resource "izli_monitor" "api" {
  name     = "Production API"
  type     = "url"
  url      = "https://api.example.com/health"
  interval = 60
}

Terraform provider is in development. Star the repo to get notified.