User:Catlee/BuildAPI: Difference between revisions

Line 1: Line 1:
= REST Interface =
= REST Interface =
List of request methods, urls, and parameters:


GET /builds/branches -> list of branches
GET /builds/branches -> list of branches
Line 13: Line 15:
GET /builds/{branch}/builders/{buildername} -> list of recent builds, including completed, running, and pending for this builder name
GET /builds/{branch}/builders/{buildername} -> list of recent builds, including completed, running, and pending for this builder name


PUT /builds/{branch}/build/{buildid} -> update this build (e.g. re-prioritize request)
PUT /builds/{branch}/build/{buildid} -> update this build
* priority (required, sets the build request's priority)


DELETE /builds/{branch}/build/{buildid} -> cancel this build (takes onlyifrunning/onlyifpending parameters)
DELETE /builds/{branch}/build/{buildid} -> cancel this build
* onlyifrunning (optional, set to only cancel builds if they're running)
* onlyifpending (optional, set to only cancel builds if they're pending)


POST /builds/{branch}/rev/{revision} -> create a new build with this revision (requires builder names as part of POST data)
POST /builds/{branch}/rev/{revision} -> create a new build with this revision  
* buildername (required, which builder to create builds for, can be specified multiple times)


POST /builds/{branch}/builders/{buildername} -> create a new build on this builder (optional revision accepted as part of POST data)
POST /builds/{branch}/builders/{buildername} -> create a new build on this builder
* revision (optional, which revision to build)


POST /builds/{branch}/build -> rebuilds an old build on this branch (requires buildid of build to rebuild)
POST /builds/{branch}/build -> rebuilds an old build on this branch  
* buildid (required, which build to rebuild)


PUT and DELETE can also be achieved by POSTing to the URL with a POST field "_method" set to PUT or DELETE.
PUT and DELETE can also be achieved by POSTing to the URL with a POST field "_method" set to PUT or DELETE.
Confirmed users
2,456

edits