Deploy API Documentation

Welcome

Deploy offers an API to allow you to view your deployments and create new ones. In addition to the API, there's also a ruby gem available to make integrating with Deploy even easier.

Authenticating and Accessing the API

Users are provided with an API key which can be found from the 'My Profile' page. It's a 40 character string which must be used with your username in order to authenticate. All API requests should be sent with HTTP Basic authentication with your username (email address) & API key.

Requests should also send an Accept: application/json and Content-type: application/json header. All requests to the API should be in JSON and all responses received will be returned as JSON.

Requests should be made to http(s)://yourdomain.deployhq.com/

Handling Validation Errors

If there are any validation errors when creating an object via the API, the returned HTTP status will be 422 (Unprocessable Entity). The body of the request will contain an object which describes the error.

This object is keyed on the attribute which is the cause of the validation error. The value will refer to an array containing one or more errors on that attribute. In the case that the validation applies to the object as a whole, the error will be in the base key. For example:

{
    "base" : ["Could not access the server with the potentials provided"],
    "hostname" : ["must be present", "must be a valid domain"],
    "username" : ["must be present"]
}