-
Notifications
You must be signed in to change notification settings - Fork 1
/
openapi.yml
2954 lines (2814 loc) · 77.9 KB
/
openapi.yml
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
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
openapi: 3.0.2
info:
title: ToolForge API
description: ToolForge is the self-serve tools platform for teams
contact:
email: api@toolforge.io
version: 0.0.42
servers:
- url: https://api.toolforge.io/v1
tags:
- name: account
description: Endpoints for manipulating accounts
- name: apiKey
description: Endpoints for manipulating API keys
- name: container
description: Endpoints for manipulating containers
- name: docker
description: Endpoints for managing Docker integration
- name: workspace
description: Endpoints for manipulating workspaces
- name: execution
description: Endpoints for manipulating executions
- name: secret
description: Endpoints for manipulating secrets
- name: tool
description: Endpoints for manipulating tools
paths:
/accounts:
get:
tags:
- account
summary: List accounts
description: List accounts one page at a time
operationId: listAccounts
parameters:
- name: q
in: query
description: A prefix query to filter accounts
schema:
type: string
format: PrefixQuery
example: bbaggins
- name: limit
in: query
description: The maximum number of accounts to return per page
schema:
type: integer
format: int32
minimum: 0
maximum: 100
default: 10
- name: cursor
in: query
description: The pagination cursor
schema:
type: string
format: AccountCursor
- name: order
in: query
description: The order in which records are returned
schema:
$ref: '#/components/schemas/AccountListOrdering'
responses:
200:
description: The user list was returned successfully
content:
application/json:
schema:
$ref: '#/components/schemas/AccountPage'
/accounts/{accountReference}:
parameters:
- name: accountReference
in: path
description: The ID of the account to retrieve, or "me"
required: true
schema:
type: string
format: AccountReference
get:
tags:
- account
summary: Get account
description: Get one account
operationId: getAccount
responses:
200:
description: The user was returned successfully
content:
application/json:
schema:
$ref: '#/components/schemas/Account'
404:
$ref: '#/components/responses/NotFound'
/accounts/{accountReference}/apiKeys:
parameters:
- name: accountReference
in: path
description: The ID of the account to retrieve, or "me"
required: true
schema:
type: string
format: AccountReference
get:
tags:
- account
- apiKey
summary: List account's API keys
description: List one account's API keys one page at a time. Users can only retrieve their own API keys.
operationId: listAccountApiKeys
parameters:
- name: limit
in: query
description: The maximum number of API keys to return per page
schema:
type: integer
format: int32
default: 10
minimum: 0
maximum: 10
- name: cursor
in: query
description: The pagination cursor
schema:
type: string
format: ApiKeyCursor
responses:
200:
description: The API keys were returned successfully
content:
application/json:
schema:
$ref: '#/components/schemas/ApiKeyPage'
403:
$ref: '#/components/responses/Forbidden'
post:
tags:
- account
- apiKey
summary: Create API key
description: Create a new API key for the given account. Users can only create new API keys for their own accounts. Each account can have up to 10 API keys.
operationId: createAccountApiKey
requestBody:
content:
'application/json':
schema:
$ref: '#/components/schemas/ApiKeyDefinition'
responses:
200:
description: The API key was created successfully
content:
application/json:
schema:
$ref: '#/components/schemas/NewApiKey'
403:
$ref: '#/components/responses/Forbidden'
409:
$ref: '#/components/responses/Conflict'
/accounts/{accountReference}/apiKeys/{apiKeyId}:
parameters:
- name: accountReference
in: path
description: The ID of the account to retrieve, or "me"
required: true
schema:
type: string
format: AccountReference
- name: apiKeyId
in: path
description: The ID of the API key to retrieve
required: true
schema:
type: string
format: ApiKeyId
get:
tags:
- account
- apiKey
summary: Get API key
description: Get one API key. Users can only retrieve API keys for their own accounts.
operationId: getAccountApiKey
responses:
200:
description: The API key was returned successfully
content:
application/json:
schema:
$ref: '#/components/schemas/ApiKey'
403:
$ref: '#/components/responses/Forbidden'
404:
$ref: '#/components/responses/NotFound'
delete:
tags:
- account
- apiKey
summary: Delete API key
description: Delete an API key from the given account. Users can only delete API keys from their own accounts.
operationId: deleteAccountApiKey
responses:
204:
description: The API key was deleted successfully
403:
$ref: '#/components/responses/Forbidden'
/accounts/by/id/{accountId}:
parameters:
- name: accountId
in: path
description: The ID of the account to retrieve
required: true
schema:
type: string
format: AccountId
get:
tags:
- account
summary: Get account by ID
description: Get one account by ID
operationId: getAccountById
responses:
200:
description: The user was returned successfully
content:
application/json:
schema:
$ref: '#/components/schemas/Account'
404:
$ref: '#/components/responses/NotFound'
/accounts/by/username/{username}:
parameters:
- name: username
in: path
description: The username of the account to retrieve
required: true
schema:
type: string
format: Username
get:
tags:
- account
summary: Get account by username
description: Get one account by username
operationId: getAccountByUsername
responses:
200:
description: The user was returned successfully
content:
application/json:
schema:
$ref: '#/components/schemas/Account'
404:
$ref: '#/components/responses/NotFound'
/accounts/{accountReference}/picture:
parameters:
- name: accountReference
in: path
description: The ID of the account to retrieve, or "me"
required: true
schema:
type: string
format: AccountReference
get:
tags:
- account
summary: Get account profile picture
description: Get one account's profile picture
operationId: getAccountPicture
responses:
200:
description: The user was returned successfully
content:
image/jpeg:
schema:
type: string
format: binary
404:
$ref: '#/components/responses/NotFound'
/containers:
get:
tags:
- container
summary: List containers
description: List one page of containers
operationId: listContainers
parameters:
- name: q
in: query
description: A keyword query to filter containers
schema:
type: string
format: KeywordQuery
example: twitter account
- name: owner
in: query
description: A reference to the container owner
schema:
type: string
format: AccountReference
example: me
- name: limit
in: query
description: The maximum number of containers to return per page
schema:
type: integer
format: int32
default: 10
minimum: 0
maximum: 100
- name: cursor
in: query
description: The pagination cursor
schema:
type: string
format: ContainerCursor
responses:
200:
description: The list of containers was returned successfully.
content:
application/json:
schema:
$ref: '#/components/schemas/ContainerPage'
post:
tags:
- container
summary: Create container
description: Create a new container
operationId: createContainer
requestBody:
content:
'application/json':
schema:
$ref: '#/components/schemas/ContainerDefinition'
responses:
200:
description: The container was created successfully
content:
application/json:
schema:
$ref: '#/components/schemas/Container'
403:
$ref: '#/components/responses/Forbidden'
409:
$ref: '#/components/responses/Conflict'
/containers/by/owner/{owner}/slug/{slug}:
parameters:
- name: owner
in: path
required: true
description: The container's owner
schema:
type: string
format: AccountReference
example: me
- name: slug
in: path
required: true
description: The slug of the container to get
schema:
type: string
format: ContainerSlug
example: container-slug
get:
tags:
- container
summary: Get container by owner's username and slug
description: Get metadata about one container
operationId: findContainerByOwnerSlug
responses:
200:
description: The container was found successfully.
content:
application/json:
schema:
$ref: '#/components/schemas/Container'
403:
$ref: '#/components/responses/Forbidden'
404:
$ref: '#/components/responses/NotFound'
/containers/{containerId}:
parameters:
- $ref: '#/components/parameters/containerId'
get:
tags:
- container
summary: Get container
description: Get metadata about one container
operationId: getContainer
responses:
200:
description: The container was found successfully.
content:
application/json:
schema:
$ref: '#/components/schemas/Container'
403:
$ref: '#/components/responses/Forbidden'
404:
$ref: '#/components/responses/NotFound'
patch:
tags:
- container
summary: Update container
description: Update metadata about one container
operationId: updateContainer
requestBody:
content:
'application/json':
schema:
$ref: '#/components/schemas/ContainerUpdate'
responses:
200:
description: The container was updated successfully.
content:
application/json:
schema:
$ref: '#/components/schemas/Container'
403:
$ref: '#/components/responses/Forbidden'
404:
$ref: '#/components/responses/NotFound'
409:
$ref: '#/components/responses/Conflict'
/containers/{containerId}/install:
parameters:
- $ref: '#/components/parameters/containerId'
post:
tags:
- container
summary: Install current version of container
description: Installs the current version of the given container into client's environment
operationId: installContainer
requestBody:
content:
'application/json':
schema:
$ref: '#/components/schemas/ContainerInstallation'
responses:
200:
description: The container was installed successfully.
content:
application/json:
schema:
$ref: '#/components/schemas/InstalledContainer'
403:
$ref: '#/components/responses/Forbidden'
404:
$ref: '#/components/responses/NotFound'
409:
$ref: '#/components/responses/Conflict'
/containers/{containerId}/transfer:
parameters:
- $ref: '#/components/parameters/containerId'
post:
tags:
- container
summary: Transfer container ownership
description: Assign ownership of this container to another user
operationId: transferContainer
requestBody:
content:
'application/json':
schema:
$ref: '#/components/schemas/ContainerTransfer'
responses:
200:
description: The container was installed successfully.
content:
application/json:
schema:
$ref: '#/components/schemas/Container'
403:
$ref: '#/components/responses/Forbidden'
404:
$ref: '#/components/responses/NotFound'
409:
$ref: '#/components/responses/Conflict'
/containers/{containerId}/logs/push:
parameters:
- $ref: '#/components/parameters/containerId'
get:
tags:
- container
summary: Get push logs
description: Get the most recent docker push log entries for this container
operationId: getContainerPushLogs
responses:
200:
description: The tool was found successfully.
content:
application/json:
schema:
$ref: '#/components/schemas/ContainerVersionPushLogEntries'
403:
$ref: '#/components/responses/Forbidden'
404:
$ref: '#/components/responses/NotFound'
/containers/{containerId}/validate/manifest:
parameters:
- $ref: '#/components/parameters/containerId'
post:
tags:
- container
summary: Validate container manifest
description: Analyze candidate container manifest for errors
operationId: validateContainerManifest
requestBody:
content:
'application/yaml':
schema:
$ref: '#/components/schemas/Manifest'
responses:
204:
description: The manifest validated successfully
403:
$ref: '#/components/responses/Forbidden'
404:
$ref: '#/components/responses/NotFound'
422:
$ref: '#/components/responses/UnprocessableEntity'
/containers/{containerId}/versions:
parameters:
- $ref: '#/components/parameters/containerId'
get:
tags:
- container
summary: List container versions
description: List one page of versions of the given container. Container versions are sorted by creation time, descending.
operationId: listContainerVersions
parameters:
- name: limit
in: query
description: The maximum number of versions to return per page
schema:
type: integer
format: int32
default: 10
- name: cursor
in: query
description: The pagination cursor
schema:
type: string
format: ContainerVersionCursor
responses:
200:
description: The tool was found successfully.
content:
application/json:
schema:
$ref: '#/components/schemas/ContainerVersionPage'
403:
$ref: '#/components/responses/Forbidden'
404:
$ref: '#/components/responses/NotFound'
/containers/{containerId}/versions/{containerVersion}:
parameters:
- $ref: '#/components/parameters/containerId'
- $ref: '#/components/parameters/containerVersion'
get:
tags:
- container
summary: Get container version
description: Get metadata about one version of one container
operationId: getContainerVersion
responses:
200:
description: The container version was found successfully.
content:
application/json:
schema:
$ref: '#/components/schemas/ContainerVersion'
403:
$ref: '#/components/responses/Forbidden'
404:
$ref: '#/components/responses/NotFound'
/containers/{containerId}/versions/{containerVersion}/release:
parameters:
- $ref: '#/components/parameters/containerId'
- $ref: '#/components/parameters/containerVersion'
post:
tags:
- container
summary: Release container version
description: Sets the given container's current version to the given version
operationId: releaseContainerVersion
responses:
200:
description: The container version was released successfully.
content:
application/json:
schema:
$ref: '#/components/schemas/ContainerVersion'
400:
$ref: '#/components/responses/BadRequest'
403:
$ref: '#/components/responses/Forbidden'
404:
$ref: '#/components/responses/NotFound'
/containers/{containerId}/versions/{containerVersion}/deprecate:
parameters:
- $ref: '#/components/parameters/containerId'
- $ref: '#/components/parameters/containerVersion'
post:
tags:
- container
summary: Deprecate container version
description: Deprecates the given version of the given tool.
operationId: deprecateContainerVersion
responses:
200:
description: The container version was deprecated successfully.
content:
application/json:
schema:
$ref: '#/components/schemas/ContainerVersion'
400:
$ref: '#/components/responses/BadRequest'
403:
$ref: '#/components/responses/Forbidden'
404:
$ref: '#/components/responses/NotFound'
/docker/otp:
post:
tags:
- docker
summary: Get one-time password for docker
description: Get a one-time password to use for docker login. Valid for 5 minutes.
operationId: getDockerOneTimePassword
responses:
200:
description: The one-time password was created successfully.
content:
'application/json':
schema:
$ref: '#/components/schemas/DockerPassword'
403:
$ref: '#/components/responses/Forbidden'
/workspaces:
get:
tags:
- workspace
summary: List workspaces
description: Get one page of workspaces
operationId: listWorkspaces
parameters:
- name: q
in: query
description: A keyword query for filtering workspaces
schema:
type: string
format: KeywordQuery
example: service name
- name: owner
in: query
description: The owner of the workspaces to return
schema:
type: string
format: AccountReference
example: me
- name: limit
in: query
description: The maximum number of executions to return per page
schema:
type: integer
format: int32
default: 10
minimum: 0
maximum: 100
- name: cursor
in: query
description: The pagination cursor
schema:
type: string
format: WorkspaceCursor
responses:
200:
description: The workspaces were retrieved successfully
content:
'application/json':
schema:
$ref: '#/components/schemas/WorkspacePage'
/workspaces/{workspaceId}:
parameters:
- $ref: '#/components/parameters/workspaceId'
get:
tags:
- workspace
summary: Get workspace
description: Get one workspace
operationId: getWorkspace
responses:
200:
description: The workspace astrieved successfully
content:
'application/json':
schema:
$ref: '#/components/schemas/Workspace'
404:
$ref: '#/components/responses/NotFound'
/workspaces/{workspaceId}/secrets:
parameters:
- $ref: '#/components/parameters/workspaceId'
post:
tags:
- workspace
- secret
summary: Create workspace secret
description: Create a new secret in the given workspace
operationId: createWorkspaceSecret
requestBody:
content:
'application/json':
schema:
$ref: '#/components/schemas/SecretDefinition'
responses:
200:
description: The secret was created successfully.
content:
application/json:
schema:
$ref: '#/components/schemas/Secret'
403:
$ref: '#/components/responses/Forbidden'
409:
$ref: '#/components/responses/Conflict'
get:
tags:
- workspace
- secret
summary: List workspace secrets
description: List one page of secrets in the given workspace
operationId: listWorkspaceSecrets
parameters:
- name: q
in: query
description: A keyword query for filtering secrets
schema:
type: string
format: KeywordQuery
example: service name
- name: owner
in: query
description: The owner of the secrets to return
schema:
type: string
format: AccountReference
example: me
- name: limit
in: query
description: The maximum number of executions to return per page
schema:
type: integer
format: int32
default: 10
minimum: 0
maximum: 100
- name: cursor
in: query
description: The pagination cursor
schema:
type: string
format: SecretCursor
responses:
200:
description: The list of executions returned successfully.
content:
application/json:
schema:
$ref: '#/components/schemas/SecretPage'
/workspaces/{workspaceId}/secrets/{secretId}:
parameters:
- $ref: '#/components/parameters/workspaceId'
- $ref: '#/components/parameters/secretId'
get:
tags:
- workspace
- secret
summary: Get workspace secret
description: Get metadata about the given secret in the given workspace. This does not reveal the secret value.
operationId: getWorkspaceSecret
responses:
200:
description: The secret was created successfully.
content:
application/json:
schema:
$ref: '#/components/schemas/Secret'
404:
$ref: '#/components/responses/NotFound'
patch:
tags:
- workspace
- secret
summary: Update workspace secret
description: Updates the given secret in the given workspace
operationId: updateWorkspaceSecret
requestBody:
content:
'application/json':
schema:
$ref: '#/components/schemas/SecretUpdate'
responses:
200:
description: The secret was updated successfully.
content:
application/json:
schema:
$ref: '#/components/schemas/Secret'
403:
$ref: '#/components/responses/Forbidden'
404:
$ref: '#/components/responses/NotFound'
409:
$ref: '#/components/responses/Conflict'
delete:
tags:
- workspace
- secret
summary: Delete workspace secret
description: Deletes the given secret in the given workspace
operationId: deleteWorkspaceSecret
responses:
204:
description: The secret was deleted successfully.
403:
$ref: '#/components/responses/Forbidden'
409:
$ref: '#/components/responses/Conflict'
/workspaces/{workspaceId}/secrets/by/name/{name}:
parameters:
- $ref: '#/components/parameters/workspaceId'
- name: name
in: path
required: true
description: The name of a secret
schema:
type: string
format: SecretName
example: SECRET_NAME
get:
tags:
- workspace
- secret
summary: Get workspace secret by name
description: Get metadata about the given secret in the given workspace. This does not reveal the secret value.
operationId: findWorkspaceSecretByName
responses:
200:
description: The secret was retrieved successfully.
content:
application/json:
schema:
$ref: '#/components/schemas/Secret'
404:
$ref: '#/components/responses/NotFound'
/workspaces/{workspaceId}/secrets/{secretId}/transfer:
parameters:
- $ref: '#/components/parameters/workspaceId'
- $ref: '#/components/parameters/secretId'
post:
tags:
- workspace
- secret
summary: Transfer workspace secret ownership
description: Transfer this workspace secret to another owner
operationId: transferWorkspaceSecret
requestBody:
content:
'application/json':
schema:
$ref: '#/components/schemas/SecretTransfer'
responses:
200:
description: The secret was transferred successfully.
content:
application/json:
schema:
$ref: '#/components/schemas/Secret'
403:
$ref: '#/components/responses/Forbidden'
404:
$ref: '#/components/responses/NotFound'
/workspaces/{workspaceId}/executions:
parameters:
- $ref: '#/components/parameters/workspaceId'
get:
tags:
- workspace
- execution
summary: List executions
description: List one page of executions
operationId: listExecutions
parameters:
- name: q
in: query
description: A keyword query for filtering executions
schema:
type: string
format: KeywordQuery
example: twitter account
- name: owner
in: query
description: The owner of executions to return
schema:
type: string
format: AccountReference
example: me
- name: state
in: query
description: The state of executions to return
schema:
$ref: '#/components/schemas/ExecutionState'
- name: limit
in: query
description: The maximum number of executions to return per page
schema:
type: integer
format: int32
default: 10
minimum: 0
maximum: 100
- name: cursor
in: query
description: The pagination cursor
schema:
type: string
format: ExecutionCursor
responses:
200:
description: The list of executions returned successfully.
content:
application/json:
schema:
$ref: '#/components/schemas/ExecutionPage'
/workspaces/{workspaceId}/executions/{executionId}:
parameters:
- $ref: '#/components/parameters/workspaceId'
- $ref: '#/components/parameters/executionId'
get:
tags:
- workspace
- execution
summary: Get execution
description: Get metadata about one execution
operationId: getExecution
responses:
200:
description: The execution was retrieved successfully.
content:
application/json:
schema:
$ref: '#/components/schemas/Execution'
403:
$ref: '#/components/responses/Forbidden'
404:
$ref: '#/components/responses/NotFound'
410:
$ref: '#/components/responses/Gone'
patch:
tags:
- workspace
- execution
summary: Update execution
description: Update metadata about one execution
operationId: updateExecution
requestBody:
content:
'application/json':
schema:
$ref: '#/components/schemas/ExecutionUpdate'
responses:
200:
description: The execution was updated successfully.
content: