Internal API for fetching custom email templates and images from core server
Code Insight REST API Documentation (v1)
The Code Insight REST APIs provide a standardized interface for interacting with the application.
An authorization JWT token must be included in the HTTP Authorization header using the Bearer schema. The token can be obtained from the Code Insight Web UI under the Preferences menu. To set the token, click the Authorize button below on the right, enter the JWT token in the Value field, then click Authorize and close the dialog. Once authorized, the token will be automatically included in the HTTP Authorization header for all API requests made through the Swagger UI.
Note: If accessing the REST APIs through external tools such as curl or Postman, include the token manually in the HTTP header using the following format: Authorization: Bearer JWT_TOKEN. "Bearer" must precede the actual JWT token value.
- Mock serverhttps://codeinsightapi.redocly.app/_mock/swagger/component/lookup
- Code Insight REST API Serverhttps://codeinsightapi.redocly.app/codeinsight/api/component/lookup
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
'https://codeinsightapi.redocly.app/_mock/swagger/component/lookup?keyword=string&size=100&page=1' \
-H 'Authorization: Bearer <YOUR_JWT_HERE>'Request
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- Mock serverhttps://codeinsightapi.redocly.app/_mock/swagger/project/generateReport
- Code Insight REST API Serverhttps://codeinsightapi.redocly.app/codeinsight/api/project/generateReport
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
'https://codeinsightapi.redocly.app/_mock/swagger/project/generateReport?projectId=1&reportType=PROJECT&otherProjectId=1' \
-H 'Authorization: Bearer <YOUR_JWT_HERE>'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.
projectType
scanProfileName
- Mock serverhttps://codeinsightapi.redocly.app/_mock/swagger/project/createProject
- Code Insight REST API Serverhttps://codeinsightapi.redocly.app/codeinsight/api/project/createProject
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X POST \
https://codeinsightapi.redocly.app/_mock/swagger/project/createProject \
-H 'Authorization: Bearer <YOUR_JWT_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"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"
}'Request
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
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.
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.
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.
Project data to import
- Mock serverhttps://codeinsightapi.redocly.app/_mock/swagger/importer/importProjectData
- Code Insight REST API Serverhttps://codeinsightapi.redocly.app/codeinsight/api/importer/importProjectData
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X POST \
'https://codeinsightapi.redocly.app/_mock/swagger/importer/importProjectData?projectId=1&checkInventory=string&checkReviewed=string&createEmptyInventory=string&overwriteInventoryNotes=string' \
-H 'Authorization: Bearer <YOUR_JWT_HERE>' \
-H 'Content-Type: application/octet-stream'