Remotehost Docs

Read a sandbox file

GET
/sandboxes/{sandboxId}/file

Returns the content as UTF-8, or as base64 for binary files, with its size in bytes. Relative paths resolve beneath /code.

Authorization

bearerAuth
AuthorizationBearer <token>

A RemoteHost API key (rh_sk_...) or a user session token.

In: header

Path Parameters

sandboxId*string

Query Parameters

path*string

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/sandboxes/string/file?path=string"
{  "path": "string",  "content": "string",  "encoding": "utf8",  "size": 0}