Leap0

Read a file

Read a file from the sandbox. Returns the raw file bytes in the response body.

POST
/v1/sandbox/{sandboxID}/filesystem/read-file

Read a file from the sandbox. Returns the raw file bytes in the response body.

Authorization

BearerAuth
AuthorizationBearer <token>

API key passed as a Bearer token in the Authorization header. Alternatively, use the leap0-authorization header.

In: header

Path Parameters

sandboxID*string

Unique sandbox identifier.

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

path*string

Path to the file to read.

offset?integer

Byte offset to start reading from.

Formatuint64
limit?integer

Maximum number of bytes to read.

Formatuint32
head?integer

Return only the first N lines of the file. Mutually exclusive with tail.

Formatuint32
tail?integer

Return only the last N lines of the file. Mutually exclusive with head.

Formatuint32

Response Body

application/octet-stream

application/json

application/json

application/json

curl -X POST "https://api.leap0.dev/v1/sandbox/string/filesystem/read-file" \  -H "Content-Type: application/json" \  -d '{    "path": "string"  }'
"string"
{  "message": "string",  "errors": [    {      "field": "string",      "error": "string"    }  ]}
{  "message": "string"}
{  "message": "string"}