Skip to main content

 Services

Web services from /about to /webhooks

webhook ping

/clients/{client}/webhooks/{webhook}/ping [GET]

Description

Send ping request for a specific webhook.

The purpose of this service is to ensure that the client app is configured correctly to receive events posted by the Webhook.

Ping request

When this service is invoked, PageSeeder uses the webhooks to post a webhook.ping event to the URL defined on that webhook client.

For example:

POST /your/endpoint
Host: app.example.org
Content-Type: application/json; charset=UTF-8
X-PS-Secret: 64f99fe53a
{
  "webhook": {
    "id": 456,
    "name": "sample"
  },
  "webevents": [
     {
       "id": "456.1108030026650199",
       "datetime": "2022-08-02T13:45:12+10:00",
       "type": "webhook.ping"
     }
  ]
}

If you have defined a Webhook secret, the request also includes the X-PS-Signature HTTP header.

Ping response

To confirm that it is ready to receive webhook events from PageSeeder, the client app must return a successful HTTP response, such as 200 OK  or 204 No Content , that includes the HTTP header X-PS-Secret set to the same value as was sent in the POST request header. Other response headers and body content are ignored.

For example:

HTTP/2 204 No Content
Date: Tue, 02 Aug 2022 03:41:40 GMT
Server: SampleApp
X-PS-Secret: 64f99fe53a

When that is the case, the webhook status changes from “pending” to “active”. This confirms that the client wishes to receive webhook POST requests from PageSeeder and helps guard against PageSeeder sending unwanted or SPAM requests.

Parameters

No parameters required.

Permission

This service requires administrator.

Response

<ping-sent />

Error Handling

0x170AIf the HTTP code returned by the webhook is not 200
0x170BIf the ping header returned by the webhook is missing or invalid
0x170CIf there was any other error when connecting to the webhook client
Created on , last edited on