XPipe LogoXPipe Documentation

Read the content of a remote file

Reads the entire content of a remote file through an active shell session.

POST
/fs/read

Authorization

AuthorizationRequiredBearer <token>

The bearer token used is the session token that you receive from the handshake exchange.

In: header

Request Body

application/jsonRequired
connectionRequiredstring

The connection uuid

pathRequiredstring

The target file path

curl -X POST "http://localhost:21721/fs/read" \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "connection": "f0ec68aa-63f5-405c-b178-9a4454556d6b",
    "path": "/home/user/myfile.txt"
  }'

The operation was successful. The file was read.

"string"