Deprecated APIs

Component LookupDeprecated

This API is Deprecated and new API is codeinsight/api/components/search

SecuritybearerAuth
Request
query Parameters
keyword
required
string

Any Keyword (Example: GNU)

size
integer <int64>
Default: 100

Page Size

page
integer <int64>
Default: 1

Page Number

Responses
200

OK

400

Bad request

500

Internal Server Error

get/component/lookup
Response samples
application/json
"string"

Generate ReportDeprecated

This API is deprecated please refer to /projects/{projectId}/reports/{reportId}/generate to Generate a report.
Refer /projects/{projectId}/reports/{reportId}/download to Download a report.
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.
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/generateReport?reportType=REPORT_TYPE&projectId=PROJECT_ID" -H "accept: application/octet-stream" -H "Authorization: Bearer JWT_TOKEN" > report.zip
SecuritybearerAuth
Request
query Parameters
projectId
required
integer <int64>

ID of the Project

Example: projectId=1
reportType
required
string

Report Type

Example: reportType=PROJECT
otherProjectId
integer <int64> >= 1

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: 2)

Responses
200

OK

400

Bad request: No project with id x

get/project/generateReport

Create ProjectDeprecated

Use the enhanced '/projects' api.

SecuritybearerAuth
Request
Request Body schema: application/json
required

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

Enum: "INVENTORY_ONLY" "STANDARD"
description
string

description

projectFolderName
string

projectFolderName

policyProfileName
string

policyProfileName

scanProfileName
string

scanProfileName

Enum: "Basic Scan Profile (Without CL)" "Standard Scan Profile" "Comprehensive Scan Profile"
ownerLogin
string

ownerLogin

risk
string

risk

Enum: "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

Import Project DataDeprecated

Imports project data for a given projectId. Only Project Owner and Analyst can Import Project Data into a private 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 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 i.e., /projects/{projectId}/import

SecuritybearerAuth
Request
query Parameters
projectId
required
integer <int64>

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.

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.

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.

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.

Request Body schema: application/octet-stream
required

Project data to import

string <binary>
Default: ""
Responses
200

OK

post/importer/importProjectData