diff --git a/pkg/api/flamenco-openapi.yaml b/pkg/api/flamenco-openapi.yaml index 77570c71..5d53716d 100644 --- a/pkg/api/flamenco-openapi.yaml +++ b/pkg/api/flamenco-openapi.yaml @@ -249,6 +249,20 @@ paths: schema: $ref: "#/components/schemas/Error" + # Worker Management + /api/worker-mgt/workers: + summary: Obtain list of Workers known to the Manager. + get: + operationId: fetchWorkers + summary: Get list of workers. + tags: [worker-mgt] + responses: + "200": + description: Known workers + content: + application/json: + schema: { $ref: "#/components/schemas/WorkerList" } + ## Jobs /api/jobs/types: @@ -656,6 +670,8 @@ tags: description: Job & task queries, submission, and management. - name: worker description: API for Flamenco Workers to communicate with Flamenco Manager. + - name: worker-mgt + description: Worker Management API, for the web interface to query and control Workers. - name: shaman description: Shaman API, for file uploading & creating job checkouts. @@ -1341,6 +1357,36 @@ components: enum: [job, tasklog] description: What kind of thing to subscribe to / unsubscribe from. + # Worker Management + + WorkerList: + type: object + description: List of workers. + properties: + "workers": + type: array + items: { $ref: "#/components/schemas/WorkerSummary" } + required: [workers] + + WorkerSummary: + type: object + description: Basic information about a Worker. + properties: + "id": { type: string, format: uuid } + "nickname": { type: string } + "status": { $ref: "#/components/schemas/WorkerStatus" } + "status_requested": { $ref: "#/components/schemas/WorkerStatus" } + # These will be implemented soon: + # "task_id": + # type: string + # format: uuid + # description: The worker's current/last-worked-on task. + # "last_seen": + # type: string + # format: date-time + # description: Last time this worker was seen by the Manager. + required: [id, nickname, status] + securitySchemes: worker_auth: description: Username is the worker ID, password is the secret given at worker registration.