api/list
Returns json with a user’s batches, or the details of a single batch. Batches and files are returned in the user’s custom sort order (see api/order).
URL:
Formats:
- json
HTTP Method:
- GET
Response:
/api/list/:user — array of batches:
[{"batch":"pics","created_at":1253742872},{"batch":"booth","created_at":1253731512},
{"batch":"fab40","created_at":1253734949}]
/api/list/:user/:batch — batch details:
{"batch":"fab40","created_at":1253734949,"note":"fab40 related stuff",
"files":[["sunset.jpg",{"uuid":"...","mime":"image/jpeg","size":10240,"idx":0}],
["cats.png",{"uuid":"...","mime":"image/png","size":2048,"idx":1}]],
"tags":["architecture"]}
-
files is an array of
[file name, file metadata]pairs;[]when the batch is empty. -
note and tags reflect what the batch owner set.
-
or:
{"result":"Unknown user","type":"error"}
{"result":"Batch not found.","type":"error"}