Deon
Posts: 0
Joined: Sun Jun 30, 2013 6:00 am

Request Service not working

Hi

I am running a service. Weinre says that there is a problem with my field that it is not an Integer. it is an integer.

Applying the Test from service works. The parameter is pulled from a local storage which is a number.

Here is the Weinre complaint

Request URL:http://xxx.xxx.xxx.xxx:81/api/v2/zoot...
Request Method:GET
Status Code:400 Bad Request400 Bad Request
Query String Parameters
filter:fromID=27 AND rideID=4
Request Payload
filter=fromID%3D27+AND+rideID%3D4
Response Headers
Cache-Control:no-cache
Connection:close
Content-Length:89
Content-Type:application/json
Date:Thu, 15 Jun 2017 10
Server:Apache
Vary:Cookie
X-Frame-Options:SAMEORIGIN
X-Powered-By:PHP/7.0.11

and the error

{"error":{"context":null,"message":"Field 'fromID' must be a valid integer.","code":400}}

As I said fromID is a local storage variable defined as a number field.
What more does it want?? Oh and the database fromID field is also an integer

Thank you

Serhii Kulibaba
Posts: 150
Joined: Tue Aug 27, 2013 1:47 pm

Request Service not working

Hello Deon,

You don't send the fromID as a request parameter at all, you send it as a part of the filter parameter. It might be an issue

Deon
Posts: 0
Joined: Sun Jun 30, 2013 6:00 am

Request Service not working

Hi Serhii

Thank you for the reply. It was sent as part of the filter parameter.

Found the issue. My filter condition syntax was correct as per above for MSSQL type DB access but for mySQL access it should be.

(fromID=27) AND (rideID=5)

It needed some brackets.

Thank you.

Return to “Issues”