Integration

Cookbook, EU-Sicherheit und Drift

for_each-Rezepte, CI-Smoke, Webhook-Verify, DSGVO und UI-oder-Terraform.

OpenAPI-VertragAPI-Schlüssel ausstellenKostenloses Solo-Konto

Vollständiges Dokument, ohne Authentifizierung, bereit für Ihren Client-Generator.

Sicherheit, EU und DSGVO

Messung aus der EU. Daten in der Union. PII in Namen und Payloads minimieren. Organisations-Export bleibt bewusst außerhalb der Schlüssel-API.

Rotation: kurze TTL für CI-Schlüssel, sofort widerrufen bei Leak. Authorization nie loggen.

UI oder Terraform, nicht beides

Drift entsteht, wenn Konsole und Terraform-State divergieren. Eine Quelle der Wahrheit pro Umgebung. Nativer Import, dann Konsolen-Edits untersagen.

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

Cookbook — Rezepte

Fertige Rezepte. Namen und URLs anpassen (in Docs nur example.*).

Agentur-Flotte — 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}'