Project API

Export Project Data

Exports project data for a given projectId. Only Project Admin and Analyst can Export Project Data from a project. Try it out is not available for this API. This API can be tested using conventional REST API clients such as postman or cURL. When calling this API from a REST client, you need to redirect output to a zip file as follows curl -X GET "http://HOST:PORT/codeinsight/api/project/exportProjectData?projectId=PROJECT_ID" -H "accept: application/json" -H "Authorization: Bearer JWT_TOKEN" > export.zip

Request
query Parameters
projectId
required
integer <int32>

ID of the Project

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

Bearer JWT Token

Example: E.g. Bearer JWT_TOKEN
Responses
200

OK

400

Bad request: No project named x

get/project/exportProjectData
Response samples
application/json
{ }

Get Project Id

Returns projectId for a given projectName.

Request
query Parameters
projectName
required
string

Name of the Project

Example: projectName=E.g. eportal
header Parameters
Authorization
required
string
Default:

Bearer JWT Token

Example: E.g. Bearer JWT_TOKEN
Responses
200

OK

400

Bad request: The project name entered was not found

get/project/id
Response samples
application/json
0
0

Get Project Inventory

Returns a list of inventory and inventory details for a given project; includes a flag for a short/long version. All project users including Observer, Reviewer and Analyst can view project inventory of private projects.

Request
path Parameters
projectId
required
integer <int32>

ID of the Project

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

If true , hide vulnerability details in the response

published
string
Default: "true"

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

Example: published=E.g. true | default: true
vendor
string

CPE Vendor name

Example: vendor=E.g. gnu
product
string

CPE Product name

Example: product=E.g. zlib
size
integer <int32>
Default: 100

Page Size. Number Of Records to fetch per page

Example: size=E.g. 1 | default: 100
page
integer <int32>
Default: 1

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

Example: page=E.g. 1 | default: 1
reviewStatus
string

return items based on the reviewStatus which we selected. Ex: if reviewStatus is APPROVED then only APPROVED items returned

Enum: "READY_TO_REVIEW" "DRAFT" "APPROVED" "REJECTED"
Example: reviewStatus=APPROVED
alerts
string

return items based the alert status selected. If alert status selected as OPEN then only open alerts returned

Enum: "OPEN" "CLOSED" "ANY"
Example: alerts=OPEN
includeFiles
boolean
Default: true

If true, display the associated files to an Inventory(Default is true)

Example: includeFiles=E.g. false/true
header Parameters
Authorization
required
string
Default:

Bearer JWT Token

Example: E.g. Bearer JWT_TOKEN
Responses
200

OK

400

Bad request: The project Id entered was not found

get/project/inventory/{projectId}
Response samples
application/json
{
  • "closedVulnerabilityAlerts": [
    ],
  • "vulnerabilityAlerts": [
    ],
  • "openVulnerabilityAlerts": [
    ],
  • "asFoundLicenseText": "Sample from file LICENSE.txt in file ePortal-2.0",
  • "repositoryItem": {
    },
  • "dependencyScope": "string",
  • "associatedComponent": {