github.com/olivere/camlistore@v0.0.0-20140121221811-1b7ac2da0199/doc/protocol/blob-enumerate-protocol.txt (about) 1 The /camli/enumerate-blobs endpoint enumerates all blobs that the 2 server knows about. 3 4 They're returned in sorted order, sorted by (digest_type, 5 digest_value). That is, md5-acbd18db4cc2f85cedef654fccc4a4d8 sorts 6 before sha1-0beec7b5ea3f0fdbc95d0dd47f3c5bc275da8a33 because "m" sorts 7 before "s", even though "0" sorts before "a". 8 9 GET /camli/enumerate-blobs?after=&limit= HTTP/1.1 10 Host: example.com 11 12 URL GET parameters: 13 14 after optional If provided, only blobs GREATER THAN this 15 value are returned. 16 17 Can't be used in combination with 'maxwaitsec' 18 19 limit optional Limit the number of returned blobrefs. The 20 server may have its own lower limit, however, 21 so be sure to pay attention to the presence 22 of a "continueAfter" key in the JSON response. 23 24 maxwaitsec optional The client may send this, an integer max 25 number of seconds the client is willing to 26 wait for the arrival of blobs. If the 27 server supports long-polling (an optional 28 feature), then the server will return 29 immediately if any blobs or available, else 30 it will wait for this number of seconds. 31 It is an error to send this option with a non- 32 zero value along with the 'after' option. 33 The server's reply must include 34 "canLongPoll" set to true if the server 35 supports this feature. Even if the server 36 supports long polling, the server may cap 37 'maxwaitsec' and wait for less time than 38 requested by the client. 39 40 Can't be used in combination with 'after'. 41 42 43 Response: 44 45 HTTP/1.1 200 OK 46 Content-Type: text/javascript 47 48 { 49 "blobs": [ 50 {"blobRef": "md5-acbd18db4cc2f85cedef654fccc4a4d8", 51 "size": 3}, 52 {"blobRef": "sha1-0beec7b5ea3f0fdbc95d0dd47f3c5bc275da8a33", 53 "size": 3}, 54 ], 55 "continueAfter": "sha1-0beec7b5ea3f0fdbc95d0dd47f3c5bc275da8a33", 56 "canLongPoll": true, 57 } 58 59 Response keys: 60 61 blobs required Array of {"blobRef": BLOBREF, "size": INT_bytes} 62 will be an empty list if no blobs are present. 63 64 continueAfter optional If present, the result is truncated and there are 65 are more blobs after the provided blobref, which 66 should be passed to the next request's "after" 67 request parameter. 68 69 canLongPoll optional Set to true (type boolean) if the server supports 70 long polling. If not true, the server ignores 71 the client's "maxwaitsec" parameter.