On the Trigger tab for every Vessel and Fleet, you are provided with a section for creating and managing Webhook Triggers.
Webhook Triggers enable you to programmatically execute a Vessel or Fleet in Shipyard by running a POST request from any service. When you run the POST request, your Vessel or Fleet will be scheduled to run immediately.
When a webhook has been created, you will be given 3 options:
- Copy the entire webhook to your clipboard
- Replace the current webhook URL with a new webhook URL
- Remove the webhook URL from existence
No matter which language or service you use to run the POST request, you will see the following status codes returned.
When your POST request returns a status code of 201, your entity has been successfully scheduled. Depending on which entity was run, you'll see a slightly different JSON response that includes multiple relevant Shipyard IDs.
With this status code, you'll receive back IDs for the element you ran, alongside a unique request ID.
When your POST request returns a status code of 400, your request has failed. This is usually due to a webhook URL that is malformed or no longer exists. You'll see the following JSON response returned alongside this status code.
- Webhooks only allow you to immediately run a Vessel or a Fleet in a programmatic manner. They do not currently support the passing of variables.
- Each Vessel or Fleet can only have one webhook associated to it.
- Vessels or Fleets may not run instantaneously, as there is still time associated with entering a job queue, spinning up servers, and installing any external package dependencies.