Skip to content

Commit 0176539

Browse files
e2b-generated-code-auto-fixer[bot]huv1kgithub-actions[bot]
authored
docs: update API reference spec (#271)
Co-authored-by: Lukáš Huvar <lukas@huvar.cz> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
1 parent ca4f0cd commit 0176539

1 file changed

Lines changed: 69 additions & 0 deletions

File tree

openapi-public.yml

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -353,6 +353,12 @@ paths:
353353
- ApiKeyAuth: []
354354
parameters:
355355
- $ref: '#/components/parameters/sandboxID'
356+
requestBody:
357+
required: false
358+
content:
359+
application/json:
360+
schema:
361+
$ref: '#/components/schemas/SandboxPauseRequest'
356362
responses:
357363
'204':
358364
description: The sandbox was paused successfully and can be resumed
@@ -632,6 +638,46 @@ paths:
632638
servers:
633639
- *id001
634640
/v2/templates:
641+
get:
642+
description: List all templates
643+
tags:
644+
- Templates
645+
security:
646+
- ApiKeyAuth: []
647+
- AccessTokenAuth: []
648+
parameters:
649+
- in: query
650+
required: false
651+
name: teamID
652+
schema:
653+
type: string
654+
description: Identifier of the team
655+
- $ref: '#/components/parameters/paginationNextToken'
656+
- $ref: '#/components/parameters/paginationLimit'
657+
responses:
658+
'200':
659+
description: Successfully returned all templates
660+
headers:
661+
X-Next-Token:
662+
description: Cursor to fetch the next page of results, if more exist
663+
schema:
664+
type: string
665+
content:
666+
application/json:
667+
schema:
668+
type: array
669+
items:
670+
$ref: '#/components/schemas/Template'
671+
'400':
672+
$ref: '#/components/responses/400'
673+
'401':
674+
$ref: '#/components/responses/401'
675+
'403':
676+
$ref: '#/components/responses/403'
677+
'500':
678+
$ref: '#/components/responses/500'
679+
operationId: listTemplatesV2
680+
summary: List templates (v2)
635681
post:
636682
description: Create a new template
637683
deprecated: true
@@ -700,6 +746,7 @@ paths:
700746
/templates:
701747
get:
702748
description: List all templates
749+
deprecated: true
703750
tags:
704751
- Templates
705752
security:
@@ -4091,6 +4138,16 @@ components:
40914138
type: boolean
40924139
default: false
40934140
description: Automatically pauses the sandbox after the timeout
4141+
autoPauseMemory:
4142+
type: boolean
4143+
default: true
4144+
description: Controls the snapshot kind taken when the sandbox auto-pauses
4145+
on timeout (only relevant when autoPause is true). When false, the auto-pause
4146+
drops the in-memory state and persists only the filesystem (a filesystem-only
4147+
snapshot); resuming it cold-boots (reboots) the sandbox from disk. Such
4148+
a snapshot cannot be auto-resumed by traffic and must be resumed explicitly,
4149+
so it cannot be combined with autoResume. Defaults to true (full memory
4150+
snapshot).
40944151
autoResume:
40954152
$ref: '#/components/schemas/SandboxAutoResumeConfig'
40964153
secure:
@@ -4164,6 +4221,18 @@ components:
41644221
description: Optional name for the snapshot template. If a snapshot template
41654222
with this name already exists, a new build will be assigned to the existing
41664223
template instead of creating a new one.
4224+
SandboxPauseRequest:
4225+
type: object
4226+
properties:
4227+
memory:
4228+
type: boolean
4229+
default: true
4230+
description: Whether to capture a full memory snapshot. When false, only
4231+
the filesystem is persisted and resuming the sandbox cold-boots (reboots)
4232+
it from disk, losing in-memory state, running processes, and open connections.
4233+
Resume it with an explicit request (connect or resume); auto-resume, which
4234+
can be triggered by arbitrary traffic, refuses such a sandbox. Defaults
4235+
to true.
41674236
TeamMetric:
41684237
description: Team metric with timestamp
41694238
required:

0 commit comments

Comments
 (0)