Skip to content

Commit

Permalink
Document DELETE staged requests endpoint
Browse files Browse the repository at this point in the history
Endpoint: DELETE
`/staging/{project_name}/staging_projects/{staging_project_name}/staged_requests`
  • Loading branch information
saraycp committed Apr 28, 2023
1 parent 7d5537f commit 56d52a0
Showing 1 changed file with 73 additions and 0 deletions.
Expand Up @@ -145,3 +145,76 @@ post:
sumary: "Can't change staged requests: Project 'project_name' is being accepted."
tags:
- Staging Workflow

delete:
summary: Delete requests from the staging project.
description: Delete the given requests from the staging project they were staged in.
security:
- basic_authentication: []
parameters:
- $ref: '../components/parameters/project_name.yaml'
- $ref: '../components/parameters/staging_project_name.yaml'
requestBody:
description: List of requests to be removed from the staging project.
content:
application/xml; charset=utf-8:
schema:
$ref: '../components/schemas/staging/requests_to_stage.yaml'
examples:
Multiple Requests:
value:
request:
- id: 1
- id: 2
responses:
'200':
$ref: '../components/responses/succeeded.yaml'
'401':
$ref: '../components/responses/unauthorized.yaml'
'400':
description: |
Bad Request.
XML Schema used for body validation: [status.xsd](../schema/status.xsd).
content:
application/xml; charset=utf-8:
schema:
$ref: '../components/schemas/api_response.yaml'
examples:
Request Not Staged:
value:
code: invalid_request
summary: "Error while unassigning requests: Request 'ID' is not staged"
Request Not In Staging:
value:
code: invalid_request
summary: "Error while unassigning requests: Requests with number: ID don't belong to Staging: project_name"
Wrong Request Number:
value:
code: invalid_request
summary: 'Error while parsing the numbers of the requests'
Invalid XML Format:
value:
code: invalid_xml_format
summary: 'XML format is not valid'
Empty Body:
value:
code: invalid_request
summary: 'Empty body'
'404':
description: Not Found
content:
application/xml; charset=utf-8:
schema:
$ref: '../components/schemas/api_response.yaml'
examples:
Without Staging Workflow:
value:
code: not_found
sumary: "Project project_name doesn't have an associated Staging Workflow"
Unknown Project:
value:
code: not_found
summary: "Project 'project_name' not found."
tags:
- Staging Workflow

0 comments on commit 56d52a0

Please sign in to comment.