Inventory API

Add Files and/or Folders to Inventory

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

SecuritybearerAuth
Request
path Parameters
inventoryId
required
integer <int64>

ID of the Inventory

Example: 1
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

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

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.
SecuritybearerAuth
Request
Request Body schema: application/json
required
projectId
required
integer <int32> >= 1

projectId

object (CreateInventoryModel)

inventoryModel

Responses
201

Created

400

Bad Request

401

Unauthorized

500

Internal Server Error

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

Get details of an inventory

Get details of an inventory.

SecuritybearerAuth
Request
path Parameters
inventoryId
required
integer <int64>

ID of the Inventory

Example: 1
query Parameters
skipVulnerabilities
boolean
Default: false

If true , hide vulnerabilty details

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.
SecuritybearerAuth
Request
path Parameters
inventoryId
required
integer <int64>

ID of the Inventory

Example: 1
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_ANY|HOSTED_I...

distribution

Enum: "UNKNOWN" "INTERNAL" "EXTERNAL" "HOSTED_ANY" "HOSTED_INTERNAL" "HOSTED_EXTERNAL"
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)

component

licenseId
string

licenseId

rememberLicense
stringGLOBAL|INVENTORY

rememberLicense

workflowURL
string

workflowURL

invProvenanceId
integer <int32> >= 1

invProvenanceId

Array of objects (CustomFieldModel)

customFields

copyrights
Array of strings

copyrights

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_ANY | HOSTED_INTERNAL | HOSTED_EXTERNAL",
  • "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": [
    ],
  • "copyrights": [
    ]
}

Delete the inventory

delete inventory

SecuritybearerAuth
Request
path Parameters
inventoryId
required
integer <int64>

ID of the Inventory

Example: 1
Responses
200

OK

400

Bad Request

401

Unauthorized

404

Not Found

500

Internal Server Error

delete/inventories/{inventoryId}

Get history of an inventory

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

SecuritybearerAuth
Request
path Parameters
inventoryId
required
integer <int64>

ID of the Inventory

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

Get children of an inventory

Fetches the children for a given inventoryId.

SecuritybearerAuth
Request
path Parameters
inventoryId
required
integer <int64>

ID of the Inventory

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

Get parents of an inventory

Fetches the parents for a given inventoryId.

SecuritybearerAuth
Request
path Parameters
inventoryId
required
integer <int64>

ID of the Inventory

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

Get All Inventories by Date

Returns a list of inventories and relevant details within the given date and time. All users can view project inventories of public projects and users with permission can view the inventories of private project

SecuritybearerAuth
Request
query Parameters
startTime
string

Start time for an inventory (Format: YYYY-MM-DD HH:MM:SS)

endTime
string

End time for an inventory (Format: YYYY-MM-DD HH:MM:SS)

published
string
Default: "PUBLISHED"

If published, then only published inventory items are returned; if unpublished, then only not-published inventory items are returned; if all, then return all inventories

Enum: "PUBLISHED" "UNPUBLISHED" "ALL"
size
integer <int64>
Default: 100

Page Size. Number Of Records to fetch per page

page
integer <int64>
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/inventories/searchByDate

Get the inventories of file/folder ids

Returns the inventories file and/or folder ids

SecuritybearerAuth
Request
query Parameters
projectId
required
integer <int64> >= 1

ID of the Project

Example: projectId=1
fileIds
string

Provide list of file ids

folderIds
string

Provide list of folder ids

published
boolean

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

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

500

Internal Server Error

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

Get vulnerability analysis details of an inventory

Get vulnerability analysis details of an inventory.

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

ID of the Inventory

Example: 1
query Parameters
vulnerabilityName
string

Name of the vulnerability

analysisState
stringANY|SUPPRESSED|UNSUPPRESSED
Default: "ANY"

Analysis State.

Enum: "ANY" "SUPPRESSED" "UNSUPPRESSED"
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

403

Forbidden

404

Not Found

500

Internal Server Error

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

Get vulnerability details of an inventory

Get vulnerability details of an inventory.

SecuritybearerAuth
Request
path Parameters
inventoryId
required
integer <int64>

ID of the Inventory

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

Update notices text

Update notices text for the given inventory

SecuritybearerAuth
Request
path Parameters
inventoryId
required
integer <int64>

ID of the Inventory

Example: 1
query Parameters
overwrite
boolean
Default: false

If true, overwrite notices text

Responses
200

OK

400

Bad Request

401

Unauthorized

404

Not Found

500

Internal Server Error

put/inventories/{inventoryId}/notices

Publish Inventory

Publish an inventory for a given inventoryId

SecuritybearerAuth
Request
path Parameters
inventoryId
required
integer <int64>

ID of the Inventory

Example: 1
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

SecuritybearerAuth
Request
path Parameters
inventoryId
required
integer <int64>

ID of the Inventory

Example: 1
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.

SecuritybearerAuth
Request
path Parameters
inventoryId
required
integer <int64>

ID of the Inventory

Example: 1
query Parameters
status
required
stringDRAFT|APPROVED|REJECTED
Default: "DRAFT"
Enum: "DRAFT" "APPROVED" "REJECTED"
Responses
200

OK

401

Unauthorized

404

Not Found

500

Internal Server Error

put/inventories/{inventoryId}/status