REST API: GET webhook

This method is used to fetch an existing webhook with the REST API. It uses an HTTP GET request to the following address:$id

Replace the $id with the identifier of the webhook you want to fetch.

Returned fields

Variable Description
ID Unique numerical identifier of the webhook.
handler The URL of the webhook's endpoint that wil handle the call.
trigger The event that will trigger this webhook.
callers An array of the callers that are permitted to trigger the webhook.

JSON example

The JSON for the database might look something like this:

   "callers":["ms", "publisher"]

PHP example

The following example demonstrates how to use this method:

// dependencies

// change this into your access token
$api = new CopernicaRestAPI("your-access-token", 4);

// do the call, and print result

The example above requires the CopernicaRestApi class.

More information