|
200 | 200 | "description": "Sandbox privacy. 0 for public, 1 for unlisted, and 2 for private. Subject to the minimum privacy restrictions of the workspace. Defaults to the privacy of the original sandbox.", |
201 | 201 | "type": "integer" |
202 | 202 | }, |
| 203 | + "start_options": { |
| 204 | + "description": "Optional VM start configuration. If provided, the sandbox VM will be started immediately after creation.", |
| 205 | + "properties": { |
| 206 | + "hibernation_timeout_seconds": { |
| 207 | + "description": "The time in seconds after which the VM will hibernate due to inactivity.\nMust be a positive integer between 1 and 86400 (24 hours).\nDefaults to 300 seconds (5 minutes) if not specified.\n", |
| 208 | + "example": 300, |
| 209 | + "maximum": 86400, |
| 210 | + "minimum": 1, |
| 211 | + "type": "integer" |
| 212 | + }, |
| 213 | + "ipcountry": { |
| 214 | + "description": "This determines in which cluster, closest to the given country the VM will be started in. The format is ISO-3166-1 alpha-2. If not set, the VM will be started closest to the caller of this API. This will only be applied when a VM is run for the first time, and will only serve as a hint (e.g. if the template of this sandbox runs in EU cluster, this sandbox will also run in the EU cluster).", |
| 215 | + "example": "NL", |
| 216 | + "pattern": "^[A-Z]{2}$", |
| 217 | + "type": "string" |
| 218 | + }, |
| 219 | + "tier": { |
| 220 | + "description": "Determines which specs to start the VM with. If not specified, the VM will start with the default specs for the workspace.\n\nYou can only specify a VM tier when starting a VM that is inside your workspace. Specifying a VM tier for someone else's sandbox will return an error.\n\nNot all tiers will be available depending on the workspace subscription status, and higher tiers incur higher costs. Please see codesandbox.io/pricing for details on specs and costs.\n", |
| 221 | + "enum": [ |
| 222 | + "Pico", |
| 223 | + "Nano", |
| 224 | + "Micro", |
| 225 | + "Small", |
| 226 | + "Medium", |
| 227 | + "Large", |
| 228 | + "XLarge" |
| 229 | + ], |
| 230 | + "example": "Micro" |
| 231 | + } |
| 232 | + }, |
| 233 | + "type": "object" |
| 234 | + }, |
203 | 235 | "tags": { |
204 | 236 | "default": [], |
205 | 237 | "description": "Tags to set on the new sandbox, if any. Will not inherit tags from the source sandbox.", |
|
213 | 245 | "type": "string" |
214 | 246 | } |
215 | 247 | }, |
216 | | - "title": "SandboxForkRequest" |
| 248 | + "title": "SandboxForkRequest", |
| 249 | + "type": "object" |
217 | 250 | }, |
218 | 251 | "SandboxForkResponse": { |
219 | 252 | "allOf": [ |
|
242 | 275 | "properties": { |
243 | 276 | "alias": { "type": "string" }, |
244 | 277 | "id": { "type": "string" }, |
| 278 | + "start_response": { |
| 279 | + "description": "VM start response. Only present when start_options were provided in the request.", |
| 280 | + "nullable": true, |
| 281 | + "properties": { |
| 282 | + "bootup_type": { "type": "string" }, |
| 283 | + "cluster": { "type": "string" }, |
| 284 | + "id": { "type": "string" }, |
| 285 | + "latest_pitcher_version": { "type": "string" }, |
| 286 | + "pitcher_manager_version": { "type": "string" }, |
| 287 | + "pitcher_token": { "type": "string" }, |
| 288 | + "pitcher_url": { "type": "string" }, |
| 289 | + "pitcher_version": { "type": "string" }, |
| 290 | + "reconnect_token": { "type": "string" }, |
| 291 | + "user_workspace_path": { "type": "string" }, |
| 292 | + "workspace_path": { "type": "string" } |
| 293 | + }, |
| 294 | + "required": [ |
| 295 | + "bootup_type", |
| 296 | + "cluster", |
| 297 | + "id", |
| 298 | + "latest_pitcher_version", |
| 299 | + "pitcher_manager_version", |
| 300 | + "pitcher_token", |
| 301 | + "pitcher_url", |
| 302 | + "pitcher_version", |
| 303 | + "reconnect_token", |
| 304 | + "user_workspace_path", |
| 305 | + "workspace_path" |
| 306 | + ], |
| 307 | + "type": "object" |
| 308 | + }, |
245 | 309 | "title": { "nullable": true, "type": "string" } |
246 | 310 | }, |
247 | 311 | "required": ["alias", "id", "title"], |
|
605 | 669 | "ipcountry": { |
606 | 670 | "description": "This determines in which cluster, closest to the given country the VM will be started in. The format is ISO-3166-1 alpha-2. If not set, the VM will be started closest to the caller of this API. This will only be applied when a VM is run for the first time, and will only serve as a hint (e.g. if the template of this sandbox runs in EU cluster, this sandbox will also run in the EU cluster).", |
607 | 671 | "example": "NL", |
| 672 | + "pattern": "^[A-Z]{2}$", |
608 | 673 | "type": "string" |
609 | 674 | }, |
610 | 675 | "tier": { |
|
618 | 683 | "Large", |
619 | 684 | "XLarge" |
620 | 685 | ], |
621 | | - "example": "Micro", |
622 | | - "type": "string" |
| 686 | + "example": "Micro" |
623 | 687 | } |
624 | 688 | }, |
625 | | - "title": "VMStartRequest" |
| 689 | + "title": "VMStartRequest", |
| 690 | + "type": "object" |
626 | 691 | }, |
627 | 692 | "VMStartResponse": { |
628 | 693 | "allOf": [ |
|
695 | 760 | "Large", |
696 | 761 | "XLarge" |
697 | 762 | ], |
698 | | - "example": "Micro", |
699 | | - "type": "string" |
| 763 | + "example": "Micro" |
700 | 764 | } |
701 | 765 | }, |
702 | 766 | "required": ["tier"], |
703 | | - "title": "VMUpdateSpecsRequest" |
| 767 | + "title": "VMUpdateSpecsRequest", |
| 768 | + "type": "object" |
704 | 769 | }, |
705 | 770 | "VMUpdateSpecsResponse": { |
706 | 771 | "allOf": [ |
|
748 | 813 | } |
749 | 814 | }, |
750 | 815 | "required": ["name"], |
751 | | - "title": "WorkspaceCreateRequest" |
| 816 | + "title": "WorkspaceCreateRequest", |
| 817 | + "type": "object" |
752 | 818 | }, |
753 | 819 | "WorkspaceCreateResponse": { |
754 | 820 | "allOf": [ |
|
930 | 996 | "name": "order_by", |
931 | 997 | "required": false, |
932 | 998 | "schema": { |
933 | | - "enum": ["inserted_at", "updated_at"], |
934 | | - "type": "string" |
| 999 | + "default": "updated_at", |
| 1000 | + "enum": ["inserted_at", "updated_at"] |
935 | 1001 | } |
936 | 1002 | }, |
937 | 1003 | { |
|
940 | 1006 | "in": "query", |
941 | 1007 | "name": "direction", |
942 | 1008 | "required": false, |
943 | | - "schema": { "enum": ["asc", "desc"], "type": "string" } |
| 1009 | + "schema": { "default": "desc", "enum": ["asc", "desc"] } |
944 | 1010 | }, |
945 | 1011 | { |
946 | 1012 | "description": "Maximum number of sandboxes to return in a single response", |
|
1236 | 1302 | } |
1237 | 1303 | }, |
1238 | 1304 | "security": [], |
1239 | | - "servers": [{ "url": "https://api.codesandbox.io", "variables": {} }], |
| 1305 | + "servers": [{ "url": "https://api.codesandbox.stream", "variables": {} }], |
1240 | 1306 | "tags": [] |
1241 | 1307 | } |
0 commit comments