Skip to main content

Create a Fleet using the API


In this tutorial, we will walk through the steps needed to create a Fleet using an API call. The tutorial will provide an example YAML for the Fleet, however the steps will work with any YAML.

By the end of this tutorial, you'll be able to:

  • Call the Shipyard API to create a Fleet


First, download the YAML configuration file named tutorial.yaml. This configuration file contains all of the details for a Fleet in Shipyard.

Feel free to peruse this YAML beforehand so you understand everything that it's doing. The YAML creates three Vessels in a Fleet:

  1. Execute Fivetran Sync
  2. Execute dbt Cloud Job
  3. Trigger Tableau Datasource Refresh

The YAML as created does not have any inputs filled out. If you have inputs for the three services in the example, feel free to replace <your_value> with actual values for the Blueprints.

The API call that we will use in this tutorial requires that you have the following:

Once we have those two values, we are ready to get started.


  1. Copy and paste the following code into your development environment:
import requests

headers = {
'X-Shipyard-API-Key': '<Your-API-Key>',
'Content-Type': 'application/x-www-form-urlencoded',

with open('tutorial.yaml', 'rb') as f:
data =

response = requests.put(

  1. Ensure that the requests package is installed by running pip install requests or pip3 install requests.

  2. Insert your Shipyard API Key, Organization ID, and Project ID into the code that you pasted. You can find your Project ID in the URL in Shipyard:

  1. Run the script. If the API call is successful, you will receive the YAML printed back to you with the print statement at the end of the script.

  1. Head into Shipyard and the specific Project whose ID you added into the Python script earlier. You should see the Fleet listed in the Project now.

  1. Click the Fleet name to open the Fleet Builder where you can enter any inputs that you left blank from the initial YAML.

You've successfully created a Fleet using a Shipyard API call.