I have to make several api calls and it gets a bit slow to get the responses back. I am working on a reporting tool to be able to export custom reports from several entities at a time (for example joins between positions, invoices, companies, contact person, projects, etc...).
What we are doing:
1. Download all the required data (takes a while) and save it in a local DB
2. Query our local DB to make the custom reports.
3. Update the data once a day (at night) using the
The issues and questions I have are as follows:
1-. I already realized (because of the forum and support calls) that I should not be asking for expanded fields for to many entries. I have already done that by calling every part as individual queries (Invoices, Positions, Companies, CompanyAddresses, etc..) and then join the information as required. Sometimes this can also get slow (for example for a first import) because there are many entries (728.000 UserReportings, 21.000 Invoices, etc..).
Right now I am calling the api and receiving 1000 entries and a
@odata.nextLink which I call to keep getting the missing entries until done. For some cases (see point 2) it is not possible not to call expanded fields and 1000 entries is to long, and sometimes I fail to get a response. I wanted to use
$skip but the
@odata.nextLink part is missing when I use
Is this an expected behavior and I should be implementing my own paging method or I am missing something?
2-. For some endpoints (for example: IncomingInvoices Positions, CustomFields on Projects) I have to ask for the expanded fields, as I can´t get that information in any other way (if there is I would be happy to read about it).
In this case what is the recommended response size (
$top parameter) I should use so that the API can handle the expanded fields without problems? 100? 50? other?