Skip to content

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.

Download OpenAPI description
Languages
Servers
Mock server
https://codeinsightapi.redocly.app/_mock/swagger
Code Insight REST API Server
https://codeinsightapi.redocly.app/codeinsight/api

Email Templates

Internal API for fetching custom email templates and images from core server

Operations

CodebaseFolder

Operations

Deprecated APIs

Operations

Component

Operations

Files

Operations

Folder

Operations

Project API

Operations

Inventory API

Operations

inventoryWorkflow

Operations

Jobs

Operations

Export project inventory to SBOM Insights

Request

Export project to SBOM Insights operation will be added to queue. To get status of Export to SBOM Insights use jobs/{jobId} API

Security
bearerAuth
Path
projectIdinteger(int64)>= 1required

ID of the Project

Example: 1
curl -i -X POST \
  https://codeinsightapi.redocly.app/_mock/swagger/jobs/sbomexport/1 \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>'

Responses

Accepted

Update project notices

Request

Update notices operation will be added to queue. To get status of update notices use jobs/{jobId} API

Security
bearerAuth
Path
projectIdinteger(int64)>= 1required

ID of the Project

Example: 1
Query
overwriteAllboolean

If true, overwrite all notices text, else update only empty notices texts

Default false
curl -i -X POST \
  'https://codeinsightapi.redocly.app/_mock/swagger/jobs/notices/1?overwriteAll=false' \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>'

Responses

Accepted

Get Job details based on the jobId provided

Request

Returns Job details for a given JobId which is obtained from /jobs/all

Security
bearerAuth
Path
jobIdinteger(int64)required

ID of the Job

Example: 1
curl -i -X GET \
  https://codeinsightapi.redocly.app/_mock/swagger/jobs/1 \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>'

Responses

OK

Bodyapplication/json
idinteger(int32)
jobTypestring

Job type

Enum"Project Branching""Project Copy""Project Scan""Project Re-Scan""PDL Update""Data Garbage Collection""Audit Report""Notices Report""Project Report""Custom Report"
projectobject(Project)
serverobject(Server)
statusstring

status of the Job

Enum"NEW""ACTIVE""CANCELED""COMPLETED""FAILED""SCHEDULED""TERMINATED""WAITING_ON_UPDATE"
triggeredByobject(TriggeredBy)
queuedOnstring

queuedOn

Example: "2017-10-24 13:04:26.0"
activatedOnstring

activatedOn

Example: "2017-10-24 13:04:26.0"
completedOnstring

completedOn

Example: "2017-10-24 13:04:26.0"
jobDetailsstring
errorstring
Response
application/json
{ "id": 0, "jobType": "Project Branching", "project": { "id": 0, "name": "string" }, "server": { "id": 0, "aliasName": "string" }, "status": "NEW", "triggeredBy": { "id": 0, "user": "string" }, "queuedOn": "2017-10-24 13:04:26.0", "activatedOn": "2017-10-24 13:04:26.0", "completedOn": "2017-10-24 13:04:26.0", "jobDetails": "string", "error": "string" }

Get jobs details based on filters

Request

Returns jobs in descending order with pagination based on jobType, status, projectId, triggeredBy, jobsHistoryInDays

Security
bearerAuth
Query
jobTypestring

Required param for jobType: Project Branching|Project Copy|Project Scan|Project Re-Scan|PDL Update|Project Deletion|Export to SBOM Insights|Update Notices|Project Import|Project Export|Remote Scan|Apply Policy - Global|Apply Policy - Project|Report - Audit Report|Report - Notices Report|Report - Project Report|Report - <Custom Report Name>

statusstring
Enum"New""Active""Canceled""Completed""Failed""Scheduled""Terminated""Waiting on update"
projectIdinteger(int32)>= 0

Id of the project (Example: 10)

triggeredBystring

Login Name of the user (Example: admin)

jobsHistoryInDaysinteger(int32)[ 0 .. 3650 ]

Days in number. Get jobs in days. (Default=0, All the jobs will be fetched with other filters)

Default 0
limitinteger(int32)>= 1

Page Size. Number Of Records to fetch per page

Default 25
offsetinteger(int32)>= 1

Page Number. Index of the page to start with(starts from 1)

Default 1
curl -i -X GET \
  'https://codeinsightapi.redocly.app/_mock/swagger/jobs?jobType=string&status=New&projectId=0&triggeredBy=string&jobsHistoryInDays=0&limit=25&offset=1' \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>'

Responses

OK

ldap

Operations

license

Operations

sourceCodeManagement

Operations

Reports

Operations

Rules

Operations

Scan profiles

Operations

Task

Operations

Scan API

Operations

User API

Operations

vulnerability

Operations