Read file content

Read the content of a specific file (limited to text files below a certain size).

Path Parameters

accountId integer · min: 1 required Example

Unique account identifier

Headers

Accept Example
Content-Type Example

Body

required
application/json
dir string required
file string required

Responses

200
success boolean
timestamp string
requestId string
data object
POST https://cloud.hostup.se/api/hosting/{accountId}/files/read
For AI assistants
cURL
curl -X POST "https://cloud.hostup.se/api/hosting/17374/files/read" \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "dir": "string",
    "file": "string"
  }'
Response
{
  "success": true,
  "timestamp": "string",
  "requestId": "string",
  "data": {
    "success": true,
    "accountId": "string",
    "cpanelUsername": "string",
    "dir": "string",
    "file": "string",
    "content": "string"
  }
}
Request Body
{
  "dir": "string",
  "file": "string"
}