diff --git a/src/api/public/apidocs-new/paths/staging_project_name_staging_projects_staging_project_name_staged_requests.yaml b/src/api/public/apidocs-new/paths/staging_project_name_staging_projects_staging_project_name_staged_requests.yaml index 988d909ba1e..10cfa9c7c23 100644 --- a/src/api/public/apidocs-new/paths/staging_project_name_staging_projects_staging_project_name_staged_requests.yaml +++ b/src/api/public/apidocs-new/paths/staging_project_name_staging_projects_staging_project_name_staged_requests.yaml @@ -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