Want to know more about Dash? Check out how Amy uses Dropbox and Dash to make her day easier here!
Forum Discussion
mikirey
2 months agoNew member | Level 2
Dropbox Cursor Behavior
Hello, I'm trying to confirm cursor behavior. - Is it safe to assume that Cursor is an offset into a transaction log per account, which is a sequential record of changes as they occurred in the ac...
DB-Des
Dropbox Community Moderator
2 months agoHi mikirey,
The cursor value used for paginating through results is an encoded string that contains various pieces of information—such as the account ID, app ID, and parameters related to the original request.
The exact structure of the cursor is intentionally abstracted and may change over time, so we recommend treating it as an opaque value that's meant to be passed back to the API as-is, without modification or inspection.
mikirey
2 months agoNew member | Level 2
Thanks for your answer!
What I'm trying to understand is the consistent behavior of cursor as a pointer at a point in time. My use case is that instead of introducing the webhook complexity (leases, etc) into my application, I can just do a schedule scan every 15mins from the last cursor saved. If for some reason, during one of the scheduled scans, something failed. The next schedule can still pick up from the last cursor saved and we're not missing out on any updates.
- Is this the correct understanding?
- If during the scan, there are new files being uploaded/modified, these changes are appended, i.e. we can pick up those changes as the cursors progresses?
- I've read some documentation indicating that cursors do become invalid after some time, do we have an approximate amount of time?
Thank you so much for your time!
- DB-Des2 months ago
Dropbox Community Moderator
When you call /2/files/list_folder/get_latest_cursor, the Dropbox API will return a cursor for the corresponding account and path (if one is provided) at that particular point in time. So, if a call is made before any folder updates are done in that account, the cursor will be for "before" those latest additions.
Sending a request to /2/files/list_folder/continue with the cursor obtained from /2/files/list_folder/get_latest_cursor will return an empty "entries" array if no changes have occurred in the corresponding account or path (if one is provided) after that cursor was obtained.
A cursor could become invalid or stale over time. We don’t make any guarantees about how long a cursor remains valid, and we don’t have an approximate expiration window to share. Because of this, we recommend treating cursors as short-lived.
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.6,018 PostsLatest Activity: 21 minutes ago
The Dropbox Community team is active from Monday to Friday. We try to respond to you as soon as we can, usually within 2 hours.
If you need more help you can view your support options (expected response time for an email or ticket is 24 hours), or contact us on X or Facebook.
For more info on available support options for your Dropbox plan, see this article.
If you found the answer to your question in this Community thread, please 'like' the post to say thanks and to let us know it was useful!