You'll need roughly 3 minutes to read this article.
We recently launched a new version of the API as a public Beta, which is open to anyone and doesn’t require any registration. This page will provide more context around the new API and examples of how to work with it.
If you’re just looking to get started, head over to the API v2 Documentation for all the details.
The new API have initially been focused on solving a specific set of use cases, that have been requested by the majority of users:
Having the above scenarios as a guiding light, we have focus on these specific endpoints:
For Projects, you’re able to do most CRUD operations (we’re working on the remaining ones) which should allow you to automate most of your project maintenance tasks; especially useful for those with 10s or 100s of projects.
Things to note:
Builds can’t really be deleted, but otherwise you can do pretty much anything with them. You can even go a level deeper than what the Codeship UI offers; if you restart a build, the old build data is kept around, but the UI only shows the latest. With the builds endpoint you can get the information on those old builds as well.
In terms of
commands on the builds endpoint, we’ve deviated slightly from “textbook REST” and have allowed endpoints to
/restart and existing build or
/stop a running build. If you want to trigger a build that pulls the latest code from a given branch, you would POST to the
/builds endpoint with the project and the branch in question. More details can be found on this in the API v2 Documentation.
Things to note:
The first version of the API is still in production, though the documentation is now hosted on the new API v1 Documentation site.
While v2 is still in Beta, nothing will change for v1, but it will be deprecated and eventually fully removed. Going forward, you shouldn’t expect any updates or fixes to v1, and ideally you should plan to migrate your projects to use v2. We will provide at least 6 months notice before completely removing v1, which would not happen until v2 exits Beta
We also have a couple of code examples and sample projects available.