forked from eclipse-dataplane-signaling/dataplane-signaling
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsignaling-data-plane-openapi.yaml
More file actions
executable file
·368 lines (355 loc) · 14.2 KB
/
signaling-data-plane-openapi.yaml
File metadata and controls
executable file
·368 lines (355 loc) · 14.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
openapi: 3.1.2
servers:
- url: https://example.com/signaling/v1
info:
description: |-
This specification contains all mandatory and optional endpoints for the [Dataplane Signaling Protocol (DPS)](https://github.com/eclipse-dataplane-signaling/dataplane-signaling/blob/main/docs/signaling.md)
to be implemented by the data-plane.
It is based on OpenAPI 3.1.2 and uses JSON Schema for data modeling.
version: 0.0.1
title: Dataplane Signaling Protocol DPS
license:
name: Apache 2.0
url: 'http://www.apache.org/licenses/LICENSE-2.0.html'
tags:
- name: Data plane endpoints
description: Endpoints that must be implemented by the data plane
externalDocs:
description: Find out more
url: 'https://github.com/eclipse-dataplane-signaling/dataplane-signaling/blob/main/docs/signaling.md#data-plane-endpoint'
- name: Control Plane Registration
description: Control plane registration endpoints, to be implemented by the data plane. Note that these endpoints are OPTIONAL, but either NONE or ALL must be implemented.
paths:
/dataflows/prepare:
post:
tags:
- Data plane endpoints
summary: Prepare a DataFlow
description: |
The `prepare` request signals to the [=Data Plane=] to initialize a [=Data Flow=] and any resources required for
data transfer. The request results in a state machine transition to PREPARING or PREPARED. If the state machine
transitions to PREPARING, the [=Data Plane=] MUST return HTTP 202 Accepted with the `Location` header set to the
[data flow status relative URL](#status) and a message body containing a `DataFlowStatusMessage`. If the state
machine transitions to PREPARED, the [=Data Plane=] MUST return HTTP 200 OK and a `DataFlowStatusMessage`.
operationId: prepareDataFlow
responses:
'200':
description: DataFlow prepared successfully
content:
application/json:
schema:
$ref: 'https://w3id.org/dspace-sig/v1.0/DataFlowStatusMessage.schema.json'
example:
dataplaneId: dataplane-64345
state: PREPARED
'202':
description: Request received, DataFlow preparation in progress
headers:
Location:
description: URL to poll for DataFlow status
schema:
type: string
format: uri
example: /dataflows/flow-1234/status
content:
application/json:
schema:
$ref: 'https://w3id.org/dspace-sig/v1.0/DataFlowStatusMessage.schema.json'
example:
dataplaneId: dataplane-64345
state: PREPARING
'400':
description: Bad Request - invalid input, invalid object state or missing required parameters, supplying the
dataAddress on consumer-pull transfers
requestBody:
description: DataFlow preparation request
required: true
content:
application/json:
schema:
$ref: 'https://w3id.org/dspace-sig/v1.0/DataFlowPrepareMessage.schema.json'
/dataflows/{id}/started:
post:
tags:
- Data plane endpoints
summary: Notify a consumer data plane that a transfer has been started
description: |
The `started` request signals to the consumer [=Data Plane=] that a data transmission has begun. For pull
transfers this indicates the consumer [=Data Plane=] may transmit data. For push transfers this
indicates the provider has already begun sending data. The request results in a state machine transition to
STARTED and the Data Plane MUST return HTTP 200 OK and a `DataFlowStatusMessage`.
operationId: notifyStarted
parameters:
- name: id
in: path
required: true
description: The unique identifier of the data flow to start
schema:
type: string
example: flow-1234
responses:
'200':
description: Signals to a data plane that the data transmission has been started normally.
'400':
description: Bad Request - invalid input, invalid object state or missing required parameters, omitting the
dataAddress on consumer-pull transfers or supplying a dataAddress on provider-push transfers.
'404':
description: Not Found - data flow with specified ID does not exist
requestBody:
description: Notify consumer data plane about started transfer. Required for consumer pull transfers.
required: false
content:
application/json:
schema:
$ref: 'https://w3id.org/dspace-sig/v1.0/DataFlowStartedNotificationMessage.schema.json'
/dataflows/start:
post:
tags:
- Data plane endpoints
summary: Start a DataFlow (provider side)
description: |
The `start` request signals to the [=Data Plane=] to begin a data transfer. The request results in a state
machine transition to STARTING or STARTED. If the state machine transitions to STARTING, the [=Data Plane=] MUST
return HTTP 202 Accepted with the `Location` header set to the [data flow status relative URL](#status) and a
message body containing a `DataFlowStatusMessage`. If the state machine transitions to STARTED, the Data
Plane MUST return HTTP 200 OK and a `DataFlowStatusMessage`.
operationId: startDataFlow
requestBody:
description: DataFlow start request
required: true
content:
application/json:
schema:
$ref: 'https://w3id.org/dspace-sig/v1.0/DataFlowStartMessage.schema.json'
responses:
'200':
description: DataFlow started successfully
content:
application/json:
schema:
$ref: 'https://w3id.org/dspace-sig/v1.0/DataFlowStatusMessage.schema.json'
example:
dataplaneId: dataplane-64345
state: STARTED
dataAddress:
'@type': DataAddress
endpointType: https://23id.org.idsa/v4.1/HTTP
endpoint: https://example.com/api/data
endpointProperties:
- '@type': EndpointProperty
name: authorization
value: 5up3r53cur3t0k3n
- '@type': EndpointProperty
name: authType
value: bearer
'202':
description: Start request received, DataFlow is being started
headers:
Location:
description: The URL to retrieve the data flow status
schema:
type: string
format: uri
example: /dataflows/flow-1234/status
content:
application/json:
schema:
$ref: 'https://w3id.org/dspace-sig/v1.0/DataFlowStatusMessage.schema.json'
example:
example:
dataplaneId: dataplane-64345
state: STARTING
'400':
description: Bad Request - invalid input, invalid object state or missing required parameters, supplying a
dataAddress in consumer-pull transfers or omitting the dataAddress in provider-push transfers
'404':
description: Not Found - data flow with specified ID does not exist
/dataflows/{id}/suspend:
post:
tags:
- Data plane endpoints
summary: Suspend a DataFlow
description: |
The suspend request signals to the data plane to suspend an ongoing data transfer.
operationId: suspendDataFlowById
requestBody:
required: false
content:
application/json:
schema:
$ref: 'https://w3id.org/dspace-sig/v1.0/DataFlowSuspendMessage.schema.json'
parameters:
- name: id
in: path
required: true
description: The unique identifier of the data flow to suspend
schema:
type: string
example: flow-1234
responses:
'200':
description: DataFlow suspended successfully
'400':
description: Bad Request - invalid input, invalid object state or missing required parameters
'404':
description: Not Found - data flow with specified ID does not exist
/dataflows/{id}/resume:
post:
tags:
- Data plane endpoints
summary: Resume a DataFlow
description: |
The suspend request signals to the data plane to resume a suspended data transfer.
operationId: resumeDataFlowById
requestBody:
content:
application/json:
schema:
$ref: 'https://w3id.org/dspace-sig/v1.0/DataFlowResumeMessage.schema.json'
parameters:
- name: id
in: path
required: true
description: The unique identifier of the data flow to resume
schema:
type: string
example: flow-1234
responses:
'200':
description: DataFlow resumed successfully
content:
application/json:
schema:
$ref: 'https://w3id.org/dspace-sig/v1.0/DataFlowStatusMessage.schema.json'
example:
dataplaneId: dataplane-64345
state: STARTED
'400':
description: Bad Request - invalid input, invalid object state or missing required parameters
'404':
description: Not Found - data flow with specified ID does not exist
/dataflows/{id}/terminate:
post:
tags:
- Data plane endpoints
summary: Terminate a DataFlow
description: |
The terminate request signals to the data plane to terminate an ongoing data transfer.
operationId: terminateDataFlowById
requestBody:
required: false
content:
application/json:
schema:
$ref: 'https://w3id.org/dspace-sig/v1.0/DataFlowTerminateMessage.schema.json'
parameters:
- name: id
in: path
required: true
description: The unique identifier of the data flow to terminate
schema:
type: string
example: flow-1234
responses:
'200':
description: DataFlow terminated successfully
'400':
description: Bad Request - invalid input, invalid object state or missing required parameters
'404':
description: Not Found - data flow with specified ID does not exist
/dataflows/{id}/status:
get:
tags:
- Data plane endpoints
summary: Get the status of a DataFlow
description: |
The status endpoint returns a representation of the data flow as managed by the data plane
operationId: getDataFlowStatusById
parameters:
- name: id
in: path
required: true
description: The unique identifier of the data flow to retrieve the status for
schema:
type: string
example: flow-1234
responses:
'200':
description: DataFlow status retrieved successfully
content:
application/json:
schema:
$ref: 'https://w3id.org/dspace-sig/v1.0/DataFlowStatusResponseMessage.schema.json'
example:
dataplaneId: dataplane-64345
state: PREPARING
'400':
description: Bad Request - invalid input, invalid object state or missing required parameters
'404':
description: Not Found - data flow with specified ID does not exist
/dataflows/{id}/completed:
post:
tags:
- Data plane endpoints
summary: Notify the data plane of a completed transfer
description: |
The complete endpoint signals to a data plane that the data transmission has completed normally.
operationId: notifyComplete
parameters:
- name: id
in: path
required: true
description: The unique identifier of the data flow to mark as complete
schema:
type: string
example: flow-1234
responses:
'200':
description: DataFlow successfully marked as completed
'400':
description: Bad Request - invalid input, invalid object state or missing required parameters
'404':
description: Not Found - data flow with specified ID does not exist
/controlplanes:
put:
tags:
- Control Plane Registration
summary: Create or Update a control plane registration
description: |
The registration endpoint is hosted on the data plane, and may be used to create a new control plane or to
update an existing control plane registration, fully replacing the existing one.
operationId: upsertControlplaneRegistration
requestBody:
description: Control plane registration data
required: true
content:
application/json:
schema:
$ref: 'https://w3id.org/dspace-sig/v1.0/ControlPlaneRegistrationMessage.schema.json'
responses:
'200':
description: Control plane registration updated successfully
'400':
description: Bad Request - invalid input, invalid object state or missing required parameters
delete:
tags:
- Control Plane Registration
summary: Delete a control plane registration
operationId: deleteControlplaneRegistration
parameters:
- name: controlplaneId
in: path
required: true
description: The unique identifier of the control plane to delete
schema:
type: string
responses:
'204':
description: Control plane registration deleted successfully
'400':
description: Bad Request - invalid input, invalid object state or missing required parameters
'404':
description: Not Found - data plane with specified ID does not exist
externalDocs:
description: Find out more about Dataplane Signaling Protocol
url: 'https://github.com/eclipse-dataplane-signaling/dataplane-signaling/blob/main/docs/signaling.md'