Pistis
API referenceWebhooks

Deliver a webhook

POST
/hooks/{key}

Continues every session waiting on key (the wait_for tool) and starts every flow with on: { hook: key }, with the body as the next message. No token: the body is signed with the server's hookSecret. GitHub's x-hub-signature-256 and x-github-delivery work as they are.

Path Parameters

key*string

What the sessions wait on

Header Parameters

x-pistis-signature*string

sha256= and the hex HMAC-SHA256 of the raw body with the secret

x-pistis-delivery*string

Unique per event: a repeat is duplicate and does nothing

Request Body

body*unknownapplication/json

Response Body

Delivered, or a repeat

application/json
  1. response
status*unknown
sessions*integer

How many sessions continue

Example Request
curl -X POST 'http://127.0.0.1:7777/hooks/ci-1234' \  -H 'x-pistis-signature: sha256=0000' \  -H 'x-pistis-delivery: d-1' \  -H 'Content-Type: application/json' \  -d '{  "status": "green"}'
Example Response
{  "status": "delivered",  "sessions": 0}