-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathswagger.yaml
819 lines (769 loc) · 27 KB
/
swagger.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
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
openapi: 3.0.3
info:
title: METACALL
description: Api for Metacall Faas
version: 0.0.1
servers:
- url: 'https://{serverURL}/'
variables:
serverURL:
default: dashboard.metacall.io
paths:
/api/billing/list-subscriptions:
get:
summary: Retrieve information about this service
description: >-
gives you a list of the subscription available
operationId: GetSubscriptionsList
security:
- JwtAuth: []
responses:
'200':
$ref: '#/components/responses/200ServiceInfo'
'500':
$ref: '#/components/responses/500InternalServerError'
tags:
- Billing
/api/account/refresh-token:
get:
summary: Retrieve information about this service
description: >-
updates the auth token
operationId: GetRefreshToken
security:
- JwtAuth: []
responses:
'200':
$ref: '#/components/responses/200ServiceInfo'
'500':
$ref: '#/components/responses/500InternalServerError'
tags:
- Auth
/validate:
get:
summary: Retrieve information about this service
description: >-
validates the auth token
operationId: ValidateToken
security:
- JwtAuth: []
responses:
'200':
$ref: '#/components/responses/200ServiceInfo'
'500':
$ref: '#/components/responses/500InternalServerError'
tags:
- Auth
/api/account/deploy-enabled:
get:
summary: Retrieve information about this service
description: >-
checks if you're able to deploy
operationId: DeployEnabled
security:
- JwtAuth: []
responses:
'200':
$ref: '#/components/responses/200ServiceInfo'
'500':
$ref: '#/components/responses/500InternalServerError'
tags:
- Account
/api/inspect:
get:
summary: Retrieve information about this service
description: >-
gives you are deploys with it's endpoints
operationId: Inspect
security:
- JwtAuth: []
responses:
'200':
$ref: '#/components/responses/200ServiceInfo'
'500':
$ref: '#/components/responses/500InternalServerError'
tags:
- Account
/api/package/create:
post:
summary: Retrieve information about this service
description: >-
deploys the previously uploaded zip into the faas
operationId: UploadPackage
security:
- JwtAuth: []
requestBody:
$ref: '#/components/requestBodies/UploadZip'
responses:
'200':
$ref: '#/components/responses/200ServiceInfo'
'500':
$ref: '#/components/responses/500InternalServerError'
tags:
- Packages
/api/deploy/add:
post:
summary: Retrieve information about this service
description: >-
deploys the previously uploaded zip into the faas
operationId: AddRepo
requestBody:
$ref: '#/components/requestBodies/AddRepo'
security:
- JwtAuth: []
responses:
'200':
$ref: '#/components/responses/200ServiceInfo'
'500':
$ref: '#/components/responses/500InternalServerError'
tags:
- Deployments
/api/deploy/create:
post:
summary: Retrieve information about this service
description: >-
deploys the previously uploaded zip into the faas
operationId: CreateDeploy
requestBody:
$ref: '#/components/requestBodies/CreateDeployment'
security:
- JwtAuth: []
responses:
'200':
$ref: '#/components/responses/200ServiceInfo'
'500':
$ref: '#/components/responses/500InternalServerError'
tags:
- Deployments
/api/deploy/delete:
post:
summary: Retrieve information about this service
description: >-
deletes the deploy and the zip
operationId: DeleteDeploy
security:
- JwtAuth: []
requestBody:
$ref: '#/components/requestBodies/DeployDelete'
responses:
'200':
$ref: '#/components/responses/200ServiceInfo'
'500':
$ref: '#/components/responses/500InternalServerError'
tags:
- Deployments
components:
securitySchemes:
JwtAuth:
type: apiKey
name: Authorization
in: header
description: >-
A valid refresh token must be passed in Authorization header as 'jwt ' + token
schemas:
Service:
description: GA4GH service
type: object
required:
- id
- name
- type
- organization
- version
properties:
id:
type: string
description: >-
Unique ID of this service. Reverse domain name notation is
recommended, though not required. The identifier should attempt to
be globally unique so it can be used in downstream aggregator
services e.g. Service Registry.
example: org.ga4gh.myservice
name:
type: string
description: Name of this service. Should be human readable.
example: My project
description:
type: string
description: >-
Description of the service. Should be human readable and provide
information about the service.
example: This service provides...
organization:
type: object
description: Organization providing the service
required:
- name
- url
properties:
name:
type: string
description: Name of the organization responsible for the service
example: My organization
url:
type: string
format: uri
description: URL of the website of the organization (RFC 3986 format)
example: 'https://example.com'
contactUrl:
type: string
format: uri
description: >-
URL of the contact for the provider of this service, e.g. a link to
a contact form (RFC 3986 format), or an email (RFC 2368 format).
example: 'mailto:[email protected]'
documentationUrl:
type: string
format: uri
description: >-
URL of the documentation of this service (RFC 3986 format). This
should help someone learn how to use your service, including any
specifics required to access data, e.g. authentication.
example: 'https://docs.myservice.example.com'
createdAt:
type: string
format: date-time
description: >-
Timestamp describing when the service was first deployed and
available (RFC 3339 format)
example: '2019-06-04T12:58:19Z'
updatedAt:
type: string
format: date-time
description: >-
Timestamp describing when the service was last updated (RFC 3339
format)
example: '2019-06-04T12:58:19Z'
environment:
type: string
description: >-
Environment the service is running in. Use this to distinguish
between production, development and testing/staging deployments.
Suggested values are prod, test, dev, staging. However this is
advised and not enforced.
example: test
version:
type: string
description: >-
Version of the service being described. Semantic versioning is
recommended, but other identifiers, such as dates or commit hashes,
are also allowed. The version should be changed whenever the service
is updated.
example: 1.0.0
DrsService:
type: object
required:
- type
properties:
type:
type: object
required:
- artifact
properties:
artifact:
type: string
enum:
- drs
example: drs
Error:
type: object
description: An object that can optionally include information about the error.
properties:
msg:
type: string
description: A detailed error message.
status_code:
type: integer
description: 'The integer representing the HTTP status code (e.g. 200, 404).'
Checksum:
type: object
required:
- checksum
- type
properties:
checksum:
type: string
description: The hex-string encoded checksum for the data
type:
type: string
description: >-
The digest method used to create the checksum.
The value (e.g. `sha-256`) SHOULD be listed as `Hash Name String` in
the
https://www.iana.org/assignments/named-information/named-information.xhtml#hash-alg[IANA
Named Information Hash Algorithm Registry]. Other values MAY be
used, as long as implementors are aware of the issues discussed in
https://tools.ietf.org/html/rfc6920#section-9.4[RFC6920].
GA4GH may provide more explicit guidance for use of
non-IANA-registered algorithms in the future. Until then, if
implementors do choose such an algorithm (e.g. because it's
implemented by their storage provider), they SHOULD use an existing
standard `type` value such as `md5`, `etag`, `crc32c`, `trunc512`,
or `sha1`.
example: sha-256
AccessURL:
type: object
required:
- url
properties:
url:
type: string
description: >-
A fully resolvable URL that can be used to fetch the actual object
bytes.
headers:
type: array
items:
type: string
description: >-
An optional list of headers to include in the HTTP request to `url`.
These headers can be used to provide auth tokens required to fetch
the object bytes.
example: 'Authorization: Basic Z2E0Z2g6ZHJz'
AccessMethod:
type: object
required:
- type
properties:
type:
type: string
enum:
- s3
- gs
- ftp
- gsiftp
- globus
- htsget
- https
- file
description: Type of the access method.
access_url:
$ref: '#/components/schemas/AccessURL'
description: >-
An `AccessURL` that can be used to fetch the actual object bytes.
Note that at least one of `access_url` and `access_id` must be
provided.
access_id:
type: string
description: >-
An arbitrary string to be passed to the `/access` method to get an
`AccessURL`. This string must be unique within the scope of a single
object. Note that at least one of `access_url` and `access_id` must
be provided.
region:
type: string
description: >-
Name of the region in the cloud service provider that the object
belongs to.
example: us-east-1
ContentsObject:
type: object
required:
- name
properties:
name:
type: string
description: >-
A name declared by the bundle author that must be used when
materialising this object, overriding any name directly associated
with the object itself. The name must be unique with the containing
bundle. This string is made up of uppercase and lowercase letters,
decimal digits, hypen, period, and underscore [A-Za-z0-9.-_]. See
http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap03.html#tag_03_282[portable
filenames].
id:
type: string
description: >-
A DRS identifier of a `DrsObject` (either a single blob or a nested
bundle). If this ContentsObject is an object within a nested bundle,
then the id is optional. Otherwise, the id is required.
drs_uri:
type: array
description: >-
A list of full DRS identifier URI paths that may be used to obtain
the object. These URIs may be external to this DRS instance.
example: 'drs://drs.example.org/314159'
items:
type: string
contents:
type: array
description: >-
If this ContentsObject describes a nested bundle and the caller
specified "?expand=true" on the request, then this contents array
must be present and describe the objects within the nested bundle.
items:
$ref: '#/components/schemas/ContentsObject'
DrsObject:
type: object
required:
- id
- self_uri
- size
- created_time
- checksums
properties:
id:
type: string
description: An identifier unique to this `DrsObject`
name:
type: string
description: >-
A string that can be used to name a `DrsObject`.
This string is made up of uppercase and lowercase letters, decimal
digits, hypen, period, and underscore [A-Za-z0-9.-_]. See
http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap03.html#tag_03_282[portable
filenames].
self_uri:
type: string
description: >-
A drs:// hostname-based URI, as defined in the DRS documentation,
that tells clients how to access this object.
The intent of this field is to make DRS objects self-contained, and
therefore easier for clients to store and pass around. For example,
if you arrive at this DRS JSON by resolving a compact
identifier-based DRS URI, the `self_uri` presents you with a
hostname and properly encoded DRS ID for use in subsequent `access`
endpoint calls.
example: 'drs://drs.example.org/314159'
size:
type: integer
format: int64
description: >-
For blobs, the blob size in bytes.
For bundles, the cumulative size, in bytes, of items in the
`contents` field.
created_time:
type: string
format: date-time
description: >-
Timestamp of content creation in RFC3339.
(This is the creation time of the underlying content, not of the
JSON object.)
updated_time:
type: string
format: date-time
description: >-
Timestamp of content update in RFC3339, identical to `created_time`
in systems that do not support updates. (This is the update time of
the underlying content, not of the JSON object.)
version:
type: string
description: >-
A string representing a version.
(Some systems may use checksum, a RFC3339 timestamp, or an
incrementing version number.)
mime_type:
type: string
description: A string providing the mime-type of the `DrsObject`.
example: application/json
checksums:
type: array
minItems: 1
items:
$ref: '#/components/schemas/Checksum'
description: >-
The checksum of the `DrsObject`. At least one checksum must be
provided.
For blobs, the checksum is computed over the bytes in the blob.
For bundles, the checksum is computed over a sorted concatenation of
the checksums of its top-level contained objects (not recursive,
names not included). The list of checksums is sorted alphabetically
(hex-code) before concatenation and a further checksum is performed
on the concatenated checksum value.
For example, if a bundle contains blobs with the following
checksums:
md5(blob1) = 72794b6d
md5(blob2) = 5e089d29
Then the checksum of the bundle is:
md5( concat( sort( md5(blob1), md5(blob2) ) ) )
= md5( concat( sort( 72794b6d, 5e089d29 ) ) )
= md5( concat( 5e089d29, 72794b6d ) )
= md5( 5e089d2972794b6d )
= f7a29a04
access_methods:
type: array
minItems: 1
items:
$ref: '#/components/schemas/AccessMethod'
description: >-
The list of access methods that can be used to fetch the
`DrsObject`.
Required for single blobs; optional for bundles.
contents:
type: array
description: >-
If not set, this `DrsObject` is a single blob.
If set, this `DrsObject` is a bundle containing the listed
`ContentsObject` s (some of which may be further nested).
items:
$ref: '#/components/schemas/ContentsObject'
description:
type: string
description: A human readable description of the `DrsObject`.
aliases:
type: array
items:
type: string
description: >-
A list of strings that can be used to find other metadata about this
`DrsObject` from external metadata sources. These aliases can be
used to represent secondary accession numbers or external GUIDs.
responses:
200ServiceInfo:
description: Retrieve info about the DRS service
content:
application/json:
schema:
allOf:
- $ref: '#/components/schemas/Service'
- $ref: '#/components/schemas/DrsService'
500InternalServerError:
description: An unexpected error occurred.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
200OkDrsObject:
description: The `DrsObject` was found successfully
content:
application/json:
schema:
$ref: '#/components/schemas/DrsObject'
202Accepted:
description: >
The operation is delayed and will continue asynchronously. The client
should retry this same request after the delay specified by Retry-After
header.
headers:
Retry-After:
description: >
Delay in seconds. The client should retry this same request after
waiting for this duration. To simplify client response processing,
this must be an integral relative time in seconds. This value SHOULD
represent the minimum duration the client should wait before
attempting the operation again with a reasonable expectation of
success. When it is not feasible for the server to determine the
actual expected delay, the server may return a brief, fixed value
instead.
schema:
type: integer
format: int64
400BadRequest:
description: The request is malformed.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
401Unauthorized:
description: The request is unauthorized.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
403Forbidden:
description: The requester is not authorized to perform this action.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
404NotFoundDrsObject:
description: The requested `DrsObject` wasn't found.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
200OkAccess:
description: The `AccessURL` was found successfully
content:
application/json:
schema:
$ref: '#/components/schemas/AccessURL'
404NotFoundAccess:
description: The requested `AccessURL` wasn't found.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
parameters:
uploadZip:
in: path
name: object_id
required: true
description: '`DrsObject` identifier'
schema:
type: string
ObjectId:
in: path
name: object_id
required: true
description: '`DrsObject` identifier'
schema:
type: string
Expand:
in: query
name: expand
schema:
type: boolean
example: false
description: >-
If false and the object_id refers to a bundle, then the ContentsObject
array contains only those objects directly contained in the bundle. That
is, if the bundle contains other bundles, those other bundles are not
recursively included in the result.
If true and the object_id refers to a bundle, then the entire set of
objects in the bundle is expanded. That is, if the bundle contains
aother bundles, then those other bundles are recursively expanded and
included in the result. Recursion continues through the entire sub-tree
of the bundle.
If the object_id refers to a blob, then the query parameter is ignored.
AccessId:
in: path
name: access_id
required: true
description: An `access_id` from the `access_methods` list of a `DrsObject`
schema:
type: string
requestBodies:
UploadZip:
required: true
content:
multipart/form-data:
schema:
type: object
properties:
id:
type: string
description: 'Name'
type:
type: string
default: 'application/x-zip-compressed'
description: 'application/x-zip-compressed'
jsons:
type: string
description: 'MetaCall JSONS'
runners:
type: string
raw:
type: string
format: binary
DeployDelete:
required: true
content:
application/json:
schema:
type: object
properties:
prefix:
type: string
description: 'Name'
suffix:
type: string
description: 'Suffix'
version:
type: string
description: 'Version'
default: 'v1'
AddRepo:
content:
application/json:
schema:
type: object
properties:
url:
type: string
description: 'Url of Repository'
branch:
type: string
description: 'Name of the branch'
jsons:
type: array
items:
$ref: '#/definitions/MetaCallJSON'
required:
- url
- branch
CreateDeployment:
required: true
content:
application/json:
schema:
type: object
properties:
resourceType:
type: string
description: 'Package'
default: 'Package'
suffix:
type: string
description: 'Name of package'
release:
type: string
description: 'Default set to current date in hexadecimal form'
version:
type: string
description: 'Version'
default: 'v1'
PostObjectBody:
required: true
content:
application/json:
schema:
type: object
properties:
expand:
type: boolean
example: false
description: >-
If false and the object_id refers to a bundle, then the
ContentsObject array contains only those objects directly
contained in the bundle. That is, if the bundle contains other
bundles, those other bundles are not recursively included in
the result.
If true and the object_id refers to a bundle, then the entire
set of objects in the bundle is expanded. That is, if the
bundle contains aother bundles, then those other bundles are
recursively expanded and included in the result. Recursion
continues through the entire sub-tree of the bundle.
If the object_id refers to a blob, then the query parameter is
ignored.
passports:
type: array
items:
type: string
example: >-
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJnYTRnaF9wYXNzcG9ydF92MSI6W119.JJ5rN0ktP0qwyZmIPpxmF_p7JsxAZH6L6brUxtad3CM
description: >-
the encoded JWT GA4GH Passport that contains embedded Visas.
The overall JWT is signed as are the individual Passport
Visas.
Passports:
required: true
content:
application/json:
schema:
type: object
properties:
passports:
type: array
items:
type: string
example: >-
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJnYTRnaF9wYXNzcG9ydF92MSI6W119.JJ5rN0ktP0qwyZmIPpxmF_p7JsxAZH6L6brUxtad3CM
description: >-
the encoded JWT GA4GH Passport that contains embedded Visas.
The overall JWT is signed as are the individual Passport
Visas.
definitions:
MetaCallJSON:
properties:
language_id:
type: string
enum: ['node','ts','rb','py','cs','cob''file','rpc']
description: "Language id"
path:
type: string
script:
schema:
type: array
items:
type: string