cancel
Showing results for 
Search instead for 
Did you mean: 

Service Layer URI length

edy_simon
Active Contributor

Hi,

When sending a Get request to Service Layer, I passed a long filter. something like

$filter=startswith(Table/Field,'A1') or startswith(Table/Field,'A2') ....

SL returns me error

{
 "error": {
 "code": 201,
 "message": {
 "lang": "en-us",
 "value": "Not supported query option: Mismatched parentheses"
 }
 }
}

I believe this is because my query string is too long ( >2200 characters)

When I remove some of the filter until it is abt 2050, the request is successfull.

Is there anywhere we can set the maximum length of the query params?

Regards

Edy

Accepted Solutions (1)

Accepted Solutions (1)

former_member197733
Contributor

Hi, Edy.

For your specific questions, no. There is no configuration for that.

That aside, such a big URI is usually a bad idea. There is a nice diiscussion here and there are several other articles explaining why you should keep it below 2000 characters.

If you can't make a shorter query, maybe a semantic layer would be better (and faster) ?

edy_simon
Active Contributor
0 Kudos

Thanks Ralph,

Since my long filter are lists of 'or', I split it up and made multiple calls.

I have another post about comparing of NTEXT in filter. If you have time for a suggestion please?

Regards
Edy

Answers (0)