REST API - BAQ parameter length error 404

Hi all,

I’m using rest calls for different need. For one of them, I’m calling a baq with a parameter (partnum list delimited by a tild. Example: XXX-023_05~XXX-023_08~XXX-023_09~XXX-163B). When the parameter lenght is over 2030 characters, I get an 404 - File or directory not found.

What would be the best approach in that case? Should I make multiple call?

Are you url encoding the parameter? I think the ~ might be messing with it
The tilde is often used to reference the home directory of a website, which would make me think that’s why you’re getting a directory not found error since the web server is interpreting the tilde as "go to home directory and then find resource XXX-163B

Looks like you are hitting IIS URL length limit

Thanks for your response @Aaron_Moreng ,

I’m using @josecgomez Epicor Rest Helper (Nuget) Updated V2 BaqGetAsync call. Bottom line, there is no problem with the tilde. By the tests I made, when I hit 2030 (approx.) I get an error. I have shrink down the list of value (characters) until a point where the call is ok.

Thanks @Olga ,

You were right. After making a test with the following change it worked.

Now, I suppose I should break down my calls in smaller chunks, right?

Use a function, custom action, or pass your data in a dataset.

How would you pass in a list of parameters that are making the URL too long in with the body of the request or as a dataset as you seuggested?
I am hitting the url max length due to my parameters too.


In my tests, if I remember, I have increased the maxQueryString until it worked. BUT, because it is not a recommended approach, I ended up doing multiple call by breaking my parameter list into small chunks.

Hope it helps.