6 ms·
Dropbox API v2 launches
- dietcokerules 11y agoLove the layout of the API Explorer. Makes it easy to see exactly what is being requested.
- muyfine 11y agoIs there an accessible description of the API? i.e., what's driving the "code generation process"? Is that open and something I could use to generate a client for <insert my favorite language here>?
- smarx 11y agoStay tuned for more details! The short answer is that yes, you'll be able to do that, but we haven't published that API description yet.
- pixie_ 11y agoA simple POST based API? What is this blasphemy?
- smizell 11y agoIt is interesting that you request the /get_account link with a POST method.
- ajkjk 11y agoAs systems grow you always end up wanting to parameterize GET apis with things that you can't reasonably continue to stuff into headers, matrix params, and a wonky URL (in my experience).
- tlb 11y agoAnd especially, browsers limit URLs to as small as 2 kB. They go into more detail on this design decision here: https://blogs.dropbox.com/developers/2015/03/limitations-of-the-get-method-in-http/ https://blogs.dropbox.com/developers/2015/03/limitations-of-...
- dragonwriter 11y agoWhich is why we need to get rid of the WebDAV baggage around the SEARCH method [0] and establish a general-purpose, safe/idempotent HTTP method that accepts a message body to supply parameters rather than using URL query strings; a draft RFC for such a method exists. [1] [0] https://tools.ietf.org/html/rfc5323 https://tools.ietf.org/html/rfc5323 [1] https://tools.ietf.org/html/draft-snell-search-method-00 https://tools.ietf.org/html/draft-snell-search-method-00
- lucian1900 11y agoGET requests can have a body. Some clients fail at handling this and you have to use method overrides, though.
- awinder 11y agoGET requests can have a body but by spec they aren't supposed to parse it with the request https://groups.yahoo.com/neo/groups/rest-discuss/conversations/messages/9962 https://groups.yahoo.com/neo/groups/rest-discuss/conversatio...
- prodigal_erik 11y agoWe have fifteen years worth of client and proxy implementations that do not support GET with a request body. This ill-conceived spec change violates "be conservative in what you send" just to avoid adding a new idempotent request method that actually defines usable semantics for its body.
- sk5t 11y agoIf I had to consume an API with entity-body-having GETs, I would definitely conclude the designers had no practical experience in the field, and had read about this obscure possibility somewhere...
- cunac 11y agoin this case there is no reason to do that and you lose all possibilities of using cache if that is desirable GET /users/@me/accounts/:id --> specific user account GET /users/@me/accounts --> all user accounts would suffice and would read naturally , it would also give you ability for other user with appropriate credentials (admin kind) to see some other user account information yes, very disappointed with design decisions (I understand that from a purist perspective URI is opaque but well named URIs help communication with people)
- ajkjk 11y agoMy point is that in complex systems 'get' use cases come up that don't fit well in urls. Suppose you have too many accounts to list, so you start taking predicates in the API, or you start returning a pagination token that's passed back in on a subsequent requests. You quickly overwhelm URIs and have to start serializing complex objects in headers or query params. Eventually you give up and switch to POST so you can just post a json body and be done with it.
- cunac 11y agoI do build a complex systems and pagination payload always have links to prev/next etc. , POST for GET would kill all client side and server side caching we leverage and would make system really hard to scale. We still didn't run into compelling case to use POST for this type of fixed queries. What you are talking is ad hoc search capability and that is usually done differently either by posting content type which indicates search payload or using different generic URI for search queries within a whole system
- conradk 11y agoAs long as everything is well documented, I don't see the problem. With most languages, you'll probably want to use an SDK anyway. What's the problem with a POST based API?
- waterside81 11y agopixie_ was being sarcastic - alluding to how "RESTful" APIs with the wide array of verbs is en-vogue in some circles.
- robitor 11y agoWhy would they choose RPC style endpoints over REST?
- swax 11y agoBecause REST is a superficial standard and people are starting to figure that out? APIs don't need to be complicated. Give me an endpoint to call and parameters to send. I don't need verbs, cool looking URLs, overloaded headers, special versioning schemes, and a never ending debate of what REST is and what it isn't. Also if anyone replies to this with 'you just don't understand REST' I'm going to put another nickel in the jar.
- morgante 11y agoYou understand REST.
- oldmanjay 11y agoIt seems like the only thing Dropbox doesn't have is the verbs. On the other hand, I've never much cared about the "no true REST" crap that the conversation always seems to turn into. I'm too pragmatic to care if I'm adhering to someone's concept of a convention.
- BinaryIdiot 11y agoYou are apparently me. I've done REST and "rest" for many years and every single time it starts out really simple. Oh I just need the profile data so let's make a RESTful endpoint just for profile. So easy! Oh wait the profile page need data from X, Y and Z. Well we gotta be RESTful so let's make 4 HTTP calls. Oh, latency sucks on mobile and terrible networks and we have to cut down on HTTP calls? Sorry, can't, we're RESTful...okay fine ONE RPC endpoint for the profile page's information. I think REST has it's place; it's good if you want a really intuitive way to access a very specific resource. Beyond that? For developing web apps? Almost always have to go down the RPC route and there is nothing wrong with that. Not everything has to be "RESTful" damn it!@
- dragonwriter 11y ago
- cryptoz 11y agoIs the Dropbox client fully open source yet? I won't use a spying tool that hires international spies to be on the board if they continue to be closed-source and intent on spying. Their new SDKs seem to be open source - why not their main client product?
- flyt 11y agoWhat are you worried about in the client app that would require it to be open source? Should they also open source their backend systems and give you access to them?
- benologist 11y agoIt can read and see everything you do on your computer... ...until you close it for grinding too much cpu.
- cryptoz 11y agoYes, they absolutely should open source their backend systems. Is the value of Dropbox really in their source code? I doubt it. They want my files, all of them, but they won't tell me what they're doing with the files or how their code works? Everything about this should be open source, and I won't ever use it until it is. Also they should make a lot more effort towards promising privacy and security. As it stands right now, they seem intent on handing your file access to governments and building systems that are insecure by design. No thanks. Open source and then we'll talk.
- flyt 11y agoYou aren't obligated to be a customer of Dropbox. There are plenty of other services, either self-run or not, that caters to people that value baseless paranoia over functionality and usability.
- benologist 11y agoBaseless paranoia? Have you read the news this year? There's never been a worse time to be unaware and unclear of what software installed on your device does. Companies are so bad at security they lose people's private information by the million, Dropbox themselves didn't even validate passwords for a four hour window once upon a time.
- JupiterMoon 11y agoSo could one use this to manage encrypted files stored in Dropbox?
- fiatjaf 11y agoCan I programmatically edit .xls files over the API? That would be great.
- swiley 11y agoIt's a storage api not a spreadsheet api. Dropbox itself can't do that, but it can get you the data and you can use an xls library or program to edit them.
- tacos 11y ago"There are currently four SDKs for API v2: Swift, Python, .NET, and Java." And a structured, non-REST API. Aw. All grown up.
- BinaryIdiot 11y agoInitially I was surprised Swift, a new language, came before JavaScript. But after thinking about it you have to have it for iOS integration. It's too bad their JavaScript SDK isn't ready yet but making HTTP calls from JavaScript is dead simple so that's not the worst thing. Overall looks like a good set of priorities for what SDKs got done first.
- denniskane 11y agoWell, if JavaScript were meant to be used as an actual programming language, then it would make sense to develop an SDK for it. I'm only half joking there :) In all seriousness, though, it did make my brain tilt about 15 degrees to see the words "JavaScript" and "SDK" next to each other like that.
- dsp1234 11y agoIn all seriousness, though, it did make my brain tilt about 15 degrees to see the words "JavaScript" and "SDK" next to each other like that. AWS has two JavaScript SDKs. https://aws.amazon.com/sdk-for-browser/ https://aws.amazon.com/sdk-for-browser/ https://aws.amazon.com/sdk-for-node-js/ https://aws.amazon.com/sdk-for-node-js/
- smarx 11y agoAnd Dropbox has one for API v1: https://github.com/dropbox/dropbox-js https://github.com/dropbox/dropbox-js. There will be one for v2 as well.
- deleted 11y ago[deleted]
- johncolanduoni 11y agoWhy? Swift is pretty easy to use from Objective-C, especially if you take care to make your API Obj-C friendly (which I would assume they did).
- samskiter 11y agoThey didn't
- awakeasleep 11y agoNo love after begging for an administration API for 2+ years. At this point they should start putting some spin on it. "Help your company employ more people. Dropbox for Business's lack of administration tools will grow your headcount. When you see your admins waiting for a list of users to load, or trying to write their own tools based on scraping the website, feel good about how you're fighting unemployment."
- smarx 11y agoOur goal is definitely to give administrators the control they need through the API, but I'm very willing to believe there are things we're missing. :-) Is there something specific that's not already part of our Dropbox Business API? (https://www.dropbox.com/developers/documentation/http#teams https://www.dropbox.com/developers/documentation/http#teams)
- awakeasleep 11y agoI didn't see this. Huge step in the right direction. I don't suppose there is a way to programmatically consume the activity stream and pick events to undelete, too? I'm sorry I can't edit the smug sassiness out of my original reply.
- smarx 11y agoIt's not in v2 yet (coming soon!), but check out /log/get_events [0] in v1. I'm not sure that it will cover what you want if you're looking for file changes. That might be better served with webhooks, /files/list_folder and /files/list_folder/continue. Feel free to post on the developer forum if you want more help! [1] [0] https://www.dropbox.com/developers-v1/business/docs#log-get-events https://www.dropbox.com/developers-v1/business/docs#log-get-... [1] https://www.dropboxforum.com/hc/en-us/community/topics/200209245-API-Development https://www.dropboxforum.com/hc/en-us/community/topics/20020...
- brazzledazzle 11y agoI think it was released at the beginning of 2015 so I wouldn't beat yourself up about it.
- jl6 11y agoHey if anyone from Dropbox is monitoring these comments: nice work, but there's something missing that I've been waiting for: API access to comments. I'd love to recommend using the new Dropbox comments feature but I can't until I know there is a way of getting that data out after putting it in. I'm not entering metadata into a system that doesn't have fully programmable export. Been burned too many times. Pretty please?
- smarx 11y agoThanks for the feedback! This is definitely already being tracked as a feature request, but I don't have anything to share about if/when we'll add comments support to the API.
- chrdlu 11y agoLove the new features. I was hoping to see the ability to programmatically create File Requests. Looks like it might still be a while before it gets implemented.
- avidas 11y agoSample app link here is broken https://github.com/dropbox/dropbox-sdk-python/blob/master/example/back-up-and-restore/backup-and-restore-sample.py https://github.com/dropbox/dropbox-sdk-python/blob/master/ex...
- leahculver 11y agoThanks for letting us know. We'll get that fixed (I'm an employee). Here's the correct link: https://github.com/dropbox/dropbox-sdk-python/blob/master/example/back-up-and-restore/backup-and-restore-example.py https://github.com/dropbox/dropbox-sdk-python/blob/master/ex...
- teleclimber 11y agoThe Dropbox Badge thing looks neat [1] but I don't see any indication of an open API so that non-Microsoft applications can take advantage of it. Does anyone know if there are any plans for that? [1] https://www.dropbox.com/help/7670 https://www.dropbox.com/help/7670
- DenisM 11y agoSo is this the API for clients or for servers? I would like my web server to be able to slurp up all the images from my customer's Dropbox. Unfortunately, shared folders can't be downloaded if they are larger than 2Gb, which is quite often for me. Is there an API suitable for this? EDIT: oh yes, yes there is! https://www.dropbox.com/developers/chooser https://www.dropbox.com/developers/chooser EDIT 2: It would be sweet if you guys also exposed SHA2 hash of the files in Choser. Often times they user will mistakenly load the same file, and I would rather not do the work at all if I don't have to.
- cllu 11y agoOne thing I cannot understand is that Dropbox API does not provide any kind of hash for files (in both v1 and v2). In contrast, Amazon Cloud Drive and Google Drive provides md5 hash, and OneDrive provides sha1Hash and crc32Hash. The lack of hash info makes custom app to compare and upload local files extremely painful.
- dmix 11y agoGit annex [1] is a far more capable solution for file syncing and remote backups. It comes with a built-in assistant which syncs directories making it an adequate Dropbox replacement. Git annex automatically uses SHA256 on all files as the UUID (optionally set SHA512 in .gitattributes). You can PGP sign your git commits to add more verification. Plus you dont have to trust a 3rd party with your data, as it can sync entirely over local networks via SSH, directly to a USB harddrive, and it supports encryption when using S3 or other cloud storage. I managed to teach my non-technical girlfriend how to use it without much effort but getting business people to use it might be a hurdle. [1] https://git-annex.branchable.com/ https://git-annex.branchable.com/