Inventory API

Create Inventory

Create an inventory. Name and Inventory type is a mandatory field. Note: Value for rememberLicense can be GLOBAL or INVENTORY (default).

  • GLOBAL: Saves and applies the component version and license mapping to the current inventory and all future inventories across projects.
  • INVENTORY: Updates only the current inventory. Future inventories will use the original license mapping.
Request
header Parameters
Authorization
required
string
Default:
Example: Bearer JWT_Token
Request Body schema: application/json
required
projectId
required
integer <int32> >= 1

projectId

object (InventoryModel)
Responses
201

Created

400

Bad Request

401

Unauthorized

500

Internal Server Error

post/inventories
Request samples
application/json
{
  • "projectId": "1",
  • "inventoryModel": {
    }
}

Get the inventories of file/folder ids

Returns the inventories file and/or folder ids

Request
query Parameters
projectId
required
integer <int32>

ID of the Project

Example: projectId=E.g. 1
fileIds
string

Provide list of file ids

folderIds
string

Provide list of folder ids

published
string

If true, then only published inventory items are returned; if false, then only un-published inventory items are returned

Example: published=E.g. true | false
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

500

Internal Server Error

get/inventories/search
Response samples
application/json
{ }

Get details of an inventory

Get details of an inventory.

Request
path Parameters
inventoryId
required
integer <int32>

ID of the Inventory

Example: E.g. 1
query Parameters
skipVulnerabilities
boolean
Default: false

If true , hide vulnerabilty details

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/inventories/{inventoryId}

Update Inventory

Update an inventory for a given inventoryId. Note: Value for rememberLicense can be GLOBAL or INVENTORY (default).

  • GLOBAL: Saves and applies the component version and license mapping to the current inventory and all future inventories across projects.
  • INVENTORY: Updates only the current inventory. Future inventories will use the original license mapping.
Request
path Parameters
inventoryId
required
integer <int32>

ID of the Inventory

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

Bearer JWT Token

Example: E.g. Bearer JWT_TOKEN
Request Body schema: application/json
required
name
string [ 1 .. 255 ] characters

name

description
string

description

url
string(@)?(href=')?(HREF=')?(HREF=")?(href=")?(http...

url

priority
stringP1|P2|P3|P4

priority

Enum: "P1" "P2" "P3" "P4"
disclosed
stringYES|NO

disclosed

Enum: "YES" "NO"
distribution
stringUNKNOWN|INTERNAL|EXTERNAL|HOSTED

distribution

Enum: "UNKNOWN" "INTERNAL" "EXTERNAL" "HOSTED"
partOfProduct
stringUNKNOWN|YES|NO

partOfProduct

Enum: "UNKNOWN" "YES" "NO"
linking
stringUNKNOWN|NOT_LINKED|STATIC|DYNAMIC

linking

Enum: "UNKNOWN" "NOT_LINKED" "STATIC" "DYNAMIC"
modified
stringUNKNOWN|YES|NO

modified

Enum: "UNKNOWN" "YES" "NO"
encryption
stringUNKNOWN|YES|NO

encryption

Enum: "UNKNOWN" "YES" "NO"
auditorReviewNotes
string

auditorReviewNotes

noticeText
string

noticeText

usageGuidance
string

usageGuidance

remediationNotes
string

remediationNotes

confidenceLevel
stringHIGH|MEDIUM|LOW

confidenceLevel

Enum: "HIGH" "MEDIUM" "LOW"
inventoryType
stringCOMPONENT|LICENSE|WORK_IN_PROGRESS

inventoryType

object (component)
licenseId
string

licenseId

rememberLicense
stringGLOBAL|INVENTORY

rememberLicense

workflowURL
string

workflowURL

invProvenanceId
integer <int32> >= 1

invProvenanceId

Array of objects (CustomFieldModel)

customFields

Responses
200

OK

400

Bad Request

401

Unauthorized

403

Forbidden

404

Not Found

500

Internal Server Error

put/inventories/{inventoryId}
Request samples
application/json
{
  • "name": "maven-artifact 3.6.1 (Apache-2.0)",
  • "description": "Sources: scm:git:https://git-wip-us.apache.org/repos/asf/maven.git",
  • "priority": "P1 | P2 | P3 | P4",
  • "disclosed": "YES | NO",
  • "distribution": "UNKNOWN | INTERNAL | EXTERNAL | HOSTED",
  • "partOfProduct": "UNKNOWN | YES | NO",
  • "linking": "UNKNOWN | NOT_LINKED | STATIC | DYNAMIC",
  • "modified": "UNKNOWN | YES | NO",
  • "encryption": "UNKNOWN | YES | NO",
  • "auditorReviewNotes": "string",
  • "noticeText": "string",
  • "usageGuidance": "string",
  • "remediationNotes": "string",
  • "confidenceLevel": "HIGH | MEDIUM | LOW default: HIGH",
  • "inventoryType": "COMPONENT | LICENSE | WORK_IN_PROGRESS",
  • "component": {
    },
  • "licenseId": "158",
  • "rememberLicense": "GLOBAL | INVENTORY default: INVENTORY",
  • "workflowURL": "SVM-123 | https://www.example.com | default: None",
  • "invProvenanceId": "1",
  • "customFields": [
    ]
}

Delete the inventory

delete inventory

Request
path Parameters
inventoryId
required
integer <int32>

ID of the Inventory

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

delete/inventories/{inventoryId}

Get children of an inventory

Fetches the children for a given inventoryId.

Request
path Parameters
inventoryId
required
integer <int32>

ID of the Inventory

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/inventories/{inventoryId}/children
Response samples
application/json
"string"

Add Files and/or Folders to Inventory

Add files and/or folders to inventory item and returns the response message

Request
path Parameters
inventoryId
required
integer <int32>

ID of the Inventory

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

Bearer JWT Token

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

To Add files and folders to the inventory provide file and folder paths.

filePaths
Array of strings

filePaths

folderPaths
Array of strings

folderPaths

markAssociatedFilesAsReviewed
boolean
Default: false

markAssociatedFilesAsReviewed

Responses
200

OK

400

Bad Request

401

Unauthorized

404

Not Found

500

Internal Server Error

put/inventories/{inventoryId}/files
Request samples
application/json
{
  • "filePaths": [
    ],
  • "folderPaths": [
    ],
  • "markAssociatedFilesAsReviewed": "false"
}
Response samples
application/json
{ }

Get history of an inventory

Fetches the history for a given inventoryId, changes are grouped based on the revision id.

Request
path Parameters
inventoryId
required
integer <int32>

ID of the Inventory

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/inventories/{inventoryId}/history
Response samples
application/json
"string"

Update notices text

Update notices text for the given inventory

Request
path Parameters
inventoryId
required
integer <int32>

ID of the Inventory

Example: E.g. 1
query Parameters
overwrite
boolean
Default: false

If true, overwrite notices text

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

put/inventories/{inventoryId}/notices

Get parents of an inventory

Fetches the parents for a given inventoryId.

Request
path Parameters
inventoryId
required
integer <int32>

ID of the Inventory

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/inventories/{inventoryId}/parents
Response samples
application/json
"string"

Publish Inventory

Publish an inventory for a given inventoryId

Request
path Parameters
inventoryId
required
integer <int32>

ID of the Inventory

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

put/inventories/{inventoryId}/publish
Response samples
application/json
"string"

Recall Inventory

Recall an inventory for a given inventoryId

Request
path Parameters
inventoryId
required
integer <int32>

ID of the Inventory

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

put/inventories/{inventoryId}/recall
Response samples
application/json
"string"

inventory status

update an inventory status with DRAFT, APPROVED and REJECTED status.The approve/reject inventory affects Manual Review task only. Any changes made to Inventory will not affect Remediation and Miscellaneous tasks. On Approving Inventory, Inventory gets Approved and Manual review task will be closed with Approve status. On Rejecting Inventory, Inventory gets Rejected by creating an open Remediation task and the Manual review task will be closed with Reject status.

Request
path Parameters
inventoryId
required
integer <int32>

ID of the Inventory

Example: E.g. 1
query Parameters
status
required
string
Default: "DRAFT"
Enum: "DRAFT" "APPROVED" "REJECTED"
header Parameters
Authorization
required
string
Default:

Bearer JWT Token

Example: E.g. Bearer JWT_TOKEN
Responses
200

OK

401

Unauthorized

404

Not Found

500

Internal Server Error

put/inventories/{inventoryId}/status

Get vulnerability details of an inventory

Get vulnerability details of an inventory.

Request
path Parameters
inventoryId
required
integer <int32>

ID of the Inventory

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/inventories/{inventoryId}/vulnerabilities

Get vulnerability analysis details of an inventory

Get vulnerability analysis details of an inventory.

Request
path Parameters
inventoryId
required
integer <int32>

ID of the Inventory

Example: E.g. 1
query Parameters
vulnerabilityName
string

Name of the vulnerability

analysisState
string
Default: "ANY"

Analysis State.

Enum: "ANY" "SUPPRESSED" "UNSUPPRESSED"
Example: analysisState=E.g. SUPPRESSED
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

403

Forbidden

404

Not Found

500

Internal Server Error

get/inventories/{inventoryId}/vulnerabilities/analysis
Response samples
application/json
{
  • "inventoryId": 0,
  • "analyzedVulnerabilities": [
    ]
}