Skip to content

Commit f0848a4

Browse files
committed
export get async jobs method in webserver openapi specs
1 parent e5ff440 commit f0848a4

File tree

2 files changed

+42
-3
lines changed

2 files changed

+42
-3
lines changed

api/specs/web-server/_storage.py

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -192,15 +192,15 @@ async def export_data(data_export: DataExportPost, location_id: LocationID):
192192
response_model=Envelope[StorageAsyncJobStatus],
193193
name="storage_async_job_status",
194194
)
195-
async def get_async_job_status(task_id: StorageAsyncJobGet, job_id: UUID):
195+
async def get_async_job_status(storage_async_job_get: StorageAsyncJobGet, job_id: UUID):
196196
"""Get async job status"""
197197

198198

199199
@router.post(
200200
"/storage/async-jobs/{job_id}:abort",
201201
name="abort_async_job",
202202
)
203-
async def abort_async_job(task_id: StorageAsyncJobGet, job_id: UUID):
203+
async def abort_async_job(storage_async_job_get: StorageAsyncJobGet, job_id: UUID):
204204
"""Get async job status"""
205205

206206

@@ -209,5 +209,14 @@ async def abort_async_job(task_id: StorageAsyncJobGet, job_id: UUID):
209209
response_model=Envelope[StorageAsyncJobResult],
210210
name="get_async_job_result",
211211
)
212-
async def get_async_job_result(task_id: StorageAsyncJobGet, job_id: UUID):
212+
async def get_async_job_result(storage_async_job_get: StorageAsyncJobGet, job_id: UUID):
213+
"""Get async job status"""
214+
215+
216+
@router.get(
217+
"/storage/async-jobs",
218+
response_model=Envelope[list[StorageAsyncJobGet]],
219+
name="get_async_job_result",
220+
)
221+
async def get_async_jobs():
213222
"""Get async job status"""

services/web/server/src/simcore_service_webserver/api/v0/openapi.yaml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6461,6 +6461,20 @@ paths:
64616461
application/json:
64626462
schema:
64636463
$ref: '#/components/schemas/Envelope_StorageAsyncJobResult_'
6464+
/v0/storage/async-jobs:
6465+
get:
6466+
tags:
6467+
- storage
6468+
summary: Get Async Job Result
6469+
description: Get async job status
6470+
operationId: get_async_jobs
6471+
responses:
6472+
'200':
6473+
description: Successful Response
6474+
content:
6475+
application/json:
6476+
schema:
6477+
$ref: '#/components/schemas/Envelope_list_StorageAsyncJobGet__'
64646478
/v0/trash:empty:
64656479
post:
64666480
tags:
@@ -9747,6 +9761,22 @@ components:
97479761
title: Error
97489762
type: object
97499763
title: Envelope[list[ServiceOutputGet]]
9764+
Envelope_list_StorageAsyncJobGet__:
9765+
properties:
9766+
data:
9767+
anyOf:
9768+
- items:
9769+
$ref: '#/components/schemas/StorageAsyncJobGet'
9770+
type: array
9771+
- type: 'null'
9772+
title: Data
9773+
error:
9774+
anyOf:
9775+
- {}
9776+
- type: 'null'
9777+
title: Error
9778+
type: object
9779+
title: Envelope[list[StorageAsyncJobGet]]
97509780
Envelope_list_TagGet__:
97519781
properties:
97529782
data:

0 commit comments

Comments
 (0)