1

I am trying to run a filter on the dataset which is private in Socrata. I have tried doing it through browser and using SoQL but it doesn't work.

https://xxxxx/resource/xxxx-xxxx.json?$where=product like '%test%'

When I am making request to the following URL in browser. It is returning me all the products without any filtering. But it occasionally throws an exception

{
  "code" : "query.compiler.malformed",
  "error" : true,
  "message" : "Error, could not parse SoQL query \"select * from #xxx-xxxx where product like '%new%'\"",
  "data" : {
    "query" : "select * from #tatp-bcb2 where product like '%new%'"
  }
}

It is private dataset so I am unable to access specific API docs from export menu. Is it because the dataset is private or something to do with the actual API ?

Arun Kumar
  • 907
  • 13
  • 33

1 Answers1

1

Probably what has happened is that you're using the latest API endpoints for your public datasets, which support LIKE, but for your private dataset, you're still using the older API endpoint, which will reject the use of LIKE.

If you have a Data Lens page for your private dataset, you can get its new API endpoint through that user interface under the API button. Or, if you email me at chris.metcalf (at) socrata.com I can look up the new API endpoint for your private dataset.

We're working on an authenticated way of getting API docs for private datasets, but its not ready yet.

chrismetcalf
  • 1,556
  • 1
  • 8
  • 7
  • I don't have direct access to the private data set. But it is only shared with me from the client that I am working for. I am unable to access the data lens page because I don't have access to dataset. I will send the email to you with dataset name. Is it still possible to use 'like' function without getting access to the actual dataset or I can ask client to create a dataset lens page for me ? – Arun Kumar Sep 09 '15 at 00:57