Deprecated APIs

Component LookupDeprecated

This API is deprecated and new API is codeinsight/api/components/search.

Request
query Parameters
keyword
required
string

Any keyword

Example: keyword=GNU
size
integer <int32>
Default: 100

Specify the number of records on a page. Default value is 100.

Example: size=10 | default: 100
page
integer <int32>
Default: 1

Page number. Default value is 1.

Example: page=2 | default: 1
header Parameters
Authorization
required
string
Default:

Bearer JWT token

Example: Bearer JWT_TOKEN
Responses
200

OK

400

Bad request

500

Internal Server Error

get/component/lookup
Response samples
application/json
{
  • "listId": 0,
  • "componentId": 0,
  • "encryption": false,
  • "vulnerabilities": false,
  • "forge": "string",
  • "name": "string",
  • "description": "string",
  • "title": "string",
  • "url": "string",
  • "versions": [
    ],
  • "licenseRestFormat": [
    ]
}

Import Project DataDeprecated

Imports project data for a given projectId. Only Project Owner and Analyst can import project data into a private project.

The Try It feature 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 run curl as follows:

curl -X POST
"http://HOST:PORT/codeinsight/api/importer/importProjectData?projectId=PROJECT_ID&checkInventory=false&checkReviewed=false&createEmptyInventory=false&overwriteInventoryNotes=true"
-H "accept: application/json" -H "Authorization: Bearer JWT_TOKEN" -H
"content-type: application/octet-stream" --data-binary
"@path/filename.zip" 

Since this is deprecated, you can find the new API under projects API, such as /projects/{projectId}/import.

Request
query Parameters
projectId
required
integer <int32>

ID of the Project

Example: projectId=1
checkInventory
string

Check file MD5 for inventory. If enabled, only files with matching MD5 in the import data file and the scanned file will be associated to inventory.

Example: checkInventory=true | default: false
checkReviewed
string

Check file MD5 for review. If enabled, only files with matching MD5 in the import data file and the scanned file will be marked as reviewed.

Example: checkReviewed=true | default: true
createEmptyInventory
string

Create inventory even if no matching file is found. By default value of this parameter is retrieved from the Project Setting(On data import or rescan, delete inventory with no associated files). If you wish to override the project setting you can pass true or false.

Example: createEmptyInventory=false | default: false
overwriteInventoryNotes
string

Choose to overwrite or append inventory notes (Audit Notes, Notices Text, Usage Guidance, Remediation Notes). By default notes will be overwritten if the inventory is same. If set to false, notes will be appended to existing ones.

Example: overwriteInventoryNotes=true | default: true
header Parameters
Authorization
required
string
Default:

Bearer JWT Token

Example: Bearer JWT_TOKEN
Request Body schema: application/octet-stream

Project data to import

object (InputStream)
Responses
200

OK

post/importer/importProjectData
Response samples
application/json
"string"

Create ProjectDeprecated

Use this API to create a Code Insight project.

Request
header Parameters
Authorization
required
string
Default:

Bearer JWT Token

Example: Bearer JWT_TOKEN
Request Body schema: application/json

To create a project the projectName field is required and other fields are optional. If the optional fields are left blank, the 'Project Default' values are applied for them.

projectName
required
string

projectName

projectType
string

projectType

Value: "INVENTORY_ONLY | STANDARD"
description
string

description

projectFolderName
string

projectFolderName

policyProfileName
string

policyProfileName

scanProfileName
string

scanProfileName

Value: "Basic Scan Profile (Without CL) | Standard Scan Profile |\nComprehensive Scan Profile\n"
ownerLogin
string

ownerLogin

risk
string

risk

Value: "HIGH | MEDIUM | LOW"
privateProject
string

privateProject

autoPublish
string

autoPublish

markAssociatedFilesAsReviewed
string

markAssociatedFilesAsReviewed

Responses
200

OK

500

Error : error message

post/project/createProject
Request samples
application/json
{
  • "projectName": "eportal",
  • "projectType": "INVENTORY_ONLY | default: STANDARD",
  • "description": "description",
  • "projectFolderName": "eportal-v1",
  • "policyProfileName": "Default License Policy Profile",
  • "scanProfileName": "Basic Scan - Without CL | default: Standard Scan Profile",
  • "ownerLogin": "admin",
  • "risk": "HIGH | default: MEDIUM",
  • "privateProject": "false",
  • "autoPublish": "true",
  • "markAssociatedFilesAsReviewed": "true"
}
Response samples
application/json
0
0

Generate ReportDeprecated

This API is deprecated.

  • To generate a report: Refer to /projects/{projectId}/reports/{reportId}/generate
  • To download a report: Refer to /projects/{projectId}/reports/{reportId}/download

Generates reports (PROJECT, AUDIT, NOTICES, CUSTOM_REPORT) for a given projectId. For CUSTOM_REPORT, provide the name of the report. All project users including Observer, Reviewer and Analyst can generate reports for private projects.

The Try It feature 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/generateReport?reportType=REPORT_TYPE&projectId=PROJECT_ID"
-H "accept: application/json" -H "Authorization: Bearer JWT_TOKEN" >
report.zip
Request
query Parameters
projectId
required
integer <int32>

ID of the Project

Example: projectId=1
reportType
required
string

Report Type

Example: reportType=PROJECT
otherProjectId
integer <int32>

Project Id of the secondary project to be included in the report. This parameter is required, if the enableProjectPicker property for this report type is set to true.

Example: otherProjectId=2
header Parameters
Authorization
required
string
Default:

Bearer JWT Token

Example: Bearer JWT_TOKEN
Responses
200

OK

400

Bad request: No project with id x

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