General API Usage
Whilst the SDKs provide the easiest way to integrate with Shipbot.io the REST API allows you to create a new deployment from any system.
Authentication
Pass the API key found in Settings as a HTTP header called X-Api-Key
like so:
curl -X POST https://api.shipbot.io/deployment \
-H "X-Api-Key: your_api_key_here" \
-H "Content-Type: application/json" \
-d '{"version":"0.0.1"}'
Errors
All API errors follow a standard structure. A non 200 response will be returned with a JSON object like so:
{
"detail": "Error description"
}
In addition to the above if the API failure was due to a data validation error detail
will be an object include detail on that error, for example:
{
"detail": [{
"type": "value_error",
"loc": ["body"],
"msg": "Value error, Either artifactId or artifactName must be provided",
"input": {
"version": "0.0.1",
"environment": "production"
},
"ctx": {
"error": {}
}
}]
}
Successful Inserts
Any successful write action (POST
, PUT
or DELETE
) will return:
{
"success": true
}
If the write was an insert the response will include an id
attribute with the ID for the newly created object.
API Objects
All datetime values are ISO 8601, for example, "2020-01-15T15:10:36.517975+0000".