User:Bhearsum/Balrog/Administration: Difference between revisions

Jump to navigation Jump to search
Line 32: Line 32:


== API ==
== API ==
Both the build machine client and the web administration API will make use of the REST interface described below:
Both the build machine client and the web administration API will make use of the REST interface described below. Status codes of 200 and 500 are implied for success and server error cases. Error responses (4xx and 5xx) will have an 'errmsg' entity in their response.
{| class="wikitable"
{| class="wikitable"
|-
|-
Line 39: Line 39:
! Arguments
! Arguments
! Description
! Description
! Status codes
! Exception Status codes
|-
|-
| /releases
| /releases
Line 45: Line 45:
|
|
| Retrieves all release names
| Retrieves all release names
| 200
|-
|-
| rowspan=2 | /releases/[name]
| /releases/[name]
| rowspan=2 | GET
| GET
| rowspan=2 |
|
| rowspan=2 | Retrieve the release identified by "name"
| Retrieve the release identified by "name"
| 200 - If release exists
| 404 - Release doesn't exist
|-
| 404 - If release doesn't exist
|-
| rowspan=3 | /releases/[name]
| rowspan=3 | PUT
| rowspan=3 | details - the JSON blob associated with this release
| rowspan=3 | Update the release with the supplied JSON data. If non-existent, it is created. Be careful when using this for existing releases that already have builds added to them -- the JSON blob given here overrides all data for the release, not just platform independent data.
| 200 - Successfully updated the release
|-
|-
| /releases/[name]
| PUT
| details - the JSON blob associated with this release
| Update the release with the supplied JSON data. If non-existent, it is created. Be careful when using this for existing releases that already have builds added to them -- the JSON blob given here overrides all data for the release, not just platform independent data.
| 400 - The details value is malformed or NULL.
| 400 - The details value is malformed or NULL.
|-
| 500 - Error occurred on the server while updating the release
|-
|-
| /releases/[name]
| /releases/[name]
Line 69: Line 62:
|
|
| Delete the release
| Delete the release
| 404 - Release does not exist
|-
|-
| /releases/[name]/builds
| /releases/[name]/builds
Line 74: Line 68:
|
|
| Retrieve all builds from a release
| Retrieve all builds from a release
| 404 - Release does not exist
|-
|-
| /releases/[name]/builds/[platform]/[locale]
| /releases/[name]/builds/[platform]/[locale]
Line 79: Line 74:
|
|
| Retrieve a specific build from a release
| Retrieve a specific build from a release
| 404 - Release, platform, or locale doesn't exist
|-
|-
| /releases/[name]/builds/[platform]/[locale]
| /releases/[name]/builds/[platform]/[locale]
| PUT
| PUT
| details - the JSON blob associated with this build
| details - the JSON blob associated with this build
| Update the build with the supplied JSON data. If non-existent, it is created.
| Update the build with the supplied JSON data. If any of the named release, platform, or locale don't exist, they will be created. If the specific build already exists, it will be overwritten with the supplied information.
| 400 - The details value is malformed or NULL.
|-
|-
| /releases/[name]/builds/[platform]/[locale]
| /releases/[name]/builds/[platform]/[locale]
Line 89: Line 86:
|
|
| Delete the build
| Delete the build
| 404 - The named build doesn't exist
|-
|-
| rowspan=15 | /rule
| rowspan=15 | /rules
| rowspan=15 | POST
| rowspan=15 | POST
| priority
| priority
| rowspan=15 | Create a new rule with the supplied arguments.
| rowspan=15 | Create a new rule with the supplied arguments.
| rowspan=15 | 400 - One or more of the arguments is invalid
|-
|-
| mapping
| mapping
Line 123: Line 122:
| comment
| comment
|-
|-
| /rule
| /rules
| GET
| GET
| Same as /rule POST
| Same as /rules POST
| Retrieve all of the rules that match the specified arguments. Any missing arguments are regarded as wildcards, therefore a request with no parameters returns all rules.
| Retrieve all of the rules that match the specified arguments. Any missing arguments are regarded as wildcards, therefore a request with no parameters returns all rules.
|-
|-
| /rule/[id]
| /rules/[id]
| PUT
| PUT
| Same as /rule POST
| Same as /rules POST
| Update the rule with the supplied arguments. Any missing arguments will be considered NULL.
| Update the rule with the supplied arguments. Any missing arguments will be considered NULL.
| 400 - One or more of the arguments is invalid
|-
|-
| /rule/[id]
| /rules/[id]
| POST
| POST
| Same as /rule POST
| Same as /rules POST
| Update the rule with any arguments passed. Any missing arguments will not be changed.
| Update the rule with any arguments passed. Any missing arguments will not be changed.
|-
|-
| /rule/[id]
| /rules/[id]
| DELETE
| DELETE
|
|
| Delete the rule
| Delete the rule
| 404 - Rule does not exist
|}
|}


== Footnotes ==
== Footnotes ==
<span id="note1">1. $product-$channel-latest only works in a world where no channel names overlap, which we should be in once 1.9.2 is dead. Doing it this way ensures that we nightly updates work after version bumps happen *and* we don't need to maintain a branch name <-> version mapping a la existing AUS.</span>
<span id="note1">1. $product-$channel-latest only works in a world where no channel names overlap, which we should be in once 1.9.2 is dead. Doing it this way ensures that we nightly updates work after version bumps happen *and* we don't need to maintain a branch name <-> version mapping a la existing AUS.</span>
canmove, Confirmed users
6,439

edits

Navigation menu