Files
Covered in this doc:
List all files uploaded within a Site
GET /api/v2/files/
{
"meta": {
"limit": 20,
"next": "/api/v2/files/?limit=20&offset=20",
"offset": 0,
"previous": null,
"total_count": 5
},
"objects": [
{
"added": "2014-07-18T12:05:44",
"checksum": "c8aaa5d3656fd6967b4826a14d3c86ef",
"filename": "chart-copy.pdf",
"filesize": 54226,
"id": 13,
"mimetype": "application/pdf",
"modified": "2014-07-18T12:05:44",
"path": null,
"resource_uri": "/api/v2/files/13/",
"site_id": 1556341,
"upload_source": "builder",
"user_id": 322,
"whitelabel_id": 10
},
...
]
}
Any files file is available publicly using the
filename
parameter from the response and prefixing it with the frontend hostname of your API instance or path to a hosted siteExample:
http://yourprivatelabel.cloudfrontend.net/files/chart-copy.pdf
POST /api/v2/files/
Name | Type | Description |
upload | object | required |
{
"upload": {
"name": "chart-copy.pdf",
"file": "iVBORw0KGgoAAAANSUhEUgAAASAAAABsCAIAAABFDPh0AAAAGXRFWHRTb2Z0d2F..."
}
}
A status code of
201 created
is returned on a successful creation and contains the created files object as JSON.Last modified 4yr ago