Question

i need to query some data with where clause

as per the API google map engine i have request as below.

https://www.googleapis.com/mapsengine/v1/tables/14538994882799551513-11853667273131550346/features?where=gx_id%3D900

for the above URL it says BAD REQUEST where=gx_id=900

and the response is

{
 "error": {
  "errors": [
   {
    "domain": "global",
    "reason": "invalid",
    "message": "The value is invalid.",
    "locationType": "parameter",
    "location": "query"
   }
  ],
  "code": 400,
  "message": "The value is invalid."
 }
}

Please suggest me what is wrong in this URL

Was it helpful?

Solution

You use a Number in your query, but the particular gx_id seems to be of type String.

Enclose the Number with single-quotes:

https://www.googleapis.com/mapsengine/v1/tables/14538994882799551513-11853667273131550346/features?where=gx_id%3D%27900%27

OTHER TIPS

Also, you don't have to worry about creating and keeping track of your ID's. the API says you need to include gx_id only to make sure that no Feature is sent twice. Therefore, you can just throw in a string representing your system's current time for example.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top