Skip to content

Java-only types

Types of the Java SDK with no Python counterpart of the same name: mostly option objects and result records. The methods that take them are on the area pages.

Plan limits (persistent volumes are Volume).

public static Map<String, Object> limits(Client client)
static
Parameter Type Default
client Client

Returns Map<String, Object>

Source: sdk/java/src/main/java/dev/svm/sandbox/Account.java:9 Source: sdk/java/src/main/java/dev/svm/sandbox/Account.java:6

What a tool returns; ok is false when it could not do what was asked and text then says why.

Field Type Description
cached boolean
data Map<String, Object>
error String
ok boolean
text String
tokens long
truncated boolean
public String toString()

Returns String

Source: sdk/java/src/main/java/dev/svm/sandbox/AgentTools.java:64 Source: sdk/java/src/main/java/dev/svm/sandbox/AgentTools.java:48

The API’s structured error. of returns the most specific subclass for a code; every one is an ApiException, so catch (ApiException e) still catches all of them, and it is a SandboxException, the base of every SDK error. attempts is how many tries the client made.

public ApiException(String code, String message, int status, String requestId)
public ApiException(String code, String message, int status, String requestId, Object details, Boolean retryable, Double retryAfterSeconds)
Parameter Type Default
code String
message String
status int
requestId String
details Object optional
retryable Boolean optional
retryAfterSeconds Double optional
Source: sdk/java/src/main/java/dev/svm/sandbox/ApiException.java:21
public String apiMessage()

Returns String

Source: sdk/java/src/main/java/dev/svm/sandbox/ApiException.java:37
public int attempts()

Returns int

Source: sdk/java/src/main/java/dev/svm/sandbox/ApiException.java:43
public String code()

Returns String

Source: sdk/java/src/main/java/dev/svm/sandbox/ApiException.java:36
public Object details()

Returns Object

Source: sdk/java/src/main/java/dev/svm/sandbox/ApiException.java:40
public static String errorKind(Throwable error)
static

The language-neutral name the conformance suite uses for an error; a data-plane failure has the kind of its REST counterpart.

Parameter Type Default
error Throwable

Returns String

Source: sdk/java/src/main/java/dev/svm/sandbox/ApiException.java:152
public boolean isNotFound()

Returns boolean

Source: sdk/java/src/main/java/dev/svm/sandbox/ApiException.java:44
public static ApiException of(String code, String message, int status, String requestId, Object details, Boolean retryable, Double retryAfterSeconds)
public static ApiException of(String code, String message, int status, String requestId, Object details, Boolean retryable, Double retryAfterSeconds, String path)
static

The most specific error for a code; an unknown code stays a plain ApiException. The dedicated codes GUEST_UNRESPONSIVE, SANDBOX_UNREACHABLE and FILE_UPLOAD_FAILED name GuestUnresponsive, SandboxUnreachable and FileUpload from the code alone.

Parameter Type Default
code String
message String
status int
requestId String
details Object
retryable Boolean
retryAfterSeconds Double
path String optional

Returns ApiException

Source: sdk/java/src/main/java/dev/svm/sandbox/ApiException.java:67
public String requestId()

Returns String

Source: sdk/java/src/main/java/dev/svm/sandbox/ApiException.java:39
public Double retryAfterSeconds()

Returns Double

Source: sdk/java/src/main/java/dev/svm/sandbox/ApiException.java:42
public Boolean retryable()

Returns Boolean

Source: sdk/java/src/main/java/dev/svm/sandbox/ApiException.java:41
public int status()

Returns int

Source: sdk/java/src/main/java/dev/svm/sandbox/ApiException.java:38 Source: sdk/java/src/main/java/dev/svm/sandbox/ApiException.java:10
public String apiMessage()
from ApiException

Returns String

Source: sdk/java/src/main/java/dev/svm/sandbox/ApiException.java:37
public int attempts()
from ApiException

Returns int

Source: sdk/java/src/main/java/dev/svm/sandbox/ApiException.java:43
public String code()
from ApiException

Returns String

Source: sdk/java/src/main/java/dev/svm/sandbox/ApiException.java:36
public Object details()
from ApiException

Returns Object

Source: sdk/java/src/main/java/dev/svm/sandbox/ApiException.java:40
public static String errorKind(Throwable error)
static · from ApiException

The language-neutral name the conformance suite uses for an error; a data-plane failure has the kind of its REST counterpart.

Parameter Type Default
error Throwable

Returns String

Source: sdk/java/src/main/java/dev/svm/sandbox/ApiException.java:152
public boolean isNotFound()
from ApiException

Returns boolean

Source: sdk/java/src/main/java/dev/svm/sandbox/ApiException.java:44
public static ApiException of(String code, String message, int status, String requestId, Object details, Boolean retryable, Double retryAfterSeconds)
public static ApiException of(String code, String message, int status, String requestId, Object details, Boolean retryable, Double retryAfterSeconds, String path)
static · from ApiException

The most specific error for a code; an unknown code stays a plain ApiException. The dedicated codes GUEST_UNRESPONSIVE, SANDBOX_UNREACHABLE and FILE_UPLOAD_FAILED name GuestUnresponsive, SandboxUnreachable and FileUpload from the code alone.

Parameter Type Default
code String
message String
status int
requestId String
details Object
retryable Boolean
retryAfterSeconds Double
path String optional

Returns ApiException

Source: sdk/java/src/main/java/dev/svm/sandbox/ApiException.java:67
public String requestId()
from ApiException

Returns String

Source: sdk/java/src/main/java/dev/svm/sandbox/ApiException.java:39
public Double retryAfterSeconds()
from ApiException

Returns Double

Source: sdk/java/src/main/java/dev/svm/sandbox/ApiException.java:42
public Boolean retryable()
from ApiException

Returns Boolean

Source: sdk/java/src/main/java/dev/svm/sandbox/ApiException.java:41
public int status()
from ApiException

Returns int

Source: sdk/java/src/main/java/dev/svm/sandbox/ApiException.java:38 Source: sdk/java/src/main/java/dev/svm/sandbox/ApiException.java:183
public String apiMessage()
from ApiException

Returns String

Source: sdk/java/src/main/java/dev/svm/sandbox/ApiException.java:37
public int attempts()
from ApiException

Returns int

Source: sdk/java/src/main/java/dev/svm/sandbox/ApiException.java:43
public String code()
from ApiException

Returns String

Source: sdk/java/src/main/java/dev/svm/sandbox/ApiException.java:36
public Object details()
from ApiException

Returns Object

Source: sdk/java/src/main/java/dev/svm/sandbox/ApiException.java:40
public static String errorKind(Throwable error)
static · from ApiException

The language-neutral name the conformance suite uses for an error; a data-plane failure has the kind of its REST counterpart.

Parameter Type Default
error Throwable

Returns String

Source: sdk/java/src/main/java/dev/svm/sandbox/ApiException.java:152
public boolean isNotFound()
from ApiException

Returns boolean

Source: sdk/java/src/main/java/dev/svm/sandbox/ApiException.java:44
public static ApiException of(String code, String message, int status, String requestId, Object details, Boolean retryable, Double retryAfterSeconds)
public static ApiException of(String code, String message, int status, String requestId, Object details, Boolean retryable, Double retryAfterSeconds, String path)
static · from ApiException

The most specific error for a code; an unknown code stays a plain ApiException. The dedicated codes GUEST_UNRESPONSIVE, SANDBOX_UNREACHABLE and FILE_UPLOAD_FAILED name GuestUnresponsive, SandboxUnreachable and FileUpload from the code alone.

Parameter Type Default
code String
message String
status int
requestId String
details Object
retryable Boolean
retryAfterSeconds Double
path String optional

Returns ApiException

Source: sdk/java/src/main/java/dev/svm/sandbox/ApiException.java:67
public String requestId()
from ApiException

Returns String

Source: sdk/java/src/main/java/dev/svm/sandbox/ApiException.java:39
public Double retryAfterSeconds()
from ApiException

Returns Double

Source: sdk/java/src/main/java/dev/svm/sandbox/ApiException.java:42
public Boolean retryable()
from ApiException

Returns Boolean

Source: sdk/java/src/main/java/dev/svm/sandbox/ApiException.java:41
public int status()
from ApiException

Returns int

Source: sdk/java/src/main/java/dev/svm/sandbox/ApiException.java:38 Source: sdk/java/src/main/java/dev/svm/sandbox/ApiException.java:202
public String apiMessage()
from ApiException

Returns String

Source: sdk/java/src/main/java/dev/svm/sandbox/ApiException.java:37
public int attempts()
from ApiException

Returns int

Source: sdk/java/src/main/java/dev/svm/sandbox/ApiException.java:43
public String code()
from ApiException

Returns String

Source: sdk/java/src/main/java/dev/svm/sandbox/ApiException.java:36
public Object details()
from ApiException

Returns Object

Source: sdk/java/src/main/java/dev/svm/sandbox/ApiException.java:40
public static String errorKind(Throwable error)
static · from ApiException

The language-neutral name the conformance suite uses for an error; a data-plane failure has the kind of its REST counterpart.

Parameter Type Default
error Throwable

Returns String

Source: sdk/java/src/main/java/dev/svm/sandbox/ApiException.java:152
public boolean isNotFound()
from ApiException

Returns boolean

Source: sdk/java/src/main/java/dev/svm/sandbox/ApiException.java:44
public static ApiException of(String code, String message, int status, String requestId, Object details, Boolean retryable, Double retryAfterSeconds)
public static ApiException of(String code, String message, int status, String requestId, Object details, Boolean retryable, Double retryAfterSeconds, String path)
static · from ApiException

The most specific error for a code; an unknown code stays a plain ApiException. The dedicated codes GUEST_UNRESPONSIVE, SANDBOX_UNREACHABLE and FILE_UPLOAD_FAILED name GuestUnresponsive, SandboxUnreachable and FileUpload from the code alone.

Parameter Type Default
code String
message String
status int
requestId String
details Object
retryable Boolean
retryAfterSeconds Double
path String optional

Returns ApiException

Source: sdk/java/src/main/java/dev/svm/sandbox/ApiException.java:67
public String requestId()
from ApiException

Returns String

Source: sdk/java/src/main/java/dev/svm/sandbox/ApiException.java:39
public Double retryAfterSeconds()
from ApiException

Returns Double

Source: sdk/java/src/main/java/dev/svm/sandbox/ApiException.java:42
public Boolean retryable()
from ApiException

Returns Boolean

Source: sdk/java/src/main/java/dev/svm/sandbox/ApiException.java:41
public int status()
from ApiException

Returns int

Source: sdk/java/src/main/java/dev/svm/sandbox/ApiException.java:38 Source: sdk/java/src/main/java/dev/svm/sandbox/ApiException.java:192
public String apiMessage()
from ApiException

Returns String

Source: sdk/java/src/main/java/dev/svm/sandbox/ApiException.java:37
public int attempts()
from ApiException

Returns int

Source: sdk/java/src/main/java/dev/svm/sandbox/ApiException.java:43
public String code()
from ApiException

Returns String

Source: sdk/java/src/main/java/dev/svm/sandbox/ApiException.java:36
public Object details()
from ApiException

Returns Object

Source: sdk/java/src/main/java/dev/svm/sandbox/ApiException.java:40
public static String errorKind(Throwable error)
static · from ApiException

The language-neutral name the conformance suite uses for an error; a data-plane failure has the kind of its REST counterpart.

Parameter Type Default
error Throwable

Returns String

Source: sdk/java/src/main/java/dev/svm/sandbox/ApiException.java:152
public boolean isNotFound()
from ApiException

Returns boolean

Source: sdk/java/src/main/java/dev/svm/sandbox/ApiException.java:44
public static ApiException of(String code, String message, int status, String requestId, Object details, Boolean retryable, Double retryAfterSeconds)
public static ApiException of(String code, String message, int status, String requestId, Object details, Boolean retryable, Double retryAfterSeconds, String path)
static · from ApiException

The most specific error for a code; an unknown code stays a plain ApiException. The dedicated codes GUEST_UNRESPONSIVE, SANDBOX_UNREACHABLE and FILE_UPLOAD_FAILED name GuestUnresponsive, SandboxUnreachable and FileUpload from the code alone.

Parameter Type Default
code String
message String
status int
requestId String
details Object
retryable Boolean
retryAfterSeconds Double
path String optional

Returns ApiException

Source: sdk/java/src/main/java/dev/svm/sandbox/ApiException.java:67
public String requestId()
from ApiException

Returns String

Source: sdk/java/src/main/java/dev/svm/sandbox/ApiException.java:39
public Double retryAfterSeconds()
from ApiException

Returns Double

Source: sdk/java/src/main/java/dev/svm/sandbox/ApiException.java:42
public Boolean retryable()
from ApiException

Returns Boolean

Source: sdk/java/src/main/java/dev/svm/sandbox/ApiException.java:41
public int status()
from ApiException

Returns int

Source: sdk/java/src/main/java/dev/svm/sandbox/ApiException.java:38 Source: sdk/java/src/main/java/dev/svm/sandbox/ApiException.java:208

The server answered FILE_UPLOAD_FAILED: the file in the sandbox is not what was sent; an Internal by its status. Java has single inheritance, so unlike the other SDKs it is not also a FileUploadException: errorKind says file_upload for both.

Source: sdk/java/src/main/java/dev/svm/sandbox/ApiException.java:207

The sandbox’s guest took the call and did not answer in time: the server answered GUEST_UNRESPONSIVE (503), for example on an exec (the reference vendor’s GuestUnresponsiveError). Assigned from that code only; an Unavailable. After a resume the recovery is on_resume “reboot”, which boots from the disk instead of the memory snapshot.

Source: sdk/java/src/main/java/dev/svm/sandbox/ApiException.java:215
public String apiMessage()
from ApiException

Returns String

Source: sdk/java/src/main/java/dev/svm/sandbox/ApiException.java:37
public int attempts()
from ApiException

Returns int

Source: sdk/java/src/main/java/dev/svm/sandbox/ApiException.java:43
public String code()
from ApiException

Returns String

Source: sdk/java/src/main/java/dev/svm/sandbox/ApiException.java:36
public Object details()
from ApiException

Returns Object

Source: sdk/java/src/main/java/dev/svm/sandbox/ApiException.java:40
public static String errorKind(Throwable error)
static · from ApiException

The language-neutral name the conformance suite uses for an error; a data-plane failure has the kind of its REST counterpart.

Parameter Type Default
error Throwable

Returns String

Source: sdk/java/src/main/java/dev/svm/sandbox/ApiException.java:152
public boolean isNotFound()
from ApiException

Returns boolean

Source: sdk/java/src/main/java/dev/svm/sandbox/ApiException.java:44
public static ApiException of(String code, String message, int status, String requestId, Object details, Boolean retryable, Double retryAfterSeconds)
public static ApiException of(String code, String message, int status, String requestId, Object details, Boolean retryable, Double retryAfterSeconds, String path)
static · from ApiException

The most specific error for a code; an unknown code stays a plain ApiException. The dedicated codes GUEST_UNRESPONSIVE, SANDBOX_UNREACHABLE and FILE_UPLOAD_FAILED name GuestUnresponsive, SandboxUnreachable and FileUpload from the code alone.

Parameter Type Default
code String
message String
status int
requestId String
details Object
retryable Boolean
retryAfterSeconds Double
path String optional

Returns ApiException

Source: sdk/java/src/main/java/dev/svm/sandbox/ApiException.java:67
public String requestId()
from ApiException

Returns String

Source: sdk/java/src/main/java/dev/svm/sandbox/ApiException.java:39
public Double retryAfterSeconds()
from ApiException

Returns Double

Source: sdk/java/src/main/java/dev/svm/sandbox/ApiException.java:42
public Boolean retryable()
from ApiException

Returns Boolean

Source: sdk/java/src/main/java/dev/svm/sandbox/ApiException.java:41
public int status()
from ApiException

Returns int

Source: sdk/java/src/main/java/dev/svm/sandbox/ApiException.java:38 Source: sdk/java/src/main/java/dev/svm/sandbox/ApiException.java:216
public String apiMessage()
from ApiException

Returns String

Source: sdk/java/src/main/java/dev/svm/sandbox/ApiException.java:37
public int attempts()
from ApiException

Returns int

Source: sdk/java/src/main/java/dev/svm/sandbox/ApiException.java:43
public String code()
from ApiException

Returns String

Source: sdk/java/src/main/java/dev/svm/sandbox/ApiException.java:36
public Object details()
from ApiException

Returns Object

Source: sdk/java/src/main/java/dev/svm/sandbox/ApiException.java:40
public static String errorKind(Throwable error)
static · from ApiException

The language-neutral name the conformance suite uses for an error; a data-plane failure has the kind of its REST counterpart.

Parameter Type Default
error Throwable

Returns String

Source: sdk/java/src/main/java/dev/svm/sandbox/ApiException.java:152
public boolean isNotFound()
from ApiException

Returns boolean

Source: sdk/java/src/main/java/dev/svm/sandbox/ApiException.java:44
public static ApiException of(String code, String message, int status, String requestId, Object details, Boolean retryable, Double retryAfterSeconds)
public static ApiException of(String code, String message, int status, String requestId, Object details, Boolean retryable, Double retryAfterSeconds, String path)
static · from ApiException

The most specific error for a code; an unknown code stays a plain ApiException. The dedicated codes GUEST_UNRESPONSIVE, SANDBOX_UNREACHABLE and FILE_UPLOAD_FAILED name GuestUnresponsive, SandboxUnreachable and FileUpload from the code alone.

Parameter Type Default
code String
message String
status int
requestId String
details Object
retryable Boolean
retryAfterSeconds Double
path String optional

Returns ApiException

Source: sdk/java/src/main/java/dev/svm/sandbox/ApiException.java:67
public String requestId()
from ApiException

Returns String

Source: sdk/java/src/main/java/dev/svm/sandbox/ApiException.java:39
public Double retryAfterSeconds()
from ApiException

Returns Double

Source: sdk/java/src/main/java/dev/svm/sandbox/ApiException.java:42
public Boolean retryable()
from ApiException

Returns Boolean

Source: sdk/java/src/main/java/dev/svm/sandbox/ApiException.java:41
public int status()
from ApiException

Returns int

Source: sdk/java/src/main/java/dev/svm/sandbox/ApiException.java:38 Source: sdk/java/src/main/java/dev/svm/sandbox/ApiException.java:200

The disk is full: an API answer with HTTP 507 (the reference vendor’s NotEnoughSpaceError); a QuotaExceeded. The data plane’s own is ProcessException.NotEnoughSpace.

Source: sdk/java/src/main/java/dev/svm/sandbox/ApiException.java:226
public String apiMessage()
from ApiException

Returns String

Source: sdk/java/src/main/java/dev/svm/sandbox/ApiException.java:37
public int attempts()
from ApiException

Returns int

Source: sdk/java/src/main/java/dev/svm/sandbox/ApiException.java:43
public String code()
from ApiException

Returns String

Source: sdk/java/src/main/java/dev/svm/sandbox/ApiException.java:36
public Object details()
from ApiException

Returns Object

Source: sdk/java/src/main/java/dev/svm/sandbox/ApiException.java:40
public static String errorKind(Throwable error)
static · from ApiException

The language-neutral name the conformance suite uses for an error; a data-plane failure has the kind of its REST counterpart.

Parameter Type Default
error Throwable

Returns String

Source: sdk/java/src/main/java/dev/svm/sandbox/ApiException.java:152
public boolean isNotFound()
from ApiException

Returns boolean

Source: sdk/java/src/main/java/dev/svm/sandbox/ApiException.java:44
public static ApiException of(String code, String message, int status, String requestId, Object details, Boolean retryable, Double retryAfterSeconds)
public static ApiException of(String code, String message, int status, String requestId, Object details, Boolean retryable, Double retryAfterSeconds, String path)
static · from ApiException

The most specific error for a code; an unknown code stays a plain ApiException. The dedicated codes GUEST_UNRESPONSIVE, SANDBOX_UNREACHABLE and FILE_UPLOAD_FAILED name GuestUnresponsive, SandboxUnreachable and FileUpload from the code alone.

Parameter Type Default
code String
message String
status int
requestId String
details Object
retryable Boolean
retryAfterSeconds Double
path String optional

Returns ApiException

Source: sdk/java/src/main/java/dev/svm/sandbox/ApiException.java:67
public String requestId()
from ApiException

Returns String

Source: sdk/java/src/main/java/dev/svm/sandbox/ApiException.java:39
public Double retryAfterSeconds()
from ApiException

Returns Double

Source: sdk/java/src/main/java/dev/svm/sandbox/ApiException.java:42
public Boolean retryable()
from ApiException

Returns Boolean

Source: sdk/java/src/main/java/dev/svm/sandbox/ApiException.java:41
public int status()
from ApiException

Returns int

Source: sdk/java/src/main/java/dev/svm/sandbox/ApiException.java:38 Source: sdk/java/src/main/java/dev/svm/sandbox/ApiException.java:185
public String apiMessage()
from ApiException

Returns String

Source: sdk/java/src/main/java/dev/svm/sandbox/ApiException.java:37
public int attempts()
from ApiException

Returns int

Source: sdk/java/src/main/java/dev/svm/sandbox/ApiException.java:43
public String code()
from ApiException

Returns String

Source: sdk/java/src/main/java/dev/svm/sandbox/ApiException.java:36
public Object details()
from ApiException

Returns Object

Source: sdk/java/src/main/java/dev/svm/sandbox/ApiException.java:40
public static String errorKind(Throwable error)
static · from ApiException

The language-neutral name the conformance suite uses for an error; a data-plane failure has the kind of its REST counterpart.

Parameter Type Default
error Throwable

Returns String

Source: sdk/java/src/main/java/dev/svm/sandbox/ApiException.java:152
public boolean isNotFound()
from ApiException

Returns boolean

Source: sdk/java/src/main/java/dev/svm/sandbox/ApiException.java:44
public static ApiException of(String code, String message, int status, String requestId, Object details, Boolean retryable, Double retryAfterSeconds)
public static ApiException of(String code, String message, int status, String requestId, Object details, Boolean retryable, Double retryAfterSeconds, String path)
static · from ApiException

The most specific error for a code; an unknown code stays a plain ApiException. The dedicated codes GUEST_UNRESPONSIVE, SANDBOX_UNREACHABLE and FILE_UPLOAD_FAILED name GuestUnresponsive, SandboxUnreachable and FileUpload from the code alone.

Parameter Type Default
code String
message String
status int
requestId String
details Object
retryable Boolean
retryAfterSeconds Double
path String optional

Returns ApiException

Source: sdk/java/src/main/java/dev/svm/sandbox/ApiException.java:67
public String requestId()
from ApiException

Returns String

Source: sdk/java/src/main/java/dev/svm/sandbox/ApiException.java:39
public Double retryAfterSeconds()
from ApiException

Returns Double

Source: sdk/java/src/main/java/dev/svm/sandbox/ApiException.java:42
public Boolean retryable()
from ApiException

Returns Boolean

Source: sdk/java/src/main/java/dev/svm/sandbox/ApiException.java:41
public int status()
from ApiException

Returns int

Source: sdk/java/src/main/java/dev/svm/sandbox/ApiException.java:38 Source: sdk/java/src/main/java/dev/svm/sandbox/ApiException.java:184
public String apiMessage()
from ApiException

Returns String

Source: sdk/java/src/main/java/dev/svm/sandbox/ApiException.java:37
public int attempts()
from ApiException

Returns int

Source: sdk/java/src/main/java/dev/svm/sandbox/ApiException.java:43
public String code()
from ApiException

Returns String

Source: sdk/java/src/main/java/dev/svm/sandbox/ApiException.java:36
public Object details()
from ApiException

Returns Object

Source: sdk/java/src/main/java/dev/svm/sandbox/ApiException.java:40
public static String errorKind(Throwable error)
static · from ApiException

The language-neutral name the conformance suite uses for an error; a data-plane failure has the kind of its REST counterpart.

Parameter Type Default
error Throwable

Returns String

Source: sdk/java/src/main/java/dev/svm/sandbox/ApiException.java:152
public boolean isNotFound()
from ApiException

Returns boolean

Source: sdk/java/src/main/java/dev/svm/sandbox/ApiException.java:44
public static ApiException of(String code, String message, int status, String requestId, Object details, Boolean retryable, Double retryAfterSeconds)
public static ApiException of(String code, String message, int status, String requestId, Object details, Boolean retryable, Double retryAfterSeconds, String path)
static · from ApiException

The most specific error for a code; an unknown code stays a plain ApiException. The dedicated codes GUEST_UNRESPONSIVE, SANDBOX_UNREACHABLE and FILE_UPLOAD_FAILED name GuestUnresponsive, SandboxUnreachable and FileUpload from the code alone.

Parameter Type Default
code String
message String
status int
requestId String
details Object
retryable Boolean
retryAfterSeconds Double
path String optional

Returns ApiException

Source: sdk/java/src/main/java/dev/svm/sandbox/ApiException.java:67
public String requestId()
from ApiException

Returns String

Source: sdk/java/src/main/java/dev/svm/sandbox/ApiException.java:39
public Double retryAfterSeconds()
from ApiException

Returns Double

Source: sdk/java/src/main/java/dev/svm/sandbox/ApiException.java:42
public Boolean retryable()
from ApiException

Returns Boolean

Source: sdk/java/src/main/java/dev/svm/sandbox/ApiException.java:41
public int status()
from ApiException

Returns int

Source: sdk/java/src/main/java/dev/svm/sandbox/ApiException.java:38 Source: sdk/java/src/main/java/dev/svm/sandbox/ApiException.java:193

A plan limit would be exceeded; limit() and max() name it when the server says.

public String apiMessage()
from ApiException

Returns String

Source: sdk/java/src/main/java/dev/svm/sandbox/ApiException.java:37
public int attempts()
from ApiException

Returns int

Source: sdk/java/src/main/java/dev/svm/sandbox/ApiException.java:43
public String code()
from ApiException

Returns String

Source: sdk/java/src/main/java/dev/svm/sandbox/ApiException.java:36
public Object details()
from ApiException

Returns Object

Source: sdk/java/src/main/java/dev/svm/sandbox/ApiException.java:40
public static String errorKind(Throwable error)
static · from ApiException

The language-neutral name the conformance suite uses for an error; a data-plane failure has the kind of its REST counterpart.

Parameter Type Default
error Throwable

Returns String

Source: sdk/java/src/main/java/dev/svm/sandbox/ApiException.java:152
public boolean isNotFound()
from ApiException

Returns boolean

Source: sdk/java/src/main/java/dev/svm/sandbox/ApiException.java:44
public String limit()

Returns String

Source: sdk/java/src/main/java/dev/svm/sandbox/ApiException.java:221
public String max()

Returns String

Source: sdk/java/src/main/java/dev/svm/sandbox/ApiException.java:222
public static ApiException of(String code, String message, int status, String requestId, Object details, Boolean retryable, Double retryAfterSeconds)
public static ApiException of(String code, String message, int status, String requestId, Object details, Boolean retryable, Double retryAfterSeconds, String path)
static · from ApiException

The most specific error for a code; an unknown code stays a plain ApiException. The dedicated codes GUEST_UNRESPONSIVE, SANDBOX_UNREACHABLE and FILE_UPLOAD_FAILED name GuestUnresponsive, SandboxUnreachable and FileUpload from the code alone.

Parameter Type Default
code String
message String
status int
requestId String
details Object
retryable Boolean
retryAfterSeconds Double
path String optional

Returns ApiException

Source: sdk/java/src/main/java/dev/svm/sandbox/ApiException.java:67
public String requestId()
from ApiException

Returns String

Source: sdk/java/src/main/java/dev/svm/sandbox/ApiException.java:39
public Double retryAfterSeconds()
from ApiException

Returns Double

Source: sdk/java/src/main/java/dev/svm/sandbox/ApiException.java:42
public Boolean retryable()
from ApiException

Returns Boolean

Source: sdk/java/src/main/java/dev/svm/sandbox/ApiException.java:41
public int status()
from ApiException

Returns int

Source: sdk/java/src/main/java/dev/svm/sandbox/ApiException.java:38 Source: sdk/java/src/main/java/dev/svm/sandbox/ApiException.java:219
public String apiMessage()
from ApiException

Returns String

Source: sdk/java/src/main/java/dev/svm/sandbox/ApiException.java:37
public int attempts()
from ApiException

Returns int

Source: sdk/java/src/main/java/dev/svm/sandbox/ApiException.java:43
public String code()
from ApiException

Returns String

Source: sdk/java/src/main/java/dev/svm/sandbox/ApiException.java:36
public Object details()
from ApiException

Returns Object

Source: sdk/java/src/main/java/dev/svm/sandbox/ApiException.java:40
public static String errorKind(Throwable error)
static · from ApiException

The language-neutral name the conformance suite uses for an error; a data-plane failure has the kind of its REST counterpart.

Parameter Type Default
error Throwable

Returns String

Source: sdk/java/src/main/java/dev/svm/sandbox/ApiException.java:152
public boolean isNotFound()
from ApiException

Returns boolean

Source: sdk/java/src/main/java/dev/svm/sandbox/ApiException.java:44
public static ApiException of(String code, String message, int status, String requestId, Object details, Boolean retryable, Double retryAfterSeconds)
public static ApiException of(String code, String message, int status, String requestId, Object details, Boolean retryable, Double retryAfterSeconds, String path)
static · from ApiException

The most specific error for a code; an unknown code stays a plain ApiException. The dedicated codes GUEST_UNRESPONSIVE, SANDBOX_UNREACHABLE and FILE_UPLOAD_FAILED name GuestUnresponsive, SandboxUnreachable and FileUpload from the code alone.

Parameter Type Default
code String
message String
status int
requestId String
details Object
retryable Boolean
retryAfterSeconds Double
path String optional

Returns ApiException

Source: sdk/java/src/main/java/dev/svm/sandbox/ApiException.java:67
public String requestId()
from ApiException

Returns String

Source: sdk/java/src/main/java/dev/svm/sandbox/ApiException.java:39
public Double retryAfterSeconds()
from ApiException

Returns Double

Source: sdk/java/src/main/java/dev/svm/sandbox/ApiException.java:42
public Boolean retryable()
from ApiException

Returns Boolean

Source: sdk/java/src/main/java/dev/svm/sandbox/ApiException.java:41
public int status()
from ApiException

Returns int

Source: sdk/java/src/main/java/dev/svm/sandbox/ApiException.java:38 Source: sdk/java/src/main/java/dev/svm/sandbox/ApiException.java:201

The sandbox does not exist, or is not yours (the reference vendor’s SandboxNotFoundError); a NotFound.

Source: sdk/java/src/main/java/dev/svm/sandbox/ApiException.java:187

The sandbox is not running, so the call cannot proceed: SANDBOX_NOT_RUNNING (the reference vendor’s SandboxNotRunningError); a Precondition. A paused sandbox (SANDBOX_PAUSED) stays a plain Precondition: resume or connect brings it back.

Source: sdk/java/src/main/java/dev/svm/sandbox/ApiException.java:196

The sandbox could not be reached: the server answered SANDBOX_UNREACHABLE (503: the API could not reach the host the sandbox runs on), as opposed to the API itself being unavailable (the reference vendor’s SandboxUnreachableError). Assigned from that code only; an Unavailable, and still safe to retry.

Source: sdk/java/src/main/java/dev/svm/sandbox/ApiException.java:211

The team has no secret of that name (the reference vendor’s SecretNotFoundError); a NotFound.

Source: sdk/java/src/main/java/dev/svm/sandbox/ApiException.java:191
public String apiMessage()
from ApiException

Returns String

Source: sdk/java/src/main/java/dev/svm/sandbox/ApiException.java:37
public int attempts()
from ApiException

Returns int

Source: sdk/java/src/main/java/dev/svm/sandbox/ApiException.java:43
public String code()
from ApiException

Returns String

Source: sdk/java/src/main/java/dev/svm/sandbox/ApiException.java:36
public Object details()
from ApiException

Returns Object

Source: sdk/java/src/main/java/dev/svm/sandbox/ApiException.java:40
public static String errorKind(Throwable error)
static · from ApiException

The language-neutral name the conformance suite uses for an error; a data-plane failure has the kind of its REST counterpart.

Parameter Type Default
error Throwable

Returns String

Source: sdk/java/src/main/java/dev/svm/sandbox/ApiException.java:152
public boolean isNotFound()
from ApiException

Returns boolean

Source: sdk/java/src/main/java/dev/svm/sandbox/ApiException.java:44
public static ApiException of(String code, String message, int status, String requestId, Object details, Boolean retryable, Double retryAfterSeconds)
public static ApiException of(String code, String message, int status, String requestId, Object details, Boolean retryable, Double retryAfterSeconds, String path)
static · from ApiException

The most specific error for a code; an unknown code stays a plain ApiException. The dedicated codes GUEST_UNRESPONSIVE, SANDBOX_UNREACHABLE and FILE_UPLOAD_FAILED name GuestUnresponsive, SandboxUnreachable and FileUpload from the code alone.

Parameter Type Default
code String
message String
status int
requestId String
details Object
retryable Boolean
retryAfterSeconds Double
path String optional

Returns ApiException

Source: sdk/java/src/main/java/dev/svm/sandbox/ApiException.java:67
public String requestId()
from ApiException

Returns String

Source: sdk/java/src/main/java/dev/svm/sandbox/ApiException.java:39
public Double retryAfterSeconds()
from ApiException

Returns Double

Source: sdk/java/src/main/java/dev/svm/sandbox/ApiException.java:42
public Boolean retryable()
from ApiException

Returns Boolean

Source: sdk/java/src/main/java/dev/svm/sandbox/ApiException.java:41
public int status()
from ApiException

Returns int

Source: sdk/java/src/main/java/dev/svm/sandbox/ApiException.java:38 Source: sdk/java/src/main/java/dev/svm/sandbox/ApiException.java:203

The template cannot be used as asked: TEMPLATE_NOT_READY, it has no finished build (the reference vendor’s TemplateError); a Precondition. A build that ended failed is a BuildException.

Source: sdk/java/src/main/java/dev/svm/sandbox/ApiException.java:199
public String apiMessage()
from ApiException

Returns String

Source: sdk/java/src/main/java/dev/svm/sandbox/ApiException.java:37
public int attempts()
from ApiException

Returns int

Source: sdk/java/src/main/java/dev/svm/sandbox/ApiException.java:43
public String code()
from ApiException

Returns String

Source: sdk/java/src/main/java/dev/svm/sandbox/ApiException.java:36
public Object details()
from ApiException

Returns Object

Source: sdk/java/src/main/java/dev/svm/sandbox/ApiException.java:40
public static String errorKind(Throwable error)
static · from ApiException

The language-neutral name the conformance suite uses for an error; a data-plane failure has the kind of its REST counterpart.

Parameter Type Default
error Throwable

Returns String

Source: sdk/java/src/main/java/dev/svm/sandbox/ApiException.java:152
public boolean isNotFound()
from ApiException

Returns boolean

Source: sdk/java/src/main/java/dev/svm/sandbox/ApiException.java:44
public static ApiException of(String code, String message, int status, String requestId, Object details, Boolean retryable, Double retryAfterSeconds)
public static ApiException of(String code, String message, int status, String requestId, Object details, Boolean retryable, Double retryAfterSeconds, String path)
static · from ApiException

The most specific error for a code; an unknown code stays a plain ApiException. The dedicated codes GUEST_UNRESPONSIVE, SANDBOX_UNREACHABLE and FILE_UPLOAD_FAILED name GuestUnresponsive, SandboxUnreachable and FileUpload from the code alone.

Parameter Type Default
code String
message String
status int
requestId String
details Object
retryable Boolean
retryAfterSeconds Double
path String optional

Returns ApiException

Source: sdk/java/src/main/java/dev/svm/sandbox/ApiException.java:67
public String requestId()
from ApiException

Returns String

Source: sdk/java/src/main/java/dev/svm/sandbox/ApiException.java:39
public Double retryAfterSeconds()
from ApiException

Returns Double

Source: sdk/java/src/main/java/dev/svm/sandbox/ApiException.java:42
public Boolean retryable()
from ApiException

Returns Boolean

Source: sdk/java/src/main/java/dev/svm/sandbox/ApiException.java:41
public int status()
from ApiException

Returns int

Source: sdk/java/src/main/java/dev/svm/sandbox/ApiException.java:38 Source: sdk/java/src/main/java/dev/svm/sandbox/ApiException.java:204

The volume does not exist, or is not yours (the reference vendor’s VolumeNotFoundError); a NotFound.

Source: sdk/java/src/main/java/dev/svm/sandbox/ApiException.java:189

The browser could not do what was asked: the gateway is not serving it, or the tool reported an error.

public BrowserException(String message)
Parameter Type Default
message String
Source: sdk/java/src/main/java/dev/svm/sandbox/Browser.java:22 Source: sdk/java/src/main/java/dev/svm/sandbox/Browser.java:21

text is what to show the agent (for navigate, click and type it ends with the page’s new snapshot); images holds screenshots, decoded.

Field Type Description
images List<byte[]>
text String
truncated boolean
public int tokens()

Estimated at three characters a token, which errs high.

Returns int

Source: sdk/java/src/main/java/dev/svm/sandbox/Browser.java:34 Source: sdk/java/src/main/java/dev/svm/sandbox/Browser.java:26

A template build ended failed (the reference vendor’s BuildError): thrown by Template.build with follow (or an onLog) once the build is over. buildId() and templateId() name it and reason() is the server’s (may be null); the log is still readable with TemplateBuild.followLogs. A canceled build is returned, not thrown.

public String buildId()

Returns String

Source: sdk/java/src/main/java/dev/svm/sandbox/BuildException.java:18
public String reason()

Returns String

Source: sdk/java/src/main/java/dev/svm/sandbox/BuildException.java:20
public String templateId()

Returns String

Source: sdk/java/src/main/java/dev/svm/sandbox/BuildException.java:19 Source: sdk/java/src/main/java/dev/svm/sandbox/BuildException.java:8 Source: sdk/java/src/main/java/dev/svm/sandbox/Chart.java:156

One bar: label, group and value (text, as the reference vendor has it).

Field Type Description
group String
label String
value String
public Map<String, Object> toMap()

Returns Map<String, Object>

Source: sdk/java/src/main/java/dev/svm/sandbox/Chart.java:147 Source: sdk/java/src/main/java/dev/svm/sandbox/Chart.java:142 Source: sdk/java/src/main/java/dev/svm/sandbox/Chart.java:209

One box.

Field Type Description
firstQuartile Number
label String
max Number
median Number
min Number
outliers List<Object>
thirdQuartile Number
public Map<String, Object> toMap()

Returns Map<String, Object>

Source: sdk/java/src/main/java/dev/svm/sandbox/Chart.java:196 Source: sdk/java/src/main/java/dev/svm/sandbox/Chart.java:181

The labels and units of a 2D chart’s axes (a label “Time (s)” is label “Time”, unit “s”); each may be null.

Field Type Description
xLabel String
xUnit String
yLabel String
yUnit String
public static Chart parse(Object data)
static · from Chart

The typed chart for the kernel’s chart JSON (parsed); throws IllegalArgumentException when it is not a chart object.

Parameter Type Default
data Object

Returns Chart

Source: sdk/java/src/main/java/dev/svm/sandbox/Chart.java:236
public Map<String, Object> toMap()

Returns Map<String, Object>

Source: sdk/java/src/main/java/dev/svm/sandbox/Chart.java:76 Source: sdk/java/src/main/java/dev/svm/sandbox/Chart.java:65 Source: sdk/java/src/main/java/dev/svm/sandbox/Chart.java:133
public static Chart parse(Object data)
static · from Chart

The typed chart for the kernel’s chart JSON (parsed); throws IllegalArgumentException when it is not a chart object.

Parameter Type Default
data Object

Returns Chart

Source: sdk/java/src/main/java/dev/svm/sandbox/Chart.java:236
public Map<String, Object> toMap()
from Chart

The chart as plain data.

Returns Map<String, Object>

Source: sdk/java/src/main/java/dev/svm/sandbox/Chart.java:47 Source: sdk/java/src/main/java/dev/svm/sandbox/Chart.java:176

One wedge.

Field Type Description
angle Number
label String
radius Number
public Map<String, Object> toMap()

Returns Map<String, Object>

Source: sdk/java/src/main/java/dev/svm/sandbox/Chart.java:167 Source: sdk/java/src/main/java/dev/svm/sandbox/Chart.java:161

What LineChart and ScatterChart share: ticks and scales.

Field Type Description
xScale Scale
xTickLabels List<String>
xTicks List<Object>
yScale Scale
yTickLabels List<String>
yTicks List<Object>
Source: sdk/java/src/main/java/dev/svm/sandbox/Chart.java:108

One series: its label and (x, y) points; a coordinate is a Number, an ISO time on a datetime axis or a name on a categorical one.

Field Type Description
label String
points List<List<Object>>
public Map<String, Object> toMap()

Returns Map<String, Object>

Source: sdk/java/src/main/java/dev/svm/sandbox/Chart.java:99 Source: sdk/java/src/main/java/dev/svm/sandbox/Chart.java:93

An axis scale; LINEAR when the kernel names none this SDK knows.

Field Type Description
ASINH Scale
CATEGORICAL Scale
DATETIME Scale
FUNCTION Scale
FUNCTIONLOG Scale
LINEAR Scale
LOG Scale
LOGIT Scale
SYMLOG Scale
public String wire()

Returns String

Source: sdk/java/src/main/java/dev/svm/sandbox/Chart.java:27 Source: sdk/java/src/main/java/dev/svm/sandbox/Chart.java:25 Source: sdk/java/src/main/java/dev/svm/sandbox/Chart.java:137
public static Chart parse(Object data)
static · from Chart

The typed chart for the kernel’s chart JSON (parsed); throws IllegalArgumentException when it is not a chart object.

Parameter Type Default
data Object

Returns Chart

Source: sdk/java/src/main/java/dev/svm/sandbox/Chart.java:236
public Map<String, Object> toMap()
from Chart

The chart as plain data.

Returns Map<String, Object>

Source: sdk/java/src/main/java/dev/svm/sandbox/Chart.java:47 Source: sdk/java/src/main/java/dev/svm/sandbox/Chart.java:213

A chart’s kind; the wire name is wire.

Field Type Description
BAR Type
BOX_AND_WHISKER Type
LINE Type
PIE Type
SCATTER Type
SUPERCHART Type
UNKNOWN Type
wire String
Source: sdk/java/src/main/java/dev/svm/sandbox/Chart.java:18

The svm command line: the same commands, flags, output and exit codes as the Python CLI, checked against its recorded cases.

public static int main(List<String> argv, Map<String, String> env, PrintStream out, PrintStream err, InputStream in, Path cwd)
public static void main(String[] args)
static

Runs the command line and returns the exit code: 0, 1 for a client error, 2 for an API error or a usage error.

Parameter Type Default
argv List<String>
env Map<String, String> optional
out PrintStream optional
err PrintStream optional
in InputStream optional
cwd Path optional

Returns int

Source: sdk/java/src/main/java/dev/svm/sandbox/cli/Cli.java:135 Source: sdk/java/src/main/java/dev/svm/sandbox/cli/Cli.java:23

One API endpoint and its credential. Retries as the other SDKs do: a safe method, or a POST that carries an Idempotency-Key (the client adds one to every POST and reuses it on every attempt), on connection errors, timeouts and 429/502/503/504, honouring Retry-After and the server’s own retryable hint.

public Client(String domain, String apiKey, String bearerToken, boolean allowInsecureHttp)
public Client(String domain, String apiKey, String bearerToken, boolean allowInsecureHttp, Duration timeout, int maxAttempts)
public Client(String domain, String apiKey, String bearerToken, boolean allowInsecureHttp, Duration timeout, RetryPolicy retry)
public Client(String domain, String apiKey, String bearerToken, boolean allowInsecureHttp, Duration timeout, RetryPolicy retry, ClientOptions options)
public Client(Config.Settings settings, boolean allowInsecureHttp, Duration timeout, RetryPolicy retry)
public Client(Config.Settings settings, boolean allowInsecureHttp, Duration timeout, RetryPolicy retry, ClientOptions options)

Credentials come from the arguments, then SVM_DOMAIN / SVM_API_KEY / SVM_ACCESS_TOKEN, then the config file (see Config).

Parameter Type Default
domain String
apiKey String
bearerToken String
allowInsecureHttp boolean
timeout Duration optional
retry RetryPolicy optional
options ClientOptions optional
Source: sdk/java/src/main/java/dev/svm/sandbox/Client.java:38
public boolean allowInsecureHttp()

Returns boolean

Source: sdk/java/src/main/java/dev/svm/sandbox/Client.java:117
public Api api()

The generated API methods (every REST operation the SDK does not write by hand).

Returns Api

Source: sdk/java/src/main/java/dev/svm/sandbox/Client.java:148
public String baseUrl()

Returns String

Source: sdk/java/src/main/java/dev/svm/sandbox/Client.java:113
public static String enc(String s)
static
Parameter Type Default
s String

Returns String

Source: sdk/java/src/main/java/dev/svm/sandbox/Client.java:119
public static Client fromEnvironment()
static

From SVM_DOMAIN and SVM_API_KEY or SVM_ACCESS_TOKEN, or the config file.

Returns Client

Source: sdk/java/src/main/java/dev/svm/sandbox/Client.java:107
public Map<String, Object> request(String method, String path, Object body, Map<String, String> query, Duration requestTimeout)
public Map<String, Object> request(String method, String path, Object body)

A JSON call; body may be null. Returns the parsed object ({} when the answer is empty).

Parameter Type Default
method String
path String
body Object
query Map<String, String> optional
requestTimeout Duration optional

Returns Map<String, Object>

Source: sdk/java/src/main/java/dev/svm/sandbox/Client.java:122
public byte[] requestBytes(String method, String path, Map<String, String> query, byte[] body, String contentType)
public byte[] requestBytes(String method, String path, byte[] data)

A call that sends and returns raw bytes (a volume file): the same retries and typed errors as the JSON calls. A path that is an absolute URL the API handed out (a build’s signed context-upload URL) is sent with no credential and not retried.

Parameter Type Default
method String
path String
query Map<String, String>
body byte[] optional
contentType String optional

Returns byte[]

Source: sdk/java/src/main/java/dev/svm/sandbox/Client.java:185
public RetryPolicy retryPolicy()

Returns RetryPolicy

Source: sdk/java/src/main/java/dev/svm/sandbox/Client.java:115
public Streams streams()

The calls that are not plain JSON: the event stream and the data-export download.

Returns Streams

Source: sdk/java/src/main/java/dev/svm/sandbox/Client.java:151
public String toString()

Returns String

Source: sdk/java/src/main/java/dev/svm/sandbox/Client.java:111 Source: sdk/java/src/main/java/dev/svm/sandbox/Client.java:23

The client’s proxy, httpVersion, headers and logger options, given to Client’s constructor: new ClientOptions().proxy("http://user:password@proxy:3128").headers(Map.of("X-Team", "platform")).logger(System.getLogger("svm")). Each is checked when it is set.

public ClientOptions headers(Map<String, String> headers)

Headers added to every REST call and data-plane call. They cannot replace the authentication headers.

Parameter Type Default
headers Map<String, String>

Returns ClientOptions

Source: sdk/java/src/main/java/dev/svm/sandbox/ClientOptions.java:76
public ClientOptions httpVersion(String version)

The HTTP version of every REST call and data-plane call: "1.1" or "2"; null keeps the default, HTTP/1.1. "2" never falls back: a call whose answer came over HTTP/1.1 (a server without h2 by ALPN, or without h2c on http://) fails with a TransportException. Not with proxy for "2" (the proxy tunnel is HTTP/1.1). Tunnels (WebSockets) are always HTTP/1.1 and presigned-URL transfers go to a third-party host that may answer either, so neither is checked.

Parameter Type Default
version String

Returns ClientOptions

Source: sdk/java/src/main/java/dev/svm/sandbox/ClientOptions.java:59
public ClientOptions logger(System.Logger logger)

Gets one DEBUG line per HTTP attempt: method, path, status and duration, never a header, query value, body or credential.

Parameter Type Default
logger System.Logger

Returns ClientOptions

Source: sdk/java/src/main/java/dev/svm/sandbox/ClientOptions.java:95
public ClientOptions proxy(String proxy)

An HTTP proxy (http://[user:password@]host:port) for every REST call and the sandbox data-plane channel, in place of any proxy the JVM is set to use. The JDK’s HttpClient sends Basic proxy credentials on an HTTPS tunnel only when the application allows it (-Djdk.http.auth.tunneling.disabledSchemes=); the SDK changes no JVM-wide setting. The error never repeats the URL.

Parameter Type Default
proxy String

Returns ClientOptions

Source: sdk/java/src/main/java/dev/svm/sandbox/ClientOptions.java:38
public String toString()

Returns String

Source: sdk/java/src/main/java/dev/svm/sandbox/ClientOptions.java:100 Source: sdk/java/src/main/java/dev/svm/sandbox/ClientOptions.java:24

The code interpreter could not run the request (bad arguments, no kernel in the image, a timeout).

public CodeInterpreterException(String message)
Parameter Type Default
message String
Source: sdk/java/src/main/java/dev/svm/sandbox/CodeInterpreterException.java:5 Source: sdk/java/src/main/java/dev/svm/sandbox/CodeInterpreterException.java:4

Where the API key and domain come from: arguments, then the environment, then a config file. The file is JSON with domain and api_key: $SVM_CONFIG when set (and then it must exist), else <XDG_CONFIG_HOME or ~/.config>/fcap/config.json when that exists. A file that holds an api_key must not be readable by group or others. The first source that gives any credential decides whether the key or the bearer token is used; the domain is chosen the same way on its own.

public static Settings resolve(String domain, String apiKey, String bearerToken, Map<String, String> env)
static

The domain and credential to use, from the arguments, then env, then the config file.

Parameter Type Default
domain String
apiKey String
bearerToken String
env Map<String, String>

Returns Settings

Raises ConfigException

Source: sdk/java/src/main/java/dev/svm/sandbox/Config.java:76 Source: sdk/java/src/main/java/dev/svm/sandbox/Config.java:22

The resolved domain and credential.

Field Type Description
apiKey String
bearerToken String
domain String
Source: sdk/java/src/main/java/dev/svm/sandbox/Config.java:26

The credentials could not be found or the config file cannot be trusted; kind() is no_credentials, config_permissions, config_invalid, config_missing, conflict or config_exists (svm auth configure found saved credentials and was not told to replace them).

public ConfigException(String kind, String message)
Parameter Type Default
kind String
message String
Source: sdk/java/src/main/java/dev/svm/sandbox/ConfigException.java:7
public String kind()

Returns String

Source: sdk/java/src/main/java/dev/svm/sandbox/ConfigException.java:12 Source: sdk/java/src/main/java/dev/svm/sandbox/ConfigException.java:4

A command, file or other data-plane call on a handle that has no data-plane access: the sandbox was killed (by this handle) or has ended, is paused, or the handle came from Sandbox.get or Sandbox.list. Thrown before any request; Sandbox.connect or Sandbox.resume(boolean) gives access again unless the sandbox has ended (Python’s DataPlaneUnavailableError).

public DataPlaneUnavailableException(String message)
Parameter Type Default
message String
Source: sdk/java/src/main/java/dev/svm/sandbox/DataPlaneUnavailableException.java:9 Source: sdk/java/src/main/java/dev/svm/sandbox/DataPlaneUnavailableException.java:8

A desktop command that failed (an X11 tool exited non-zero). Before the session has painted this is “not ready yet”, as a black frame is.

public CommandException(String message)
Parameter Type Default
message String
Source: sdk/java/src/main/java/dev/svm/sandbox/Desktop.java:18 Source: sdk/java/src/main/java/dev/svm/sandbox/Desktop.java:17

A cell did not finish within its timeout.

public ExecutionTimeoutException(String message)
Parameter Type Default
message String
Source: sdk/java/src/main/java/dev/svm/sandbox/ExecutionTimeoutException.java:5 Source: sdk/java/src/main/java/dev/svm/sandbox/ExecutionTimeoutException.java:4

Options of a FileClient call; immutable, each setter returns a new value: FileOptions.of().user("dev").gzip(true).

<ul> <li>user: the account the call runs as, with that account’s file permissions, instead of the sandbox’s default user (the template’s default user, else root). Null runs as the default. An account the image lacks is refused, never run as another one. Every file call takes it.</li> <li>metadata: up to 16 string pairs (keys 1..64 characters, values at most 256, no NUL) stored with a written file and returned in its entry’s "metadata"; a write replaces the file and its pairs. Only writes and uploads use it.</li> <li>gzip: the data travels compressed (worth it for large, compressible files); the bytes read or written are the same. Only reads, downloads, writes and uploads use it.</li> </ul>

public FileOptions gzip(boolean gzip)
public boolean gzip()
Parameter Type Default
gzip boolean optional

Returns FileOptions

Source: sdk/java/src/main/java/dev/svm/sandbox/FileOptions.java:38
public FileOptions metadata(Map<String, String> metadata)
public Map<String, String> metadata()

The pairs to store (never null).

Parameter Type Default
metadata Map<String, String> optional

Returns FileOptions

Source: sdk/java/src/main/java/dev/svm/sandbox/FileOptions.java:36
public static FileOptions of()
static

No options: the sandbox’s default user, no metadata, no compression.

Returns FileOptions

Source: sdk/java/src/main/java/dev/svm/sandbox/FileOptions.java:32
public FileOptions user(String user)
public String user()
Parameter Type Default
user String optional

Returns FileOptions

Source: sdk/java/src/main/java/dev/svm/sandbox/FileOptions.java:34 Source: sdk/java/src/main/java/dev/svm/sandbox/FileOptions.java:18

An upload to a sandbox did not complete correctly: the sandbox wrote a different size than was sent, or the file’s checksum differs from what was sent (the reference vendor’s FileUploadError). A TransferException, so catch (TransferException e) still catches it; downloads keep throwing plain TransferException.

public FileUploadException(String message)
Parameter Type Default
message String
Source: sdk/java/src/main/java/dev/svm/sandbox/FileUploadException.java:9 Source: sdk/java/src/main/java/dev/svm/sandbox/FileUploadException.java:8

A local listener whose connections are relayed through tunnels to a port in a sandbox. Reach it with Sandbox.forwardLocal.

public String addr()

Returns String

Source: sdk/java/src/main/java/dev/svm/sandbox/Forward.java:32
public void close()
Source: sdk/java/src/main/java/dev/svm/sandbox/Forward.java:74
public int port()

Returns int

Source: sdk/java/src/main/java/dev/svm/sandbox/Forward.java:30
public String url()

Returns String

Source: sdk/java/src/main/java/dev/svm/sandbox/Forward.java:34 Source: sdk/java/src/main/java/dev/svm/sandbox/Forward.java:11
Field Type Description
current String
local List<String>
remote List<String>
Source: sdk/java/src/main/java/dev/svm/sandbox/Git.java:48
Field Type Description
authorEmail String
authorName String
id String
subject String
timestamp long
Source: sdk/java/src/main/java/dev/svm/sandbox/Git.java:41

One changed file of git status.

Field Type Description
index String
path String
renamedFrom String
worktree String
Source: sdk/java/src/main/java/dev/svm/sandbox/Git.java:26

The branch, its tracking state and the changed files.

Field Type Description
ahead int
behind int
branch String
files List<FileStatus>
upstream String
public boolean clean()

Returns boolean

Source: sdk/java/src/main/java/dev/svm/sandbox/Git.java:38 Source: sdk/java/src/main/java/dev/svm/sandbox/Git.java:33

A git command that exited non-zero.

public GitException(String what, int exitCode, String stderr)
Parameter Type Default
what String
exitCode int
stderr String
Source: sdk/java/src/main/java/dev/svm/sandbox/GitException.java:8
public int exitCode()

Returns int

Source: sdk/java/src/main/java/dev/svm/sandbox/GitException.java:16
public String stderr()

Returns String

Source: sdk/java/src/main/java/dev/svm/sandbox/GitException.java:17
public String what()

Returns String

Source: sdk/java/src/main/java/dev/svm/sandbox/GitException.java:15 Source: sdk/java/src/main/java/dev/svm/sandbox/GitException.java:4

What the guest helpers (sessions, terminals, git client, agent tools, desktop, browser, language servers) need from a sandbox: shell commands and a few file calls, all over the data plane (envd). Sandbox#guest() is the one implementation.

java.util.Map<String, Object> egress()

The sandbox’s layer-7 egress settings (enabled, proxy_url, ca_certificate …), as the API’s get-egress call returns them.

Returns java.util.Map<String, Object>

Source: sdk/java/src/main/java/dev/svm/sandbox/GuestBox.java:41
byte[] readFile(String path, long limit)

Up to limit bytes of a file in the sandbox.

Parameter Type Default
path String
limit long

Returns byte[]

Source: sdk/java/src/main/java/dev/svm/sandbox/GuestBox.java:29
void removeFile(String path)

Removes a file in the sandbox.

Parameter Type Default
path String
Source: sdk/java/src/main/java/dev/svm/sandbox/GuestBox.java:32
default Out run(String command, String user, int timeoutSeconds)
default Out run(String command, String user, int timeoutSeconds, byte[] stdin)
Out run(String command, java.util.Map<String, String> envs, String user, int timeoutSeconds, byte[] stdin)
Out run(String command, java.util.Map<String, String> envs, boolean background)

Runs command in a login shell as user (null for the sandbox user) with a limit; a limit of 0 leaves it to the platform.

Parameter Type Default
command String
envs java.util.Map<String, String>
user String
timeoutSeconds int optional
stdin byte[] optional

Returns Out

Source: sdk/java/src/main/java/dev/svm/sandbox/GuestBox.java:17
String trafficUrl(int port, String path)

A one-time URL to a port of the sandbox (a traffic session); used for the desktop’s noVNC stream.

Parameter Type Default
port int
path String

Returns String

Source: sdk/java/src/main/java/dev/svm/sandbox/GuestBox.java:35
void writeFile(String path, byte[] content)

Writes a file in the sandbox.

Parameter Type Default
path String
content byte[]
Source: sdk/java/src/main/java/dev/svm/sandbox/GuestBox.java:38 Source: sdk/java/src/main/java/dev/svm/sandbox/GuestBox.java:7

What a command left behind.

Field Type Description
exitCode int
stderr String
stdout String
public Out(String stdout, String stderr, int exitCode)
Parameter Type Default
stdout String
stderr String
exitCode int
Source: sdk/java/src/main/java/dev/svm/sandbox/GuestBox.java:13 Source: sdk/java/src/main/java/dev/svm/sandbox/GuestBox.java:9

Persistent shell sessions and tmux-style terminals: helpers that run in the sandbox through a GuestBox.

public static String sessionCreateScript(String name, String cwd, Map<String, String> envs)
static

The shell that creates a session; public so a test can run it for real.

Parameter Type Default
name String
cwd String
envs Map<String, String>

Returns String

Source: sdk/java/src/main/java/dev/svm/sandbox/GuestTools.java:33
public static String sessionRunScript(String name, String command)
static

Restores the session, runs command in this shell, and saves cwd and exports on the way out, even after exit.

Parameter Type Default
name String
command String

Returns String

Source: sdk/java/src/main/java/dev/svm/sandbox/GuestTools.java:48 Source: sdk/java/src/main/java/dev/svm/sandbox/GuestTools.java:11

Named shells whose state lives in the sandbox (~/.fcap/sessions, owner-only), so it survives pause and resume.

public Sessions(GuestBox box)
Parameter Type Default
box GuestBox
Source: sdk/java/src/main/java/dev/svm/sandbox/GuestTools.java:60
public void close(String name)
Parameter Type Default
name String
Source: sdk/java/src/main/java/dev/svm/sandbox/GuestTools.java:71
public void create(String name, String cwd, Map<String, String> envs)
Parameter Type Default
name String
cwd String
envs Map<String, String>

Raises SandboxException

Source: sdk/java/src/main/java/dev/svm/sandbox/GuestTools.java:62
public List<String> list()

Returns List<String>

Source: sdk/java/src/main/java/dev/svm/sandbox/GuestTools.java:69
public GuestBox.Out run(String name, String command, int timeoutSeconds)
Parameter Type Default
name String
command String
timeoutSeconds int

Returns GuestBox.Out

Source: sdk/java/src/main/java/dev/svm/sandbox/GuestTools.java:67 Source: sdk/java/src/main/java/dev/svm/sandbox/GuestTools.java:57

Long-lived tmux sessions an agent can start, type into, read the screen of and wait on; they keep running when the client disconnects.

public Terminals(GuestBox box)
Parameter Type Default
box GuestBox
Source: sdk/java/src/main/java/dev/svm/sandbox/GuestTools.java:83
public String attachCommand(String name)

The command to run in a PTY to attach interactively; detaching leaves the terminal running.

Parameter Type Default
name String

Returns String

Source: sdk/java/src/main/java/dev/svm/sandbox/GuestTools.java:164
public void ensure()

Installs tmux if the template lacks it (as root; needs internet egress).

Raises SandboxException

Source: sdk/java/src/main/java/dev/svm/sandbox/GuestTools.java:100
public boolean isAlive(String name)
Parameter Type Default
name String

Returns boolean

Source: sdk/java/src/main/java/dev/svm/sandbox/GuestTools.java:159
public boolean kill(String name)
Parameter Type Default
name String

Returns boolean

Source: sdk/java/src/main/java/dev/svm/sandbox/GuestTools.java:161
public List<String> list()

Returns List<String>

Source: sdk/java/src/main/java/dev/svm/sandbox/GuestTools.java:153
public String screen(String name, int scrollback)

The visible screen plus up to scrollback earlier lines.

Parameter Type Default
name String
scrollback int

Returns String

Source: sdk/java/src/main/java/dev/svm/sandbox/GuestTools.java:136
public void sendKeys(String name, String... keys)

Presses named keys such as Enter, C-c, Up or Escape.

Parameter Type Default
name String
keys String...
Source: sdk/java/src/main/java/dev/svm/sandbox/GuestTools.java:124
public void sendText(String name, String text, boolean enter)

Types text literally; enter then presses Enter.

Parameter Type Default
name String
text String
enter boolean
Source: sdk/java/src/main/java/dev/svm/sandbox/GuestTools.java:118
public void start(String name, String command, int cols, int rows, String cwd)

Creates a terminal; command may be null (a login shell); zero cols and rows mean 200 by 50.

Parameter Type Default
name String
command String
cols int
rows int
cwd String
Source: sdk/java/src/main/java/dev/svm/sandbox/GuestTools.java:106
public String waitFor(String name, Pattern pattern, double timeoutSeconds, double intervalSeconds)

Polls the screen until pattern appears and returns it; throws after timeoutSeconds.

Parameter Type Default
name String
pattern Pattern
timeoutSeconds double
intervalSeconds double

Returns String

Raises TimeoutException

Source: sdk/java/src/main/java/dev/svm/sandbox/GuestTools.java:143 Source: sdk/java/src/main/java/dev/svm/sandbox/GuestTools.java:78

A small JSON codec (the SDK has no dependencies): objects are Map, arrays List, numbers Long or Double.

Field Type Description
NULL Object An explicit JSON null in a request body. A plain null map value is left out (the field is “not set”); this is sent as null, which some updates need to clear a field, such as detaching a domain from its sandbox ({“sandbox_id”: null}).
public static Object parse(String text)
static
Parameter Type Default
text String

Returns Object

Source: sdk/java/src/main/java/dev/svm/sandbox/Json.java:74
public static Map<String, Object> parseObject(String text)
static
Parameter Type Default
text String

Returns Map<String, Object>

Source: sdk/java/src/main/java/dev/svm/sandbox/Json.java:83
public static String write(Object value)
static
Parameter Type Default
value Object

Returns String

Source: sdk/java/src/main/java/dev/svm/sandbox/Json.java:16 Source: sdk/java/src/main/java/dev/svm/sandbox/Json.java:9

How to start the server for a language.

Field Type Description
command List<String>
initOptions Map<String, Object>
languageId String
Source: sdk/java/src/main/java/dev/svm/sandbox/LanguageServers.java:17

A failure the data plane reports. Branch on code(), never on the message: it is the typed envd code (ERROR_CODE_NOT_FOUND …) when the sandbox sent one, else the gRPC status name; grpcCode() is always the gRPC status name (UNAVAILABLE, NOT_FOUND …).

public ProcessException(String code, String message, String grpcCode, Map<String, Object> details)
Parameter Type Default
code String
message String
grpcCode String
details Map<String, Object>
Source: sdk/java/src/main/java/dev/svm/sandbox/ProcessException.java:13
public String code()

Returns String

Source: sdk/java/src/main/java/dev/svm/sandbox/ProcessException.java:46
public Map<String, Object> details()

Returns Map<String, Object>

Source: sdk/java/src/main/java/dev/svm/sandbox/ProcessException.java:48
public String grpcCode()

Returns String

Source: sdk/java/src/main/java/dev/svm/sandbox/ProcessException.java:47
public static ProcessException of(String code, String message, String grpcCode, Map<String, Object> details)
static

The exception for a data-plane failure: a FileNotFound for ERROR_CODE_PATH_NOT_FOUND, a NotEnoughSpace for ERROR_CODE_DISK_FULL, a GuestUnresponsive when the server names the reason GUEST_UNRESPONSIVE.

Parameter Type Default
code String
message String
grpcCode String
details Map<String, Object>

Returns ProcessException

Source: sdk/java/src/main/java/dev/svm/sandbox/ProcessException.java:22 Source: sdk/java/src/main/java/dev/svm/sandbox/ProcessException.java:9

A file or directory in a sandbox does not exist (the reference vendor’s FileNotFoundError; named so it does not shadow java.io.FileNotFoundException).

public String code()
from ProcessException

Returns String

Source: sdk/java/src/main/java/dev/svm/sandbox/ProcessException.java:46
public Map<String, Object> details()
from ProcessException

Returns Map<String, Object>

Source: sdk/java/src/main/java/dev/svm/sandbox/ProcessException.java:48
public String grpcCode()
from ProcessException

Returns String

Source: sdk/java/src/main/java/dev/svm/sandbox/ProcessException.java:47
public static ProcessException of(String code, String message, String grpcCode, Map<String, Object> details)
static · from ProcessException

The exception for a data-plane failure: a FileNotFound for ERROR_CODE_PATH_NOT_FOUND, a NotEnoughSpace for ERROR_CODE_DISK_FULL, a GuestUnresponsive when the server names the reason GUEST_UNRESPONSIVE.

Parameter Type Default
code String
message String
grpcCode String
details Map<String, Object>

Returns ProcessException

Source: sdk/java/src/main/java/dev/svm/sandbox/ProcessException.java:22 Source: sdk/java/src/main/java/dev/svm/sandbox/ProcessException.java:30

The sandbox’s guest took the call and stopped answering (the server’s reason GUEST_UNRESPONSIVE): retryable once the guest has reconnected, like any UNAVAILABLE answer, but named so a caller can tell a hung guest from one that is still starting. The data-plane counterpart of ApiException.GuestUnresponsive; ApiException.errorKind says guest_unresponsive for both.

public String code()
from ProcessException

Returns String

Source: sdk/java/src/main/java/dev/svm/sandbox/ProcessException.java:46
public Map<String, Object> details()
from ProcessException

Returns Map<String, Object>

Source: sdk/java/src/main/java/dev/svm/sandbox/ProcessException.java:48
public String grpcCode()
from ProcessException

Returns String

Source: sdk/java/src/main/java/dev/svm/sandbox/ProcessException.java:47
public static ProcessException of(String code, String message, String grpcCode, Map<String, Object> details)
static · from ProcessException

The exception for a data-plane failure: a FileNotFound for ERROR_CODE_PATH_NOT_FOUND, a NotEnoughSpace for ERROR_CODE_DISK_FULL, a GuestUnresponsive when the server names the reason GUEST_UNRESPONSIVE.

Parameter Type Default
code String
message String
grpcCode String
details Map<String, Object>

Returns ProcessException

Source: sdk/java/src/main/java/dev/svm/sandbox/ProcessException.java:22 Source: sdk/java/src/main/java/dev/svm/sandbox/ProcessException.java:37

The disk is full (the reference vendor’s NotEnoughSpaceError).

public String code()
from ProcessException

Returns String

Source: sdk/java/src/main/java/dev/svm/sandbox/ProcessException.java:46
public Map<String, Object> details()
from ProcessException

Returns Map<String, Object>

Source: sdk/java/src/main/java/dev/svm/sandbox/ProcessException.java:48
public String grpcCode()
from ProcessException

Returns String

Source: sdk/java/src/main/java/dev/svm/sandbox/ProcessException.java:47
public static ProcessException of(String code, String message, String grpcCode, Map<String, Object> details)
static · from ProcessException

The exception for a data-plane failure: a FileNotFound for ERROR_CODE_PATH_NOT_FOUND, a NotEnoughSpace for ERROR_CODE_DISK_FULL, a GuestUnresponsive when the server names the reason GUEST_UNRESPONSIVE.

Parameter Type Default
code String
message String
grpcCode String
details Map<String, Object>

Returns ProcessException

Source: sdk/java/src/main/java/dev/svm/sandbox/ProcessException.java:22 Source: sdk/java/src/main/java/dev/svm/sandbox/ProcessException.java:42

No response arrived within the client’s timeout.

public RequestTimeoutException(String message, Throwable cause)
Parameter Type Default
message String
cause Throwable
Source: sdk/java/src/main/java/dev/svm/sandbox/RequestTimeoutException.java:5
public int attempts()
from TransportException

Returns int

Source: sdk/java/src/main/java/dev/svm/sandbox/TransportException.java:9 Source: sdk/java/src/main/java/dev/svm/sandbox/RequestTimeoutException.java:4

How a failed request is repeated. maxAttempts counts the first try. The wait after attempt n is baseDelay * 2^(n-1) capped at maxDelay, scaled by jitter (a number in [0.5, 1]); a server’s own Retry-After replaces it, and one longer than maxRetryAfter ends the call at once. A POST is repeated only because the client attaches an idempotency key to it that every attempt reuses.

public RetryPolicy()
public RetryPolicy(int maxAttempts)
public RetryPolicy(int maxAttempts, double baseDelay, double maxDelay, double maxRetryAfter, DoubleSupplier jitter, DoubleConsumer sleeper)
Parameter Type Default
maxAttempts int optional
baseDelay double optional
maxDelay double optional
maxRetryAfter double optional
jitter DoubleSupplier optional
sleeper DoubleConsumer optional
Source: sdk/java/src/main/java/dev/svm/sandbox/RetryPolicy.java:25
public double backoff(int attempt)

The wait after attempt number attempt (1-based) failed.

Parameter Type Default
attempt int

Returns double

Source: sdk/java/src/main/java/dev/svm/sandbox/RetryPolicy.java:50
public int maxAttempts()

Returns int

Source: sdk/java/src/main/java/dev/svm/sandbox/RetryPolicy.java:42
public static Double parseRetryAfter(String value)
static

Seconds from a Retry-After header: a number of seconds or an HTTP date; null when absent or unreadable.

Parameter Type Default
value String

Returns Double

Source: sdk/java/src/main/java/dev/svm/sandbox/RetryPolicy.java:55
public double spread(double hinted)

A server’s Retry-After plus up to 25% more (none when jitter is fixed at 1), so clients refused together do not retry in step.

Parameter Type Default
hinted double

Returns double

Source: sdk/java/src/main/java/dev/svm/sandbox/RetryPolicy.java:45 Source: sdk/java/src/main/java/dev/svm/sandbox/RetryPolicy.java:16

What a rollout runs and how it is scored and kept; pass exactly one of command and script.

Field Type Description
command List<String> The argv each branch runs; argv[0] must be an absolute path (e.g. /usr/bin/pytest): it is not looked up on PATH.
env Map<String, String>
idempotencyKey String
keep Map<String, Object>
metadata Map<String, String>
pollSeconds double
sandboxTimeoutSeconds Integer
script String
timeoutSeconds Integer
user String
verifier Map<String, Object>
wait boolean
workingDirectory String
Source: sdk/java/src/main/java/dev/svm/sandbox/Rollout.java:12

Options of Sandbox.runCode(String, RunCodeOptions). Give a language or a context, not both; with neither the cell runs in the sandbox’s default python context. envs runs it in a scratch context with those variables. The handlers see output as it arrives, then each result and the error.

Field Type Description
context Context A context, or null; contextId names one by id instead.
contextId String
envs Map<String, String>
language String
onError Consumer<ExecutionError>
onResult Consumer<Result>
onStderr Consumer<OutputMessage>
onStdout Consumer<OutputMessage>
requestTimeoutSeconds Double Seconds the HTTP request may take (the timeout plus 45 when null).
timeoutSeconds Double Seconds the cell may run (60 when null); past it the cell is interrupted and ExecutionTimeoutException is thrown.
Source: sdk/java/src/main/java/dev/svm/sandbox/RunCodeOptions.java:11

Options of ProcessClient.run.

Field Type Description
background boolean
cwd String
envs Map<String, String>
onStderr Consumer<byte[]>
onStdout Consumer<byte[]>
sandboxProfile String
stdin byte[] The command’s standard input. null (the default) starts the command with stdin closed, so a later sendStdin is refused with stdin_closed; an empty array keeps stdin open for sendStdin and closeStdin.
tag String
timeoutSeconds long
user String
Source: sdk/java/src/main/java/dev/svm/sandbox/RunOptions.java:30

Options of create; unset fields are left to the platform’s defaults.

Field Type Description
autoPause boolean
bucketMounts List<Map<String, Object>>
cpuCount Integer
diskMb Integer
envs Map<String, String>
gitCredentials List<Map<String, String>>
gpu String A GPU class such as nvidia-l4; needs a GPU profile.
lifecycle Map<String, Object> Lifecycle timers and flags (auto_stop_seconds, ephemeral, persistent …); an auto-stop timer replaces timeoutSeconds.
mcpServers List<Map<String, Object>> MCP servers to run behind the gateway from the first start, e.g. Map.of("name", "gh", "catalog_id", "github").
memoryMb Integer
metadata Map<String, String>
name String A name to find the sandbox by (getByName), unique among the team’s live sandboxes.
network Map<String, Object>
privateNetwork boolean Join the team’s private network (a private address and the name <name>.sandbox.internal).
profile String The VMM profile: “fc-linux” or “ch-linux”; null leaves it to the deployment. An unavailable profile is refused.
secure boolean
snapshotId String
template String
timeoutSeconds int
volumeMounts List<Map<String, Object>>
wait boolean
Source: sdk/java/src/main/java/dev/svm/sandbox/Sandbox.java:31

The base of every error the SDK throws: an API answer (ApiException), transport, waiting, local validation. It is a RuntimeException, so catch (RuntimeException e) still catches all of them.

public SandboxException(String message)
public SandboxException(String message, Throwable cause)
Parameter Type Default
message String
cause Throwable optional
Source: sdk/java/src/main/java/dev/svm/sandbox/SandboxException.java:8 Source: sdk/java/src/main/java/dev/svm/sandbox/SandboxException.java:7

One tool call the agent made in this sandbox (a span in its trace, and its cost); null fields are left out.

Field Type Description
attributes Map<String, String>
callId String
costUsd Double
durationMs long
effectIds List<String>
errorType String
failed boolean
inputTokens Long
model String
name String
outputTokens Long
runId String
startedAt java.time.Instant
type String
Source: sdk/java/src/main/java/dev/svm/sandbox/SandboxHelpers.java:60

One secret as the API reports it (description and updatedAt may be null); never its value. metadata are the caller’s own string pairs about it; version is 1, then +1 each time the value is put (0 when an older server does not say).

Field Type Description
createdAt String
description String
metadata Map<String, String>
name String
updatedAt String
version int
public boolean equals(Object o)
Parameter Type Default
o Object

Returns boolean

Source: sdk/java/src/main/java/dev/svm/sandbox/Secret.java:84
public int hashCode()

Returns int

Source: sdk/java/src/main/java/dev/svm/sandbox/Secret.java:91
public String toString()

Returns String

Source: sdk/java/src/main/java/dev/svm/sandbox/Secret.java:93 Source: sdk/java/src/main/java/dev/svm/sandbox/Secret.java:67

The REST calls that are not plain JSON: the event stream and the data-export download (volume files are Volume). Reach them with client.streams().

public long downloadDataExport(String exportId, OutputStream out)

Streams a finished personal-data export (a ZIP) into out; returns the byte count.

Parameter Type Default
exportId String
out OutputStream

Returns long

Raises TransportException

Source: sdk/java/src/main/java/dev/svm/sandbox/Streams.java:104
public long downloadDataExportFile(String exportId, Path path)

Downloads through “<path>.part”, renamed when complete; a break starts over, under the client’s retry policy.

Parameter Type Default
exportId String
path Path

Returns long

Raises SandboxException

Source: sdk/java/src/main/java/dev/svm/sandbox/Streams.java:114
public void streamEvents(String sandboxId, String type, String lastEventId, Predicate<Map<String, Object>> handle)

Hands each lifecycle event (the event JSON) to handle until it returns false. The stream reconnects after a break, resuming from the last event id seen, under the client’s retry policy. Any of the filters may be null. A quiet stream is kept: the server’s heartbeats (every 15 s) count as traffic, a read waits up to 45 s for a line whatever the request timeout, and any line received resets the failure count; it gives up with the error only after the retry policy’s attempts in a row that brought nothing.

Parameter Type Default
sandboxId String
type String
lastEventId String
handle Predicate<Map<String, Object>>

Raises SandboxException, TransportException

Source: sdk/java/src/main/java/dev/svm/sandbox/Streams.java:38 Source: sdk/java/src/main/java/dev/svm/sandbox/Streams.java:19

A file copyItems puts in the image: src in the build context, content at dest.

public CopyItem(String src, String dest, byte[] content)
Parameter Type Default
src String
dest String
content byte[]
Source: sdk/java/src/main/java/dev/svm/sandbox/Template.java:341 Source: sdk/java/src/main/java/dev/svm/sandbox/Template.java:337

One MCP server of a template (addMcpServer): a catalog server (catalogId) or a custom one (command, with args), exactly one; the rest are as the contract’s McpServerConfig has them.

Field Type Description
args List<String>
catalogId String
command String
env Map<String, String>
envSecretNames List<String>
secrets Map<String, String>
toolRules Map<String, Object>
Source: sdk/java/src/main/java/dev/svm/sandbox/Template.java:249

the reference vendor’s TimeoutError: something did not finish in time on the client’s side. Thrown for an HTTP request with no answer in time (as the RequestTimeoutException it already was) and by the waits: Sandbox.waitUntilRunning, a template build’s wait, a terminal’s waitFor, a desktop’s waitUntilReady, a rollout’s waitDone. ApiException.errorKind says timeout. It is a RequestTimeoutException (so a TransportException and SandboxException), so every existing catch keeps catching it. A server’s DEADLINE_EXCEEDED stays ApiException.DeadlineExceeded. Named like the other Java exceptions of the SDK; it is not java.util.concurrent.TimeoutException, so a file that imports both packages with a wildcard must qualify the name.

public TimeoutException(String message, Throwable cause)
public TimeoutException(String message)
Parameter Type Default
message String
cause Throwable optional
Source: sdk/java/src/main/java/dev/svm/sandbox/TimeoutException.java:12
public int attempts()
from TransportException

Returns int

Source: sdk/java/src/main/java/dev/svm/sandbox/TransportException.java:9 Source: sdk/java/src/main/java/dev/svm/sandbox/TimeoutException.java:11

How the cache has done; savedSeconds adds, for every hit, how long the stored run took less how long the hit took.

Field Type Description
hits long
misses long
savedSeconds double
stored long
uncacheable long
public double hitRate()

Returns double

Source: sdk/java/src/main/java/dev/svm/sandbox/ToolCache.java:37 Source: sdk/java/src/main/java/dev/svm/sandbox/ToolCache.java:33

A download or upload that did not end in the bytes it should have.

public TransferException(String message)
Parameter Type Default
message String
Source: sdk/java/src/main/java/dev/svm/sandbox/TransferException.java:5 Source: sdk/java/src/main/java/dev/svm/sandbox/TransferException.java:4

The HTTP request could not be completed (DNS, connection, TLS).

public TransportException(String message, Throwable cause)
Parameter Type Default
message String
cause Throwable
Source: sdk/java/src/main/java/dev/svm/sandbox/TransportException.java:7
public int attempts()

Returns int

Source: sdk/java/src/main/java/dev/svm/sandbox/TransportException.java:9 Source: sdk/java/src/main/java/dev/svm/sandbox/TransportException.java:4

One entry of a volume directory: kind is the API’s “file”, “dir”, “symlink” or “other”; the time is Unix milliseconds.

Field Type Description
group String The owning user and group when the guest names them, else empty.
kind String
mode int
modifiedUnixMs long
name String
owner String The owning user and group when the guest names them, else empty.
size long
public String toString()

Returns String

Source: sdk/java/src/main/java/dev/svm/sandbox/Volume.java:58 Source: sdk/java/src/main/java/dev/svm/sandbox/Volume.java:41

What the API said about a volume.

Field Type Description
attachedSandboxId String
createdAt String
name String
sizeGb int
volumeId String
public Map<String, Object> raw()

The answer as the API sent it, fields this SDK does not name included.

Returns Map<String, Object>

Source: sdk/java/src/main/java/dev/svm/sandbox/Volume.java:35
public String toString()

Returns String

Source: sdk/java/src/main/java/dev/svm/sandbox/Volume.java:37 Source: sdk/java/src/main/java/dev/svm/sandbox/Volume.java:20

What updateMetadata changes: mode (the permission bits as a number, 0644 octal), owner and group (names or numeric ids); a field left null keeps its value. At least one is required.

Field Type Description
group String
mode Integer
owner String
public Metadata group(String group)
Parameter Type Default
group String

Returns Metadata

Source: sdk/java/src/main/java/dev/svm/sandbox/Volume.java:188
public Metadata mode(int mode)
Parameter Type Default
mode int

Returns Metadata

Source: sdk/java/src/main/java/dev/svm/sandbox/Volume.java:186
public Metadata owner(String owner)
Parameter Type Default
owner String

Returns Metadata

Source: sdk/java/src/main/java/dev/svm/sandbox/Volume.java:187 Source: sdk/java/src/main/java/dev/svm/sandbox/Volume.java:182

The sandbox no longer has the watcher a watch was reading from.

Source: sdk/java/src/main/java/dev/svm/sandbox/WatchLostException.java:4

A webhook callback whose signature does not verify (Webhooks.verifyWebhookSignature): refuse it.

Source: sdk/java/src/main/java/dev/svm/sandbox/WebhookSignatureException.java:4

Checks that a webhook callback is genuine: run verifyWebhookSignature on every request before trusting it.

Field Type Description
DEFAULT_TOLERANCE_SECONDS int How far a signature’s timestamp may be from now, in seconds (as in the Python SDK).
public static void verifyWebhookSignature(String secretHex, byte[] body, String header)
public static void verifyWebhookSignature(List<String> secretsHex, byte[] body, String header)
public static void verifyWebhookSignature(List<String> secretsHex, byte[] body, String header, int toleranceSeconds, double nowSeconds)
static

One secret, the default tolerance and the current time.

Parameter Type Default
secretsHex List<String>
body byte[]
header String
toleranceSeconds int optional
nowSeconds double optional

Raises WebhookSignatureException

Source: sdk/java/src/main/java/dev/svm/sandbox/Webhooks.java:18 Source: sdk/java/src/main/java/dev/svm/sandbox/Webhooks.java:11

The same desktop controls on a Windows sandbox (WIN-005). There is no shell to run xdotool in: each call is one PowerShell command that carries a base64 JSON request to the helper installed in the sandbox’s interactive session.

public WindowsDesktop(GuestBox box)
Parameter Type Default
box GuestBox
Source: sdk/java/src/main/java/dev/svm/sandbox/WindowsDesktop.java:19
public void doubleClick(Integer x, Integer y)
Parameter Type Default
x Integer
y Integer
Source: sdk/java/src/main/java/dev/svm/sandbox/WindowsDesktop.java:51
public void drag(int[] start, int[] end, int steps)
Parameter Type Default
start int[]
end int[]
steps int
Source: sdk/java/src/main/java/dev/svm/sandbox/WindowsDesktop.java:55
public List<String> getApplicationWindows(String application)
Parameter Type Default
application String

Returns List<String>

Source: sdk/java/src/main/java/dev/svm/sandbox/WindowsDesktop.java:78
public String getCurrentWindowId()

Returns String

Source: sdk/java/src/main/java/dev/svm/sandbox/WindowsDesktop.java:76
public int[] getCursorPosition()

Returns int[]

Source: sdk/java/src/main/java/dev/svm/sandbox/WindowsDesktop.java:74
public int[] getScreenSize()

Returns int[]

Source: sdk/java/src/main/java/dev/svm/sandbox/WindowsDesktop.java:75
public String getWindowTitle(String windowId)
Parameter Type Default
windowId String

Returns String

Source: sdk/java/src/main/java/dev/svm/sandbox/WindowsDesktop.java:80
public boolean hasApp(String application)

Whether application resolves to a program on the guest’s PATH, the way launch starts it.

Parameter Type Default
application String

Returns boolean

Source: sdk/java/src/main/java/dev/svm/sandbox/WindowsDesktop.java:98
public void launch(String application, String uri)
Parameter Type Default
application String
uri String
Source: sdk/java/src/main/java/dev/svm/sandbox/WindowsDesktop.java:69
public void leftClick(Integer x, Integer y)
Parameter Type Default
x Integer
y Integer
Source: sdk/java/src/main/java/dev/svm/sandbox/WindowsDesktop.java:48
public void middleClick(Integer x, Integer y)
Parameter Type Default
x Integer
y Integer
Source: sdk/java/src/main/java/dev/svm/sandbox/WindowsDesktop.java:50
public void mousePress(String button)
Parameter Type Default
button String
Source: sdk/java/src/main/java/dev/svm/sandbox/WindowsDesktop.java:52
public void mouseRelease(String button)
Parameter Type Default
button String
Source: sdk/java/src/main/java/dev/svm/sandbox/WindowsDesktop.java:53
public void moveMouse(int x, int y)
Parameter Type Default
x int
y int
Source: sdk/java/src/main/java/dev/svm/sandbox/WindowsDesktop.java:47
public void open(String fileOrUrl)
Parameter Type Default
fileOrUrl String
Source: sdk/java/src/main/java/dev/svm/sandbox/WindowsDesktop.java:70
public void press(String key)
Parameter Type Default
key String
Source: sdk/java/src/main/java/dev/svm/sandbox/WindowsDesktop.java:68
public void rightClick(Integer x, Integer y)
Parameter Type Default
x Integer
y Integer
Source: sdk/java/src/main/java/dev/svm/sandbox/WindowsDesktop.java:49
public byte[] screenshot(double waitForFrame)
public byte[] screenshot()

The Windows session is drawn when the helper answers, so there is no first frame to wait for.

Parameter Type Default
waitForFrame double optional

Returns byte[]

Raises SandboxException

Source: sdk/java/src/main/java/dev/svm/sandbox/WindowsDesktop.java:83
public void scroll(int amount)
Parameter Type Default
amount int
Source: sdk/java/src/main/java/dev/svm/sandbox/WindowsDesktop.java:61
public String streamUrl()
from Desktop

Mints a one-time, short-lived noVNC browser entry URL; treat it as a secret. Waits (up to 15 s) until the noVNC server listens.

Returns String

Raises SandboxException

Source: sdk/java/src/main/java/dev/svm/sandbox/Desktop.java:297
public boolean waitAndVerify(String command, java.util.function.Predicate<GuestBox.Out> onResult, Duration timeout, Duration interval)
public boolean waitAndVerify(String command, java.util.function.Predicate<GuestBox.Out> onResult)
from Desktop

Runs command in the desktop’s session every interval until onResult accepts its result (true), or timeout passes (false). onResult gets the command’s result whatever its exit code. The command runs at least once.

Parameter Type Default
command String
onResult java.util.function.Predicate<GuestBox.Out>
timeout Duration optional
interval Duration optional

Returns boolean

Source: sdk/java/src/main/java/dev/svm/sandbox/Desktop.java:200
public void waitMs(int ms)
from Desktop
Parameter Type Default
ms int
Source: sdk/java/src/main/java/dev/svm/sandbox/Desktop.java:216
public Duration waitUntilReady(Duration timeout)
public Duration waitUntilReady()
from Desktop

Waits until the desktop session has painted (the first frame that is not one flat colour) and returns how long it took (Python returns the seconds as a float; Duration is the Java form, as Sandbox.waitUntilRunning(Duration) takes one). A desktop sandbox reports running well before its session draws; until then every screenshot is black and clicks land on nothing. Call this once after create instead of looping on screenshot(). Throws SandboxException when it has not painted within timeout, as the SDK’s other waits do.

Parameter Type Default
timeout Duration optional

Returns Duration

Raises TimeoutException

Source: sdk/java/src/main/java/dev/svm/sandbox/Desktop.java:153
public void write(String text, int chunkSize, int delayInMs)
public void write(String text)
Parameter Type Default
text String
chunkSize int optional
delayInMs int optional
Source: sdk/java/src/main/java/dev/svm/sandbox/WindowsDesktop.java:63 Source: sdk/java/src/main/java/dev/svm/sandbox/WindowsDesktop.java:14