Skip to content

Commit 4c4d781

Browse files
authored
Update openapi.yaml with upscale endpoints
1 parent 4667d7d commit 4c4d781

File tree

1 file changed

+152
-42
lines changed

1 file changed

+152
-42
lines changed

openapi.yaml

Lines changed: 152 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -2,33 +2,26 @@ openapi: 3.0.4
22
info:
33
title: APEx Dispatch API
44
description: |-
5-
This is a temporary description.
5+
Implementation of the APEx Dispatch Service API to support the execution of single job executions or upscaling tasks for APEx-compliant services.
66
version: 1.0.0
7-
externalDocs:
8-
description: Find out more about Swagger
9-
url: https://swagger.io
10-
# server:
11-
# - url: https://petstore3.swagger.io/api/v3
7+
8+
security:
9+
- apex_auth: []
10+
1211
tags:
1312
- name: Upscale Tasks
14-
description: API calls to manage upscale tasks
15-
# externalDocs:
16-
# description: Find out more
17-
# url: https://swagger.io
13+
description: API calls to manage upscale tasks bundling multiple processing jobs
1814
- name: Unit Jobs
19-
description: API calls to manage processing jobs
20-
# externalDocs:
21-
# description: Find out more about our store
22-
# url: https://swagger.io
15+
description: API calls to manage single processing jobs
2316

2417
paths:
2518
/tiles:
2619
post:
2720
tags:
2821
- Upscale Tasks
29-
summary: Retrieve a list of tiles to process
22+
summary: Split an area of interest in a list of tiles
3023
description: |-
31-
Given a certain area of interest and a tiling grid definition (from the service’s Max AOI capacity), calculate the number of tiles to be processed by the upscaling service
24+
Given a certain area of interest and a tiling grid definition (from the service’s Max AOI capacity), calculate the number of tiles to be processed by the upscaling service.
3225
requestBody:
3326
description: Request the tiles to be processed.
3427
content:
@@ -44,21 +37,55 @@ paths:
4437
schema:
4538
$ref: '#/components/schemas/TileResponse'
4639
'400':
47-
description: Invalid ID supplied
40+
description: Grid ID is not supported
41+
security:
42+
- apex_auth: []
43+
44+
/upscale_tasks:
45+
post:
46+
tags:
47+
- Upscale Tasks
48+
summary: Create a new upscaling task
49+
requestBody:
50+
description: Details of the upscaling task to be created
51+
content:
52+
application/json:
53+
schema:
54+
$ref: '#/components/schemas/UpscaleRequest'
55+
responses:
56+
'200':
57+
description: Successfully created an upscaling task
58+
content:
59+
application/json:
60+
schema:
61+
$ref: '#/components/schemas/UpscalingTask'
62+
security:
63+
- apex_auth: []
64+
65+
/upscale_tasks/{taskID}:
66+
get:
67+
tags:
68+
- Upscale Tasks
69+
summary: Get the details of a specific upscaling task
70+
parameters:
71+
- in: path
72+
name: taskID
73+
schema:
74+
type: integer
75+
required: true
76+
description: ID of the upscaling task to retrieve
77+
responses:
78+
'200':
79+
description: Successfully retrieved the upscaling task
80+
content:
81+
application/json:
82+
schema:
83+
$ref: '#/components/schemas/UpscalingTask'
4884
'404':
49-
description: Pet not found
50-
'422':
51-
description: Validation exception
52-
# default:
53-
# description: Unexpected error
54-
# content:
55-
# application/json:
56-
# schema:
57-
# $ref: "#/components/schemas/Error"
85+
description: Could not find the upscaling task for the provided ID
5886
security:
59-
- petstore_auth:
60-
- write:pets
61-
- read:pets
87+
- apex_auth: []
88+
6289
components:
6390
schemas:
6491
TileRequest:
@@ -82,22 +109,105 @@ components:
82109
tiles:
83110
type: array
84111
items:
85-
type: object
86-
description: GeoJSON Feature using coordinates in EPSG:4326
87-
example: { "type": "Feature", "geometry": {}}
112+
$ref: '#/components/schemas/Tile'
113+
114+
UpscaleRequest:
115+
type: object
116+
required:
117+
- label
118+
- tiles
119+
- title
120+
- service
121+
- parameters
122+
properties:
123+
label:
124+
$ref: '#/components/schemas/ProcessType'
125+
tiles:
126+
type: array
127+
items:
128+
$ref: '#/components/schemas/Tile'
129+
title:
130+
type: string
131+
description: Title of the upscaling task
132+
example: My upscaling task
133+
service:
134+
$ref: '#/components/schemas/ServiceDetails'
135+
parameters:
136+
$ref: '#/components/schemas/ServiceParameters'
137+
138+
88139

89-
140+
# OBJECTS
90141

142+
ServiceDetails:
143+
type: object
144+
description: Details of the service to be executed
145+
properties:
146+
id:
147+
type: string
148+
149+
ServiceParameters:
150+
type: object
151+
description: Object containing the parameters that need to be provided to the service execution
152+
153+
154+
ProcessingJob:
155+
type: object
156+
description: Description of the processing job
157+
158+
UpscalingTaskSummary:
159+
type: object
160+
description: Summary of an upscaling task
161+
properties:
162+
id:
163+
type: string
164+
description: ID of the upscaling task
165+
status:
166+
$ref: '#/components/schemas/ProcessingStatus'
167+
168+
UpscalingTask:
169+
type: object
170+
description: Details of an upscaling task
171+
allOf:
172+
- $ref: "#/components/schemas/UpscalingTaskSummary"
173+
- type: object
174+
properties:
175+
service:
176+
$ref: '#/components/schemas/ServiceDetails'
177+
parameters:
178+
$ref: '#/components/schemas/ServiceParameters'
179+
jobs:
180+
type: array
181+
items:
182+
$ref: '#/components/schemas/ProcessingJob'
183+
184+
185+
186+
Tile:
187+
type: object
188+
description: GeoJSON Feature using coordinates in EPSG:4326
189+
example: { "type": "Feature", "geometry": {}}
190+
191+
ProcessType:
192+
type: string
193+
description: Label indicating that the type of service that is going to be executed.
194+
enum: ['OPENEO', 'OGC_API_PROCESS']
195+
196+
ProcessingStatus:
197+
type: string
198+
description: Status of the processing
199+
enum: ['CREATED', 'RUNNING', 'FINISHED', 'FAILED']
200+
201+
91202
securitySchemes:
92-
petstore_auth:
203+
apex_auth:
93204
type: oauth2
94205
flows:
95-
implicit:
96-
authorizationUrl: https://petstore3.swagger.io/oauth/authorize
206+
authorizationCode:
207+
authorizationUrl: http://auth.apex.esa.int/realms/apex/protocol/openid-connect/auth
208+
tokenUrl: http://auth.apex.esa.int/realms/apex/protocol/openid-connect/token
97209
scopes:
98-
"write:pets": modify pets in your account
99-
"read:pets": read your pets
100-
api_key:
101-
type: apiKey
102-
name: api_key
103-
in: header
210+
openid: OpenID Connect scope
211+
profile: User profile
212+
email: Email address
213+

0 commit comments

Comments
 (0)