Open jamietanna opened 7 months ago
Currently the lookup endpoint doesn’t support looking up particular versions, you’ll need to make a second request to the versions end point.
We can potentially add that ability, will need to change or adapt the response to make sense for both with and without a version
Ah OK, that explains it then! I'm happy to call out to the versions API then, as I then have all the metadata I need to do so (namely the Registry
)
You can also add your version number and a slash to the end of versions_url
When looking up a pURL with a version, we receive the following JSON, i.e. via https://packages.ecosyste.ms/api/v1/packages/lookup?purl=pkg:npm/type-of@2.0.1:
Note that there's no indication of the publish date of the package version we've looked up.
Compare this to the version lookup API,i.e. https://packages.ecosyste.ms/api/v1/registries/npmjs.org/packages/type-of/versions/2.0.1 we see:
Is this expected? (Happy if yes is the answer!) Or is there something we can do to expose
published_at
if we see that it's a lookup of a given version number?Upvote & Fund