Replies: 2 comments
-
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. |
Beta Was this translation helpful? Give feedback.
-
I can't see that we would make API changes to support longer URI's. Adding some form of validation error in the SDK could be an option, not that it resolves the issue, rather it would inform the developer that an issue exists. Solutions Discussed:
Of those solutions:
|
Beta Was this translation helpful? Give feedback.
-
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.
Beta Was this translation helpful? Give feedback.
All reactions