Integration

Cookbook, EU security and drift

for_each recipes, CI smoke, webhook verify, GDPR and UI-or-Terraform rule.

OpenAPI contractIssue an API keyFree Solo account

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

Security, EU and GDPR

Measurement from the EU. Data hosted in the Union. Minimise PII in scenario names and custom payloads. Organisation exports (members) stay out of key API — on purpose.

Rotation: short TTL on CI keys, immediate revoke on leak. App logs: never log Authorization or the raw signed body if the secret appears there.

UI or Terraform, not both

Drift appears when console and Terraform state diverge. Pick one source of truth per environment. Use provider native import to adopt a hand-built estate, then forbid console edits on those resources.

# Adopter un scénario existant
terraform import pathly_scenario.home scn_…

Cookbook

Copy-paste recipes. Adapt names and URLs (example.* domains only in docs).

Agency fleet — for_each

locals {
  clients = {
    acme  = "https://www.example.com/"
    globex = "https://shop.example.com/"
  }
}

resource "pathly_scenario" "home" {
  for_each     = local.clients
  name         = "home-${each.key}"
  url          = each.value
  interval_sec = 300
  severity     = "critical"
}

GitHub Actions — run-scenario post-deploy

- name: Pathly smoke
  uses: pathlyhq/pathly-action@v1
  with:
    api_token: ${{ secrets.PATHLY_API_TOKEN }}
    operation: run-scenario
    scenario_id: ${{ vars.PATHLY_CHECKOUT_SCENARIO_ID }}
    timeout_sec: "120"

GitLab CI — component

include:
  - component: gitlab.com/pathly1/provider/gitlab-ci/pathly-ping@0.1.2
    inputs:
      api_token: $PATHLY_API_TOKEN

Node SDK — Ping, Chain, lister

import { PathlyClient } from "@pathly/sdk";
const client = new PathlyClient({ token: process.env.PATHLY_API_TOKEN });
const s = await client.createScenario({
  name: "Checkout",
  url: "https://www.example.com/cart",
  intervalSec: 300,
  expectText: "Your cart",
});
const chain = await client.createChain({
  name: "Login then /me",
  intervalSec: 300,
  hops: [
    { method: "POST", url: "https://api.example.com/login", assertStatus: 200 },
    { method: "GET", url: "https://api.example.com/me", assertStatus: 200 },
  ],
});
for await (const row of client.paginate((cursor) => client.listScenarios({ cursor }))) {
  console.log(row.id, row.name);
}

Python SDK

from pathly import Client, ScenarioInput
client = Client()
s = client.create_scenario(ScenarioInput(
    name="Checkout",
    url="https://www.example.com/cart",
    intervalSec=300,
    expectText="Your cart",
))
chain = client.create_scenario(ScenarioInput(
    name="Login then /me",
    intervalSec=300,
    httpChain=[
        {"method": "POST", "url": "https://api.example.com/login", "assertStatus": 200},
        {"method": "GET", "url": "https://api.example.com/me", "assertStatus": 200},
    ],
))
print(s.id, chain.id)

jq — filtrer les scénarios critiques

curl -sS https://api.pathlyhq.com/v1/scenarios \
  -H "Authorization: Bearer $PATHLY_API_TOKEN" \
  | jq '.items[] | select(.severity=="critical") | {id,name,url}'