Skip to content

Commit e0cc63e

Browse files
committed
update openapi
1 parent 87b2c4a commit e0cc63e

1 file changed

Lines changed: 158 additions & 78 deletions

File tree

docs/spiceai/openapi.json

Lines changed: 158 additions & 78 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,142 @@
1010
"version": "v1"
1111
},
1212
"paths": {
13+
"/v1/apps/{appId}/api-keys": {
14+
"get": {
15+
"summary": "Get API keys for app",
16+
"description": "Returns the API keys for a specific app. API keys are used to authenticate requests to the Spice runtime.",
17+
"security": [
18+
{
19+
"BearerAuth": []
20+
}
21+
],
22+
"parameters": [
23+
{
24+
"in": "path",
25+
"name": "appId",
26+
"required": true,
27+
"schema": {
28+
"type": "integer"
29+
},
30+
"description": "The ID of the app"
31+
}
32+
],
33+
"responses": {
34+
"200": {
35+
"description": "API keys for the app",
36+
"content": {
37+
"application/json": {
38+
"schema": {
39+
"type": "object",
40+
"properties": {
41+
"api_key": {
42+
"type": "string",
43+
"nullable": true,
44+
"description": "Primary API key"
45+
},
46+
"api_key_2": {
47+
"type": "string",
48+
"nullable": true,
49+
"description": "Secondary API key (for key rotation)"
50+
}
51+
}
52+
}
53+
}
54+
}
55+
},
56+
"401": {
57+
"description": "Unauthorized"
58+
},
59+
"403": {
60+
"description": "Insufficient scope"
61+
},
62+
"404": {
63+
"description": "App not found"
64+
}
65+
},
66+
"tags": ["API Keys"]
67+
},
68+
"post": {
69+
"summary": "Regenerate API key",
70+
"description": "Regenerates an API key for the specified app. This invalidates the previous key. Use key_number to specify which key to regenerate (0 for both, 1 for primary, 2 for secondary).",
71+
"security": [
72+
{
73+
"BearerAuth": []
74+
}
75+
],
76+
"parameters": [
77+
{
78+
"in": "path",
79+
"name": "appId",
80+
"required": true,
81+
"schema": {
82+
"type": "integer"
83+
},
84+
"description": "The ID of the app"
85+
}
86+
],
87+
"requestBody": {
88+
"required": false,
89+
"content": {
90+
"application/json": {
91+
"schema": {
92+
"type": "object",
93+
"properties": {
94+
"key_number": {
95+
"type": "integer",
96+
"enum": [0, 1, 2],
97+
"default": 1,
98+
"description": "Which API key to regenerate (0 = both, 1 = primary, 2 = secondary)"
99+
}
100+
}
101+
}
102+
}
103+
}
104+
},
105+
"responses": {
106+
"200": {
107+
"description": "API key regenerated successfully",
108+
"content": {
109+
"application/json": {
110+
"schema": {
111+
"type": "object",
112+
"properties": {
113+
"api_key": {
114+
"type": "string",
115+
"nullable": true,
116+
"description": "Primary API key"
117+
},
118+
"api_key_2": {
119+
"type": "string",
120+
"nullable": true,
121+
"description": "Secondary API key"
122+
},
123+
"regenerated_key": {
124+
"type": "integer",
125+
"enum": [0, 1, 2],
126+
"description": "Which key was regenerated (0 = both)"
127+
}
128+
}
129+
}
130+
}
131+
}
132+
},
133+
"400": {
134+
"description": "Invalid request"
135+
},
136+
"401": {
137+
"description": "Unauthorized"
138+
},
139+
"403": {
140+
"description": "Insufficient scope"
141+
},
142+
"404": {
143+
"description": "App not found"
144+
}
145+
},
146+
"tags": ["API Keys"]
147+
}
148+
},
13149
"/v1/apps/{appId}/deployments": {
14150
"get": {
15151
"summary": "List deployments",
@@ -43,13 +179,7 @@
43179
"name": "status",
44180
"schema": {
45181
"type": "string",
46-
"enum": [
47-
"queued",
48-
"deploying",
49-
"running",
50-
"failed",
51-
"stopped"
52-
]
182+
"enum": ["queued", "deploying", "running", "failed", "stopped"]
53183
},
54184
"description": "Filter by deployment status"
55185
}
@@ -128,9 +258,7 @@
128258
"description": "App not found"
129259
}
130260
},
131-
"tags": [
132-
"Deployments"
133-
]
261+
"tags": ["Deployments"]
134262
},
135263
"post": {
136264
"summary": "Create deployment",
@@ -231,9 +359,7 @@
231359
"description": "App not found"
232360
}
233361
},
234-
"tags": [
235-
"Deployments"
236-
]
362+
"tags": ["Deployments"]
237363
}
238364
},
239365
"/v1/apps/{appId}": {
@@ -275,10 +401,7 @@
275401
},
276402
"visibility": {
277403
"type": "string",
278-
"enum": [
279-
"public",
280-
"private"
281-
]
404+
"enum": ["public", "private"]
282405
},
283406
"created_at": {
284407
"type": "string",
@@ -328,9 +451,7 @@
328451
"description": "App not found"
329452
}
330453
},
331-
"tags": [
332-
"Apps"
333-
]
454+
"tags": ["Apps"]
334455
},
335456
"put": {
336457
"summary": "Update app",
@@ -363,10 +484,7 @@
363484
},
364485
"visibility": {
365486
"type": "string",
366-
"enum": [
367-
"public",
368-
"private"
369-
]
487+
"enum": ["public", "private"]
370488
},
371489
"production_branch": {
372490
"type": "string"
@@ -430,9 +548,7 @@
430548
"description": "App not found"
431549
}
432550
},
433-
"tags": [
434-
"Apps"
435-
]
551+
"tags": ["Apps"]
436552
},
437553
"delete": {
438554
"summary": "Delete app",
@@ -467,9 +583,7 @@
467583
"description": "App not found"
468584
}
469585
},
470-
"tags": [
471-
"Apps"
472-
]
586+
"tags": ["Apps"]
473587
}
474588
},
475589
"/v1/apps": {
@@ -507,9 +621,7 @@
507621
"description": "Insufficient scope"
508622
}
509623
},
510-
"tags": [
511-
"Apps"
512-
]
624+
"tags": ["Apps"]
513625
},
514626
"post": {
515627
"summary": "Create app",
@@ -525,9 +637,7 @@
525637
"application/json": {
526638
"schema": {
527639
"type": "object",
528-
"required": [
529-
"name"
530-
],
640+
"required": ["name"],
531641
"properties": {
532642
"name": {
533643
"type": "string",
@@ -541,10 +651,7 @@
541651
},
542652
"visibility": {
543653
"type": "string",
544-
"enum": [
545-
"public",
546-
"private"
547-
],
654+
"enum": ["public", "private"],
548655
"default": "private"
549656
}
550657
}
@@ -576,9 +683,7 @@
576683
"description": "App with this name already exists"
577684
}
578685
},
579-
"tags": [
580-
"Apps"
581-
]
686+
"tags": ["Apps"]
582687
}
583688
},
584689
"/v1/container-images": {
@@ -596,10 +701,7 @@
596701
"name": "channel",
597702
"schema": {
598703
"type": "string",
599-
"enum": [
600-
"stable",
601-
"enterprise"
602-
],
704+
"enum": ["stable", "enterprise"],
603705
"default": "stable"
604706
},
605707
"description": "The release channel to fetch container images from.\n- stable: Public OSS images from Docker Hub\n- enterprise: Enterprise images (requires enterprise subscription)\n"
@@ -628,10 +730,7 @@
628730
},
629731
"channel": {
630732
"type": "string",
631-
"enum": [
632-
"stable",
633-
"enterprise"
634-
]
733+
"enum": ["stable", "enterprise"]
635734
}
636735
}
637736
}
@@ -652,9 +751,7 @@
652751
"description": "Insufficient scope"
653752
}
654753
},
655-
"tags": [
656-
"Container Images"
657-
]
754+
"tags": ["Container Images"]
658755
}
659756
},
660757
"/v1/docs": {
@@ -673,9 +770,7 @@
673770
}
674771
}
675772
},
676-
"tags": [
677-
"Documentation"
678-
]
773+
"tags": ["Documentation"]
679774
}
680775
},
681776
"/v1/health": {
@@ -704,9 +799,7 @@
704799
}
705800
}
706801
},
707-
"tags": [
708-
"Health"
709-
]
802+
"tags": ["Health"]
710803
}
711804
},
712805
"/v1/regions": {
@@ -724,10 +817,7 @@
724817
"name": "env",
725818
"schema": {
726819
"type": "string",
727-
"enum": [
728-
"prod",
729-
"dev"
730-
]
820+
"enum": ["prod", "dev"]
731821
},
732822
"description": "Filter by environment (defaults to prod in production)"
733823
}
@@ -755,19 +845,11 @@
755845
},
756846
"provider": {
757847
"type": "string",
758-
"enum": [
759-
"teraswitch",
760-
"aws",
761-
"azure"
762-
]
848+
"enum": ["teraswitch", "aws", "azure"]
763849
},
764850
"providerName": {
765851
"type": "string",
766-
"enum": [
767-
"Teraswitch",
768-
"AWS",
769-
"Azure"
770-
]
852+
"enum": ["Teraswitch", "AWS", "Azure"]
771853
},
772854
"isDefault": {
773855
"type": "boolean"
@@ -794,12 +876,10 @@
794876
"description": "Insufficient scope"
795877
}
796878
},
797-
"tags": [
798-
"Regions"
799-
]
879+
"tags": ["Regions"]
800880
}
801881
}
802882
},
803883
"components": {},
804884
"tags": []
805-
}
885+
}

0 commit comments

Comments
 (0)