cloudapi: Add DELETE /composes/{id} route to delete a job

This will be used to delete jobs and their artifacts.

Related: RHEL-60120
This commit is contained in:
Brian C. Lane 2024-04-15 11:14:10 -07:00 committed by Tomáš Hozza
parent f1a2c24563
commit a569ac0f7b
2 changed files with 295 additions and 211 deletions

View file

@ -133,6 +133,60 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/Error'
delete:
operationId: deleteCompose
summary: Delete a compose
security:
- Bearer: []
parameters:
- in: path
name: id
schema:
type: string
format: uuid
example: '123e4567-e89b-12d3-a456-426655440000'
required: true
description: ID of compose to delete
description: |-
Delete a compose and all of its independent jobs.
responses:
'200':
description: compose delete status
content:
application/json:
schema:
$ref: '#/components/schemas/ComposeDeleteStatus'
'400':
description: Invalid compose id
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'401':
description: Auth token is invalid
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'403':
description: Unauthorized to perform operation
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'404':
description: Unknown compose id
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'500':
description: Unexpected error occurred
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
/composes/{id}/metadata:
get:
@ -805,6 +859,10 @@ components:
- failure
- pending
example: success
ComposeDeleteStatus:
$ref: '#/components/schemas/ObjectReference'
ComposeLogs:
allOf:
- $ref: '#/components/schemas/ObjectReference'