Shifter now supports outgoing Webhooks.
This feature can send requests to 3rd party locations using POST or GET based on a Shifter site lifecycle events.
Key features explained:
POSTmethod is selected, data has JSON format
Content-type: application/jsonheader when it runs.
GETmethod is selected, it sends data as query parameters.
Adding custom headers to requests are optional.
All headers can be overwritten, except
Event name: Artifact:Created
Once a newly created artifact is complete, this event is fired and can send the following data:
site_id: Site ID
artifact_id: Artifact ID
download_url: URL for downloading archived artifact as a TAR Archive file or tgz. BASE64 format, decode requires to handle. A download_url is available for three hours since the Webhook fired.
Shifter Webhook Examples
Send data as JSON format
"site_id": "xxx-xxx..." ,
"artifact_id": "xxx-xxx..." ,
Send data as a query parameter.
How to set up
1. Login to the Dashboard
2. Navigate to [Webhooks] menu
3. Input target to the URL field
Netlify's API is set as a sample.
You can also set additional headers to Key and Value field.
4. Hit [Submit] button to save webhook
5. Webhook is saved
6. On "Your webhooks" section, you can confirm webhooks
It's done by automatically when Shifter completed generating artifacts.
Shifter automatically send webhook when it completed artifact generation.
But, you can send it again with manually.
1. Navigate to Overview page
2. Scroll down to "Deploys" section and click [Detail] of the published Artfact
3. Scroll down to the Webhook section, and click [Invoke Webhook]
4. Webhook has been invoked
Do Shifter Webhooks support Basic Authentication or Digest Authentication?
Basic Authentication is supported. To use basic auth, add basic (base64-encoded-username:base64-encoded-password) to your header.
Digest Authentication is not supported at this time.