Retrieving a File in Base64 Format

To add the supporting json format for the Files collection, send a POST request to the following URL:

https://api.appery.io/rest/1/db/files/json/<file_name>

Example

cURL:

curl -X GET \
       -H "X-Appery-Database-Id: 526fdbd8e4b07c3286b537f1" \
       -H "X-Appery-Session-Token: 6fb9515d-82fd-43b3-9124-f0534dceca8e" \
       https://api.appery.io/rest/1/db/files/json/31bb3831-a18e-4a3a-b720-0747a0901481.config.txt
{
  "content": <base64_file>
}

To retrieve json file data, add the parameter full_object to the POST request sent to the following URL:

https://api.appery.io/rest/1/db/files/json/<file_name>?full_object=true

Example

cURL:

curl -X GET \
      -H "X-Appery-Database-Id: 526fdbd8e4b07c3286b537f1" \
      -H "X-Appery-Session-Token: 6fb9515d-82fd-43b3-9124-f0534dceca8e" \
       https://api.appery.io/rest/1/db/files/json/31bb3831-a18e-4a3a-b720-0747a0901481.config.txt?full_object=true
{
 "_id": "31bb3831-a18e-4a3a-b720-0747a0901481.config.txt",
 "contentType": "text/plain",
 "owner": "602ba5150a975a725932f230",
 "_createdAt": "2021-02-16 11:45:06.709",
 "length": 12,
 "acl": {
 "*": {
 "read": true
 },
 "602ba5150a975a725932f230": {
 "read": true,
 "write": true
 }
 },
 "content": "SGVsbG8gdGhlcmUh"
}