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

ldap

Operations

license

Operations

sourceCodeManagement

Operations

Reports

Operations

Rules

Operations

Scan profiles

Operations

Task

Operations

Scan API

Operations

User API

Operations

activate User

Request

Activate a User

Security
bearerAuth
Path
loginIdstringrequired

loginId (Example: admin)

curl -i -X PUT \
  'https://codeinsightapi.redocly.app/_mock/swagger/users/{loginId}/activate' \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>'

Responses

OK

Create User

Request

Creates a user

Security
bearerAuth
Bodyapplication/jsonrequired

To create a user the login, First Name, Last Name, Email, Password, Question, Answer field is required.

loginstring[ 1 .. 60 ] charactersrequired

login

Example: "admin"
firstNamestring[ 1 .. 60 ] charactersrequired

firstName

Example: "John"
lastNamestring[ 1 .. 60 ] charactersrequired

lastName

Example: "Miller"
emailstring^(.+)@(.+)$required

email

Example: "john@yahoomail.com"
passwordstring(?=.*[0-9])(?=.*[a-z])(?=.*[A-Z])(?=\S+$).{8,...required

password

Example: "Password123"
questionstring[ 3 .. 300 ] charactersrequired

question

Example: "What is your best friend name?"
answerstring[ 3 .. 2147483647 ] charactersrequired

answer

Example: "Jim"
curl -i -X POST \
  https://codeinsightapi.redocly.app/_mock/swagger/users \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "login": "admin",
    "firstName": "John",
    "lastName": "Miller",
    "email": "john@yahoomail.com",
    "password": "Password123",
    "question": "What is your best friend name?",
    "answer": "Jim"
  }'

Responses

Created

deactivate User

Request

Deactivate a User

Security
bearerAuth
Path
loginIdstringrequired

loginId (Example: admin)

curl -i -X PUT \
  'https://codeinsightapi.redocly.app/_mock/swagger/users/{loginId}/deactivate' \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>'

Responses

OK

manage Permission

Request

Manage User Permission for the existing user in the system. This will remove the permission mapped earlier and the current request permissions will be considered always.

Security
bearerAuth
Path
loginIdstringrequired

loginId (Example: admin)

Bodyapplication/json

list of permission is a required field. Allowable permission are system_admin, edit_policy, create_project, library_manager

permissionsArray of stringsrequired

permissions

curl -i -X PUT \
  'https://codeinsightapi.redocly.app/_mock/swagger/users/{loginId}/permission' \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "permissions": [
      "string"
    ]
  }'

Responses

OK

Search Users

Request

Search User By id or login

Security
bearerAuth
Query
idinteger(int64)
Example: id=1
loginstring
Example: login=admin
emailstring
Example: email=admin@gmail.com
curl -i -X GET \
  'https://codeinsightapi.redocly.app/_mock/swagger/users/search?id=1&login=admin&email=admin%40gmail.com' \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>'

Responses

OK

vulnerability

Operations