New ask Hacker News story: Ask HN: Are batch endpoints a good pattern in REST APIs? - Gadgets180™

It is a technical blog/website and you will get here all the technical stuff and we also post some tech news.

Header Ads

Post Top Ad

Responsive Ads Here

New ask Hacker News story: Ask HN: Are batch endpoints a good pattern in REST APIs?

Share This
Ask HN: Are batch endpoints a good pattern in REST APIs?
4 by mattmarcus | 5 comments on Hacker News.
We've been asked by a number of our customers to add endpoints in our API that would allow them to create, update, or delete objects in bulk. Today, we try to keep our endpoints pretty simple, like this: POST /resource PATCH /resource/:id GET /resource/:id DELETE /resource/:id The reason for the ask comes when someone needs to operate on thousands (or more) records at a time, and it's more efficient to just do it at once rather than be at the whims of request latencies and rate limits. So I understand the reason behind it. Yet, I don't see a lot of great APIs offer endpoints like this. Does anyone have thoughts on if this is an ok pattern (or anti-pattern)? I would be curious to see example API docs of any companies that do this particularly well. (For reference, this is our API: https://ift.tt/3gTvGW9)

Don't forget to subscribe our youtube channel Click here:- http://www.youtube.com/c/techgk Product of the day

No comments:

Post a Comment

Post Bottom Ad

Responsive Ads Here

Pages