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
Returns a list of inventory and relevant details for a given project within the given date and time. All project users including Observer, Reviewer and Analyst can view project inventory of private/public projects.
- Mock serverhttps://codeinsightapi.redocly.app/_mock/swagger/project/inventoryLite/{projectId}
- Code Insight REST API Serverhttps://codeinsightapi.redocly.app/codeinsight/api/project/inventoryLite/{projectId}
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
'https://codeinsightapi.redocly.app/_mock/swagger/project/inventoryLite/1?startTime=string&endTime=string&size=100&page=1' \
-H 'Authorization: Bearer <YOUR_JWT_HERE>'- Mock serverhttps://codeinsightapi.redocly.app/_mock/swagger/project/scanStatus/{taskId}
- Code Insight REST API Serverhttps://codeinsightapi.redocly.app/codeinsight/api/project/scanStatus/{taskId}
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
https://codeinsightapi.redocly.app/_mock/swagger/project/scanStatus/1 \
-H 'Authorization: Bearer <YOUR_JWT_HERE>'"new"
Request
Uploads and extracts a codebase zip file for a project. (* Maximum supported file size is 10GB.). Upload only files with extensions zip,tar,tar.gz and 7z. Do not upload any .gz files directly without archiving it in a tar file. The upload result may come wrong if any compressed files uploaded directly without archiving it. Only Project Admin and Analyst can upload project codebase to a 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/project/uploadProjectCodebase?projectId=PROJECT_ID&deleteExistingFileOnServer=true&expansionLevel=1" -H "accept: application/json" -H "Authorization: Bearer JWT_TOKEN" -H "content-type: application/octet-stream" --data-binary "@path/filename.zip"Delete existing files on server. By deleting exiting files on the server, all existing project codebase files will be permanently removed from the scan server. If you rescan the project without replacing these files via a new upload, the scan results for the removed files will be permanently deleted.
Codebase expansion level for the project. 1: None | 2: First level | 3: Recursive level . If the expansionLevel parameter is not provided, the codebase will get extracted as 'None' by default.
Zipped codebase to scan
- Mock serverhttps://codeinsightapi.redocly.app/_mock/swagger/project/uploadProjectCodebase
- Code Insight REST API Serverhttps://codeinsightapi.redocly.app/codeinsight/api/project/uploadProjectCodebase
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X POST \
'https://codeinsightapi.redocly.app/_mock/swagger/project/uploadProjectCodebase?projectId=1&deleteExistingFileOnServer=false&expansionLevel=0&deleteArchiveAfterExpand=false&archiveDirSuffix=string' \
-H 'Authorization: Bearer <YOUR_JWT_HERE>' \
-H 'Content-Type: application/octet-stream' \
-d true