Skip to content

Commit 026e2f7

Browse files
committed
added callback specs
1 parent 36181ff commit 026e2f7

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed

openapi/task_execution_service.openapi.yaml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,23 @@ paths:
146146
application/json:
147147
schema:
148148
$ref: '#/components/schemas/tesCreateTaskResponse'
149+
callbacks:
150+
statusChange:
151+
'{$request.body#/callback_url}':
152+
post:
153+
description: |-
154+
The API will send notifications to the callback URL, if provided,
155+
when the task status changes.
156+
requestBody:
157+
content:
158+
application/json:
159+
schema:
160+
$ref: '#/components/schemas/tesCallbackStatus'
161+
responses:
162+
204:
163+
description: |-
164+
Listener should return this HTTP status code if
165+
the payload was received successfully.
149166
x-codegen-request-body-name: body
150167
/tasks/{id}:
151168
get:
@@ -654,6 +671,14 @@ components:
654671
type: string
655672
description: |-
656673
Optional user-provided description of task for documentation purposes.
674+
callback_url:
675+
type: string
676+
format: uri
677+
description: |-
678+
Optional user-provided callback URL. Note that the URL should be
679+
provided while creating a new task, and it won't be displayed when
680+
a task or a list of tasks is returned by the TES server.
681+
example: https://myserver.com/send/callback/here
657682
inputs:
658683
type: array
659684
description: |-
@@ -741,6 +766,19 @@ components:
741766
example: 2020-10-02T10:00:00-05:00
742767
readOnly: true
743768
description: Task describes an instance of a task.
769+
tesCallbackStatus:
770+
type: object
771+
required:
772+
- task_id
773+
- state
774+
properties:
775+
task_id:
776+
type: string
777+
description: Task identifier assigned by the server.
778+
example: job-0012345
779+
state:
780+
$ref: '#/components/schemas/tesState'
781+
description: Notification that a task has changed state.
744782
tesTaskLog:
745783
required:
746784
- logs

0 commit comments

Comments
 (0)