monitoring

Add Webhook

Send this key's monitoring events to an https URL, each delivery signed.

The response carries the webhook's signing secret, shown only this once. Each delivery is a POST of one event (the same JSON as the events feed) with Licenscheck-Event-Id and Licenscheck-Signature: t=<unix>,v1=<hex>, where v1 is the HMAC-SHA256 of "<t>.<body>" under the secret. A delivery that isn't answered with a 2xx within 10 seconds is retried after 5 and 30 minutes, then 2, 6 and 24 hours; a webhook with no 2xx for 3 days is disabled. The events feed keeps every event either way.

Args: body: The URL. api_key_id: Injected: the caller's key. monitoring: Injected MonitoringRepository. resolve: Injected DNS lookup, for the address check.

Returns: The webhook and its secret.

Raises: HTTPException: 409 at the webhook limit, 422 for an unusable URL, 503 when webhooks are off.

post/monitoring/webhooks

Request

  • Base URL: https://api.licenscheck.com (the document declares no server; this is the origin it was published from)
  • URL: https://api.licenscheck.com/monitoring/webhooks
  • Auth: none declared

Request body

urlstring required

An https URL on the public internet that accepts POSTed JSON events.

Response

Successful Response

idstring uuid required

The webhook's ID.

urlstring required

Where events are POSTed.

created_atstring date-time required

When it was added.

last_success_atstring date-time nullable required

The last time it answered a delivery with a 2xx, if ever.

secretstring required

Verifies the Licenscheck-Signature header on each delivery. Shown only now: store it. Delete the webhook and add it again for a new one.

Changes

No recorded changes to this operation across all 1 revision of this API.