GET/v1/repository/latest

Get the latest component version from repositories

Retrieves the latest available version metadata for a component from configured repositories. Supply purl as a valid Package URL; when metadata is available, the response includes the latest version and publication timestamp.

1 parameter
purlstringrequired
The Package URL identifying the component to query. Must use a valid Package URL format.

5 status codes
200Returns the component's repository metadata, including its latest version, publication timestamp, name, namespace, repository type, and last-check timestamp.
lastCheckintegeroptional
UNIX epoch timestamp in milliseconds
latestVersionstringoptional
latestVersionPublishedAtintegeroptional
UNIX epoch timestamp in milliseconds
namestringoptional
namespacestringoptional
repositoryTypestringoptional
Allowed:MAVENNPMGEMPYPINUGETHEXCOMPOSERCARGOGO_MODULESCPANGITHUBHACKAGE
204Returns no content when no configured repositories support the specified Package URL.
400Returned when the specified Package URL is invalid or not in the correct format.
401Returned when the request is unauthorized.
404Returned when repository metadata for the specified component cannot be found.

Error handling

A 400 is returned when the purl query parameter is not a valid Package URL. A 401 is returned when the request is unauthorized. A 404 is returned when repository metadata for the specified component cannot be found.