Resources
Get Resources
get /sites/{siteid}/resourcesPARAMETERS
siteid
integer
path
REQUIRED
start
integer
query
The index of the item to start from
Default: 0
num
integer
query
The number of items returned
Default: 10
fields
array (string)
query
Comma separated list of fields to return. Use this to query only the fields you are using. Default is all fields in resource.
Example: /sites/{siteid}/resources?fields=resourceid,datecreated
gethttps://api.mysitoo.com/v2/accounts/1500/sites/1/resources.json?num=2
RESPONSE JSON
{ "totalcount": 41, "items": [ { "resourceid": "banner_main.jpg", "mimetype": "image/jpeg", "width": 947, "height": 430, "filesize": 21117, "datecreated": 1352898291 }, { "resourceid": "banner_main_demo.jpg", "mimetype": "image/jpeg", "width": 1134, "height": 515, "filesize": 33920, "datecreated": 1352898291 } ]}
HTTP Status Code Summary | |
---|---|
200 | Returns an envelope with items of type resource. |
400 | Bad Request. Invalid syntax, missing required argument or invalid request. |
401 | Unauthorized. Authorization failed. |
404 | Resource not found. The url is invalid. |
429 | Too Many Requests. |
500 | Internal Server Error. |
Objects
resourceobject
A resource is an uploaded file.
PROPERTIES
resourceid
string
ID for the file as a relative URL (typically the filename).
mimetype
string
READ ONLY
Mime-type for the file.
Example: ""image/png""
width
integer
READ ONLY
Width of image in pixels (only applies to images).
height
integer
READ ONLY
Height of image in pixels (only applies to images).
filesize
integer
READ ONLY
Filesize on disk in bytes for file.
Timestamp for the date that the file was created.
timestampinteger
Number of seconds since the Unix Epoch.