Skip to content
Wardcase Docs

Write a file (body is the raw content)

PUT
/v1/sandboxes/{id}/files
id
required
string
/^sbx_[A-Za-z0-9]+$/

Sandbox ids are lowercase: sbx_ followed by 16 characters from [a-z0-9]. Hostname labels derived from them are therefore safe to compare after lowercasing.

path
required
string

Path inside the sandbox. Must resolve under /work (the writable volume); relative paths are resolved against /work. The root filesystem is read-only.

mode
string
/^0[0-7]{3}$/

Octal permission bits, for example 0755

string format: binary

Written

object
path
required
string
size
required
integer
sha256
required
string
mode
string

Not found

RFC 9457 problem document

object
type
required

https://docs.wardcase.com/errors/<slug>. The slug is a stable machine code (PROBLEM_TYPES in @vivarium/contracts).

string format: uri
title
required
string
status
required
integer
detail
string
instance
string
errors

Field-level validation errors

Array<object>
object
path
required
string
message
required
string

The resource is not in a state that allows this

RFC 9457 problem document

object
type
required

https://docs.wardcase.com/errors/<slug>. The slug is a stable machine code (PROBLEM_TYPES in @vivarium/contracts).

string format: uri
title
required
string
status
required
integer
detail
string
instance
string
errors

Field-level validation errors

Array<object>
object
path
required
string
message
required
string

File larger than the limit (config limits.fileMaxBytes, 50 MiB)

RFC 9457 problem document

object
type
required

https://docs.wardcase.com/errors/<slug>. The slug is a stable machine code (PROBLEM_TYPES in @vivarium/contracts).

string format: uri
title
required
string
status
required
integer
detail
string
instance
string
errors

Field-level validation errors

Array<object>
object
path
required
string
message
required
string

The host reported an error

RFC 9457 problem document

object
type
required

https://docs.wardcase.com/errors/<slug>. The slug is a stable machine code (PROBLEM_TYPES in @vivarium/contracts).

string format: uri
title
required
string
status
required
integer
detail
string
instance
string
errors

Field-level validation errors

Array<object>
object
path
required
string
message
required
string

The host did not answer within the deadline

RFC 9457 problem document

object
type
required

https://docs.wardcase.com/errors/<slug>. The slug is a stable machine code (PROBLEM_TYPES in @vivarium/contracts).

string format: uri
title
required
string
status
required
integer
detail
string
instance
string
errors

Field-level validation errors

Array<object>
object
path
required
string
message
required
string