Component

Create a custom component

Creates a custom component

Request
header Parameters
Authorization
required
string
Default:

Bearer JWT Token

Example: E.g. Bearer JWT_TOKEN
Request Body schema: application/json
required

To create a custom component the name, title and url field is required. 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": "E.g. 2 | default: 1"
}

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

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 E.g."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: E.g. 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

Get Component version details

Request
path Parameters
id
required
integer <int64>

ID of the component version

Example: E.g. 1
header Parameters
Authorization
required
string
Default:

Bearer JWT Token

Example: E.g. Bearer JWT_TOKEN
Responses
200

OK

400

Bad Request

401

Unauthorized

404

Not Found

500

Internal Server Error

get/components/versions/{id}

Get Component

Get Component by id.

Request
path Parameters
componentId
required
integer <int64>

ID of the Component

Example: E.g. 1
query Parameters
includeVersions
boolean
Default: true

If true, display version details(Default is true)

Example: includeVersions=E.g. false/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"
Example: cvssVersion=E.g V2
header Parameters
Authorization
required
string
Default:

Bearer JWT Token

Example: E.g. 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": "E.g. YES | default: NO",
  • "forgeId": "E.g. 2 | default: 1",
  • "id": 0,
  • "forge": "string",
  • "versionList": [
    ],
  • "licenseList": [
    ],
  • "componentCPEList": [
    ]
}

Create a component custom version

Create a component custom version

Request
path Parameters
componentId
required
integer <int64>

ID of the Component

Example: E.g. 1
header Parameters
Authorization
required
string
Default:
Example: Bearer JWT_Token
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": [
    ]
}

Get Component version vulnerabilities

Get vulnerability details of a component version

Request
path Parameters
versionId
required
integer <int64>

ID of the component version

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

Page Size. Number Of Records to fetch per page

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

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

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

Bearer JWT Token

Example: E.g. Bearer JWT_TOKEN
Responses
200

OK

400

Bad Request

401

Unauthorized

404

Not Found

500

Internal Server Error

get/components/{versionId}/vulnerabilities