Skip to content

Commit

Permalink
API documentation for staged requests
Browse files Browse the repository at this point in the history
  • Loading branch information
bgeuken committed Nov 23, 2018
1 parent 78dc408 commit 8d42a9e
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 2 deletions.
18 changes: 17 additions & 1 deletion docs/api/api/api.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1930,7 +1930,6 @@ DELETE /status_reports/repositories/<project>/<repository>/required_checks/<chec
Delete a required check
XmlResult: required_checks


== Staging

=== Excluded Requests
Expand All @@ -1944,6 +1943,23 @@ POST /staging_excluded_requests/<request>/<project>
DELETE /staging_excluded_requests/<request>
Stop excluding this request

=== Staged Requests

<staging_workflow_project>: The name of the staging workflow project, e.g. home:user1
<staging_project>: The name of the staging project, e.g. home:user1:Staging:A

GET /staging/<staging_workflow_project>/staging_projects/<staging_project>/staged_requests
Get all staged requests of a staging project.
XmlResult: staged_requests

POST /staging/<staging_workflow_project>/staging_projects/<staging_project>/staged_requests
Add one or multiple bs_requests to the staged requests of a staging project.
XmlBody: remove_staged_requests
XmlResult: status_ok

DELETE /staging/<staging_workflow_project>/staging_projects/<staging_project>/staged_requests
Remove one or multiple bs_requests to the staged requests of a staging project.
XmlResult: status_ok

== Internal only routes

Expand Down
4 changes: 4 additions & 0 deletions docs/api/api/remove_staged_requests.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<requests>
<number>7</number>
<number>13</number>
</requests>
4 changes: 4 additions & 0 deletions docs/api/api/staged_requests.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<staged_requests>
<request id="7" creator="tux" state="new" package="aaa_base"/>
<request id="13" creator="bob" state="review" package="ruby"/>
</staged_requests>
3 changes: 3 additions & 0 deletions docs/api/api/status_ok.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<status code="ok">
<summary>Ok</summary>
</status>
3 changes: 2 additions & 1 deletion src/api/test/functional/backend_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ def test_validate_bsxml
'latest_added', 'latest_updated', 'message', 'messages', 'most_active', 'newest_stats',
'packageresult', 'projectresult', 'projects', 'rating', 'redirect_stats', 'status_message',
'status_messages', 'tagcloud', 'taglist', 'tags', 'updated_timestamp', 'distributions',
'productlist', 'binary_released', 'check', 'required_checks', 'status_report'].include?(schema)
'productlist', 'binary_released', 'check', 'required_checks', 'status_report',
'staged_requests', 'remove_staged_requests', 'status_ok'].include?(schema)
# no backend schema exists
next
elsif schema == 'aggregate'
Expand Down

0 comments on commit 8d42a9e

Please sign in to comment.