Component

Create a Custom Component

Use this API to create a custom component that represents OSS or third-party software not found in the Code Insight data library or that represents commercial software that you want to track as part of your Software Bill of Materials.

The custom component is saved to the data library and made available for global use.

Request
header Parameters
Authorization
required
string
Default:

Bearer JWT Token

Example: Bearer JWT_TOKEN
Request Body schema: application/json

To create a custom component, the name, title, and URL field is required. Allowable values of forgeId (optional) are:

ID Value Forge Description
1 Other (default when no other ID is specified)
2 SourceForge
3 Apache
5 MySQL AB
11 kernel.org
53 Mozilla
78 Java.net
87 GNU
175 Free Software Directory
176 CodePlex
186 Savannah
248 CPAN
419 Google Code
628 Ibiblio Maven2
696 GitHub
2033 NuGet Gallery
2037 npm
2039 RubyGems
2040 CentOS Project
2067 PyPI
2070 Packagist
2073 Google's Maven Repository
2076 crates.io
name
required
string [ 0 .. 127 ] characters ^[a-zA-Z0-9\.\_\-]+$

name

title
required
string [ 0 .. 255 ] characters

title

url
required
string [ 0 .. 2400 ] characters (NA|^https?:\/\/(www\.)?[-a-zA-Z0-9@:%._\+~#=...

url

description
string [ 0 .. 65535 ] characters

description

encryption
stringYES|NO

encryption

Enum: "YES" "NO"
forgeId
integer <int32> >= 1

forgeId

Responses
201

Created

400

Bad Request

500

Internal Server Error

post/components
Request samples
application/json
{
  • "name": "Comp1",
  • "title": "Component1",
  • "url": "http://abc@xyz.com | NA",
  • "description": "This is a custom component.",
  • "encryption": "YES | default: NO",
  • "forgeId": "2 | default: 1"
}

Component Search

This API enables you to provide a set of criteria to look up components in the Code Insight data library. The response includes information about all components that meet the criteria and can optionally include versions. However, it does not include information about security vulnerabilities and licenses associated with the retrieved versions.

Request
query Parameters
searchBy
required
string

Search Type. default is NAME.

Enum: "NAME" "URL" "CPE" "FORGE"
filter
string

Search Filter. This is required for searchBy NAME, default is ALL_TERMS.

Enum: "ALL_TERMS" "ANY_TERM" "BEGINS_WITH" "EXACT_MATCH"
searchTerm
string

Any Keyword. This is required for searchBy NAME/URL and optional for CPE. For searchBy CPE, the supplied searchTerm, such as "apache commons", would perform exact match against the component.

includeVersions
boolean

If true, response will include versions as well.

vendor
string

Vendor name

product
string

Product name

forgeName
string

Forge name. Is required for searchBy FORGE and optional for NAME/URL/CPE.

Enum: "SourceForge" "Apache" "MySQL AB" "Java.net" "GNU" "Free Software Directory" "CodePlex" "Savannah" "Google Code" "Hackage" "NuGet Gallery" "npm" "CentOS Project" "PyPI" "Google's Maven Repository" "Clojars" "Ibiblio Maven2" "Packagist" "GitHub" "RubyGems" "crates.io" "CRAN" "CPAN" "Fedora Koji" "GitLab"
projectName
string

Required param for forges: SourceForge | Apache | MySQL | AB | Java.net | GNU | Free Software Directory | CodePlex | Savannah | Google Code | GitLab

packageName
string

Required param for forges: Hackage | NuGet Gallery | npm | PyPI | Packagist | CentOS Project

groupId
string

Required param for forges: Google's Maven Repository | Clojars | Ibiblio Maven2

artifactId
string

Required param for forges: Google's Maven Repository | Clojars | Ibiblio Maven2

moduleOrDistributionName
string

Required param for forge: CPAN

packageOrDistributionName
string

Required param for forge: CRAN | Fedora Koji

author
string

Required param for forge: GitHub | GitLab (It accepts Author/Org value)

repositoryName
string

Required param for forge: GitHub

vendorName
string

Required param for forge: Packagist

gemName
string

Required param for forge: RubyGems

crate
string

Required param for forge: crates.io

limit
integer <int32>

Page Size. Number Of Records to fetch per page

offset
integer <int32>

Page Number. Index of the page to start with(starts from 1)

header Parameters
Authorization
required
string
Default:

Bearer JWT Token

Example: Bearer JWT_TOKEN
Responses
200

OK

400

Bad request

500

Internal Server Error

get/components/search
Response samples
application/json
{
  • "id": 0,
  • "name": "string",
  • "description": "string",
  • "title": "string",
  • "url": "string",
  • "forge": "string",
  • "versionList": [
    ],
  • "licenseList": [
    ],
  • "cpeList": [
    ]
}

Get Component Version Details

This API retrieves details about a specific component version (identified by its versionId). The response does not include information about security vulnerabilities associated with the version.

Request
path Parameters
id
required
integer <int64>

ID of the component version

Example: 1
header Parameters
Authorization
required
string
Default:

Bearer JWT Token

Example: Bearer JWT_TOKEN
Responses
200

OK

400

Bad Request

401

Unauthorized

404

Not Found

500

Internal Server Error

get/components/versions/{id}

Get Component

This API retrieves details about a specific component (identified by its componentId) and each of its versions. Information returned for each version includes license details and security vulnerability information. (You can choose to retrieve either detailed information about each vulnerability or a summary of the vulnerabilities for each version.)

Request
path Parameters
componentId
required
integer <int64>

ID of the Component

Example: 1
query Parameters
vulnerabilitySummary
boolean
Default: false

If true, display vulnerabilty summary details and hide vulnerability list

cvssVersion
string

CVSS version: This field is required only if vulnerabilitySummary is set to true.

Enum: "V2" "V3" "ANY"
Example: cvssVersion=V2
header Parameters
Authorization
required
string
Default:

Bearer JWT Token

Example: Bearer JWT_TOKEN
Responses
200

OK

404

Not Found

500

Internal Server Error

get/components/{componentId}
Response samples
application/json
{
  • "name": "Comp1",
  • "title": "Component1",
  • "url": "http://abc@xyz.com | NA",
  • "description": "This is a custom component.",
  • "encryption": "YES | default: NO",
  • "forgeId": "2 | default: 1",
  • "id": 0,
  • "forge": "string",
  • "versionList": [
    ],
  • "licenseList": [
    ],
  • "componentCPEList": [
    ]
}

Create a Component Custom Version

Use this API to create a custom version for a component (identified by its componentId) and include information about the version’s associated security vulnerabilities.

Request
path Parameters
componentId
required
integer <int64>

ID of the Component

Example: 1
header Parameters
Authorization
required
string
Default:
Example: Bearer JWT_Token
Request Body schema: application/json
name
string

name

Array of objects
Responses
201

Created

400

Bad Request

404

Not Found

500

Internal Server Error

post/components/{componentId}/versions
Request samples
application/json
{
  • "name": "string",
  • "vulnerabilitySummary": [
    ]
}

Get Component Version Vulnerabilities

This API retrieves details for each security vulnerability associated a specific version of a component (identified by the versionId).

Request
path Parameters
versionId
required
integer <int64>

ID of the component version

Example: 1
query Parameters
limit
integer <int32>
Default: 25

Page Size. Number Of Records to fetch per page

Example: limit=1 | default: 25
offset
integer <int32>
Default: 1

Page Number. Index of the page to start with(starts from 1)

Example: offset=1 | default: 1
header Parameters
Authorization
required
string
Default:

Bearer JWT Token

Example: Bearer JWT_TOKEN
Responses
200

OK

400

Bad Request

401

Unauthorized

404

Not Found

500

Internal Server Error

get/components/{versionId}/vulnerabilities