"Overall, we’ve simplified our use of HTTP. For example, most endpoints always use HTTP POST, including those that return structured data."
I was wondering, what is the benefit of using one verb (POST) for mostly all calls? I know that you can describe DELETE and PUT/PATCH calls with POST (which is done on some servers because they can't handle those), but why would it be better to get rid of GET and make it POST calls?
Can someone explain me this design decision?
Gian-Luca, thanks for asking this! The way our team has been thinking about API v2 is that we want to make the API as simple as possible. In this case, that means using fewer HTTP verbs. Looking at the question from a different angle, what are the advantages of using GET? Here are a few possibilities:
GET is more friendly to caches. (POST responses may be cached, but in practice I believe caching of GET responses is better supported.) For the RPC-style endpoints, we actually don't want caching anyway, so this wouldn't benefit us.
GET is guaranteed to be idempotent. This makes GET requests safe to retry, which is not the case for POST. In practice, I'm not sure how much this matters. Automatic retries are rare outside the context of an SDK, where the author can decide which things to retry based on the endpoint and the response.
GET is simply what developers expect to see for API calls that retrieve data without side-effects.
Note that we support GET for download-style endpoints, where we do want to make sure browsers can cache the server response. When we use GET, we use JSON-encoded parameters in a header.
Do you have other reasons for why you'd prefer GET? The primary reason for sharing the API v2 preview is to collect this sort of feedback and make improvements as needed, so thank you for sharing your thoughts!
P.S. I have to correct you... you said "Dropbox REST API," but the API definitely isn't REST. 🙂
..sabre rest exposes most of it's search api through Post method because most of these search api need search criteria to process requests which are not possible with get method
We love to learn from the educators who use Dropbox. Whether you teach kids, teens, adults or a combination of all three, we want to know what apps and integrations you use with Dropbox to help with teaching. Which of the ones below is your favorite, or most used tool?