curl --request GET \
--url https://api.storiza.store/apps/{id}/files/text \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.storiza.store/apps/{id}/files/text', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.storiza.store/apps/{id}/files/text"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"success": true,
"message": "File read",
"data": {
"path": "<string>",
"content": "<string>",
"bytes": 123,
"truncated": true,
"binary": true
}
}Read a file as text
A file’s contents as text, inside the normal response envelope.
GET /apps/{id}/files/content streams the same file as application/octet-stream for downloads — which is right for a browser and useless to anything that reads JSON, because the bytes never appear in data. This is the callable form: data.content is the text.
Capped at 512 KB. A larger file comes back with truncated: true and the first 512 KB, so a caller always gets something rather than an error. Use offset to page through the rest.
Text only. A file that is not valid UTF-8 is reported with binary: true and no content — reading a binary as a string produces replacement characters that look like data and are not.
Templates that do not allow file access refuse this the same way they refuse the rest of the file API.
Required API key permission: apps:read
curl --request GET \
--url https://api.storiza.store/apps/{id}/files/text \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.storiza.store/apps/{id}/files/text', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.storiza.store/apps/{id}/files/text"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"success": true,
"message": "File read",
"data": {
"path": "<string>",
"content": "<string>",
"bytes": 123,
"truncated": true,
"binary": true
}
}Authorizations
An API key from the Storiza dashboard (API & Integrations), sent as Authorization: Bearer stz_….
Path Parameters
Query Parameters
1x >= 01 <= x <= 524288Was this page helpful?