Skip to content

Filesystem API

GET/v1/sprites/{name}/fs/read

Read file contents from the sprite filesystem. Returns raw file bytes.

Query Parameters

path:string

Path to the file to read

workingDir:string

Working directory for resolving relative paths

StatusDescription
200Success
404Not Found - Resource not found
500Internal Server Error
Request

PUT/v1/sprites/{name}/fs/write

Write file contents to the sprite filesystem. Request body contains raw file bytes.

Query Parameters

path:string

Path to the file to write

workingDir:string

Working directory for resolving relative paths

mode:optionalstring

File permissions in octal (e.g., '0644')

mkdir:optionalboolean

Create parent directories if they don't exist

StatusDescription
200Success
400Bad Request - Invalid request body
404Not Found - Resource not found
500Internal Server Error
Request

GET/v1/sprites/{name}/fs/list

List directory contents.

Query Parameters

path:string

Path to the directory to list

workingDir:string

Working directory for resolving relative paths

StatusDescription
200Success
404Not Found - Resource not found
500Internal Server Error
Request

DELETE/v1/sprites/{name}/fs/delete

Delete a file or directory.

Request Body

path:string
workingDir:string
recursive:boolean
asRoot:boolean
StatusDescription
200Success
400Bad Request - Invalid request body
404Not Found - Resource not found
500Internal Server Error
Request

POST/v1/sprites/{name}/fs/rename

Rename or move a file or directory.

Request Body

source:string
dest:string
workingDir:string
asRoot:boolean
StatusDescription
200Success
400Bad Request - Invalid request body
404Not Found - Resource not found
500Internal Server Error
Request

POST/v1/sprites/{name}/fs/copy

Copy a file or directory.

Request Body

source:string
dest:string
workingDir:string
recursive:boolean
preserveAttrs:boolean
asRoot:boolean
StatusDescription
200Success
400Bad Request - Invalid request body
404Not Found - Resource not found
500Internal Server Error
Request

POST/v1/sprites/{name}/fs/chmod

Change file or directory permissions.

Request Body

path:string
workingDir:string
mode:string
recursive:boolean
asRoot:boolean
StatusDescription
200Success
400Bad Request - Invalid request body
404Not Found - Resource not found
500Internal Server Error
Request

POST/v1/sprites/{name}/fs/chown

Change file or directory ownership.

Request Body

path:string
workingDir:string
uid:any
gid:any
recursive:boolean
asRoot:boolean
StatusDescription
200Success
400Bad Request - Invalid request body
404Not Found - Resource not found
500Internal Server Error
Request

WSS/v1/sprites/{name}/fs/watch

Watch for filesystem changes via WebSocket.

StatusDescription
101Switching Protocols - WebSocket connection established
400Bad Request - Invalid WebSocket upgrade or missing parameters
404Not Found - Resource not found
FieldTypeDescription
typestring
pathsstring[]
recursiveboolean
workingDirstring
pathstring
eventstring
timestampstring
sizenumber
isDirboolean
messagestring
FieldTypeDescription
typestring
pathsstring[]
recursiveboolean
workingDirstring
pathstring
eventstring
timestampstring
sizenumber
isDirboolean
messagestring
Request