Upload image
POST
/gallery/image.json
base64 required (string) | base64 encoded string of image |
POST
/gallery/image.json
base64 required (string) | base64 encoded string of image |
$storeden = new Storeden\Storeden($config);
$payload = array();
$payload['base64'] = '/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAA....';
$result = $storeden->post('/gallery/image.json', $payload);
{
"id": "5b59abe916f46a1845b410f0",
"thumbnail": "https://static-cdn.storeden.com/secache/5b59abe916f46a1845b410f0",
"original": "https://tcdn.storeden.com/gallery/5b59abe916f46a1845b410f0"
}
DELETE
/gallery/image.json
id required (StoredenID) | Unique image id |
$storeden = new Storeden\Storeden($config);
$result = $storeden->delete('/gallery/image.json', ['id' => '5b59abe916f46a1845b410f0']);
{
"ok": 1,
"n": 1,
"err": null,
"errmsg": null
}
GET
/gallery/directories.json
$storeden = new Storeden\Storeden($config);
$result = $storeden->get('/gallery/directories.json');
[
{
"type": "static",
"name": "Products storage",
"id": "item"
},
{
"type": "static",
"name": "Brands storage",
"id": "brand"
},
{
"type": "static",
"name": "Categories storage",
"id": "category"
},
{
"type": "static",
"name": "Template storage",
"id": "theme"
},
{
"type": "static",
"name": "Blog articles storage",
"id": "blog"
},
{
"type": "static",
"name": "Email/Logo storage",
"id": "logos"
},
{
"type": "custom",
"name": "custom directory",
"id": "505725dcbe85f1832e000000"
},
{
"type": "custom",
"name": "custom directory 2",
"id": "50577093be85f17463000003"
}
]
You have a limit of 5 requests every 60 seconds. All requests made over 5 requests in 60 seconds span, your call will be throttle and an HTTP 429 Too Much Requests
error is returned.
On response headers you can find a X-Storeden-Limit
header with left-usage/assigned-quota.
GET
/gallery/list.json
id (string|StoredenID) | Unique images group identifier |
page (int) | Page of data to retrieve |
limit (int) | Default: 100. Number of record to return. |
notes (string) | Available: more-info . |
$storeden = new Storeden\Storeden($config);
$result = $storeden->get('/gallery/list.json');
{
"total_pages": 53,
"images_per_page": 100,
"total_images": 5203,
"next_page": "https://connect.storeden.com/v1.1/gallery/list.json?id=&limit=100&page=1",
"images": [
{
"id": "5458e04e16f46a1b749e365b",
"original": "https://egress.storeden.net/gallery/5458e04e16f46a1b749e365b",
"preview": "https://cdn.storeden.net/secache/5458e04e16f46a1b749e365b",
"updatedDate": "2014-11-04T15:18:54+01:00"
},
....
]
}