Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

400 bad request #35

Closed
syllogismus opened this issue Nov 17, 2015 · 4 comments
Closed

400 bad request #35

syllogismus opened this issue Nov 17, 2015 · 4 comments

Comments

@syllogismus
Copy link

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

@marks
Copy link

marks commented Nov 17, 2015

@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

@syllogismus
Copy link
Author

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 [email protected]
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-8trz

Sample JSON response:
https://data.cityofnewyork.us/resource/rvhx-8trz.json?$limit=1


Reply to this email directly or view it on GitHub
#35 (comment).

@marks
Copy link

marks commented Nov 18, 2015

@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

@syllogismus
Copy link
Author

ok, all good - that works!
thank you

On Wed, Nov 18, 2015 at 2:29 PM, Mark Silverberg [email protected]
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).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants