Integration

Ping, Flow, Chain — runs, incidents and SLA

Ping vs Flow vs Chain, triggering runs, maintenance and availability targets.

OpenAPI contractIssue an API keyFree Solo account

Full document, no authentication, ready for your client generator.

Ping and Chain

type: "http" requires `url` (Ping) or `httpChain` (Chain, 1–10 hops). Checks: expectedStatus, expectText, headers, JSONPath, timing, TLS / DNS. intervalSec sets cadence. enabled: false prepares without alerting. Hop bodies and headers are never returned on read.

POST minimal

curl -X POST https://api.pathlyhq.com/v1/scenarios \
  -H "Authorization: Bearer $PATHLY_API_TOKEN" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: http-home-v1" \
  -d '{
    "type": "http",
    "name": "Home",
    "url": "https://www.example.com/",
    "intervalSec": 300,
    "expectedStatus": 200,
    "severity": "critical"
  }'

POST Chain — login puis /me

curl -X POST https://api.pathlyhq.com/v1/scenarios \
  -H "Authorization: Bearer $PATHLY_API_TOKEN" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: chain-me-v1" \
  -d '{
    "type": "http",
    "name": "Login then /me",
    "intervalSec": 300,
    "httpChain": [
      {
        "name": "Login",
        "method": "POST",
        "url": "https://api.example.com/login",
        "body": "{"email":"user@example.com"}",
        "assertStatus": 200,
        "extractJson": { "path": "token", "as": "token" }
      },
      {
        "name": "Me",
        "method": "GET",
        "url": "https://api.example.com/me",
        "assertStatus": 200
      }
    ]
  }'

PATCH — pause

curl -X PATCH https://api.pathlyhq.com/v1/scenarios/{id} \
  -H "Authorization: Bearer $PATHLY_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"enabled": false}'

PowerShell

$headers = @{ Authorization = "Bearer $env:PATHLY_API_TOKEN" }
Invoke-RestMethod -Method Get -Uri "https://api.pathlyhq.com/v1/scenarios" -Headers $headers

Flow

type: "browser" requires a step AST. Create the journey in the console (recorder): login, cart, 2FA. The API can reference and trigger, but must not carry customer credentials in Git.

On read you get a scenario fingerprint, not secret details. Use it to detect out-of-band changes (console vs Terraform).

Runs

A run is a billable execution. GET /v1/runs lists history. Trigger POST (runs:trigger) starts an immediate smoke — useful in post-deploy CI. Watch plan quota: API rate limit and commercial quota are distinct.

Liste récente

curl "https://api.pathlyhq.com/v1/runs?limit=20" \
  -H "Authorization: Bearer $PATHLY_API_TOKEN"

Déclencher (si exposé sur votre plan / portée)

curl -X POST https://api.pathlyhq.com/v1/scenarios/{id}/runs \
  -H "Authorization: Bearer $PATHLY_API_TOKEN" \
  -H "Idempotency-Key: smoke-$(git rev-parse --short HEAD)"

Incidents

Incidents aggregate consecutive failures per escalation policy. Read: incidents:read. Write (ack / notes per contract): incidents:write. Unknown id → 404.

curl "https://api.pathlyhq.com/v1/incidents?limit=50" \
  -H "Authorization: Bearer $PATHLY_API_TOKEN"

Maintenance and SLA

Maintenance windows: silence alerts during a planned slot (deploys). Availability targets (SLA): threshold and scope, alerts when error budget burns. Both are first-class IaC resources.

Terraform — maintenance + SLA

resource "pathly_maintenance_window" "friday_deploy" {
  name       = "Friday deploy"
  starts_at  = "2026-09-26T22:00:00Z"
  ends_at    = "2026-09-26T23:00:00Z"
  # lier les scénarios concernés selon le schéma provider
}

resource "pathly_sla_target" "checkout" {
  name              = "Checkout"
  target_percentage = 99.9
}