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

pds api not able to search using URL parameters #130

Closed
gxtchen opened this issue Nov 1, 2021 · 6 comments
Closed

pds api not able to search using URL parameters #130

gxtchen opened this issue Nov 1, 2021 · 6 comments
Assignees
Labels
B12.1 bug Something isn't working i&t.issue s.low
Milestone

Comments

@gxtchen
Copy link

gxtchen commented Nov 1, 2021

🐛 Describe the bug identified during I&T

When I search using the command:
curl -X GET --header 'Accept: application/json' 'https://pds-gamma.jpl.nasa.gov/api/products/urn%3Anasa%3Apds%3Ainsight_documents'

The Api returns the correct result. But when I try to use the ? search:
curl -X GET --header 'Accept: application/json' 'https://pds-gamma.jpl.nasa.gov/api/products?limit=100&q=lid%20eq%20urn%3Anasa%3Apds%3Ainsight_documents&only-summary=false'

API returns 404, no content.

🥼 Related Test Case(s)

NASA-PDS/registry-api#462

🖥 System Info

  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

🦄 Related requirements

⚙️ Engineering Details

@gxtchen gxtchen added bug Something isn't working I&T needs:triage labels Nov 1, 2021
@jordanpadams jordanpadams changed the title doi-api not able to search using URL parameters pds api not able to search using URL parameters Nov 9, 2021
@jordanpadams
Copy link
Member

@tloubrieu-jpl here is the corresponding ticket from I&T

@jordanpadams jordanpadams added this to the 16.Tyson.Gay milestone Nov 9, 2021
@tloubrieu-jpl
Copy link
Member

tloubrieu-jpl commented Nov 9, 2021

@gxtchen I was able to make that request work:

curl --location --request GET 'http://pds-gamma.jpl.nasa.gov/api/products?q=lid eq "urn:nasa:pds:insight_documents"&limit=100&only-summary=False'

I think this is equivalent to the one which you tested but did not work. I think the reason why it did not work is the quote missing around the lid url value. Did you get this request from a documentation that we should update.

@jordanpadams
Copy link
Member

@tloubrieu-jpl should we update the API to support without quotes? this seems a little too rigid and may cause some heartburn for users?

@tloubrieu-jpl
Copy link
Member

@jordanpadams , @al-niessner spent a some time to make the query handle values without quote and then, @tdddblog made some change in August which led to not supporting the values without quotes. I would say we should wait bit before supporting values without quotes again, but the best might be to discuss that during a breakout session.

@jordanpadams
Copy link
Member

@tloubrieu-jpl copy. So do all values needed to be enclosed in quotes or just strings? Either way, I think what I am getting at here is we should at least document when you need quotes. And then we can reevaluate later.

@tloubrieu-jpl
Copy link
Member

tloubrieu-jpl commented Nov 18, 2021

@jordanpadams Perfect, I created a ticket for the documentation of the API query: #137

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
B12.1 bug Something isn't working i&t.issue s.low
Projects
None yet
Development

No branches or pull requests

3 participants