Retrieve the content of a specific file on your web hosting account. This is only available for web hosting accounts.
path.accountId accountId integer · min: 1 required
Example: 20000 Unique account identifier
Accept Example Content-Type Example dir string required
· Example: public_html file string required
· Example: .htaccess data object required data.accountId string required
· Example: 20000 data.content string required
· Example: RewriteOptions inherit # BEGIN WordPress
# Direktiven (raderna) mellan ”BEGIN WordPress... data.cpanelUsername string required
· Example: xkqjm data.dir string required
· Example: public_html data.file string required
· Example: .htaccess data.success boolean required
· Example: true True for successful responses.
requestId string required
· Example: 2121ae20-bd9d-41e9-aeeb-5dd1dd1a24ba Unique request identifier (UUID).
success boolean required
· Example: true True for successful responses.
timestamp string required
· Example: 2026-02-10T00:00:00.000Z ISO 8601 timestamp (UTC).
https://cloud.hostup.se/api/hosting/{accountId}/files/read curl -X POST "https://cloud.hostup.se/api/hosting/20000/files/read" \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"dir": "public_html",
"file": ".htaccess"
}' {
"success": true,
"timestamp": "2026-02-10T00:00:00.000Z",
"requestId": "2121ae20-bd9d-41e9-aeeb-5dd1dd1a24ba",
"data": {
"success": true,
"accountId": "20000",
"cpanelUsername": "xkqjm",
"dir": "public_html",
"file": ".htaccess",
"content": "RewriteOptions inherit # BEGIN WordPress\n# Direktiven (raderna) mellan ”BEGIN WordPress” och ”END WordPress” är\n# dynamiskt genererade och bör endast ändras via WordPress-filter.\n# Eventuella ändringar av direktiven mellan dessa markörer kommer att skrivas över.\n<IfModule mod_rewrite.c>\nRewriteEngine On\nRewriteRule.* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]\nRewriteBase /\nRewriteRule ^index\\.php$ - [L]\nRewriteCond %{REQUEST_FILENAME} !-f\nRewriteCond %{REQUEST_FILENAME} !-d\nRewriteRule...."
}
} {
"dir": "public_html",
"file": ".htaccess"
}