@usestatemachines/sdk 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (203) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +311 -0
  3. package/agents/SKILL.md +90 -0
  4. package/agents/index.d.ts +13 -0
  5. package/agents/index.js +22 -0
  6. package/agents/llms.txt +93 -0
  7. package/agents/prompt.md +49 -0
  8. package/esm/core.d.ts +9 -0
  9. package/esm/core.js +12 -0
  10. package/esm/extensions/client.d.ts +81 -0
  11. package/esm/extensions/client.js +213 -0
  12. package/esm/extensions/connection.d.ts +42 -0
  13. package/esm/extensions/connection.js +133 -0
  14. package/esm/extensions/errors.d.ts +52 -0
  15. package/esm/extensions/errors.js +129 -0
  16. package/esm/extensions/index.d.ts +11 -0
  17. package/esm/extensions/index.js +7 -0
  18. package/esm/extensions/signal.d.ts +14 -0
  19. package/esm/extensions/signal.js +29 -0
  20. package/esm/extensions/wait.d.ts +19 -0
  21. package/esm/extensions/wait.js +102 -0
  22. package/esm/funcs/catalog-get.d.ts +11 -0
  23. package/esm/funcs/catalog-get.js +76 -0
  24. package/esm/funcs/catalog-release.d.ts +11 -0
  25. package/esm/funcs/catalog-release.js +92 -0
  26. package/esm/funcs/credential-get.d.ts +11 -0
  27. package/esm/funcs/credential-get.js +76 -0
  28. package/esm/funcs/environments-create.d.ts +11 -0
  29. package/esm/funcs/environments-create.js +94 -0
  30. package/esm/funcs/environments-events.d.ts +12 -0
  31. package/esm/funcs/environments-events.js +98 -0
  32. package/esm/funcs/environments-get-connection.d.ts +11 -0
  33. package/esm/funcs/environments-get-connection.js +96 -0
  34. package/esm/funcs/environments-get.d.ts +11 -0
  35. package/esm/funcs/environments-get.js +92 -0
  36. package/esm/funcs/environments-list.d.ts +11 -0
  37. package/esm/funcs/environments-list.js +100 -0
  38. package/esm/funcs/environments-reveal.d.ts +11 -0
  39. package/esm/funcs/environments-reveal.js +97 -0
  40. package/esm/funcs/environments-stop.d.ts +11 -0
  41. package/esm/funcs/environments-stop.js +92 -0
  42. package/esm/funcs/workspaces-events.d.ts +12 -0
  43. package/esm/funcs/workspaces-events.js +98 -0
  44. package/esm/funcs/workspaces-get.d.ts +11 -0
  45. package/esm/funcs/workspaces-get.js +92 -0
  46. package/esm/funcs/workspaces-list.d.ts +11 -0
  47. package/esm/funcs/workspaces-list.js +90 -0
  48. package/esm/hooks/hooks.d.ts +24 -0
  49. package/esm/hooks/hooks.js +79 -0
  50. package/esm/hooks/index.d.ts +2 -0
  51. package/esm/hooks/index.js +5 -0
  52. package/esm/hooks/types.d.ts +76 -0
  53. package/esm/hooks/types.js +4 -0
  54. package/esm/index.d.ts +5 -0
  55. package/esm/index.js +7 -0
  56. package/esm/lib/base64.d.ts +9 -0
  57. package/esm/lib/base64.js +30 -0
  58. package/esm/lib/config.d.ts +37 -0
  59. package/esm/lib/config.js +30 -0
  60. package/esm/lib/encodings.d.ts +54 -0
  61. package/esm/lib/encodings.js +406 -0
  62. package/esm/lib/files.d.ts +25 -0
  63. package/esm/lib/files.js +90 -0
  64. package/esm/lib/http.d.ts +66 -0
  65. package/esm/lib/http.js +208 -0
  66. package/esm/lib/logger.d.ts +5 -0
  67. package/esm/lib/logger.js +4 -0
  68. package/esm/lib/matchers.d.ts +58 -0
  69. package/esm/lib/matchers.js +201 -0
  70. package/esm/lib/primitives.d.ts +26 -0
  71. package/esm/lib/primitives.js +119 -0
  72. package/esm/lib/retries.d.ts +37 -0
  73. package/esm/lib/retries.js +156 -0
  74. package/esm/lib/schemas.d.ts +20 -0
  75. package/esm/lib/schemas.js +56 -0
  76. package/esm/lib/sdks.d.ts +62 -0
  77. package/esm/lib/sdks.js +289 -0
  78. package/esm/lib/security.d.ts +83 -0
  79. package/esm/lib/security.js +145 -0
  80. package/esm/lib/url.d.ts +4 -0
  81. package/esm/lib/url.js +23 -0
  82. package/esm/models/actor.d.ts +12 -0
  83. package/esm/models/actor.js +16 -0
  84. package/esm/models/api-profile.d.ts +17 -0
  85. package/esm/models/api-profile.js +22 -0
  86. package/esm/models/app.d.ts +14 -0
  87. package/esm/models/app.js +18 -0
  88. package/esm/models/catalog.d.ts +12 -0
  89. package/esm/models/catalog.js +15 -0
  90. package/esm/models/connection-secret.d.ts +14 -0
  91. package/esm/models/connection-secret.js +18 -0
  92. package/esm/models/connection.d.ts +26 -0
  93. package/esm/models/connection.js +30 -0
  94. package/esm/models/create-environment-input.d.ts +35 -0
  95. package/esm/models/create-environment-input.js +23 -0
  96. package/esm/models/credential-kind.d.ts +9 -0
  97. package/esm/models/credential-kind.js +10 -0
  98. package/esm/models/credential.d.ts +48 -0
  99. package/esm/models/credential.js +44 -0
  100. package/esm/models/environment-app.d.ts +42 -0
  101. package/esm/models/environment-app.js +44 -0
  102. package/esm/models/environment-lifetime.d.ts +10 -0
  103. package/esm/models/environment-lifetime.js +14 -0
  104. package/esm/models/environment.d.ts +47 -0
  105. package/esm/models/environment.js +48 -0
  106. package/esm/models/error-response.d.ts +45 -0
  107. package/esm/models/error-response.js +47 -0
  108. package/esm/models/errors/error-response.d.ts +18 -0
  109. package/esm/models/errors/error-response.js +32 -0
  110. package/esm/models/errors/http-client-errors.d.ts +43 -0
  111. package/esm/models/errors/http-client-errors.js +55 -0
  112. package/esm/models/errors/index.d.ts +6 -0
  113. package/esm/models/errors/index.js +9 -0
  114. package/esm/models/errors/response-validation-error.d.ts +25 -0
  115. package/esm/models/errors/response-validation-error.js +36 -0
  116. package/esm/models/errors/sdk-validation-error.d.ts +20 -0
  117. package/esm/models/errors/sdk-validation-error.js +51 -0
  118. package/esm/models/errors/state-machines-http-error.d.ts +18 -0
  119. package/esm/models/errors/state-machines-http-error.js +25 -0
  120. package/esm/models/errors/unexpected-response-error.d.ts +9 -0
  121. package/esm/models/errors/unexpected-response-error.js +29 -0
  122. package/esm/models/event-page.d.ts +11 -0
  123. package/esm/models/event-page.js +16 -0
  124. package/esm/models/event.d.ts +20 -0
  125. package/esm/models/event.js +22 -0
  126. package/esm/models/index.d.ts +19 -0
  127. package/esm/models/index.js +22 -0
  128. package/esm/models/operations/create-environments.d.ts +27 -0
  129. package/esm/models/operations/create-environments.js +27 -0
  130. package/esm/models/operations/get-catalog.d.ts +13 -0
  131. package/esm/models/operations/get-catalog.js +13 -0
  132. package/esm/models/operations/get-connection.d.ts +25 -0
  133. package/esm/models/operations/get-connection.js +21 -0
  134. package/esm/models/operations/get-credential.d.ts +13 -0
  135. package/esm/models/operations/get-credential.js +13 -0
  136. package/esm/models/operations/get-environment.d.ts +23 -0
  137. package/esm/models/operations/get-environment.js +20 -0
  138. package/esm/models/operations/get-release.d.ts +23 -0
  139. package/esm/models/operations/get-release.js +20 -0
  140. package/esm/models/operations/get-workspace.d.ts +23 -0
  141. package/esm/models/operations/get-workspace.js +20 -0
  142. package/esm/models/operations/index.d.ts +13 -0
  143. package/esm/models/operations/index.js +16 -0
  144. package/esm/models/operations/list-environment-events.d.ts +15 -0
  145. package/esm/models/operations/list-environment-events.js +13 -0
  146. package/esm/models/operations/list-environments.d.ts +49 -0
  147. package/esm/models/operations/list-environments.js +40 -0
  148. package/esm/models/operations/list-workspace-events.d.ts +15 -0
  149. package/esm/models/operations/list-workspace-events.js +13 -0
  150. package/esm/models/operations/list-workspaces.d.ts +32 -0
  151. package/esm/models/operations/list-workspaces.js +27 -0
  152. package/esm/models/operations/reveal-connection.d.ts +37 -0
  153. package/esm/models/operations/reveal-connection.js +29 -0
  154. package/esm/models/operations/stop-environment.d.ts +23 -0
  155. package/esm/models/operations/stop-environment.js +20 -0
  156. package/esm/models/release-actor.d.ts +11 -0
  157. package/esm/models/release-actor.js +15 -0
  158. package/esm/models/release.d.ts +26 -0
  159. package/esm/models/release.js +29 -0
  160. package/esm/models/security.d.ts +11 -0
  161. package/esm/models/security.js +11 -0
  162. package/esm/models/workspace.d.ts +16 -0
  163. package/esm/models/workspace.js +21 -0
  164. package/esm/sdk/catalog.d.ts +6 -0
  165. package/esm/sdk/catalog.js +15 -0
  166. package/esm/sdk/credential.d.ts +5 -0
  167. package/esm/sdk/credential.js +11 -0
  168. package/esm/sdk/environments.d.ts +12 -0
  169. package/esm/sdk/environments.js +35 -0
  170. package/esm/sdk/index.d.ts +1 -0
  171. package/esm/sdk/index.js +4 -0
  172. package/esm/sdk/sdk.d.ts +15 -0
  173. package/esm/sdk/sdk.js +26 -0
  174. package/esm/sdk/workspaces.d.ts +8 -0
  175. package/esm/sdk/workspaces.js +19 -0
  176. package/esm/types/async.d.ts +22 -0
  177. package/esm/types/async.js +27 -0
  178. package/esm/types/blobs.d.ts +3 -0
  179. package/esm/types/blobs.js +24 -0
  180. package/esm/types/const-date-time.d.ts +2 -0
  181. package/esm/types/const-date-time.js +9 -0
  182. package/esm/types/default-to-zero-value.d.ts +11 -0
  183. package/esm/types/default-to-zero-value.js +30 -0
  184. package/esm/types/enums.d.ts +8 -0
  185. package/esm/types/enums.js +26 -0
  186. package/esm/types/fp.d.ts +30 -0
  187. package/esm/types/fp.js +30 -0
  188. package/esm/types/index.d.ts +9 -0
  189. package/esm/types/index.js +9 -0
  190. package/esm/types/operations.d.ts +26 -0
  191. package/esm/types/operations.js +76 -0
  192. package/esm/types/primitives.d.ts +8 -0
  193. package/esm/types/primitives.js +108 -0
  194. package/esm/types/rfcdate.d.ts +20 -0
  195. package/esm/types/rfcdate.js +42 -0
  196. package/esm/types/smart-union.d.ts +6 -0
  197. package/esm/types/smart-union.js +116 -0
  198. package/esm/types/streams.d.ts +1 -0
  199. package/esm/types/streams.js +14 -0
  200. package/esm/types/unrecognized.d.ts +15 -0
  201. package/esm/types/unrecognized.js +30 -0
  202. package/openapi.json +2853 -0
  203. package/package.json +50 -0
package/openapi.json ADDED
@@ -0,0 +1,2853 @@
1
+ {
2
+ "components": {
3
+ "schemas": {
4
+ "Actor": {
5
+ "properties": {
6
+ "id": {
7
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$",
8
+ "type": "string"
9
+ },
10
+ "kind": {
11
+ "$ref": "#/components/schemas/CredentialKind"
12
+ },
13
+ "name": {
14
+ "type": ["string", "null"]
15
+ }
16
+ },
17
+ "required": ["id", "kind", "name"],
18
+ "type": ["object", "null"]
19
+ },
20
+ "ApiProfile": {
21
+ "properties": {
22
+ "actorHeader": {
23
+ "type": "string"
24
+ },
25
+ "actorVariable": {
26
+ "type": "string"
27
+ },
28
+ "id": {
29
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$",
30
+ "type": "string"
31
+ },
32
+ "interactive": {
33
+ "type": "boolean"
34
+ },
35
+ "limitations": {
36
+ "items": {
37
+ "type": "string"
38
+ },
39
+ "type": "array"
40
+ },
41
+ "name": {
42
+ "type": "string"
43
+ },
44
+ "pathTemplate": {
45
+ "type": "string"
46
+ },
47
+ "requestContentType": {
48
+ "type": "string"
49
+ },
50
+ "versions": {
51
+ "items": {
52
+ "type": "string"
53
+ },
54
+ "type": "array"
55
+ }
56
+ },
57
+ "required": [
58
+ "id",
59
+ "name",
60
+ "versions",
61
+ "pathTemplate",
62
+ "requestContentType",
63
+ "actorHeader",
64
+ "actorVariable",
65
+ "limitations",
66
+ "interactive"
67
+ ],
68
+ "type": "object"
69
+ },
70
+ "App": {
71
+ "properties": {
72
+ "defaultReleaseId": {
73
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$",
74
+ "type": ["string", "null"]
75
+ },
76
+ "description": {
77
+ "type": "string"
78
+ },
79
+ "id": {
80
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$",
81
+ "type": "string"
82
+ },
83
+ "logoPath": {
84
+ "type": "string"
85
+ },
86
+ "name": {
87
+ "type": "string"
88
+ },
89
+ "vendor": {
90
+ "type": "string"
91
+ }
92
+ },
93
+ "required": [
94
+ "id",
95
+ "vendor",
96
+ "name",
97
+ "description",
98
+ "logoPath",
99
+ "defaultReleaseId"
100
+ ],
101
+ "type": "object"
102
+ },
103
+ "Catalog": {
104
+ "properties": {
105
+ "apps": {
106
+ "items": {
107
+ "$ref": "#/components/schemas/App"
108
+ },
109
+ "type": "array"
110
+ },
111
+ "releases": {
112
+ "items": {
113
+ "$ref": "#/components/schemas/Release"
114
+ },
115
+ "type": "array"
116
+ }
117
+ },
118
+ "required": ["apps", "releases"],
119
+ "type": "object"
120
+ },
121
+ "Connection": {
122
+ "properties": {
123
+ "actors": {
124
+ "items": {
125
+ "$ref": "#/components/schemas/ReleaseActor"
126
+ },
127
+ "type": "array"
128
+ },
129
+ "apis": {
130
+ "items": {
131
+ "$ref": "#/components/schemas/ApiProfile"
132
+ },
133
+ "type": "array"
134
+ },
135
+ "appKey": {
136
+ "pattern": "^[a-z][a-z0-9-]{0,39}$",
137
+ "type": "string"
138
+ },
139
+ "baseUrl": {
140
+ "type": ["string", "null"]
141
+ },
142
+ "environmentId": {
143
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$",
144
+ "type": "string"
145
+ },
146
+ "expiresAt": {
147
+ "format": "date-time",
148
+ "type": ["string", "null"]
149
+ },
150
+ "status": {
151
+ "enum": ["starting", "ready", "unavailable"],
152
+ "type": "string"
153
+ }
154
+ },
155
+ "required": [
156
+ "environmentId",
157
+ "appKey",
158
+ "status",
159
+ "baseUrl",
160
+ "expiresAt",
161
+ "actors",
162
+ "apis"
163
+ ],
164
+ "type": "object"
165
+ },
166
+ "ConnectionSecret": {
167
+ "properties": {
168
+ "actorId": {
169
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$",
170
+ "type": "string"
171
+ },
172
+ "actorToken": {
173
+ "type": "string"
174
+ },
175
+ "appKey": {
176
+ "pattern": "^[a-z][a-z0-9-]{0,39}$",
177
+ "type": "string"
178
+ },
179
+ "environmentId": {
180
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$",
181
+ "type": "string"
182
+ },
183
+ "environmentToken": {
184
+ "type": "string"
185
+ },
186
+ "expiresAt": {
187
+ "format": "date-time",
188
+ "type": "string"
189
+ }
190
+ },
191
+ "required": [
192
+ "environmentId",
193
+ "appKey",
194
+ "actorId",
195
+ "environmentToken",
196
+ "actorToken",
197
+ "expiresAt"
198
+ ],
199
+ "type": "object"
200
+ },
201
+ "CreateEnvironmentInput": {
202
+ "properties": {
203
+ "apps": {
204
+ "items": {
205
+ "properties": {
206
+ "appId": {
207
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$",
208
+ "type": "string"
209
+ },
210
+ "appReleaseId": {
211
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$",
212
+ "type": "string"
213
+ },
214
+ "key": {
215
+ "pattern": "^[a-z][a-z0-9-]{0,39}$",
216
+ "type": "string"
217
+ }
218
+ },
219
+ "required": ["key", "appId"],
220
+ "type": "object"
221
+ },
222
+ "maxItems": 10,
223
+ "minItems": 1,
224
+ "type": "array"
225
+ },
226
+ "count": {
227
+ "default": 1,
228
+ "maximum": 100,
229
+ "minimum": 1,
230
+ "type": "integer"
231
+ },
232
+ "labels": {
233
+ "additionalProperties": {
234
+ "maxLength": 256,
235
+ "type": "string"
236
+ },
237
+ "default": {},
238
+ "type": "object"
239
+ },
240
+ "lifetimeMinutes": {
241
+ "maximum": 1440,
242
+ "minimum": 1,
243
+ "type": "integer"
244
+ },
245
+ "name": {
246
+ "maxLength": 120,
247
+ "minLength": 1,
248
+ "type": "string"
249
+ }
250
+ },
251
+ "required": ["apps"],
252
+ "type": "object"
253
+ },
254
+ "Credential": {
255
+ "properties": {
256
+ "kind": {
257
+ "$ref": "#/components/schemas/CredentialKind"
258
+ },
259
+ "limits": {
260
+ "properties": {
261
+ "environmentLifetime": {
262
+ "$ref": "#/components/schemas/EnvironmentLifetime"
263
+ },
264
+ "liveEnvironments": {
265
+ "description": "How many environments the organization may run at once; null when there is no organization or it is not known yet. Never means unlimited.",
266
+ "type": ["integer", "null"]
267
+ }
268
+ },
269
+ "required": ["environmentLifetime", "liveEnvironments"],
270
+ "type": "object"
271
+ },
272
+ "organizationId": {
273
+ "description": "The organization the credential acts in; null for a user without an organization.",
274
+ "type": ["string", "null"]
275
+ },
276
+ "permissions": {
277
+ "items": {
278
+ "enum": [
279
+ "environments:read",
280
+ "environments:create",
281
+ "environments:update",
282
+ "environments:stop",
283
+ "connections:reveal",
284
+ "snapshots:read",
285
+ "snapshots:create",
286
+ "snapshots:delete",
287
+ "workspaces:manage",
288
+ "api_keys:manage",
289
+ "members:manage"
290
+ ],
291
+ "type": "string"
292
+ },
293
+ "type": "array"
294
+ },
295
+ "workspaceId": {
296
+ "description": "The workspace an API key is bound to; null for a user session.",
297
+ "type": ["string", "null"]
298
+ }
299
+ },
300
+ "required": [
301
+ "kind",
302
+ "organizationId",
303
+ "workspaceId",
304
+ "permissions",
305
+ "limits"
306
+ ],
307
+ "type": "object"
308
+ },
309
+ "CredentialKind": {
310
+ "enum": ["user", "api_key"],
311
+ "type": "string"
312
+ },
313
+ "Environment": {
314
+ "properties": {
315
+ "apps": {
316
+ "items": {
317
+ "$ref": "#/components/schemas/EnvironmentApp"
318
+ },
319
+ "type": "array"
320
+ },
321
+ "createdAt": {
322
+ "format": "date-time",
323
+ "type": "string"
324
+ },
325
+ "createdBy": {
326
+ "$ref": "#/components/schemas/Actor"
327
+ },
328
+ "expiresAt": {
329
+ "format": "date-time",
330
+ "type": ["string", "null"]
331
+ },
332
+ "id": {
333
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$",
334
+ "type": "string"
335
+ },
336
+ "labels": {
337
+ "additionalProperties": {
338
+ "type": "string"
339
+ },
340
+ "type": "object"
341
+ },
342
+ "lifetimeMinutes": {
343
+ "type": "integer"
344
+ },
345
+ "name": {
346
+ "type": ["string", "null"]
347
+ },
348
+ "startedAt": {
349
+ "format": "date-time",
350
+ "type": ["string", "null"]
351
+ },
352
+ "status": {
353
+ "enum": [
354
+ "queued",
355
+ "starting",
356
+ "running",
357
+ "stopping",
358
+ "stopped",
359
+ "failed"
360
+ ],
361
+ "type": "string"
362
+ },
363
+ "stopReason": {
364
+ "enum": ["requested", "expired", "app_failed", "owner_lost", null],
365
+ "type": ["string", "null"]
366
+ },
367
+ "stoppedAt": {
368
+ "format": "date-time",
369
+ "type": ["string", "null"]
370
+ },
371
+ "version": {
372
+ "type": "integer"
373
+ },
374
+ "workspaceId": {
375
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$",
376
+ "type": "string"
377
+ }
378
+ },
379
+ "required": [
380
+ "id",
381
+ "workspaceId",
382
+ "name",
383
+ "labels",
384
+ "status",
385
+ "stopReason",
386
+ "lifetimeMinutes",
387
+ "version",
388
+ "createdBy",
389
+ "createdAt",
390
+ "startedAt",
391
+ "stoppedAt",
392
+ "expiresAt",
393
+ "apps"
394
+ ],
395
+ "type": "object"
396
+ },
397
+ "EnvironmentApp": {
398
+ "properties": {
399
+ "allocatedAt": {
400
+ "format": "date-time",
401
+ "type": ["string", "null"]
402
+ },
403
+ "appId": {
404
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$",
405
+ "type": "string"
406
+ },
407
+ "appReleaseId": {
408
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$",
409
+ "type": "string"
410
+ },
411
+ "disposal": {
412
+ "enum": ["pending", "complete", "failed", "unknown"],
413
+ "type": "string"
414
+ },
415
+ "errorCode": {
416
+ "type": ["string", "null"]
417
+ },
418
+ "expiresAt": {
419
+ "format": "date-time",
420
+ "type": ["string", "null"]
421
+ },
422
+ "id": {
423
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$",
424
+ "type": "string"
425
+ },
426
+ "key": {
427
+ "pattern": "^[a-z][a-z0-9-]{0,39}$",
428
+ "type": "string"
429
+ },
430
+ "provider": {
431
+ "type": "string"
432
+ },
433
+ "readyAt": {
434
+ "format": "date-time",
435
+ "type": ["string", "null"]
436
+ },
437
+ "region": {
438
+ "type": ["string", "null"]
439
+ },
440
+ "status": {
441
+ "enum": [
442
+ "pending",
443
+ "starting",
444
+ "ready",
445
+ "stopping",
446
+ "stopped",
447
+ "failed"
448
+ ],
449
+ "type": "string"
450
+ },
451
+ "stoppedAt": {
452
+ "format": "date-time",
453
+ "type": ["string", "null"]
454
+ }
455
+ },
456
+ "required": [
457
+ "id",
458
+ "key",
459
+ "appId",
460
+ "appReleaseId",
461
+ "status",
462
+ "disposal",
463
+ "errorCode",
464
+ "provider",
465
+ "region",
466
+ "allocatedAt",
467
+ "readyAt",
468
+ "stoppedAt",
469
+ "expiresAt"
470
+ ],
471
+ "type": "object"
472
+ },
473
+ "EnvironmentLifetime": {
474
+ "properties": {
475
+ "defaultMinutes": {
476
+ "type": "integer"
477
+ },
478
+ "maximumMinutes": {
479
+ "type": "integer"
480
+ }
481
+ },
482
+ "required": ["defaultMinutes", "maximumMinutes"],
483
+ "type": "object"
484
+ },
485
+ "ErrorResponse": {
486
+ "properties": {
487
+ "error": {
488
+ "properties": {
489
+ "code": {
490
+ "enum": [
491
+ "body-too-large",
492
+ "connection-unavailable",
493
+ "environment-limit",
494
+ "forbidden",
495
+ "idempotency-conflict",
496
+ "identity-request-rejected",
497
+ "internal-error",
498
+ "invalid-cursor",
499
+ "invalid-request",
500
+ "invalid-response",
501
+ "invalid-webhook",
502
+ "last-owner",
503
+ "last-workspace",
504
+ "lifetime-too-long",
505
+ "not-found",
506
+ "not-ready",
507
+ "organization-required",
508
+ "release-unavailable",
509
+ "request-capacity-reached",
510
+ "request-timeout",
511
+ "service-unavailable",
512
+ "unauthorized",
513
+ "version-conflict",
514
+ "workspace-archived",
515
+ "workspace-name-taken"
516
+ ],
517
+ "type": "string"
518
+ },
519
+ "fields": {
520
+ "additionalProperties": {
521
+ "items": {
522
+ "type": "string"
523
+ },
524
+ "type": "array"
525
+ },
526
+ "type": "object"
527
+ },
528
+ "message": {
529
+ "type": "string"
530
+ },
531
+ "requestId": {
532
+ "type": "string"
533
+ }
534
+ },
535
+ "required": ["code", "message", "requestId"],
536
+ "type": "object"
537
+ }
538
+ },
539
+ "required": ["error"],
540
+ "type": "object"
541
+ },
542
+ "Event": {
543
+ "properties": {
544
+ "action": {
545
+ "type": "string"
546
+ },
547
+ "actor": {
548
+ "$ref": "#/components/schemas/Actor"
549
+ },
550
+ "data": {
551
+ "additionalProperties": {},
552
+ "type": "object"
553
+ },
554
+ "environmentId": {
555
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$",
556
+ "type": ["string", "null"]
557
+ },
558
+ "id": {
559
+ "type": "string"
560
+ },
561
+ "occurredAt": {
562
+ "format": "date-time",
563
+ "type": "string"
564
+ },
565
+ "requestId": {
566
+ "type": ["string", "null"]
567
+ },
568
+ "subjectId": {
569
+ "type": "string"
570
+ },
571
+ "workspaceId": {
572
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$",
573
+ "type": ["string", "null"]
574
+ }
575
+ },
576
+ "required": [
577
+ "id",
578
+ "action",
579
+ "subjectId",
580
+ "workspaceId",
581
+ "environmentId",
582
+ "actor",
583
+ "requestId",
584
+ "data",
585
+ "occurredAt"
586
+ ],
587
+ "type": "object"
588
+ },
589
+ "EventPage": {
590
+ "properties": {
591
+ "data": {
592
+ "items": {
593
+ "$ref": "#/components/schemas/Event"
594
+ },
595
+ "type": "array"
596
+ },
597
+ "nextCursor": {
598
+ "type": ["string", "null"]
599
+ }
600
+ },
601
+ "required": ["data", "nextCursor"],
602
+ "type": "object"
603
+ },
604
+ "Release": {
605
+ "properties": {
606
+ "actors": {
607
+ "items": {
608
+ "$ref": "#/components/schemas/ReleaseActor"
609
+ },
610
+ "type": "array"
611
+ },
612
+ "apis": {
613
+ "items": {
614
+ "$ref": "#/components/schemas/ApiProfile"
615
+ },
616
+ "type": "array"
617
+ },
618
+ "appId": {
619
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$",
620
+ "type": "string"
621
+ },
622
+ "createdAt": {
623
+ "format": "date-time",
624
+ "type": "string"
625
+ },
626
+ "id": {
627
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$",
628
+ "type": "string"
629
+ },
630
+ "qualification": {
631
+ "enum": ["development", "qualified"],
632
+ "type": "string"
633
+ },
634
+ "retiredAt": {
635
+ "format": "date-time",
636
+ "type": ["string", "null"]
637
+ },
638
+ "version": {
639
+ "type": "string"
640
+ }
641
+ },
642
+ "required": [
643
+ "id",
644
+ "appId",
645
+ "version",
646
+ "qualification",
647
+ "apis",
648
+ "actors",
649
+ "createdAt",
650
+ "retiredAt"
651
+ ],
652
+ "type": "object"
653
+ },
654
+ "ReleaseActor": {
655
+ "properties": {
656
+ "id": {
657
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$",
658
+ "type": "string"
659
+ },
660
+ "name": {
661
+ "type": "string"
662
+ },
663
+ "summary": {
664
+ "type": "string"
665
+ }
666
+ },
667
+ "required": ["id", "name", "summary"],
668
+ "type": "object"
669
+ },
670
+ "Workspace": {
671
+ "properties": {
672
+ "archivedAt": {
673
+ "format": "date-time",
674
+ "type": ["string", "null"]
675
+ },
676
+ "createdAt": {
677
+ "format": "date-time",
678
+ "type": "string"
679
+ },
680
+ "createdBy": {
681
+ "$ref": "#/components/schemas/Actor"
682
+ },
683
+ "id": {
684
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$",
685
+ "type": "string"
686
+ },
687
+ "name": {
688
+ "type": "string"
689
+ },
690
+ "updatedAt": {
691
+ "format": "date-time",
692
+ "type": "string"
693
+ },
694
+ "version": {
695
+ "type": "integer"
696
+ }
697
+ },
698
+ "required": [
699
+ "id",
700
+ "name",
701
+ "version",
702
+ "createdBy",
703
+ "createdAt",
704
+ "updatedAt",
705
+ "archivedAt"
706
+ ],
707
+ "type": "object"
708
+ }
709
+ },
710
+ "securitySchemes": {
711
+ "bearerAuth": {
712
+ "description": "WorkOS session access token or workspace API key",
713
+ "scheme": "bearer",
714
+ "type": "http"
715
+ }
716
+ }
717
+ },
718
+ "info": {
719
+ "title": "State product API",
720
+ "version": "1.0.0"
721
+ },
722
+ "openapi": "3.1.0",
723
+ "paths": {
724
+ "/v1/catalog": {
725
+ "get": {
726
+ "operationId": "getCatalog",
727
+ "responses": {
728
+ "200": {
729
+ "content": {
730
+ "application/json": {
731
+ "schema": {
732
+ "properties": {
733
+ "data": {
734
+ "$ref": "#/components/schemas/Catalog"
735
+ }
736
+ },
737
+ "required": ["data"],
738
+ "type": "object"
739
+ }
740
+ }
741
+ },
742
+ "description": "Admitted application catalog"
743
+ },
744
+ "400": {
745
+ "content": {
746
+ "application/json": {
747
+ "schema": {
748
+ "$ref": "#/components/schemas/ErrorResponse"
749
+ }
750
+ }
751
+ },
752
+ "description": "Invalid request"
753
+ },
754
+ "401": {
755
+ "content": {
756
+ "application/json": {
757
+ "schema": {
758
+ "$ref": "#/components/schemas/ErrorResponse"
759
+ }
760
+ }
761
+ },
762
+ "description": "Authentication required"
763
+ },
764
+ "403": {
765
+ "content": {
766
+ "application/json": {
767
+ "schema": {
768
+ "$ref": "#/components/schemas/ErrorResponse"
769
+ }
770
+ }
771
+ },
772
+ "description": "Permission denied"
773
+ },
774
+ "404": {
775
+ "content": {
776
+ "application/json": {
777
+ "schema": {
778
+ "$ref": "#/components/schemas/ErrorResponse"
779
+ }
780
+ }
781
+ },
782
+ "description": "Resource not found"
783
+ },
784
+ "409": {
785
+ "content": {
786
+ "application/json": {
787
+ "schema": {
788
+ "$ref": "#/components/schemas/ErrorResponse"
789
+ }
790
+ }
791
+ },
792
+ "description": "Conflicting request or version"
793
+ },
794
+ "413": {
795
+ "content": {
796
+ "application/json": {
797
+ "schema": {
798
+ "$ref": "#/components/schemas/ErrorResponse"
799
+ }
800
+ }
801
+ },
802
+ "description": "Request body too large"
803
+ },
804
+ "422": {
805
+ "content": {
806
+ "application/json": {
807
+ "schema": {
808
+ "$ref": "#/components/schemas/ErrorResponse"
809
+ }
810
+ }
811
+ },
812
+ "description": "Unsupported configuration"
813
+ },
814
+ "429": {
815
+ "content": {
816
+ "application/json": {
817
+ "schema": {
818
+ "$ref": "#/components/schemas/ErrorResponse"
819
+ }
820
+ }
821
+ },
822
+ "description": "Admission limit reached"
823
+ },
824
+ "500": {
825
+ "content": {
826
+ "application/json": {
827
+ "schema": {
828
+ "$ref": "#/components/schemas/ErrorResponse"
829
+ }
830
+ }
831
+ },
832
+ "description": "Unexpected failure"
833
+ },
834
+ "503": {
835
+ "content": {
836
+ "application/json": {
837
+ "schema": {
838
+ "$ref": "#/components/schemas/ErrorResponse"
839
+ }
840
+ }
841
+ },
842
+ "description": "Dependency unavailable"
843
+ }
844
+ },
845
+ "security": [
846
+ {
847
+ "bearerAuth": []
848
+ }
849
+ ],
850
+ "x-state-credentials": ["user", "api_key"]
851
+ }
852
+ },
853
+ "/v1/catalog/releases/{releaseId}": {
854
+ "get": {
855
+ "operationId": "getRelease",
856
+ "parameters": [
857
+ {
858
+ "in": "path",
859
+ "name": "releaseId",
860
+ "required": true,
861
+ "schema": {
862
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$",
863
+ "type": "string"
864
+ }
865
+ }
866
+ ],
867
+ "responses": {
868
+ "200": {
869
+ "content": {
870
+ "application/json": {
871
+ "schema": {
872
+ "properties": {
873
+ "data": {
874
+ "$ref": "#/components/schemas/Release"
875
+ }
876
+ },
877
+ "required": ["data"],
878
+ "type": "object"
879
+ }
880
+ }
881
+ },
882
+ "description": "Pinned application release"
883
+ },
884
+ "400": {
885
+ "content": {
886
+ "application/json": {
887
+ "schema": {
888
+ "$ref": "#/components/schemas/ErrorResponse"
889
+ }
890
+ }
891
+ },
892
+ "description": "Invalid request"
893
+ },
894
+ "401": {
895
+ "content": {
896
+ "application/json": {
897
+ "schema": {
898
+ "$ref": "#/components/schemas/ErrorResponse"
899
+ }
900
+ }
901
+ },
902
+ "description": "Authentication required"
903
+ },
904
+ "403": {
905
+ "content": {
906
+ "application/json": {
907
+ "schema": {
908
+ "$ref": "#/components/schemas/ErrorResponse"
909
+ }
910
+ }
911
+ },
912
+ "description": "Permission denied"
913
+ },
914
+ "404": {
915
+ "content": {
916
+ "application/json": {
917
+ "schema": {
918
+ "$ref": "#/components/schemas/ErrorResponse"
919
+ }
920
+ }
921
+ },
922
+ "description": "Resource not found"
923
+ },
924
+ "409": {
925
+ "content": {
926
+ "application/json": {
927
+ "schema": {
928
+ "$ref": "#/components/schemas/ErrorResponse"
929
+ }
930
+ }
931
+ },
932
+ "description": "Conflicting request or version"
933
+ },
934
+ "413": {
935
+ "content": {
936
+ "application/json": {
937
+ "schema": {
938
+ "$ref": "#/components/schemas/ErrorResponse"
939
+ }
940
+ }
941
+ },
942
+ "description": "Request body too large"
943
+ },
944
+ "422": {
945
+ "content": {
946
+ "application/json": {
947
+ "schema": {
948
+ "$ref": "#/components/schemas/ErrorResponse"
949
+ }
950
+ }
951
+ },
952
+ "description": "Unsupported configuration"
953
+ },
954
+ "429": {
955
+ "content": {
956
+ "application/json": {
957
+ "schema": {
958
+ "$ref": "#/components/schemas/ErrorResponse"
959
+ }
960
+ }
961
+ },
962
+ "description": "Admission limit reached"
963
+ },
964
+ "500": {
965
+ "content": {
966
+ "application/json": {
967
+ "schema": {
968
+ "$ref": "#/components/schemas/ErrorResponse"
969
+ }
970
+ }
971
+ },
972
+ "description": "Unexpected failure"
973
+ },
974
+ "503": {
975
+ "content": {
976
+ "application/json": {
977
+ "schema": {
978
+ "$ref": "#/components/schemas/ErrorResponse"
979
+ }
980
+ }
981
+ },
982
+ "description": "Dependency unavailable"
983
+ }
984
+ },
985
+ "security": [
986
+ {
987
+ "bearerAuth": []
988
+ }
989
+ ],
990
+ "x-state-credentials": ["user", "api_key"]
991
+ }
992
+ },
993
+ "/v1/credential": {
994
+ "get": {
995
+ "operationId": "getCredential",
996
+ "responses": {
997
+ "200": {
998
+ "content": {
999
+ "application/json": {
1000
+ "schema": {
1001
+ "properties": {
1002
+ "data": {
1003
+ "$ref": "#/components/schemas/Credential"
1004
+ }
1005
+ },
1006
+ "required": ["data"],
1007
+ "type": "object"
1008
+ }
1009
+ }
1010
+ },
1011
+ "description": "The calling credential, its workspace and its limits"
1012
+ },
1013
+ "400": {
1014
+ "content": {
1015
+ "application/json": {
1016
+ "schema": {
1017
+ "$ref": "#/components/schemas/ErrorResponse"
1018
+ }
1019
+ }
1020
+ },
1021
+ "description": "Invalid request"
1022
+ },
1023
+ "401": {
1024
+ "content": {
1025
+ "application/json": {
1026
+ "schema": {
1027
+ "$ref": "#/components/schemas/ErrorResponse"
1028
+ }
1029
+ }
1030
+ },
1031
+ "description": "Authentication required"
1032
+ },
1033
+ "403": {
1034
+ "content": {
1035
+ "application/json": {
1036
+ "schema": {
1037
+ "$ref": "#/components/schemas/ErrorResponse"
1038
+ }
1039
+ }
1040
+ },
1041
+ "description": "Permission denied"
1042
+ },
1043
+ "404": {
1044
+ "content": {
1045
+ "application/json": {
1046
+ "schema": {
1047
+ "$ref": "#/components/schemas/ErrorResponse"
1048
+ }
1049
+ }
1050
+ },
1051
+ "description": "Resource not found"
1052
+ },
1053
+ "409": {
1054
+ "content": {
1055
+ "application/json": {
1056
+ "schema": {
1057
+ "$ref": "#/components/schemas/ErrorResponse"
1058
+ }
1059
+ }
1060
+ },
1061
+ "description": "Conflicting request or version"
1062
+ },
1063
+ "413": {
1064
+ "content": {
1065
+ "application/json": {
1066
+ "schema": {
1067
+ "$ref": "#/components/schemas/ErrorResponse"
1068
+ }
1069
+ }
1070
+ },
1071
+ "description": "Request body too large"
1072
+ },
1073
+ "422": {
1074
+ "content": {
1075
+ "application/json": {
1076
+ "schema": {
1077
+ "$ref": "#/components/schemas/ErrorResponse"
1078
+ }
1079
+ }
1080
+ },
1081
+ "description": "Unsupported configuration"
1082
+ },
1083
+ "429": {
1084
+ "content": {
1085
+ "application/json": {
1086
+ "schema": {
1087
+ "$ref": "#/components/schemas/ErrorResponse"
1088
+ }
1089
+ }
1090
+ },
1091
+ "description": "Admission limit reached"
1092
+ },
1093
+ "500": {
1094
+ "content": {
1095
+ "application/json": {
1096
+ "schema": {
1097
+ "$ref": "#/components/schemas/ErrorResponse"
1098
+ }
1099
+ }
1100
+ },
1101
+ "description": "Unexpected failure"
1102
+ },
1103
+ "503": {
1104
+ "content": {
1105
+ "application/json": {
1106
+ "schema": {
1107
+ "$ref": "#/components/schemas/ErrorResponse"
1108
+ }
1109
+ }
1110
+ },
1111
+ "description": "Dependency unavailable"
1112
+ }
1113
+ },
1114
+ "security": [
1115
+ {
1116
+ "bearerAuth": []
1117
+ }
1118
+ ],
1119
+ "x-state-credentials": ["user", "api_key"]
1120
+ }
1121
+ },
1122
+ "/v1/environments/{environmentId}": {
1123
+ "get": {
1124
+ "operationId": "getEnvironment",
1125
+ "parameters": [
1126
+ {
1127
+ "in": "path",
1128
+ "name": "environmentId",
1129
+ "required": true,
1130
+ "schema": {
1131
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$",
1132
+ "type": "string"
1133
+ }
1134
+ }
1135
+ ],
1136
+ "responses": {
1137
+ "200": {
1138
+ "content": {
1139
+ "application/json": {
1140
+ "schema": {
1141
+ "properties": {
1142
+ "data": {
1143
+ "$ref": "#/components/schemas/Environment"
1144
+ }
1145
+ },
1146
+ "required": ["data"],
1147
+ "type": "object"
1148
+ }
1149
+ }
1150
+ },
1151
+ "description": "Environment and its apps"
1152
+ },
1153
+ "400": {
1154
+ "content": {
1155
+ "application/json": {
1156
+ "schema": {
1157
+ "$ref": "#/components/schemas/ErrorResponse"
1158
+ }
1159
+ }
1160
+ },
1161
+ "description": "Invalid request"
1162
+ },
1163
+ "401": {
1164
+ "content": {
1165
+ "application/json": {
1166
+ "schema": {
1167
+ "$ref": "#/components/schemas/ErrorResponse"
1168
+ }
1169
+ }
1170
+ },
1171
+ "description": "Authentication required"
1172
+ },
1173
+ "403": {
1174
+ "content": {
1175
+ "application/json": {
1176
+ "schema": {
1177
+ "$ref": "#/components/schemas/ErrorResponse"
1178
+ }
1179
+ }
1180
+ },
1181
+ "description": "Permission denied"
1182
+ },
1183
+ "404": {
1184
+ "content": {
1185
+ "application/json": {
1186
+ "schema": {
1187
+ "$ref": "#/components/schemas/ErrorResponse"
1188
+ }
1189
+ }
1190
+ },
1191
+ "description": "Resource not found"
1192
+ },
1193
+ "409": {
1194
+ "content": {
1195
+ "application/json": {
1196
+ "schema": {
1197
+ "$ref": "#/components/schemas/ErrorResponse"
1198
+ }
1199
+ }
1200
+ },
1201
+ "description": "Conflicting request or version"
1202
+ },
1203
+ "413": {
1204
+ "content": {
1205
+ "application/json": {
1206
+ "schema": {
1207
+ "$ref": "#/components/schemas/ErrorResponse"
1208
+ }
1209
+ }
1210
+ },
1211
+ "description": "Request body too large"
1212
+ },
1213
+ "422": {
1214
+ "content": {
1215
+ "application/json": {
1216
+ "schema": {
1217
+ "$ref": "#/components/schemas/ErrorResponse"
1218
+ }
1219
+ }
1220
+ },
1221
+ "description": "Unsupported configuration"
1222
+ },
1223
+ "429": {
1224
+ "content": {
1225
+ "application/json": {
1226
+ "schema": {
1227
+ "$ref": "#/components/schemas/ErrorResponse"
1228
+ }
1229
+ }
1230
+ },
1231
+ "description": "Admission limit reached"
1232
+ },
1233
+ "500": {
1234
+ "content": {
1235
+ "application/json": {
1236
+ "schema": {
1237
+ "$ref": "#/components/schemas/ErrorResponse"
1238
+ }
1239
+ }
1240
+ },
1241
+ "description": "Unexpected failure"
1242
+ },
1243
+ "503": {
1244
+ "content": {
1245
+ "application/json": {
1246
+ "schema": {
1247
+ "$ref": "#/components/schemas/ErrorResponse"
1248
+ }
1249
+ }
1250
+ },
1251
+ "description": "Dependency unavailable"
1252
+ }
1253
+ },
1254
+ "security": [
1255
+ {
1256
+ "bearerAuth": []
1257
+ }
1258
+ ],
1259
+ "x-state-credentials": ["user", "api_key"]
1260
+ },
1261
+ "patch": {
1262
+ "operationId": "updateEnvironment",
1263
+ "parameters": [
1264
+ {
1265
+ "in": "path",
1266
+ "name": "environmentId",
1267
+ "required": true,
1268
+ "schema": {
1269
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$",
1270
+ "type": "string"
1271
+ }
1272
+ }
1273
+ ],
1274
+ "requestBody": {
1275
+ "content": {
1276
+ "application/json": {
1277
+ "schema": {
1278
+ "properties": {
1279
+ "expectedVersion": {
1280
+ "minimum": 1,
1281
+ "type": "integer"
1282
+ },
1283
+ "labels": {
1284
+ "additionalProperties": {
1285
+ "maxLength": 256,
1286
+ "type": "string"
1287
+ },
1288
+ "type": "object"
1289
+ },
1290
+ "name": {
1291
+ "maxLength": 120,
1292
+ "minLength": 1,
1293
+ "type": ["string", "null"]
1294
+ }
1295
+ },
1296
+ "required": ["expectedVersion"],
1297
+ "type": "object"
1298
+ }
1299
+ }
1300
+ },
1301
+ "required": true
1302
+ },
1303
+ "responses": {
1304
+ "200": {
1305
+ "content": {
1306
+ "application/json": {
1307
+ "schema": {
1308
+ "properties": {
1309
+ "data": {
1310
+ "$ref": "#/components/schemas/Environment"
1311
+ }
1312
+ },
1313
+ "required": ["data"],
1314
+ "type": "object"
1315
+ }
1316
+ }
1317
+ },
1318
+ "description": "Environment renamed or relabeled"
1319
+ },
1320
+ "400": {
1321
+ "content": {
1322
+ "application/json": {
1323
+ "schema": {
1324
+ "$ref": "#/components/schemas/ErrorResponse"
1325
+ }
1326
+ }
1327
+ },
1328
+ "description": "Invalid request"
1329
+ },
1330
+ "401": {
1331
+ "content": {
1332
+ "application/json": {
1333
+ "schema": {
1334
+ "$ref": "#/components/schemas/ErrorResponse"
1335
+ }
1336
+ }
1337
+ },
1338
+ "description": "Authentication required"
1339
+ },
1340
+ "403": {
1341
+ "content": {
1342
+ "application/json": {
1343
+ "schema": {
1344
+ "$ref": "#/components/schemas/ErrorResponse"
1345
+ }
1346
+ }
1347
+ },
1348
+ "description": "Permission denied"
1349
+ },
1350
+ "404": {
1351
+ "content": {
1352
+ "application/json": {
1353
+ "schema": {
1354
+ "$ref": "#/components/schemas/ErrorResponse"
1355
+ }
1356
+ }
1357
+ },
1358
+ "description": "Resource not found"
1359
+ },
1360
+ "409": {
1361
+ "content": {
1362
+ "application/json": {
1363
+ "schema": {
1364
+ "$ref": "#/components/schemas/ErrorResponse"
1365
+ }
1366
+ }
1367
+ },
1368
+ "description": "Conflicting request or version"
1369
+ },
1370
+ "413": {
1371
+ "content": {
1372
+ "application/json": {
1373
+ "schema": {
1374
+ "$ref": "#/components/schemas/ErrorResponse"
1375
+ }
1376
+ }
1377
+ },
1378
+ "description": "Request body too large"
1379
+ },
1380
+ "422": {
1381
+ "content": {
1382
+ "application/json": {
1383
+ "schema": {
1384
+ "$ref": "#/components/schemas/ErrorResponse"
1385
+ }
1386
+ }
1387
+ },
1388
+ "description": "Unsupported configuration"
1389
+ },
1390
+ "429": {
1391
+ "content": {
1392
+ "application/json": {
1393
+ "schema": {
1394
+ "$ref": "#/components/schemas/ErrorResponse"
1395
+ }
1396
+ }
1397
+ },
1398
+ "description": "Admission limit reached"
1399
+ },
1400
+ "500": {
1401
+ "content": {
1402
+ "application/json": {
1403
+ "schema": {
1404
+ "$ref": "#/components/schemas/ErrorResponse"
1405
+ }
1406
+ }
1407
+ },
1408
+ "description": "Unexpected failure"
1409
+ },
1410
+ "503": {
1411
+ "content": {
1412
+ "application/json": {
1413
+ "schema": {
1414
+ "$ref": "#/components/schemas/ErrorResponse"
1415
+ }
1416
+ }
1417
+ },
1418
+ "description": "Dependency unavailable"
1419
+ }
1420
+ },
1421
+ "security": [
1422
+ {
1423
+ "bearerAuth": []
1424
+ }
1425
+ ],
1426
+ "x-state-credentials": ["user", "api_key"]
1427
+ }
1428
+ },
1429
+ "/v1/environments/{environmentId}/apps/{appKey}/connection": {
1430
+ "get": {
1431
+ "operationId": "getConnection",
1432
+ "parameters": [
1433
+ {
1434
+ "in": "path",
1435
+ "name": "environmentId",
1436
+ "required": true,
1437
+ "schema": {
1438
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$",
1439
+ "type": "string"
1440
+ }
1441
+ },
1442
+ {
1443
+ "in": "path",
1444
+ "name": "appKey",
1445
+ "required": true,
1446
+ "schema": {
1447
+ "pattern": "^[a-z][a-z0-9-]{0,39}$",
1448
+ "type": "string"
1449
+ }
1450
+ }
1451
+ ],
1452
+ "responses": {
1453
+ "200": {
1454
+ "content": {
1455
+ "application/json": {
1456
+ "schema": {
1457
+ "properties": {
1458
+ "data": {
1459
+ "$ref": "#/components/schemas/Connection"
1460
+ }
1461
+ },
1462
+ "required": ["data"],
1463
+ "type": "object"
1464
+ }
1465
+ }
1466
+ },
1467
+ "description": "How to reach one app; never contains secrets"
1468
+ },
1469
+ "400": {
1470
+ "content": {
1471
+ "application/json": {
1472
+ "schema": {
1473
+ "$ref": "#/components/schemas/ErrorResponse"
1474
+ }
1475
+ }
1476
+ },
1477
+ "description": "Invalid request"
1478
+ },
1479
+ "401": {
1480
+ "content": {
1481
+ "application/json": {
1482
+ "schema": {
1483
+ "$ref": "#/components/schemas/ErrorResponse"
1484
+ }
1485
+ }
1486
+ },
1487
+ "description": "Authentication required"
1488
+ },
1489
+ "403": {
1490
+ "content": {
1491
+ "application/json": {
1492
+ "schema": {
1493
+ "$ref": "#/components/schemas/ErrorResponse"
1494
+ }
1495
+ }
1496
+ },
1497
+ "description": "Permission denied"
1498
+ },
1499
+ "404": {
1500
+ "content": {
1501
+ "application/json": {
1502
+ "schema": {
1503
+ "$ref": "#/components/schemas/ErrorResponse"
1504
+ }
1505
+ }
1506
+ },
1507
+ "description": "Resource not found"
1508
+ },
1509
+ "409": {
1510
+ "content": {
1511
+ "application/json": {
1512
+ "schema": {
1513
+ "$ref": "#/components/schemas/ErrorResponse"
1514
+ }
1515
+ }
1516
+ },
1517
+ "description": "Conflicting request or version"
1518
+ },
1519
+ "413": {
1520
+ "content": {
1521
+ "application/json": {
1522
+ "schema": {
1523
+ "$ref": "#/components/schemas/ErrorResponse"
1524
+ }
1525
+ }
1526
+ },
1527
+ "description": "Request body too large"
1528
+ },
1529
+ "422": {
1530
+ "content": {
1531
+ "application/json": {
1532
+ "schema": {
1533
+ "$ref": "#/components/schemas/ErrorResponse"
1534
+ }
1535
+ }
1536
+ },
1537
+ "description": "Unsupported configuration"
1538
+ },
1539
+ "429": {
1540
+ "content": {
1541
+ "application/json": {
1542
+ "schema": {
1543
+ "$ref": "#/components/schemas/ErrorResponse"
1544
+ }
1545
+ }
1546
+ },
1547
+ "description": "Admission limit reached"
1548
+ },
1549
+ "500": {
1550
+ "content": {
1551
+ "application/json": {
1552
+ "schema": {
1553
+ "$ref": "#/components/schemas/ErrorResponse"
1554
+ }
1555
+ }
1556
+ },
1557
+ "description": "Unexpected failure"
1558
+ },
1559
+ "503": {
1560
+ "content": {
1561
+ "application/json": {
1562
+ "schema": {
1563
+ "$ref": "#/components/schemas/ErrorResponse"
1564
+ }
1565
+ }
1566
+ },
1567
+ "description": "Dependency unavailable"
1568
+ }
1569
+ },
1570
+ "security": [
1571
+ {
1572
+ "bearerAuth": []
1573
+ }
1574
+ ],
1575
+ "x-state-credentials": ["user", "api_key"]
1576
+ }
1577
+ },
1578
+ "/v1/environments/{environmentId}/apps/{appKey}/connection/reveal": {
1579
+ "post": {
1580
+ "operationId": "revealConnection",
1581
+ "parameters": [
1582
+ {
1583
+ "in": "path",
1584
+ "name": "environmentId",
1585
+ "required": true,
1586
+ "schema": {
1587
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$",
1588
+ "type": "string"
1589
+ }
1590
+ },
1591
+ {
1592
+ "in": "path",
1593
+ "name": "appKey",
1594
+ "required": true,
1595
+ "schema": {
1596
+ "pattern": "^[a-z][a-z0-9-]{0,39}$",
1597
+ "type": "string"
1598
+ }
1599
+ }
1600
+ ],
1601
+ "requestBody": {
1602
+ "content": {
1603
+ "application/json": {
1604
+ "schema": {
1605
+ "properties": {
1606
+ "actorId": {
1607
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$",
1608
+ "type": "string"
1609
+ }
1610
+ },
1611
+ "required": ["actorId"],
1612
+ "type": "object"
1613
+ }
1614
+ }
1615
+ },
1616
+ "required": true
1617
+ },
1618
+ "responses": {
1619
+ "200": {
1620
+ "content": {
1621
+ "application/json": {
1622
+ "schema": {
1623
+ "properties": {
1624
+ "data": {
1625
+ "$ref": "#/components/schemas/ConnectionSecret"
1626
+ }
1627
+ },
1628
+ "required": ["data"],
1629
+ "type": "object"
1630
+ }
1631
+ }
1632
+ },
1633
+ "description": "Live credentials for one actor; recorded as an event"
1634
+ },
1635
+ "400": {
1636
+ "content": {
1637
+ "application/json": {
1638
+ "schema": {
1639
+ "$ref": "#/components/schemas/ErrorResponse"
1640
+ }
1641
+ }
1642
+ },
1643
+ "description": "Invalid request"
1644
+ },
1645
+ "401": {
1646
+ "content": {
1647
+ "application/json": {
1648
+ "schema": {
1649
+ "$ref": "#/components/schemas/ErrorResponse"
1650
+ }
1651
+ }
1652
+ },
1653
+ "description": "Authentication required"
1654
+ },
1655
+ "403": {
1656
+ "content": {
1657
+ "application/json": {
1658
+ "schema": {
1659
+ "$ref": "#/components/schemas/ErrorResponse"
1660
+ }
1661
+ }
1662
+ },
1663
+ "description": "Permission denied"
1664
+ },
1665
+ "404": {
1666
+ "content": {
1667
+ "application/json": {
1668
+ "schema": {
1669
+ "$ref": "#/components/schemas/ErrorResponse"
1670
+ }
1671
+ }
1672
+ },
1673
+ "description": "Resource not found"
1674
+ },
1675
+ "409": {
1676
+ "content": {
1677
+ "application/json": {
1678
+ "schema": {
1679
+ "$ref": "#/components/schemas/ErrorResponse"
1680
+ }
1681
+ }
1682
+ },
1683
+ "description": "Conflicting request or version"
1684
+ },
1685
+ "413": {
1686
+ "content": {
1687
+ "application/json": {
1688
+ "schema": {
1689
+ "$ref": "#/components/schemas/ErrorResponse"
1690
+ }
1691
+ }
1692
+ },
1693
+ "description": "Request body too large"
1694
+ },
1695
+ "422": {
1696
+ "content": {
1697
+ "application/json": {
1698
+ "schema": {
1699
+ "$ref": "#/components/schemas/ErrorResponse"
1700
+ }
1701
+ }
1702
+ },
1703
+ "description": "Unsupported configuration"
1704
+ },
1705
+ "429": {
1706
+ "content": {
1707
+ "application/json": {
1708
+ "schema": {
1709
+ "$ref": "#/components/schemas/ErrorResponse"
1710
+ }
1711
+ }
1712
+ },
1713
+ "description": "Admission limit reached"
1714
+ },
1715
+ "500": {
1716
+ "content": {
1717
+ "application/json": {
1718
+ "schema": {
1719
+ "$ref": "#/components/schemas/ErrorResponse"
1720
+ }
1721
+ }
1722
+ },
1723
+ "description": "Unexpected failure"
1724
+ },
1725
+ "503": {
1726
+ "content": {
1727
+ "application/json": {
1728
+ "schema": {
1729
+ "$ref": "#/components/schemas/ErrorResponse"
1730
+ }
1731
+ }
1732
+ },
1733
+ "description": "Dependency unavailable"
1734
+ }
1735
+ },
1736
+ "security": [
1737
+ {
1738
+ "bearerAuth": []
1739
+ }
1740
+ ],
1741
+ "x-state-credentials": ["user", "api_key"]
1742
+ }
1743
+ },
1744
+ "/v1/environments/{environmentId}/events": {
1745
+ "get": {
1746
+ "operationId": "listEnvironmentEvents",
1747
+ "parameters": [
1748
+ {
1749
+ "in": "path",
1750
+ "name": "environmentId",
1751
+ "required": true,
1752
+ "schema": {
1753
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$",
1754
+ "type": "string"
1755
+ }
1756
+ },
1757
+ {
1758
+ "in": "query",
1759
+ "name": "limit",
1760
+ "required": false,
1761
+ "schema": {
1762
+ "default": 50,
1763
+ "maximum": 100,
1764
+ "minimum": 1,
1765
+ "type": "integer"
1766
+ }
1767
+ },
1768
+ {
1769
+ "in": "query",
1770
+ "name": "cursor",
1771
+ "required": false,
1772
+ "schema": {
1773
+ "maxLength": 64,
1774
+ "pattern": "^\\d+$",
1775
+ "type": "string"
1776
+ }
1777
+ }
1778
+ ],
1779
+ "responses": {
1780
+ "200": {
1781
+ "content": {
1782
+ "application/json": {
1783
+ "schema": {
1784
+ "$ref": "#/components/schemas/EventPage"
1785
+ }
1786
+ }
1787
+ },
1788
+ "description": "The environment's timeline, oldest first"
1789
+ },
1790
+ "400": {
1791
+ "content": {
1792
+ "application/json": {
1793
+ "schema": {
1794
+ "$ref": "#/components/schemas/ErrorResponse"
1795
+ }
1796
+ }
1797
+ },
1798
+ "description": "Invalid request"
1799
+ },
1800
+ "401": {
1801
+ "content": {
1802
+ "application/json": {
1803
+ "schema": {
1804
+ "$ref": "#/components/schemas/ErrorResponse"
1805
+ }
1806
+ }
1807
+ },
1808
+ "description": "Authentication required"
1809
+ },
1810
+ "403": {
1811
+ "content": {
1812
+ "application/json": {
1813
+ "schema": {
1814
+ "$ref": "#/components/schemas/ErrorResponse"
1815
+ }
1816
+ }
1817
+ },
1818
+ "description": "Permission denied"
1819
+ },
1820
+ "404": {
1821
+ "content": {
1822
+ "application/json": {
1823
+ "schema": {
1824
+ "$ref": "#/components/schemas/ErrorResponse"
1825
+ }
1826
+ }
1827
+ },
1828
+ "description": "Resource not found"
1829
+ },
1830
+ "409": {
1831
+ "content": {
1832
+ "application/json": {
1833
+ "schema": {
1834
+ "$ref": "#/components/schemas/ErrorResponse"
1835
+ }
1836
+ }
1837
+ },
1838
+ "description": "Conflicting request or version"
1839
+ },
1840
+ "413": {
1841
+ "content": {
1842
+ "application/json": {
1843
+ "schema": {
1844
+ "$ref": "#/components/schemas/ErrorResponse"
1845
+ }
1846
+ }
1847
+ },
1848
+ "description": "Request body too large"
1849
+ },
1850
+ "422": {
1851
+ "content": {
1852
+ "application/json": {
1853
+ "schema": {
1854
+ "$ref": "#/components/schemas/ErrorResponse"
1855
+ }
1856
+ }
1857
+ },
1858
+ "description": "Unsupported configuration"
1859
+ },
1860
+ "429": {
1861
+ "content": {
1862
+ "application/json": {
1863
+ "schema": {
1864
+ "$ref": "#/components/schemas/ErrorResponse"
1865
+ }
1866
+ }
1867
+ },
1868
+ "description": "Admission limit reached"
1869
+ },
1870
+ "500": {
1871
+ "content": {
1872
+ "application/json": {
1873
+ "schema": {
1874
+ "$ref": "#/components/schemas/ErrorResponse"
1875
+ }
1876
+ }
1877
+ },
1878
+ "description": "Unexpected failure"
1879
+ },
1880
+ "503": {
1881
+ "content": {
1882
+ "application/json": {
1883
+ "schema": {
1884
+ "$ref": "#/components/schemas/ErrorResponse"
1885
+ }
1886
+ }
1887
+ },
1888
+ "description": "Dependency unavailable"
1889
+ }
1890
+ },
1891
+ "security": [
1892
+ {
1893
+ "bearerAuth": []
1894
+ }
1895
+ ],
1896
+ "x-state-credentials": ["user", "api_key"]
1897
+ }
1898
+ },
1899
+ "/v1/environments/{environmentId}/stop": {
1900
+ "post": {
1901
+ "operationId": "stopEnvironment",
1902
+ "parameters": [
1903
+ {
1904
+ "in": "path",
1905
+ "name": "environmentId",
1906
+ "required": true,
1907
+ "schema": {
1908
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$",
1909
+ "type": "string"
1910
+ }
1911
+ }
1912
+ ],
1913
+ "responses": {
1914
+ "200": {
1915
+ "content": {
1916
+ "application/json": {
1917
+ "schema": {
1918
+ "properties": {
1919
+ "data": {
1920
+ "$ref": "#/components/schemas/Environment"
1921
+ }
1922
+ },
1923
+ "required": ["data"],
1924
+ "type": "object"
1925
+ }
1926
+ }
1927
+ },
1928
+ "description": "Environment stopped or stopping"
1929
+ },
1930
+ "400": {
1931
+ "content": {
1932
+ "application/json": {
1933
+ "schema": {
1934
+ "$ref": "#/components/schemas/ErrorResponse"
1935
+ }
1936
+ }
1937
+ },
1938
+ "description": "Invalid request"
1939
+ },
1940
+ "401": {
1941
+ "content": {
1942
+ "application/json": {
1943
+ "schema": {
1944
+ "$ref": "#/components/schemas/ErrorResponse"
1945
+ }
1946
+ }
1947
+ },
1948
+ "description": "Authentication required"
1949
+ },
1950
+ "403": {
1951
+ "content": {
1952
+ "application/json": {
1953
+ "schema": {
1954
+ "$ref": "#/components/schemas/ErrorResponse"
1955
+ }
1956
+ }
1957
+ },
1958
+ "description": "Permission denied"
1959
+ },
1960
+ "404": {
1961
+ "content": {
1962
+ "application/json": {
1963
+ "schema": {
1964
+ "$ref": "#/components/schemas/ErrorResponse"
1965
+ }
1966
+ }
1967
+ },
1968
+ "description": "Resource not found"
1969
+ },
1970
+ "409": {
1971
+ "content": {
1972
+ "application/json": {
1973
+ "schema": {
1974
+ "$ref": "#/components/schemas/ErrorResponse"
1975
+ }
1976
+ }
1977
+ },
1978
+ "description": "Conflicting request or version"
1979
+ },
1980
+ "413": {
1981
+ "content": {
1982
+ "application/json": {
1983
+ "schema": {
1984
+ "$ref": "#/components/schemas/ErrorResponse"
1985
+ }
1986
+ }
1987
+ },
1988
+ "description": "Request body too large"
1989
+ },
1990
+ "422": {
1991
+ "content": {
1992
+ "application/json": {
1993
+ "schema": {
1994
+ "$ref": "#/components/schemas/ErrorResponse"
1995
+ }
1996
+ }
1997
+ },
1998
+ "description": "Unsupported configuration"
1999
+ },
2000
+ "429": {
2001
+ "content": {
2002
+ "application/json": {
2003
+ "schema": {
2004
+ "$ref": "#/components/schemas/ErrorResponse"
2005
+ }
2006
+ }
2007
+ },
2008
+ "description": "Admission limit reached"
2009
+ },
2010
+ "500": {
2011
+ "content": {
2012
+ "application/json": {
2013
+ "schema": {
2014
+ "$ref": "#/components/schemas/ErrorResponse"
2015
+ }
2016
+ }
2017
+ },
2018
+ "description": "Unexpected failure"
2019
+ },
2020
+ "503": {
2021
+ "content": {
2022
+ "application/json": {
2023
+ "schema": {
2024
+ "$ref": "#/components/schemas/ErrorResponse"
2025
+ }
2026
+ }
2027
+ },
2028
+ "description": "Dependency unavailable"
2029
+ }
2030
+ },
2031
+ "security": [
2032
+ {
2033
+ "bearerAuth": []
2034
+ }
2035
+ ],
2036
+ "x-state-credentials": ["user", "api_key"]
2037
+ }
2038
+ },
2039
+ "/v1/workspaces": {
2040
+ "get": {
2041
+ "operationId": "listWorkspaces",
2042
+ "parameters": [
2043
+ {
2044
+ "in": "query",
2045
+ "name": "archived",
2046
+ "required": false,
2047
+ "schema": {
2048
+ "default": "exclude",
2049
+ "enum": ["exclude", "include", "only"],
2050
+ "type": "string"
2051
+ }
2052
+ }
2053
+ ],
2054
+ "responses": {
2055
+ "200": {
2056
+ "content": {
2057
+ "application/json": {
2058
+ "schema": {
2059
+ "properties": {
2060
+ "data": {
2061
+ "items": {
2062
+ "$ref": "#/components/schemas/Workspace"
2063
+ },
2064
+ "type": "array"
2065
+ }
2066
+ },
2067
+ "required": ["data"],
2068
+ "type": "object"
2069
+ }
2070
+ }
2071
+ },
2072
+ "description": "The current organization's workspaces"
2073
+ },
2074
+ "400": {
2075
+ "content": {
2076
+ "application/json": {
2077
+ "schema": {
2078
+ "$ref": "#/components/schemas/ErrorResponse"
2079
+ }
2080
+ }
2081
+ },
2082
+ "description": "Invalid request"
2083
+ },
2084
+ "401": {
2085
+ "content": {
2086
+ "application/json": {
2087
+ "schema": {
2088
+ "$ref": "#/components/schemas/ErrorResponse"
2089
+ }
2090
+ }
2091
+ },
2092
+ "description": "Authentication required"
2093
+ },
2094
+ "403": {
2095
+ "content": {
2096
+ "application/json": {
2097
+ "schema": {
2098
+ "$ref": "#/components/schemas/ErrorResponse"
2099
+ }
2100
+ }
2101
+ },
2102
+ "description": "Permission denied"
2103
+ },
2104
+ "404": {
2105
+ "content": {
2106
+ "application/json": {
2107
+ "schema": {
2108
+ "$ref": "#/components/schemas/ErrorResponse"
2109
+ }
2110
+ }
2111
+ },
2112
+ "description": "Resource not found"
2113
+ },
2114
+ "409": {
2115
+ "content": {
2116
+ "application/json": {
2117
+ "schema": {
2118
+ "$ref": "#/components/schemas/ErrorResponse"
2119
+ }
2120
+ }
2121
+ },
2122
+ "description": "Conflicting request or version"
2123
+ },
2124
+ "413": {
2125
+ "content": {
2126
+ "application/json": {
2127
+ "schema": {
2128
+ "$ref": "#/components/schemas/ErrorResponse"
2129
+ }
2130
+ }
2131
+ },
2132
+ "description": "Request body too large"
2133
+ },
2134
+ "422": {
2135
+ "content": {
2136
+ "application/json": {
2137
+ "schema": {
2138
+ "$ref": "#/components/schemas/ErrorResponse"
2139
+ }
2140
+ }
2141
+ },
2142
+ "description": "Unsupported configuration"
2143
+ },
2144
+ "429": {
2145
+ "content": {
2146
+ "application/json": {
2147
+ "schema": {
2148
+ "$ref": "#/components/schemas/ErrorResponse"
2149
+ }
2150
+ }
2151
+ },
2152
+ "description": "Admission limit reached"
2153
+ },
2154
+ "500": {
2155
+ "content": {
2156
+ "application/json": {
2157
+ "schema": {
2158
+ "$ref": "#/components/schemas/ErrorResponse"
2159
+ }
2160
+ }
2161
+ },
2162
+ "description": "Unexpected failure"
2163
+ },
2164
+ "503": {
2165
+ "content": {
2166
+ "application/json": {
2167
+ "schema": {
2168
+ "$ref": "#/components/schemas/ErrorResponse"
2169
+ }
2170
+ }
2171
+ },
2172
+ "description": "Dependency unavailable"
2173
+ }
2174
+ },
2175
+ "security": [
2176
+ {
2177
+ "bearerAuth": []
2178
+ }
2179
+ ],
2180
+ "x-state-credentials": ["user", "api_key"]
2181
+ }
2182
+ },
2183
+ "/v1/workspaces/{workspaceId}": {
2184
+ "get": {
2185
+ "operationId": "getWorkspace",
2186
+ "parameters": [
2187
+ {
2188
+ "in": "path",
2189
+ "name": "workspaceId",
2190
+ "required": true,
2191
+ "schema": {
2192
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$",
2193
+ "type": "string"
2194
+ }
2195
+ }
2196
+ ],
2197
+ "responses": {
2198
+ "200": {
2199
+ "content": {
2200
+ "application/json": {
2201
+ "schema": {
2202
+ "properties": {
2203
+ "data": {
2204
+ "$ref": "#/components/schemas/Workspace"
2205
+ }
2206
+ },
2207
+ "required": ["data"],
2208
+ "type": "object"
2209
+ }
2210
+ }
2211
+ },
2212
+ "description": "Workspace"
2213
+ },
2214
+ "400": {
2215
+ "content": {
2216
+ "application/json": {
2217
+ "schema": {
2218
+ "$ref": "#/components/schemas/ErrorResponse"
2219
+ }
2220
+ }
2221
+ },
2222
+ "description": "Invalid request"
2223
+ },
2224
+ "401": {
2225
+ "content": {
2226
+ "application/json": {
2227
+ "schema": {
2228
+ "$ref": "#/components/schemas/ErrorResponse"
2229
+ }
2230
+ }
2231
+ },
2232
+ "description": "Authentication required"
2233
+ },
2234
+ "403": {
2235
+ "content": {
2236
+ "application/json": {
2237
+ "schema": {
2238
+ "$ref": "#/components/schemas/ErrorResponse"
2239
+ }
2240
+ }
2241
+ },
2242
+ "description": "Permission denied"
2243
+ },
2244
+ "404": {
2245
+ "content": {
2246
+ "application/json": {
2247
+ "schema": {
2248
+ "$ref": "#/components/schemas/ErrorResponse"
2249
+ }
2250
+ }
2251
+ },
2252
+ "description": "Resource not found"
2253
+ },
2254
+ "409": {
2255
+ "content": {
2256
+ "application/json": {
2257
+ "schema": {
2258
+ "$ref": "#/components/schemas/ErrorResponse"
2259
+ }
2260
+ }
2261
+ },
2262
+ "description": "Conflicting request or version"
2263
+ },
2264
+ "413": {
2265
+ "content": {
2266
+ "application/json": {
2267
+ "schema": {
2268
+ "$ref": "#/components/schemas/ErrorResponse"
2269
+ }
2270
+ }
2271
+ },
2272
+ "description": "Request body too large"
2273
+ },
2274
+ "422": {
2275
+ "content": {
2276
+ "application/json": {
2277
+ "schema": {
2278
+ "$ref": "#/components/schemas/ErrorResponse"
2279
+ }
2280
+ }
2281
+ },
2282
+ "description": "Unsupported configuration"
2283
+ },
2284
+ "429": {
2285
+ "content": {
2286
+ "application/json": {
2287
+ "schema": {
2288
+ "$ref": "#/components/schemas/ErrorResponse"
2289
+ }
2290
+ }
2291
+ },
2292
+ "description": "Admission limit reached"
2293
+ },
2294
+ "500": {
2295
+ "content": {
2296
+ "application/json": {
2297
+ "schema": {
2298
+ "$ref": "#/components/schemas/ErrorResponse"
2299
+ }
2300
+ }
2301
+ },
2302
+ "description": "Unexpected failure"
2303
+ },
2304
+ "503": {
2305
+ "content": {
2306
+ "application/json": {
2307
+ "schema": {
2308
+ "$ref": "#/components/schemas/ErrorResponse"
2309
+ }
2310
+ }
2311
+ },
2312
+ "description": "Dependency unavailable"
2313
+ }
2314
+ },
2315
+ "security": [
2316
+ {
2317
+ "bearerAuth": []
2318
+ }
2319
+ ],
2320
+ "x-state-credentials": ["user", "api_key"]
2321
+ }
2322
+ },
2323
+ "/v1/workspaces/{workspaceId}/environments": {
2324
+ "get": {
2325
+ "operationId": "listEnvironments",
2326
+ "parameters": [
2327
+ {
2328
+ "in": "path",
2329
+ "name": "workspaceId",
2330
+ "required": true,
2331
+ "schema": {
2332
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$",
2333
+ "type": "string"
2334
+ }
2335
+ },
2336
+ {
2337
+ "in": "query",
2338
+ "name": "limit",
2339
+ "required": false,
2340
+ "schema": {
2341
+ "default": 50,
2342
+ "maximum": 100,
2343
+ "minimum": 1,
2344
+ "type": "integer"
2345
+ }
2346
+ },
2347
+ {
2348
+ "in": "query",
2349
+ "name": "cursor",
2350
+ "required": false,
2351
+ "schema": {
2352
+ "maxLength": 2048,
2353
+ "type": "string"
2354
+ }
2355
+ },
2356
+ {
2357
+ "in": "query",
2358
+ "name": "status",
2359
+ "required": false,
2360
+ "schema": {
2361
+ "default": "all",
2362
+ "enum": ["live", "ended", "all"],
2363
+ "type": "string"
2364
+ }
2365
+ },
2366
+ {
2367
+ "in": "query",
2368
+ "name": "search",
2369
+ "required": false,
2370
+ "schema": {
2371
+ "maxLength": 120,
2372
+ "type": "string"
2373
+ }
2374
+ },
2375
+ {
2376
+ "in": "query",
2377
+ "name": "label",
2378
+ "required": false,
2379
+ "schema": {
2380
+ "anyOf": [
2381
+ {
2382
+ "maxLength": 320,
2383
+ "type": "string"
2384
+ },
2385
+ {
2386
+ "items": {
2387
+ "maxLength": 320,
2388
+ "type": "string"
2389
+ },
2390
+ "maxItems": 32,
2391
+ "type": "array"
2392
+ }
2393
+ ]
2394
+ }
2395
+ }
2396
+ ],
2397
+ "responses": {
2398
+ "200": {
2399
+ "content": {
2400
+ "application/json": {
2401
+ "schema": {
2402
+ "properties": {
2403
+ "data": {
2404
+ "items": {
2405
+ "$ref": "#/components/schemas/Environment"
2406
+ },
2407
+ "type": "array"
2408
+ },
2409
+ "nextCursor": {
2410
+ "type": ["string", "null"]
2411
+ }
2412
+ },
2413
+ "required": ["data", "nextCursor"],
2414
+ "type": "object"
2415
+ }
2416
+ }
2417
+ },
2418
+ "description": "The workspace's environments, newest first"
2419
+ },
2420
+ "400": {
2421
+ "content": {
2422
+ "application/json": {
2423
+ "schema": {
2424
+ "$ref": "#/components/schemas/ErrorResponse"
2425
+ }
2426
+ }
2427
+ },
2428
+ "description": "Invalid request"
2429
+ },
2430
+ "401": {
2431
+ "content": {
2432
+ "application/json": {
2433
+ "schema": {
2434
+ "$ref": "#/components/schemas/ErrorResponse"
2435
+ }
2436
+ }
2437
+ },
2438
+ "description": "Authentication required"
2439
+ },
2440
+ "403": {
2441
+ "content": {
2442
+ "application/json": {
2443
+ "schema": {
2444
+ "$ref": "#/components/schemas/ErrorResponse"
2445
+ }
2446
+ }
2447
+ },
2448
+ "description": "Permission denied"
2449
+ },
2450
+ "404": {
2451
+ "content": {
2452
+ "application/json": {
2453
+ "schema": {
2454
+ "$ref": "#/components/schemas/ErrorResponse"
2455
+ }
2456
+ }
2457
+ },
2458
+ "description": "Resource not found"
2459
+ },
2460
+ "409": {
2461
+ "content": {
2462
+ "application/json": {
2463
+ "schema": {
2464
+ "$ref": "#/components/schemas/ErrorResponse"
2465
+ }
2466
+ }
2467
+ },
2468
+ "description": "Conflicting request or version"
2469
+ },
2470
+ "413": {
2471
+ "content": {
2472
+ "application/json": {
2473
+ "schema": {
2474
+ "$ref": "#/components/schemas/ErrorResponse"
2475
+ }
2476
+ }
2477
+ },
2478
+ "description": "Request body too large"
2479
+ },
2480
+ "422": {
2481
+ "content": {
2482
+ "application/json": {
2483
+ "schema": {
2484
+ "$ref": "#/components/schemas/ErrorResponse"
2485
+ }
2486
+ }
2487
+ },
2488
+ "description": "Unsupported configuration"
2489
+ },
2490
+ "429": {
2491
+ "content": {
2492
+ "application/json": {
2493
+ "schema": {
2494
+ "$ref": "#/components/schemas/ErrorResponse"
2495
+ }
2496
+ }
2497
+ },
2498
+ "description": "Admission limit reached"
2499
+ },
2500
+ "500": {
2501
+ "content": {
2502
+ "application/json": {
2503
+ "schema": {
2504
+ "$ref": "#/components/schemas/ErrorResponse"
2505
+ }
2506
+ }
2507
+ },
2508
+ "description": "Unexpected failure"
2509
+ },
2510
+ "503": {
2511
+ "content": {
2512
+ "application/json": {
2513
+ "schema": {
2514
+ "$ref": "#/components/schemas/ErrorResponse"
2515
+ }
2516
+ }
2517
+ },
2518
+ "description": "Dependency unavailable"
2519
+ }
2520
+ },
2521
+ "security": [
2522
+ {
2523
+ "bearerAuth": []
2524
+ }
2525
+ ],
2526
+ "x-state-credentials": ["user", "api_key"]
2527
+ },
2528
+ "post": {
2529
+ "operationId": "createEnvironments",
2530
+ "parameters": [
2531
+ {
2532
+ "in": "path",
2533
+ "name": "workspaceId",
2534
+ "required": true,
2535
+ "schema": {
2536
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$",
2537
+ "type": "string"
2538
+ }
2539
+ },
2540
+ {
2541
+ "in": "header",
2542
+ "name": "idempotency-key",
2543
+ "required": true,
2544
+ "schema": {
2545
+ "maxLength": 128,
2546
+ "minLength": 8,
2547
+ "pattern": "^[A-Za-z0-9._:-]+$",
2548
+ "type": "string"
2549
+ }
2550
+ }
2551
+ ],
2552
+ "requestBody": {
2553
+ "content": {
2554
+ "application/json": {
2555
+ "schema": {
2556
+ "$ref": "#/components/schemas/CreateEnvironmentInput"
2557
+ }
2558
+ }
2559
+ },
2560
+ "required": true
2561
+ },
2562
+ "responses": {
2563
+ "202": {
2564
+ "content": {
2565
+ "application/json": {
2566
+ "schema": {
2567
+ "properties": {
2568
+ "data": {
2569
+ "items": {
2570
+ "$ref": "#/components/schemas/Environment"
2571
+ },
2572
+ "type": "array"
2573
+ }
2574
+ },
2575
+ "required": ["data"],
2576
+ "type": "object"
2577
+ }
2578
+ }
2579
+ },
2580
+ "description": "Environments accepted; each app starts in its own sandbox"
2581
+ },
2582
+ "400": {
2583
+ "content": {
2584
+ "application/json": {
2585
+ "schema": {
2586
+ "$ref": "#/components/schemas/ErrorResponse"
2587
+ }
2588
+ }
2589
+ },
2590
+ "description": "Invalid request"
2591
+ },
2592
+ "401": {
2593
+ "content": {
2594
+ "application/json": {
2595
+ "schema": {
2596
+ "$ref": "#/components/schemas/ErrorResponse"
2597
+ }
2598
+ }
2599
+ },
2600
+ "description": "Authentication required"
2601
+ },
2602
+ "403": {
2603
+ "content": {
2604
+ "application/json": {
2605
+ "schema": {
2606
+ "$ref": "#/components/schemas/ErrorResponse"
2607
+ }
2608
+ }
2609
+ },
2610
+ "description": "Permission denied"
2611
+ },
2612
+ "404": {
2613
+ "content": {
2614
+ "application/json": {
2615
+ "schema": {
2616
+ "$ref": "#/components/schemas/ErrorResponse"
2617
+ }
2618
+ }
2619
+ },
2620
+ "description": "Resource not found"
2621
+ },
2622
+ "409": {
2623
+ "content": {
2624
+ "application/json": {
2625
+ "schema": {
2626
+ "$ref": "#/components/schemas/ErrorResponse"
2627
+ }
2628
+ }
2629
+ },
2630
+ "description": "Conflicting request or version"
2631
+ },
2632
+ "413": {
2633
+ "content": {
2634
+ "application/json": {
2635
+ "schema": {
2636
+ "$ref": "#/components/schemas/ErrorResponse"
2637
+ }
2638
+ }
2639
+ },
2640
+ "description": "Request body too large"
2641
+ },
2642
+ "422": {
2643
+ "content": {
2644
+ "application/json": {
2645
+ "schema": {
2646
+ "$ref": "#/components/schemas/ErrorResponse"
2647
+ }
2648
+ }
2649
+ },
2650
+ "description": "Unsupported configuration"
2651
+ },
2652
+ "429": {
2653
+ "content": {
2654
+ "application/json": {
2655
+ "schema": {
2656
+ "$ref": "#/components/schemas/ErrorResponse"
2657
+ }
2658
+ }
2659
+ },
2660
+ "description": "Admission limit reached"
2661
+ },
2662
+ "500": {
2663
+ "content": {
2664
+ "application/json": {
2665
+ "schema": {
2666
+ "$ref": "#/components/schemas/ErrorResponse"
2667
+ }
2668
+ }
2669
+ },
2670
+ "description": "Unexpected failure"
2671
+ },
2672
+ "503": {
2673
+ "content": {
2674
+ "application/json": {
2675
+ "schema": {
2676
+ "$ref": "#/components/schemas/ErrorResponse"
2677
+ }
2678
+ }
2679
+ },
2680
+ "description": "Dependency unavailable"
2681
+ }
2682
+ },
2683
+ "security": [
2684
+ {
2685
+ "bearerAuth": []
2686
+ }
2687
+ ],
2688
+ "x-state-credentials": ["user", "api_key"]
2689
+ }
2690
+ },
2691
+ "/v1/workspaces/{workspaceId}/events": {
2692
+ "get": {
2693
+ "operationId": "listWorkspaceEvents",
2694
+ "parameters": [
2695
+ {
2696
+ "in": "path",
2697
+ "name": "workspaceId",
2698
+ "required": true,
2699
+ "schema": {
2700
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$",
2701
+ "type": "string"
2702
+ }
2703
+ },
2704
+ {
2705
+ "in": "query",
2706
+ "name": "limit",
2707
+ "required": false,
2708
+ "schema": {
2709
+ "default": 50,
2710
+ "maximum": 100,
2711
+ "minimum": 1,
2712
+ "type": "integer"
2713
+ }
2714
+ },
2715
+ {
2716
+ "in": "query",
2717
+ "name": "cursor",
2718
+ "required": false,
2719
+ "schema": {
2720
+ "maxLength": 64,
2721
+ "pattern": "^\\d+$",
2722
+ "type": "string"
2723
+ }
2724
+ }
2725
+ ],
2726
+ "responses": {
2727
+ "200": {
2728
+ "content": {
2729
+ "application/json": {
2730
+ "schema": {
2731
+ "$ref": "#/components/schemas/EventPage"
2732
+ }
2733
+ }
2734
+ },
2735
+ "description": "Workspace activity, newest first"
2736
+ },
2737
+ "400": {
2738
+ "content": {
2739
+ "application/json": {
2740
+ "schema": {
2741
+ "$ref": "#/components/schemas/ErrorResponse"
2742
+ }
2743
+ }
2744
+ },
2745
+ "description": "Invalid request"
2746
+ },
2747
+ "401": {
2748
+ "content": {
2749
+ "application/json": {
2750
+ "schema": {
2751
+ "$ref": "#/components/schemas/ErrorResponse"
2752
+ }
2753
+ }
2754
+ },
2755
+ "description": "Authentication required"
2756
+ },
2757
+ "403": {
2758
+ "content": {
2759
+ "application/json": {
2760
+ "schema": {
2761
+ "$ref": "#/components/schemas/ErrorResponse"
2762
+ }
2763
+ }
2764
+ },
2765
+ "description": "Permission denied"
2766
+ },
2767
+ "404": {
2768
+ "content": {
2769
+ "application/json": {
2770
+ "schema": {
2771
+ "$ref": "#/components/schemas/ErrorResponse"
2772
+ }
2773
+ }
2774
+ },
2775
+ "description": "Resource not found"
2776
+ },
2777
+ "409": {
2778
+ "content": {
2779
+ "application/json": {
2780
+ "schema": {
2781
+ "$ref": "#/components/schemas/ErrorResponse"
2782
+ }
2783
+ }
2784
+ },
2785
+ "description": "Conflicting request or version"
2786
+ },
2787
+ "413": {
2788
+ "content": {
2789
+ "application/json": {
2790
+ "schema": {
2791
+ "$ref": "#/components/schemas/ErrorResponse"
2792
+ }
2793
+ }
2794
+ },
2795
+ "description": "Request body too large"
2796
+ },
2797
+ "422": {
2798
+ "content": {
2799
+ "application/json": {
2800
+ "schema": {
2801
+ "$ref": "#/components/schemas/ErrorResponse"
2802
+ }
2803
+ }
2804
+ },
2805
+ "description": "Unsupported configuration"
2806
+ },
2807
+ "429": {
2808
+ "content": {
2809
+ "application/json": {
2810
+ "schema": {
2811
+ "$ref": "#/components/schemas/ErrorResponse"
2812
+ }
2813
+ }
2814
+ },
2815
+ "description": "Admission limit reached"
2816
+ },
2817
+ "500": {
2818
+ "content": {
2819
+ "application/json": {
2820
+ "schema": {
2821
+ "$ref": "#/components/schemas/ErrorResponse"
2822
+ }
2823
+ }
2824
+ },
2825
+ "description": "Unexpected failure"
2826
+ },
2827
+ "503": {
2828
+ "content": {
2829
+ "application/json": {
2830
+ "schema": {
2831
+ "$ref": "#/components/schemas/ErrorResponse"
2832
+ }
2833
+ }
2834
+ },
2835
+ "description": "Dependency unavailable"
2836
+ }
2837
+ },
2838
+ "security": [
2839
+ {
2840
+ "bearerAuth": []
2841
+ }
2842
+ ],
2843
+ "x-state-credentials": ["user", "api_key"]
2844
+ }
2845
+ }
2846
+ },
2847
+ "servers": [
2848
+ {
2849
+ "url": "https://state-api.usestatemachines.workers.dev"
2850
+ }
2851
+ ],
2852
+ "webhooks": {}
2853
+ }