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.
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"
}'