News for hackers. Stuff that matters.
Re:Ask HN: Are batch endpoints a good pattern in REST APIs? by sethammons on Thursday September 02, 2021 @09:56AM (#28392042)
Yes, you should embrace batching as your customers need it. We batch whenever possible. We process billions of api calls daily at our edge and that multiplies out internally. Without batching and caching, we would grind to a halt.

My suggestion: either pre-validate and return a structured response or return a 202 Accepted with a job id with a different endpoint for checking on the status of the batch. Another option is to have a webhook subscribed to report back status (success and error).

There are no comments on this comment yet.