bizarre response to API query

When I test my API query
https://api.backendless.com/v1/services/QuoteService/1.0.1/Quotes?t=null&maxR=1&id=null&size=medium&d=12&s=2

I get the following response:
Service invocation failed: ExceptionClass:“JsonMappingException” {Msg:“Unrecognized token ‘medium’: was expecting (‘true’, ‘false’ or ‘null’)\n at [Source: [1,20,123,medium,Series,DailyBoost>DailyBoost Year 1]; line: 1, column: 17] (through reference chain: Object[][3])”, Cause:"Unrecognized token ‘medium’: was expecting (‘true’, ‘false’ or ‘null’)\n at [Source: [1,20,123,medium,Series,DailyBoost>DailyBoost Year 1]; line: 1, column: 17]
this does not make sense as ‘size’ should be expecting values like ‘medium’ or ‘max’.

Did I do something wrong?

Our APP ID is 717EA037-49BD-FA51-FF0D-720176385200

Hello!

Looks like your “size” property has boolean type. Can you show the “Quotes” method from your service? You can send it to support@backendless.com or post it here.
regards,
Alex

Here’s a curl request that make a successful request for your service:

curl -X GET --header “Content-Type: application/json” --header “Accept: application/json” --header “application-id: 717EA037-49BD-FA51-FF0D-720176385200” --header “secret-key: YOUR-SERVER-CODE-SECRET-KEY” "https://api.backendless.com/v1/services/QuoteService/1.0.1/Quotes?t=%22t-string%22&maxR=%22maxR-string%22&id=%22id-string%22&size=%22size-string%22&d=%22d-string%22&s=%22s-string%22";

Make sure to replace YOUR-SERVER-CODE-SECRET-KEY with the value of the secret key

Quite confusing but ok :slight_smile:

Thanks for the solution

If you use the Business Logic screen to make the invocation, it makes it super clear.

Well, that’s what I used in the first place but using a double quote in a GET request seem a bit counter-intuitive if I may say :slight_smile:

Now that we know all should be way easier. Thank you!