v1

latestOpenAPI 3.1.02026-07-2631411.5 MB
Context - Runtime

Read runtime sandbox file

Read a UTF-8 file from the workspace runtime sandbox. Returns the file content.

post/context/runtime/content

Request body

pathstring required

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

startLineinteger

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

endLineinteger

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.

Response

Successful response

pathstring required
contentstring required

UTF-8 decoded content of the requested line range.

startLineinteger required

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

endLineinteger required

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

totalLinesinteger required

Total number of lines in the underlying file.