HTTP Webhooks

HTTP Webhooks for Playwright and Cypress tests dashboard

Enabling HTTP Webhook Integration will trigger an HTTP POST request to an endpoint of your choice.

Currents will send a POST request for the following lifecycle event of Cypress or Playwright tests run:

  • a new run starts

  • a run finishes

  • a run times out

  • a run is cancelled

Please note: The endpoint should be publicly accessible

Examples

Example of HTTP POST request with cypress tests run data

curl --location --request POST 'https://yourserver.com/webhook/currents.dev' \
--header 'Content-Type: application/json' \
--data-raw '{
    "event": "RUN_START",
    "runUrl": "https://app.currents.dev/run/950a13c3edf4f28b6e8ce301a404b4aa",
    "buildId": "demo-build-cdx3314",
    "commit": {
        "authorEmail": "[email protected]",
        "authorName": "John Doe",
        "defaultBranch": "main",
        "branch": "feature-A",
        "message": "feat: change button color",
        "remoteOrigin": "https://github.com/org/repo.git",
        "sha": "5a7edc9a156e417068060d67109021351fc7d9b8"
    },
    "failures": 0,
    "flaky": 0,
    "overall": 1,
    "passes": 1,
    "pending": 0,
    "retries": 0,
    "skipped": 0
}'

HTTP Webhook Integration payload schema

Security

Validate the authenticity of Currents webhooks by setting custom HTTP headers.

Timestamp

Currents includes an x-timestamp HTTP header with the system's epoch timestamp for each webhook request to help you prevent replay attacks. Make sure your server's clock is synchronized with a reliable time source to avoid validation issues.

Custom Headers

You can set custom headers to pass a secret key with each webhook request.

Add a secret key in the headers so that your system can validate that the request came from Currents.

Last updated

Was this helpful?