Files
Covered in this doc:

List files

List all files uploaded within a Site
1
GET /api/v2/files/
Copied!

Response

1
{
2
"meta": {
3
"limit": 20,
4
"next": "/api/v2/files/?limit=20&offset=20",
5
"offset": 0,
6
"previous": null,
7
"total_count": 5
8
},
9
"objects": [
10
{
11
"added": "2014-07-18T12:05:44",
12
"checksum": "c8aaa5d3656fd6967b4826a14d3c86ef",
13
"filename": "chart-copy.pdf",
14
"filesize": 54226,
15
"id": 13,
16
"mimetype": "application/pdf",
17
"modified": "2014-07-18T12:05:44",
18
"path": null,
19
"resource_uri": "/api/v2/files/13/",
20
"site_id": 1556341,
21
"upload_source": "builder",
22
"user_id": 322,
23
"whitelabel_id": 10
24
},
25
...
26
]
27
}
Copied!

Full URI of files

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 site
Example:
1
http://yourprivatelabel.cloudfrontend.net/files/chart-copy.pdf
Copied!

Upload a new file (via base64)

1
POST /api/v2/files/
Copied!

Parameters

Name
Type
Description
upload
object
required

Example

1
{
2
"upload": {
3
"name": "chart-copy.pdf",
4
"file": "iVBORw0KGgoAAAANSUhEUgAAASAAAABsCAIAAABFDPh0AAAAGXRFWHRTb2Z0d2F..."
5
}
6
}
Copied!

Response

A status code of 201 created is returned on a successful creation and contains the created files object as JSON.
Last modified 2yr ago