POST
/
api
/
editor
/
view
curl --request POST \
  --url http://localhost:4242/{computer_name}/api/editor/view \
  --header 'Content-Type: application/json' \
  --data '{
  "path": "/path/to/file.txt",
  "view_range": [
    1,
    10
  ]
}'
"Line 1\nLine 2\nLine 3"

Body

application/json
path
string
required

File path to view

Example:

"/path/to/file.txt"

view_range
integer[] | null

Line range to view [start, end]

Example:
[1, 10]

Response

200
application/json
Successfully retrieved file contents

The response is of type string.