Skip to main content
POST
Read runtime sandbox file

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json

Read a file from the workspace runtime sandbox.

path
string
required

Path of the file to read in the runtime sandbox, relative to the workspace working directory.

Minimum string length: 1
startLine
integer

1-indexed inclusive line at which to start reading. Defaults to the first line of the file.

Required range: 1 <= x <= 9007199254740991
endLine
integer

1-indexed inclusive line at which to stop reading. Defaults to the last line of the file. Must be greater than or equal to startLine when both are provided.

Required range: 1 <= x <= 9007199254740991

Response

Successful response

path
string
required
content
string
required

UTF-8 decoded content of the requested line range.

startLine
integer
required

1-indexed inclusive start line of the returned slice (after clamping to the file's bounds).

Required range: -9007199254740991 <= x <= 9007199254740991
endLine
integer
required

1-indexed inclusive end line of the returned slice. Equals startLine - 1 when the requested range starts past the end of the file.

Required range: -9007199254740991 <= x <= 9007199254740991
totalLines
integer
required

Total number of lines in the underlying file.

Required range: -9007199254740991 <= x <= 9007199254740991