KVStore

फ़्री
द्वारा Carlo Alberto Degli Atti | अपडेट किया गया 22일 전 | Data
लोकप्रियता

9.2 / 10

लेटेंसी

419ms

सेवा का स्तर

100%

Health Check

N/A

सभी चर्चाओं पर वापस जाएं

How can I set offset for "get items"?

Rapid account: Naosk 8
naosk8
7년 전

In the documentation, there is a optional field to enable offset for “get items”, but it doesn’t seem to work.
So could you check it, and please let me know the proper usage.

Rapid account: Lordkada
lordkada Commented 7년 전

In the meantime I close this. In case you’re still experiencing unexpected results, please open a new ticket.

Rapid account: Lordkada
lordkada Commented 7년 전

I checked it and from my point of view I can confirm it works as expected.

The offset refers to the created_at field: items in a collection are sorted in the descending order (new items come first) and then filtered out if their created_at >= query param. date (i.e. only older items are kept).

So, when you want to iterate over more batches, you fetch the first one, then take the last item created_at value and use it as parameter to get the second batch… and so on.

This is an example of usage:
https://kvstore.p.mashape.com/collections/my_collection/items?offset=1476496846.550855

Let me know if it works or you have different results

चर्चा में शामिल हों - नीचे टिप्पणी जोड़ें:

नई टिप्पणियाँ पोस्ट करने के लिए लॉग इन / साइनअप करें