Sonatype CLM Server - REST APIs

Chapter 3. Sonatype CLM Policy Violation REST API

The Policy Violation REST APIs for Sonatype CLM allow you to access and extract policy violations gathered during the evaluation of applications by the Sonatype CLM Server. In most cases the desire for getting to this data is to integrate into other tools your company may have. For example you may have a specific dashboard or reporting application that should have this data.

Whatever the case, just as with other Sonatype CLM APIs, this is all done using Sonatype CLM REST API calls. For the accessing policy violation information the following API is used:

GET
Used to retrieve policy information, such as a list of policy ids as well as a list of violations based on a specific Policy ID, or list of IDs.

As mentioned previously, we will provide both the API, as well as exampled using the HTTP client CURL. This is only for demonstration purposes and displaying the necessary input, and desired output.

Additionally, to help demonstrate this, we’ve approached this in a step-by-step manner that will start with gathering policy ids, and then requesting the violations.