Re:Ask HN: Are batch endpoints a good pattern in REST APIs?
by beamatronic on Wednesday September 01, 2021 @05:35PM
(#28385786)
I would break it into small parts - I would decouple the storage of the batch request from it's processing. For example, let's say your requests originate in a CSV file. I'd have a CRUD API to upload the CSV and give it a handle. Then I'd have an API for setting up a job, using the handle of that resource file. You'd use another API to then start this job and check on its progress. This API might specify a webhook to call back when the job is done. A final API would allow you to query for successes and errors based on the job id.
[ Parent
| on HN ]
There are no comments on this comment yet.