400 bad request
syllogismus opened this issue · comments
hi,
adding filters and such ends up in a bad request:
NYC JOBS
https://data.cityofnewyork.us/resource/rvhx-8trz.json
domain = "data.cityofnewyork.us"
client = SODA::Client.new({:domain => domain, :app_token => token })
response = client.get("rvhx-8trz", {"$where" => "posting_date > '2015/01/01'"})
bad
response = client.get("rvhx-8trz",{'where' => "'job_id = '320756008'"})
bad
response = client.get("rvhx-8trz",{"$limit" => 100 , "$where" => "posting_date > '2015/01/1' AND posting_date < '2016/1/1'" , "$order" => "posting_date DESC"})
bad
any ideas?
thx
@syllogismus - I am not seeing job_id
or posting_date
as columns in the dataset.
API docs I am referencing: https://dev.socrata.com/foundry/#/data.cityofnewyork.us/rvhx-8trz
Sample JSON response: https://data.cityofnewyork.us/resource/rvhx-8trz.json?$limit=1
ok that was my bad.
please look at this: the website reports 12 results, i get 0
domain = "data.illinois.gov"
client = SODA::Client.new({:domain => domain, :app_token => token })
response = client.get("traj-88ek", {'$where' => "'bid_date' = '8/18/11'"})
count > 0 (website: 12)
thx
On Tue, Nov 17, 2015 at 4:53 PM, Mark Silverberg notifications@github.com
wrote:
@syllogismus https://github.com/syllogismus - I am not seeing job_id or
posting_date as columns in the dataset.API docs I am referencing:
https://dev.socrata.com/foundry/#/data.cityofnewyork.us/rvhx-8trzSample JSON response:
https://data.cityofnewyork.us/resource/rvhx-8trz.json?$limit=1—
Reply to this email directly or view it on GitHub
#35 (comment).
@syllogismus -- I am not seeing a bid_date
column in that dataset. I think the query is being interpreted by Socrata as "if the string bid_date equals 8/18/11" which would never be true. When you use bid_date
instead of 'bid_date'
you will get an error that
ok, all good - that works!
thank you
On Wed, Nov 18, 2015 at 2:29 PM, Mark Silverberg notifications@github.com
wrote:
@syllogismus https://github.com/syllogismus -- I am not seeing a
bid_date column in that dataset. I think the query is being interpreted
by Socrata as "if the string bid_date equals 8/18/11" which would never be
true. When you use bid_date instead of 'bid_date' you will get an error
that—
Reply to this email directly or view it on GitHub
#35 (comment).