OAPI: add operations for fetching blocklist & removing individual items
This commit is contained in:
parent
2d6c11e98b
commit
a084f6e2a4
@ -517,6 +517,53 @@ paths:
|
|||||||
schema:
|
schema:
|
||||||
$ref: "#/components/schemas/Error"
|
$ref: "#/components/schemas/Error"
|
||||||
|
|
||||||
|
/api/jobs/{job_id}/blocklist:
|
||||||
|
summary: Access blocklist of this job.
|
||||||
|
get:
|
||||||
|
operationId: fetchJobBlocklist
|
||||||
|
summary: Fetch the list of workers that are blocked from doing certain task types on this job.
|
||||||
|
tags: [jobs]
|
||||||
|
parameters:
|
||||||
|
- name: job_id
|
||||||
|
in: path
|
||||||
|
required: true
|
||||||
|
schema: { type: string, format: uuid }
|
||||||
|
responses:
|
||||||
|
"200":
|
||||||
|
description: Get tuples (worker, task type) that got blocked on this job.
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema: { $ref: "#/components/schemas/JobBlocklist" }
|
||||||
|
default:
|
||||||
|
description: Unexpected error.
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: "#/components/schemas/Error"
|
||||||
|
delete:
|
||||||
|
operationId: removeJobBlocklist
|
||||||
|
summary: Remove entries from a job blocklist.
|
||||||
|
tags: [jobs]
|
||||||
|
parameters:
|
||||||
|
- name: job_id
|
||||||
|
in: path
|
||||||
|
required: true
|
||||||
|
schema: { type: string, format: uuid }
|
||||||
|
requestBody:
|
||||||
|
description: Tuples (worker, task type) to be removed from the blocklist.
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema: { $ref: "#/components/schemas/JobBlocklist" }
|
||||||
|
responses:
|
||||||
|
"204":
|
||||||
|
description: Request accepted, entries have been removed.
|
||||||
|
default:
|
||||||
|
description: Unexpected error.
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: "#/components/schemas/Error"
|
||||||
|
|
||||||
/api/tasks/{task_id}:
|
/api/tasks/{task_id}:
|
||||||
summary: Fetch a single task
|
summary: Fetch a single task
|
||||||
get:
|
get:
|
||||||
@ -1211,6 +1258,18 @@ components:
|
|||||||
updated: { type: string, format: date-time }
|
updated: { type: string, format: date-time }
|
||||||
required: [id, name, status, priority, task_type, updated]
|
required: [id, name, status, priority, task_type, updated]
|
||||||
|
|
||||||
|
JobBlocklist:
|
||||||
|
description: "List of workers that are not allowed certain task types on a specific job."
|
||||||
|
type: array
|
||||||
|
items: { $ref: "#/components/schemas/JobBlocklistEntry" }
|
||||||
|
|
||||||
|
JobBlocklistEntry:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
worker_id: { type: string, format: uuid }
|
||||||
|
task_type: { type: string }
|
||||||
|
required: [worker_id, task_type]
|
||||||
|
|
||||||
JobStatusChange:
|
JobStatusChange:
|
||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user