I am currently using the Salesforce REST API to fetch the records from Salesforce by passing the query via the query parameter in the GET request. However, this particular implementation returns an error when the url query parameter character count is more than 16000
. Is there a way to get it to accept around 1,00,000 chars in the url?
Unfortunately, it looks like you're just hitting the limits imposed by Salesforce:
SOSL search query strings
Maximum length of SearchQuery string
If the
SearchQuery
string is longer than 10,000 characters, no result rows are returned. IfSearchQuery
is longer than 4,000 characters, any logical operators are removed. For example, theAND
operator in a statement with aSearchQuery
that’s 4,001 characters will default to theOR
operator, which could return more results than expected.
I don't know the Salesforce API at all, but I have two suggestions (especially if no one else answers your question):
POST
/PUT
based query option in the Salesforce REST API. I think I read something about being able to format a query in JSON and then submitting that instead (but I could be wrong). Edit: I looked a little more, and I didn't see anything immediately that said this was a possibility.