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 a user, I want to get all product versions associated to one lid #436

Closed
tloubrieu-jpl opened this issue Apr 30, 2024 · 5 comments
Closed
Assignees
Labels
B14.1 B15.0 p.must-have requirement the current issue is a requirement

Comments

@tloubrieu-jpl
Copy link
Member

Checked for duplicates

Yes - I've already checked

πŸ§‘β€πŸ”¬ User Persona(s)

Data user.

πŸ’ͺ Motivation

...so that I can see all available version related to a lid

πŸ“– Additional Details

No response

Acceptance Criteria

Given a lid {lid}
When I perform a request /products/{lid}/all
Then I expect to get all the products having this lid

βš™οΈ Engineering Details

No response

πŸŽ‰ I&T

No response

@jordanpadams
Copy link
Member

@tloubrieu-jpl @alexdunnjpl per our conversations with IMG a couple months ago, since we are moving towards adding additional endpoints like:

/products/{identifier}/services
/products/{identifier}/targets
/products/{identifier}/instruments
etc.

Did we want to change the all functionality to be a new version query parameter instead? Something like:

/products/{identifier}?version=all
/products/{identifier}?version=1.0
/products/{identifier}?version=1.1
/products/{identifier}?version=latest

or maybe just more of a flag?

/products/{identifier}?versions=all
/products/{identifier}?versions=latest

/products/{identifier}?all-versions=true

@tloubrieu-jpl
Copy link
Member Author

Yes @jordanpadams , I thought of it but I figured we can keep that for after the migration as-is is complete, actually we will also do (not part of this requirement though)
/products?q=....&keywords=...&versions=all

For the specific versions of a lid, I was thinking we would keep the version part of the identifier. I prefer your latest options actually : /products/{identifier}?all-versions=true, that makes the behavior easier to understand for users I think.

@alexdunnjpl
Copy link
Contributor

I agree with @tloubrieu-jpl that there's no reason to request a LID with a specific version specifier qparam when the LIDVID is trivially constructable.

If the default case is latest-only across the API and this is well-understood by users, I think that all-versions=true is a reasonable approach.

My only outstanding question is whether there's ever a use-case where a used might provide a LIDVID, and desire the latest version of the product without knowing the VID? If so, then a version=latest and version=all qparam would be preferable, imho.

@jordanpadams
Copy link
Member

@alexdunnjpl @tloubrieu-jpl either works for me. The last use case you mentioned is not a unrealistic possibility.

@tloubrieu-jpl
Copy link
Member Author

I will close this ticket since the requirement is implemented in the develop branch.
I'll create a new ticket for the all-version parameter implementation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
B14.1 B15.0 p.must-have requirement the current issue is a requirement
Projects
Status: 🏁 Done
Status: 🏁 Done
Development

No branches or pull requests

3 participants