-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathopenapi-spec.yaml
485 lines (472 loc) · 22.7 KB
/
openapi-spec.yaml
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
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
# openapi: 3.0.0
info:
title: Self Description Creator API
version: 0.1.0
servers:
- url: https://sd-creator.gxfs.gx4fm.org
description: Demonstration server - maintained by msg.
paths:
/federated-catalogue/upload-from-claims:
post:
summary: Creates a sample Verifiable Presentation based on provided Claims and adds it to configured GXFS Federated Catalogue instance.
description: Issuer and Private Key used for creating the Proof are configured on server side.
requestBody:
description: JSON-LD Claims to be placed inside the Verifiable Credential of the resulting Verifiable Presenation.
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/ServiceOfferingClaims'
responses:
"201": # status code
description: In case the Verifiable Presentation has been created and successfully added to the configured GXFS Federated Catalogue instance.
content:
application/json:
schema:
type: object
example: { "status": "success" }
"500": # status code
description: In case an error occurred.
content:
application/json:
schema:
type: object
/federated-catalogue/self-descriptions:
post:
summary: This endpoint is deprecated, please use /federated-catalogue/upload-from-claims instead.
deprecated: true
responses:
"308": # status code
description: Permanent forwarding to /federated-catalogue/upload-from-claims
/vp-from-claims:
post:
summary: Creates a sample Verifiable Presentation based on provided Claims.
description: Issuer and Private Key used to create the Proof are configured on the server side.
requestBody:
description: JSON-LD Claims to be placed inside the Verifiable Credential of the resulting Verifiable Presentation.
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/ServiceOfferingClaims'
responses:
"200": # status code
description: The created Verifiable Presentation.
content:
application/json:
schema:
type: object
"500": # status code
description: In case an error occurred.
content:
application/json:
schema:
type: object
/self-description:
post:
summary: This endpoint is deprecated, please use /vp-from-claims instead.
deprecated: true
responses:
"308": # status code
description: Permanent forwarding to /federated-catalogue/upload-from-claims
/vp-from-vp-without-proof:
post:
summary: Creates a Verifiable Presentation having a proof based on a provided Verifiable Presentation without a proof.
description: Issuer and Private Key used to create the Proof are configured on the server side.
requestBody:
description: Verifiable Presentation in JSON-LD format having no proof.
required: true
content:
application/json:
schema:
type: object
example:
{
"@context": ["https://www.w3.org/2018/credentials/v1"],
"holder": "did:web:compliance.lab.gaia-x.eu",
"id": "http://example.org/presentations/3731",
"type": ["VerifiablePresentation"],
"verifiableCredential":
[
{
"@context":
[
"https://www.w3.org/2018/credentials/v1",
"https://www.w3.org/2018/credentials/examples/v1",
],
"credentialSubject":
{
"@context":
{
"example": "https://github.com/GAIA-X4PLC-AAD/ontology-management/tree/main/examples/example_ontology/",
"openlabel": "https://openlabel.asam.net/V1-0-0/ontologies/",
"sh": "http://www.w3.org/ns/shacl#",
"skos": "http://www.w3.org/2004/02/skos/core#",
"xsd": "http://www.w3.org/2001/XMLSchema#",
},
"@id": "fdfgdfgdf",
"@type": "example:ExampleServiceOffering",
"example:belongs_to": { "@id": "sdfgdfgdfg" },
"example:hasJunctionIntersection":
{ "@id": "serssefr" },
"example:property1":
{ "@type": "xsd:string", "@value": "sdfsdf" },
"example:property2":
{ "@type": "xsd:string", "@value": "svrvgerswv" },
},
"expirationDate": "2022-06-18T12:30:00Z",
"issuanceDate": "2022-01-01T12:30:00Z",
"issuer": "did:web:compliance.lab.gaia-x.eu",
"proof":
{
"created": "2022-01-01T12:30:00Z",
"jws": "eyJiNjQiOmZhbHNlLCJjcml0IjpbImI2NCJdLCJhbGciOiJQUzI1NiJ9..LyowYUxUDtOXur-JsLe_VSEgA9h1ERcHQbuq4Aq3wjrCnb6WIBlm-A1N3P4hVLuxVfWiBK-aNooxynbRAIToQT5sqI3onf6GLjPd53cUOAUnLie7kE7Sd4Vio_Gy085oS9lSc_wIiK6m7ebEownz9UNJuyFJLpKDIkJngZ0RNcsoIl2Ntny9lcXt6B0nDuHbmjfJZZAwqWEaLZTAllI2Fd4vKpOt037PbKDWSF3uk11Zaw5-T48X6E-RqA-fH5VRhKCxK6bpybt7vUfj4tEG0vC5eCou_uolfoCy3YSODcqmK4N2kb6vTDKnRrvIVYJWGrzSTbT9sjpbVeg3eQG3999iGgLWNyYj9k40EuSRfph7i97ODcC-CdkydQFZ_J2HBV6erS3oIPQk_To37Itx2QojK_GgUfiYYG8UQM5suBDKXaog9rYaOl0vP4W7HYqgDQjVVhN4uhhRSmtAD3ICy_Npfy4tccjAWw9_cPZNWY3wdIZpGQPo6yYjLPtRJx5rN1T8ECAQMRT-bnd33M06onzAUu1zDc6v_lyy2dxhtiAQQZH0d_mGVN_uH4_9yL-Tw7WO2B4u-TTICnU1JQ-RJ3gLC0PR9W1ph2EfJf5jYYOkJYYCf-1XQiktuJ9bcpn-OoSqdR5ilh0SWclqA3eu5RjBbI8FRlrgOIVR1UuVHfw",
"proofPurpose": "assertionMethod",
"type": "JsonWebSignature2020",
"verificationMethod": "did:web:compliance.lab.gaia-x.eu",
},
"type": ["VerifiableCredential"],
},
],
}
responses:
"200": # status code
description: The created Verifiable Presentation.
content:
application/json:
schema:
type: object
"500": # status code
description: In case an error occurred.
content:
application/json:
schema:
type: object
/vc-from-claims:
post:
summary: Creates a Verifiable Credential based on provided Claims.
description: Issuer and Private Key used to create the Proof are configured on the server side.
requestBody:
description: JSON-LD Claims to be placed inside the Verifiable Credential.
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/ServiceOfferingClaims'
responses:
"200": # status code
description: The created Verifiable Credential.
content:
application/json:
schema:
type: object
'500': # status code
description: In case an error occurred.
content:
application/json:
schema:
type: object
/vp-from-vcs:
post:
summary: Creates a Verifiable Presentation based on a provided list of Verifiable Credentials.
description: Issuer and Private Key used to create the Proof are configured on the server side.
requestBody:
description: List of Verifiable Credentials to be placed inside the Verifiable Presentation.
required: true
content:
application/json:
schema:
type: object
example:
[
{
"@context":
[
"https://www.w3.org/2018/credentials/v1",
"https://www.w3.org/2018/credentials/examples/v1",
],
"credentialSubject":
{
"@context":
{
"example": "https://github.com/GAIA-X4PLC-AAD/ontology-management/tree/main/examples/example_ontology/",
"openlabel": "https://openlabel.asam.net/V1-0-0/ontologies/",
"sh": "http://www.w3.org/ns/shacl#",
"skos": "http://www.w3.org/2004/02/skos/core#",
"xsd": "http://www.w3.org/2001/XMLSchema#",
},
"@id": "ololololoolollo",
"@type": "example:ExampleServiceOffering",
"example:belongs_to": { "@id": "fghdhdfgrttz" },
"example:hasJunctionIntersection": { "@id": "fxghfhgfh" },
"example:property1":
{ "@type": "xsd:string", "@value": "lololololol" },
"example:property2":
{ "@type": "xsd:string", "@value": "lololloolol" },
},
"expirationDate": "2022-06-18T12:30:00Z",
"issuanceDate": "2022-01-01T12:30:00Z",
"issuer": "did:web:compliance.lab.gaia-x.eu",
"proof":
{
"created": "2022-01-01T12:30:00Z",
"jws": "eyJiNjQiOmZhbHNlLCJjcml0IjpbImI2NCJdLCJhbGciOiJQUzI1NiJ9..gv_mzzc9aoZbbVUpVZ3VDs3AAoLm9n9On5s9YNwBj-XqJx3gl2lJozy1uz22GhaaLJ3J1SQa_-diZFgIfi6TmCLnV78j2Xs61aNknCFhBWrvt_GrqV13dCIhRas1pxnBVLknBrhh-9bFj_b5_zTFGACNfBUsf2n4LnS-gk14JeyDc_T9GGTa1_tDqYljZZLonY9oe6raQ6NUdgNnAOX5KeHyWN7F0NGz4sXfiIsJU_GidjvTa4pyM7mQfpXpgX7paOENSkrWA3dDtlyxsyUmIRyAzGvizifVesQfaYucWKmpgvO2wMi_KmsRQmy2E2Xvb8dVkQ3hPl2BUiJVnNOcC3FyKkrFue-YIvZEKSjuYlX2c-EaK0sg5M0OkE7kd2VBT8Hy_UnM1qqMmHQQj2TaSnkr2T04B4qVLcHQVQ9qDP9JH-8g3BsGdFMZK-Xi_rKp1jk_lItCkd_dBTfFFIbGxMp-ckVr3cA6wsg8bbs8kqc9yU2xfosZkzbbYlJq5Ey3bok84R5NZSQS-YI2IDcjMgx-v2A__LEVtmkktf_yRHiykqxvdDvQmXNThTxOQkeh8_9weFqkmtIaFJHtlFujmRkE1-X790Na92qayG3QKvFZs9Vg2D2EeVq7CLfAeHXS77YFbLNSTme7WW97PMhgBBTBHaQfQUNBVkNYuHZiZ7c",
"proofPurpose": "assertionMethod",
"type": "JsonWebSignature2020",
"verificationMethod": "did:web:compliance.lab.gaia-x.eu",
},
"type": ["VerifiableCredential"],
},
{
"@context":
[
"https://www.w3.org/2018/credentials/v1",
"https://www.w3.org/2018/credentials/examples/v1",
],
"credentialSubject":
{
"@context":
{
"example": "https://github.com/GAIA-X4PLC-AAD/ontology-management/tree/main/examples/example_ontology/",
"openlabel": "https://openlabel.asam.net/V1-0-0/ontologies/",
"sh": "http://www.w3.org/ns/shacl#",
"skos": "http://www.w3.org/2004/02/skos/core#",
"xsd": "http://www.w3.org/2001/XMLSchema#",
},
"@id": "asdfasd",
"@type": "example:ExampleServiceOffering",
"example:belongs_to": { "@id": "fdgfdd" },
"example:hasJunctionIntersection": { "@id": "dfgdg" },
"example:property1":
{ "@type": "xsd:string", "@value": "dfghjt" },
"example:property2":
{ "@type": "xsd:string", "@value": "ththththt" },
},
"expirationDate": "2022-06-18T12:30:00Z",
"issuanceDate": "2022-01-01T12:30:00Z",
"issuer": "did:web:compliance.lab.gaia-x.eu",
"proof":
{
"created": "2022-01-01T12:30:00Z",
"jws": "eyJiNjQiOmZhbHNlLCJjcml0IjpbImI2NCJdLCJhbGciOiJQUzI1NiJ9..ZEsy_Y_psm67lu7Ie48eLqNTCIfCl0L1oYe4XPYCk36C4mRDhyuLI8oQ6EyZ8_AxhYhlV25lLIMZK6wpj3KjHOH3n3mvGW4qLalslly2n_0hal3CN8JZ2wlopCoOGy2-q-Jh6n1u9-glhQSDBzCngSlV0iFvP5IU-mcUDlvoQ52MzqhWtHGxEe40MS0N_GBwFiWmvCCj1PmGZeEyJoRolsIVKKIkvhQ3mEvrjx56-eoebZByUN9JPBzopkGEd7Y5hq4ppDpZEXAPS8a2zhYi0eNHIojkunxgcgD8PZ90IGky0Z8QKgokzXsvkajd8iqT2cki-1kn0I2F_L8B-3bfTqT4W1MuG-2LWDgG7nyOj4wbhkzJ2zL-6obsRMTAxfa4JjcTOoy29_S2GAuwav08kzJpv57ZV5XilCntJh0pR0du4fJxEvgm-0olB6kgFhgugzbnvbHzhYBk8212Mr0f6vuTt3b8cZNj9NgwryGAojqe-4q8dXhYG8GsG_Ou54DcLRbo_17T6QF7DeA6Ud35EyavsmsC7eAeQcjoM5hKYFYFsMfTS1FvZRjUNKnwBcnMKT9BxlXV1uxF8a3AsryEsnhdUwoblNm-bAGk6e-FRRo72nU3psWzbiBxcR-IvvtC6OfXfwvnSLOZ9eOQtCctp1k6RN363jpup3dS4cxscj0",
"proofPurpose": "assertionMethod",
"type": "JsonWebSignature2020",
"verificationMethod": "did:web:compliance.lab.gaia-x.eu",
},
"type": ["VerifiableCredential"],
},
]
responses:
"200": # status code
description: The created Verifiable Presentation.
content:
application/json:
schema:
type: object
"500": # status code
description: In case an error occurred.
content:
application/json:
schema:
type: object
/vp-without-proof-from-vcs:
post:
summary: Creates a Verifiable Presentation having no proof based on a provided list of Verifiable Credentials.
requestBody:
description: List of Verifiable Credentials to be placed inside the Verifiable Presentation.
required: true
content:
application/json:
schema:
type: object
example:
[
{
"@context":
[
"https://www.w3.org/2018/credentials/v1",
"https://www.w3.org/2018/credentials/examples/v1",
],
"credentialSubject":
{
"@context":
{
"example": "https://github.com/GAIA-X4PLC-AAD/ontology-management/tree/main/examples/example_ontology/",
"openlabel": "https://openlabel.asam.net/V1-0-0/ontologies/",
"sh": "http://www.w3.org/ns/shacl#",
"skos": "http://www.w3.org/2004/02/skos/core#",
"xsd": "http://www.w3.org/2001/XMLSchema#",
},
"@id": "ololololoolollo",
"@type": "example:ExampleServiceOffering",
"example:belongs_to": { "@id": "fghdhdfgrttz" },
"example:hasJunctionIntersection": { "@id": "fxghfhgfh" },
"example:property1":
{ "@type": "xsd:string", "@value": "lololololol" },
"example:property2":
{ "@type": "xsd:string", "@value": "lololloolol" },
},
"expirationDate": "2022-06-18T12:30:00Z",
"issuanceDate": "2022-01-01T12:30:00Z",
"issuer": "did:web:compliance.lab.gaia-x.eu",
"proof":
{
"created": "2022-01-01T12:30:00Z",
"jws": "eyJiNjQiOmZhbHNlLCJjcml0IjpbImI2NCJdLCJhbGciOiJQUzI1NiJ9..gv_mzzc9aoZbbVUpVZ3VDs3AAoLm9n9On5s9YNwBj-XqJx3gl2lJozy1uz22GhaaLJ3J1SQa_-diZFgIfi6TmCLnV78j2Xs61aNknCFhBWrvt_GrqV13dCIhRas1pxnBVLknBrhh-9bFj_b5_zTFGACNfBUsf2n4LnS-gk14JeyDc_T9GGTa1_tDqYljZZLonY9oe6raQ6NUdgNnAOX5KeHyWN7F0NGz4sXfiIsJU_GidjvTa4pyM7mQfpXpgX7paOENSkrWA3dDtlyxsyUmIRyAzGvizifVesQfaYucWKmpgvO2wMi_KmsRQmy2E2Xvb8dVkQ3hPl2BUiJVnNOcC3FyKkrFue-YIvZEKSjuYlX2c-EaK0sg5M0OkE7kd2VBT8Hy_UnM1qqMmHQQj2TaSnkr2T04B4qVLcHQVQ9qDP9JH-8g3BsGdFMZK-Xi_rKp1jk_lItCkd_dBTfFFIbGxMp-ckVr3cA6wsg8bbs8kqc9yU2xfosZkzbbYlJq5Ey3bok84R5NZSQS-YI2IDcjMgx-v2A__LEVtmkktf_yRHiykqxvdDvQmXNThTxOQkeh8_9weFqkmtIaFJHtlFujmRkE1-X790Na92qayG3QKvFZs9Vg2D2EeVq7CLfAeHXS77YFbLNSTme7WW97PMhgBBTBHaQfQUNBVkNYuHZiZ7c",
"proofPurpose": "assertionMethod",
"type": "JsonWebSignature2020",
"verificationMethod": "did:web:compliance.lab.gaia-x.eu",
},
"type": ["VerifiableCredential"],
},
{
"@context":
[
"https://www.w3.org/2018/credentials/v1",
"https://www.w3.org/2018/credentials/examples/v1",
],
"credentialSubject":
{
"@context":
{
"example": "https://github.com/GAIA-X4PLC-AAD/ontology-management/tree/main/examples/example_ontology/",
"openlabel": "https://openlabel.asam.net/V1-0-0/ontologies/",
"sh": "http://www.w3.org/ns/shacl#",
"skos": "http://www.w3.org/2004/02/skos/core#",
"xsd": "http://www.w3.org/2001/XMLSchema#",
},
"@id": "asdfasd",
"@type": "example:ExampleServiceOffering",
"example:belongs_to": { "@id": "fdgfdd" },
"example:hasJunctionIntersection": { "@id": "dfgdg" },
"example:property1":
{ "@type": "xsd:string", "@value": "dfghjt" },
"example:property2":
{ "@type": "xsd:string", "@value": "ththththt" },
},
"expirationDate": "2022-06-18T12:30:00Z",
"issuanceDate": "2022-01-01T12:30:00Z",
"issuer": "did:web:compliance.lab.gaia-x.eu",
"proof":
{
"created": "2022-01-01T12:30:00Z",
"jws": "eyJiNjQiOmZhbHNlLCJjcml0IjpbImI2NCJdLCJhbGciOiJQUzI1NiJ9..ZEsy_Y_psm67lu7Ie48eLqNTCIfCl0L1oYe4XPYCk36C4mRDhyuLI8oQ6EyZ8_AxhYhlV25lLIMZK6wpj3KjHOH3n3mvGW4qLalslly2n_0hal3CN8JZ2wlopCoOGy2-q-Jh6n1u9-glhQSDBzCngSlV0iFvP5IU-mcUDlvoQ52MzqhWtHGxEe40MS0N_GBwFiWmvCCj1PmGZeEyJoRolsIVKKIkvhQ3mEvrjx56-eoebZByUN9JPBzopkGEd7Y5hq4ppDpZEXAPS8a2zhYi0eNHIojkunxgcgD8PZ90IGky0Z8QKgokzXsvkajd8iqT2cki-1kn0I2F_L8B-3bfTqT4W1MuG-2LWDgG7nyOj4wbhkzJ2zL-6obsRMTAxfa4JjcTOoy29_S2GAuwav08kzJpv57ZV5XilCntJh0pR0du4fJxEvgm-0olB6kgFhgugzbnvbHzhYBk8212Mr0f6vuTt3b8cZNj9NgwryGAojqe-4q8dXhYG8GsG_Ou54DcLRbo_17T6QF7DeA6Ud35EyavsmsC7eAeQcjoM5hKYFYFsMfTS1FvZRjUNKnwBcnMKT9BxlXV1uxF8a3AsryEsnhdUwoblNm-bAGk6e-FRRo72nU3psWzbiBxcR-IvvtC6OfXfwvnSLOZ9eOQtCctp1k6RN363jpup3dS4cxscj0",
"proofPurpose": "assertionMethod",
"type": "JsonWebSignature2020",
"verificationMethod": "did:web:compliance.lab.gaia-x.eu",
},
"type": ["VerifiableCredential"],
},
]
responses:
"200": # status code
description: The created Verifiable Presentation without proof object.
content:
application/json:
schema:
type: object
"500": # status code
description: In case an error occurred.
content:
application/json:
schema:
type: object
/id-documents:
get:
summary: Get a list of UUIDs of the stored did documents
responses:
"200": # status code
description: The created List.
content:
application/json:
schema:
type: object
"500": # status code
description: In case an error occurred.
content:
application/json:
schema:
type: object
/id-documents/{request_uuid}/did.json:
get:
summary: Get DID document by UUID
description: Issuer and Private Key used to create the Proof are configured on the server side.
parameters:
- in: path
name: request_uuid
required: true
description: UUID of the DID document to retrieve
schema:
type: string
responses:
"200": # status code
description: The created Verifiable Presentation.
content:
application/json:
schema:
type: object
"500": # status code
description: In case an error occurred.
content:
application/json:
schema:
type: object
components:
schemas:
ServiceOfferingClaims:
type: object
properties:
id:
type: string
format: uri
description: The identifier of the service offering.
example: "https://gaia-x.eu/.well-known/service1.json"
type:
type: string
description: The type of service offering.
example: "gx:ServiceOffering"
providedBy:
$ref: "#/components/schemas/Participant"
policy:
type: string
description: The policy associated with the service offering.
example: ""
termsAndConditions:
$ref: "#/components/schemas/TermsAndConditions"
dataAccountExport:
$ref: "#/components/schemas/DataAccountExport"
Participant:
type: object
properties:
id:
type: string
format: uri
description: The identifier of the participant.
example: "https://gaia-x.eu/.well-known/participant.json"
TermsAndConditions:
type: object
properties:
URL:
type: string
format: uri
description: The URL to the terms and conditions.
example: "http://termsandconds.com"
hash:
type: string
description: The hash value of the terms and conditions.
example: "d8402a23de560f5ab34b22d1a142feb9e13b3143"
DataAccountExport:
type: object
properties:
requestType:
type: string
description: The type of request for data account export.
example: "API"
accessType:
type: string
description: The type of access for data account export.
example: "digital"
formatType:
type: string
description: The format type for data account export.
example: "application/json"