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
Exports project data for a given projectId. Only Project Admin and Analyst can Export Project Data from 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 redirect output to a zip file as follows
curl -X GET "http://HOST:PORT/codeinsight/api/project/exportProjectData?projectId=PROJECT_ID" -H "accept: application/octet-stream" -H "Authorization: Bearer JWT_TOKEN" > export.zip- Mock serverhttps://codeinsightapi.redocly.app/_mock/swagger/project/exportProjectData
- Code Insight REST API Serverhttps://codeinsightapi.redocly.app/codeinsight/api/project/exportProjectData
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
'https://codeinsightapi.redocly.app/_mock/swagger/project/exportProjectData?projectId=1' \
-H 'Authorization: Bearer <YOUR_JWT_HERE>'Request
Download Reports (PROJECT, AUDIT, NOTICES, CUSTOM_REPORT) for a given projectId. For ALL Reports we need to provide the id of the report. All project users including Observer, Reviewer and Analyst can download reports for private projects.
If a task is in progress the response will be 202 and the status will be provided in the header for e.g(ACTIVE, SCHEDULED).
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/projects/{projectId}/reports/{reportId}/download?taskId={taskId}" -H "accept: application/octet-stream" -H "Authorization: Bearer JWT_TOKEN" > report.zip- Mock serverhttps://codeinsightapi.redocly.app/_mock/swagger/projects/{projectId}/reports/{reportId}/download
- Code Insight REST API Serverhttps://codeinsightapi.redocly.app/codeinsight/api/projects/{projectId}/reports/{reportId}/download
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
'https://codeinsightapi.redocly.app/_mock/swagger/projects/1/reports/1/download?taskId=1' \
-H 'Authorization: Bearer <YOUR_JWT_HERE>'Request
Generates Reports (PROJECT, AUDIT, NOTICES, CUSTOM_REPORT) for a given projectId. For ALL Reports we need to provide the id of the report. All project users including Observer, Reviewer and Analyst can generate reports for private projects.
The success response of the generate is a taskId which should be used during download. If the report type is custom report and enableProjectPicker is true otherProjectId is required.
- Mock serverhttps://codeinsightapi.redocly.app/_mock/swagger/projects/{projectId}/reports/{reportId}/generate
- Code Insight REST API Serverhttps://codeinsightapi.redocly.app/codeinsight/api/projects/{projectId}/reports/{reportId}/generate
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X POST \
https://codeinsightapi.redocly.app/_mock/swagger/projects/1/reports/1/generate \
-H 'Authorization: Bearer <YOUR_JWT_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"otherProjectId": 1,
"options": {
"property1": "string",
"property2": "string"
}
}'