Shifter now supports send webhooks. This feature allows you to send requests to third-party locations using POST or GET
based on lifecycle events on your Shifter
site.
Key Features
Methods: POST/GET
- If the POST method is selected, data is sent in the BODY
in JSON format, and theContent-type: application/json
header is added at runtime. If the - GET
method is selected, data is sent as query parameters.
- If the POST method is selected, data is sent in the BODY
Custom Headers:
Adding custom headers to the request is optional. You can override all headers exceptContent-type
andUser-Agent
.
Event Name: Artifact:Created
This event is triggered when a newly created artifact is completed, and you can send the following data:
site_id: Site IDartifact_id: Artifact IDdownload_url: URL to download the archived artifact as a TAR
archive file or tgz. Since it is encoded in BASE64
format, it must be decoded.
Note: download_url is available for 3 hours after the webhook
is triggered.
Shifter Webhook Example
POST
Send data in JSON format.
json { “site_id”: “xxx-xxx…” , “artifact_id”: “xxx-xxx…” ,
“download_url”: “xxx-xxx-…” }