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=E.g. GNU
size
integer <int32>
Default: 100

Page Size

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

Page Number

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

Bearer JWT Token

Example: E.g. 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. 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

Request
query Parameters
projectId
required
integer <int32>

ID of the Project

Example: projectId=E.g. 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=E.g. 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=E.g. 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=E.g. 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=E.g. true | default: true
header Parameters
Authorization
required
string
Default:

Bearer JWT Token

Example: E.g. Bearer JWT_TOKEN
Request Body schema: application/octet-stream
required

Project data to import

object (InputStream)
Responses
200

OK

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

Create ProjectDeprecated

Use the enhanced '/projects' api.

Request
header Parameters
Authorization
required
string
Default:

Bearer JWT Token

Example: E.g. Bearer JWT_TOKEN
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

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 | Comprehensive Scan Profile"
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 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/json" -H "Authorization: Bearer JWT_TOKEN" > report.zip

Request
query Parameters
projectId
required
integer <int32>

ID of the Project

Example: projectId=E.g. 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=E.g. 2
header Parameters
Authorization
required
string
Default:

Bearer JWT Token

Example: E.g. Bearer JWT_TOKEN
Responses
200

OK

400

Bad request: No project with id x

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