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

As an API user, I want to search using URL parameters #462

Closed
jordanpadams opened this issue Apr 21, 2021 · 5 comments
Closed

As an API user, I want to search using URL parameters #462

jordanpadams opened this issue Apr 21, 2021 · 5 comments
Labels
B12.0 p.must-have requirement the current issue is a requirement

Comments

@jordanpadams
Copy link
Member

jordanpadams commented Apr 21, 2021

Motivation

...so that I can provide more simple search criteria, and do not need to know the complexity of the API query syntax

Additional Details

Acceptance Criteria

Given a deployed API with data ingested
When I perform a query against an API endpoint with <endpoint>?lidvid eq *my_lid*
Then I expect the API to query the Registry for a lidvid that matches *my_lid*.

Engineering Details

@jordanpadams jordanpadams added requirement the current issue is a requirement needs:triage labels Apr 21, 2021
@jordanpadams jordanpadams self-assigned this Apr 21, 2021
@jordanpadams jordanpadams removed their assignment May 13, 2021
@jordanpadams
Copy link
Member Author

This was completed at the initiation of the API. See https://pds-gamma.jpl.nasa.gov/api/products?limit=100&q=lid%20eq%20*insight*&only-summary=false as an example

@gxtchen
Copy link

gxtchen commented Oct 11, 2021

@jordanpadams Your request string doesn't work for me using firefox or safari.

@jordanpadams
Copy link
Member Author

@gxtchen you have to use curl or wget to test this. this will no longer work in the browser because we disabled the HTML / XML responses.

@gxtchen
Copy link

gxtchen commented Oct 24, 2021

@jordanpadams @tloubrieu-jpl This works.
curl -X GET --header 'Accept: application/json' 'https://pds-gamma.jpl.nasa.gov/api/products/urn%3Anasa%3Apds%3Ainsight_documents'
{"id":"urn:nasa:pds:insight_documents::2.0","type":"Product_Bundle","title":"Mars InSight Lander Document Archive","investigations":[{"id":"urn:nasa:pds:context:investigation:missi

q=... doesn't return anything.
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'

@tloubrieu-jpl
Copy link
Member

@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 jordanpadams transferred this issue from NASA-PDS/pds-api May 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
B12.0 p.must-have requirement the current issue is a requirement
Projects
None yet
Development

No branches or pull requests

3 participants