Integración

Ping, Flow, Chain — runs, incidentes y SLA

Ping vs Flow vs Chain, disparo de runs, mantenimiento y objetivos SLA.

Contrato OpenAPIEmitir una clave de APICuenta Solo gratis

Documento completo, sin autenticación, listo para su generador de clientes.

Ping y Chain

type: "http" exige `url` (Ping) o `httpChain` (Chain, 1–10 hops). Controles: expectedStatus, expectText. enabled: false prepara sin alertar. Body y headers de los hops no vuelven en lectura.

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" exige un AST de pasos. Créelo en la consola. La API puede referenciar y disparar, no versionar secretos.

En lectura obtiene una huella, no el detalle de secretos.

Runs (ejecuciones)

Un run es una ejecución facturable. GET /v1/runs lista el historial. El disparo (runs:trigger) sirve de smoke post-deploy.

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)"

Incidentes

Los incidentes agregan fallos consecutivos según la política de escalada. Lectura: incidents:read. Escritura: incidents:write.

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

Mantenimiento y SLA

Ventanas de mantenimiento: silencian alertas en un hueco planificado. Objetivos SLA: umbral y perímetro. Ambos son recursos IaC de primer nivel.

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
}