We’re Still Here to Help (Even Over the Holidays!) - find out more here.
Forum Discussion
Raheel S.
11 years agoExplorer | Level 3
Transition from Dropbox Datastore API to API v2
Okay, The dates coming close when the datastore api will get deprecated.
I need to think of a good way to transition my iOS app that essentially uses Dropbox Datastores as a way to store "text" notes and their attachments and another table houses the "Tags". All strings.
I'd really like to know if anyone tried this transition, at this point, i can only think the obvious like:
- Store all note-records as text files.
- use some kind of custom formatted schema where any additional note-data would be within the note-file itself.
Now one, big reason i used datastore api was that it had the "push" feature. I'd really like to know if there a good way to do that in API v2.
Lastly, is there an ObjC API v2 lib?
4 Replies
- Greg-DB11 years ago
Dropbox Community Moderator
Hi Raheel, for the fist part of your post, it sounds like you're looking for some feedback from other developers in a similar situation, so hopefully any such developers reading can chime in.
Regarding the "push" feature of the old Datastore API, do you mean how you would sync changes when/as desired? If you're using files with API v2 as described as a replacement, the equivalent there would just be a matter of uploading the new version(s) of the relevant file(s) when necessary.
Alternatively, if you're referring to a way to get low-latency notification of changes, that is available in API v2, using either:
- for client-side apps: https://www.dropbox.com/developers/documentation/http/documentation#documentation-files-list_folder-longpoll
- for server-side apps: https://www.dropbox.com/developers/reference/webhooks
Finally, we don't currently have an official SDK for Objective-C for API v2 yet, but I'll send this along as a request.
- Raheel S.11 years agoExplorer | Level 3
Hey Greg, good to see you here.
By "push", I mean, observing changes to anything in a datastore was so easy. Just add an observer and figure out according to the DBDatastoreStatus thing..
I know Sync API had those for a full folder..
My intention is to keep my local copy (in my preferred data structure) and make use of these notifications to add or delete data to my local store, using simple text files as a replacement of DBRecord. I don't intend to keep dropbox text files open locally.
Syncing was easy here as I didn't have to figure out "what changes were made", I jus received those DBRecord and I made the necessary changes.
If i'm correct, in APIv2 I'd have to manually look out for what kinda changes where made and get a list of those files.
Looks like a long road to transition, but can you think of a better way to use APIv2? Lets just say, I want to stick with dropbox :)
- Greg-DB11 years ago
Dropbox Community Moderator
Thanks for clarifying! In that case, the longpoll or webhooks functionality I linked to is the right way to mimic this. (In fact, the Sync/Datastores SDK itself did just use longpolling to find out about changes quickly.) API v2 doesn't have the same sort of model that the Sync/Datastores SDK did though, as you mentioned, so your app should use /list_folder and /list_folder/continue to keep track of changes (which should be easier now that there are file IDs).
- Greg-DB10 years ago
Dropbox Community Moderator
The official Objective-C SDK for API v2 has been released here:
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
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, Facebook or Instagram.
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!