Component Details API - v2
The Component Details API provides all available (to Sonatype) security vulnerability, license data, age, and popularity information for a specified component. What is not included, is any information related to policy violations for an evaluated application.
If you are looking for component information for a component that has been evaluated as part of an application, please see the Component Details by Report API.
This API uses POST REST resource
Below, we have provided a step-by-step example using the HTTP client cURL, though any HTTP client could be used.
Step 1: Get the Component HASH or Component Identifier
Depending on the type of component, and the information you have, the API allows you to specify the component hash, the component identifier, or both. In our example we’ll be searching using Maven coordinates.
If desired you can specify more than one component.
Step 2 - Submit the Specified Component to Retrieve Details
First let’s take a look at the POST resource:
You will also need to include JSON data specifying the component information you are providing.
Putting this together with the cURL command, as well as including the IQ Server URL for the POST resource path, you should have something that looks like this:
The IQ Server will then respond with the component details. An example is provided below.