Component

Component LookupDeprecated

This API is Deprecated and new API is codeinsight/api/components/search

SecuritybearerAuth
Request
query Parameters
keyword
required
string

Any Keyword (Example: GNU)

size
integer <int64>
Default: 100

Page Size

page
integer <int64>
Default: 1

Page Number

Responses
200

OK

400

Bad request

500

Internal Server Error

get/component/lookup
Response samples
application/json
"string"

Component Search

Search for the components based on the given input and return list of components which includes registered,popular and unpopular.Response will not include vulnerabilities and licenses of the version

SecuritybearerAuth
Request
query Parameters
searchBy
required
stringNAME|URL|CPE|FORGE
Default: "NAME"

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 E.g."apache commons" would perform exact match against the component.

includeVersions
boolean
Default: false

If true , response will include versions as well.

vendor
string

Vendor name (Example: gnu)

product
string

Product name (Example: zlib)

forgeName
stringSourceForge|Apache|MySQL AB|Java.net|GNU|Free...

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" "Conan"
projectName
string

Required param for forges: SourceForge|Apache|MySQL AB|Java.net|GNU|Free Software Directory|CodePlex|Savannah|Google Code|GitLab (Example: apache-batik)

packageName
string

Required param for forges: Hackage|NuGet Gallery|npm|PyPI|Packagist|CentOS Project (Example: newtonsoft.json)

groupId
string

Required param for forges: Google's Maven Repository|Clojars|Ibiblio Maven2 (Example: com.google.firebase)

artifactId
string

Required param for forges: Google's Maven Repository|Clojars|Ibiblio Maven2 (Example: firebase-abt)

moduleOrDistributionName
string

Required param for forge: CPAN (Example: exporter-tidy)

packageOrDistributionName
string

Required param for forge: CRAN | Fedora Koji (Example: acid)

author
string

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

repositoryName
string

Required param for forge: GitHub (Example: jquery-ui)

vendorName
string

Required param for forge: Packagist (Example: 100hz)

gemName
string

Required param for forge: RubyGems (Example: x-editable-rails)

crate
string

Required param for forge: crates.io (Example: brewstillery)

limit
integer <int32> >= 1
Default: 100

Page Size. Number Of Records to fetch per page

offset
integer <int32> >= 1
Default: 1

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

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": [
    ]
}

Create a component custom version

Create a component custom version

SecuritybearerAuth
Request
path Parameters
componentId
required
integer <int64> >= 1

ID of the Component

Example: 1
Request Body schema: application/json
required
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": [
    ]
}

Create a custom component

Creates a custom component

SecuritybearerAuth
Request
Request Body schema: application/json
required

To create a custom component the name, title and url field is required.
Only users with the “library_manager” permission can create a custom component.
Allowable values of forgeId(Optional) are
1 : Other(This will be used as default when none is supplied) | 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": "E.g. YES | default: NO",
  • "forgeId": 1
}

Delete a component custom version

Delete a custom version using the component ID and version ID. All existing inventory that uses this version will have its version changed to Unknown. You must have the Library Manager permission to delete a custom version.

SecuritybearerAuth
Request
path Parameters
componentId
required
integer <int64>

ID of the component

Example: 1
id
required
integer <int64> >= 1

ID of the component version

Example: 1
Responses
201

Deleted

400

Bad Request

500

Internal Server Error

delete/components/{componentId}/versions/{id}

Delete a custom component

Delete a custom component using the component ID. All existing inventory that uses this component will be changed to work in progress. You must have the Library Manager permission to delete a custom component.

SecuritybearerAuth
Request
path Parameters
id
required
integer <int64>

ID of the component

Example: 1
Responses
201

Deleted

400

Bad Request

500

Internal Server Error

delete/components/{id}

Get Component

Get Component by id.

SecuritybearerAuth
Request
path Parameters
componentId
required
integer <int64>

ID of the Component

Example: 1
query Parameters
includeVersions
boolean
Default: true

If true, display version details(Default is true)

vulnerabilitySummary
boolean
Default: false

If true , display vulnerability 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"
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": "E.g. YES | default: NO",
  • "forgeId": 1,
  • "id": 0,
  • "forge": "string",
  • "versionList": [
    ],
  • "licenseList": [
    ],
  • "componentCPEList": [
    ],
  • "createdBy": "string",
  • "createdOn": "string",
  • "updatedBy": "string",
  • "updatedOn": "string"
}

Get Component version details

Get Component version details

SecuritybearerAuth
Request
path Parameters
id
required
integer <int64>

ID of the component version

Example: 1
Responses
200

OK

400

Bad Request

401

Unauthorized

404

Not Found

500

Internal Server Error

get/components/versions/{id}

Get Component version vulnerabilities

Get vulnerability details of a component version

SecuritybearerAuth
Request
path Parameters
versionId
required
integer <int64>

ID of the component version

Example: 1
query Parameters
limit
integer <int64> >= 1
Default: 25

Page Size. Number Of Records to fetch per page

offset
integer <int64> >= 1
Default: 1

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

Responses
200

OK

400

Bad Request

401

Unauthorized

404

Not Found

500

Internal Server Error

get/components/{versionId}/vulnerabilities