Ping und Chain type: "http" verlangt `url` (Ping) oder `httpChain` (Chain, 1–10 Hops). Checks: expectedStatus, expectText. enabled: false legt an ohne Alarm. Hop-Bodies und Header kommen beim Lesen nicht zurück.
POST minimal
Kopieren 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
Kopieren 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
Kopieren 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
Kopieren $headers = @{ Authorization = "Bearer $env:PATHLY_API_TOKEN" }
Invoke-RestMethod -Method Get -Uri "https://api.pathlyhq.com/v1/scenarios" -Headers $headersFlow type: "browser" verlangt einen Schritt- AST . In der Konsole erstellen. API kann referenzieren und auslösen — keine Secrets in Git.
Beim Lesen erhalten Sie eine Prüfsumme , keine Geheimnisdetails.
Runs (Ausführungen) Ein Run ist eine abrechenbare Ausführung. GET /v1/runs listet die Historie. Auslösen (runs:trigger) eignet sich als Post-Deploy-Smoke.
Liste récente
Kopieren curl "https://api.pathlyhq.com/v1/runs?limit=20" \
-H "Authorization: Bearer $PATHLY_API_TOKEN"Déclencher (si exposé sur votre plan / portée)
Kopieren 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)"Vorfälle Vorfälle bündeln aufeinanderfolgende Fehlschläge laut Eskalationspolitik. Lesen: incidents:read. Schreiben: incidents:write.
Kopieren curl "https://api.pathlyhq.com/v1/incidents?limit=50" \
-H "Authorization: Bearer $PATHLY_API_TOKEN"Wartung und SLA Wartungsfenster: Alarme in geplanten Slots stumm. SLA-Ziele: Schwelle und Umfang. Beides sind erstklassige IaC-Ressourcen.
Terraform — maintenance + SLA
Kopieren 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
}