You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Restrict number of IDs allowed in GET requests #178
If you specify a large number of, for example, invoice IDs in xero_client.accounting_api.get_invoices you will hit either a 414 or 400 error due to the request URI being too long.
Specifically with 220 IDs we get a HTML 400 error from Akamai, with 210 IDs we get an XML 414 error from Xero, and with 200 IDs we get success.
I think this SDK should either immediately raise an error if you try and request more than say 100 IDs, or better, paginate the requests itself. Or better still, update the API to support these kind of bulk requests with a POST that would not have a URI length restriction.
This is a good idea. I've dealt with the URL string exceeding browser limits and it is not clear at first.
In the near term I think putting in clearer SDK errors to limit the user from passing the url limits will be more feasible then new post endpoints, but agreed that is likely the better option, using a POST body.
Feel free to post back ideas you have on how to best solve and will do some more thinking on this, as it is an edge case issue that effects all 6 of our supported SDKs.
Activity
SerKnight commentedon Jun 21, 2021
Hi Steveh.
This is a good idea. I've dealt with the URL string exceeding browser limits and it is not clear at first.
In the near term I think putting in clearer SDK errors to limit the user from passing the url limits will be more feasible then new post endpoints, but agreed that is likely the better option, using a POST body.
Feel free to post back ideas you have on how to best solve and will do some more thinking on this, as it is an edge case issue that effects all 6 of our supported SDKs.