Other Enhancements and Updates to Code Insight APIs

In addition to the enhancement described in “Last Updated” Timestamp on Projects Now Available Through API, these new APIs and API updates are also available in this release:

New REST APIs
Updates to Existing Java API

For complete information about the Code Insight public REST interface and Java methods, select Help in the upper right corner of the Code Insight Web UI and then, from the Documentation tab, select the appropriate link:

For Code Insight REST documentation, select Public REST API Swagger Doc.
For the Code Insight Java method documentation, select Public API Javadoc.

You can also find this documentation in the /docs directory of your Code Insight installation.

New REST APIs

The following new REST APIs are now available.

Resource

API Name

Method

Description

Component

associateVulnerabilityToComponentVersion/{versionId}/{vulnerabilityId}

POST

Manually adds a security vulnerability currently existing in the Code Insight data library to a component version.

disassociate
Vulnerabilityfrom
ComponentVersion/{versionId}/{vulnerabilityId}

POST

Removes a custom security vulnerability from a component version. (The custom vulnerability is not removed from the Code Insight data library.)

A custom vulnerability is either a user-created or an existing vulnerability that was manually added to a component version through the Code Insight Web UI or a public API.

Updates to Existing Java API

The following Code Insight public Java API has been updated:

Resource

API Name

Change

Reference
Data
ServiceCover

deleteVulnerability(long, long)

Now checks the following before removing the custom security vulnerability from the component version:

The vulnerability passed is valid.
The vulnerability and component version passed are associated.