We are building this REST API layer for out partners where the architecture is something like this:
- We will have a bunch of REST API scripts built using PHP sitting on our storage server.
- A partner will hit our API with a transfer request
- We will fetch the customer data files related to that transfer request and push them to the partner's server.
The problem we are having is with the data files being requested. One transfer request can can ask for hundreds of data files.
Ideally we would prefer getting a single request from the partner for the transfer. (One request that will have all the data files to be transferred).
The other way is that each data file is a separate request and so one order of a hundred files will have 100 requests. This will have additional to and fro traffic as well as individual notification for each file which can be cumbersome.
So my question is - how to format a request to a REST API to retrieve a collection of over hundred objects? If I ask the partner to POST a txt file with the data file names it will not technically be REST, right? What is the ideal way to tackle this?