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

Update Inventory

Request

Update an inventory for a given inventoryId.

Note: Value for rememberLicense can be GLOBAL or INVENTORY (default).

  • GLOBAL: Saves and applies the component version and license mapping to the current inventory and all future inventories across projects.
  • INVENTORY: Updates only the current inventory. Future inventories will use the original license mapping.
Security
bearerAuth
Path
inventoryIdinteger(int64)required

ID of the Inventory

Example: 1
Bodyapplication/jsonrequired
namestring[ 1 .. 255 ] characters

name

Example: "maven-artifact 3.6.1 (Apache-2.0)"
descriptionstring

description

Example: "Sources: scm:git:https://git-wip-us.apache.org/repos/asf/maven.git"
urlstring(@)?(href=')?(HREF=')?(HREF=")?(href=")?(http...

url

Example: "https://repo1.maven.org/maven2/org/apache/maven/maven-artifact"
prioritystringP1|P2|P3|P4

priority

Enum"P1""P2""P3""P4"
Example: "P1 | P2 | P3 | P4"
disclosedstringYES|NO

disclosed

Enum"YES""NO"
Example: "YES | NO"
distributionstringUNKNOWN|INTERNAL|EXTERNAL|HOSTED_ANY|HOSTED_I...

distribution

Enum"UNKNOWN""INTERNAL""EXTERNAL""HOSTED_ANY""HOSTED_INTERNAL""HOSTED_EXTERNAL"
Example: "UNKNOWN | INTERNAL | EXTERNAL | HOSTED_ANY | HOSTED_INTERNAL | HOSTED_EXTERNAL"
partOfProductstringUNKNOWN|YES|NO

partOfProduct

Enum"UNKNOWN""YES""NO"
Example: "UNKNOWN | YES | NO"
linkingstringUNKNOWN|NOT_LINKED|STATIC|DYNAMIC

linking

Enum"UNKNOWN""NOT_LINKED""STATIC""DYNAMIC"
Example: "UNKNOWN | NOT_LINKED | STATIC | DYNAMIC"
modifiedstringUNKNOWN|YES|NO

modified

Enum"UNKNOWN""YES""NO"
Example: "UNKNOWN | YES | NO"
encryptionstringUNKNOWN|YES|NO

encryption

Enum"UNKNOWN""YES""NO"
Example: "UNKNOWN | YES | NO"
auditorReviewNotesstring

auditorReviewNotes

noticeTextstring

noticeText

usageGuidancestring

usageGuidance

remediationNotesstring

remediationNotes

confidenceLevelstringHIGH|MEDIUM|LOW

confidenceLevel

Enum"HIGH""MEDIUM""LOW"
Example: "HIGH | MEDIUM | LOW default: HIGH"
inventoryTypestringCOMPONENT|LICENSE|WORK_IN_PROGRESS

inventoryType

Example: "COMPONENT | LICENSE | WORK_IN_PROGRESS"
componentobject(component)

component

licenseIdstring

licenseId

Example: "158"
rememberLicensestringGLOBAL|INVENTORY

rememberLicense

Example: "GLOBAL | INVENTORY default: INVENTORY"
workflowURLstring

workflowURL

Example: "SVM-123 | https://www.example.com | default: None"
invProvenanceIdinteger(int32)>= 1

invProvenanceId

Example: 1
customFieldsArray of objects(CustomFieldModel)

customFields

copyrightsArray of strings

copyrights

curl -i -X PUT \
  https://codeinsightapi.redocly.app/_mock/swagger/inventories/1 \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "name": "maven-artifact 3.6.1 (Apache-2.0)",
    "description": "Sources: scm:git:https://git-wip-us.apache.org/repos/asf/maven.git",
    "url": "https://repo1.maven.org/maven2/org/apache/maven/maven-artifact",
    "priority": "P1 | P2 | P3 | P4",
    "disclosed": "YES | NO",
    "distribution": "UNKNOWN | INTERNAL | EXTERNAL | HOSTED_ANY | HOSTED_INTERNAL | HOSTED_EXTERNAL",
    "partOfProduct": "UNKNOWN | YES | NO",
    "linking": "UNKNOWN | NOT_LINKED | STATIC | DYNAMIC",
    "modified": "UNKNOWN | YES | NO",
    "encryption": "UNKNOWN | YES | NO",
    "auditorReviewNotes": "string",
    "noticeText": "string",
    "usageGuidance": "string",
    "remediationNotes": "string",
    "confidenceLevel": "HIGH | MEDIUM | LOW default: HIGH",
    "inventoryType": "COMPONENT | LICENSE | WORK_IN_PROGRESS",
    "component": {
      "id": "58316",
      "versionId": "3704669",
      "licenseId": "158"
    },
    "licenseId": "158",
    "rememberLicense": "GLOBAL | INVENTORY default: INVENTORY",
    "workflowURL": "SVM-123 | https://www.example.com | default: None",
    "invProvenanceId": 1,
    "customFields": [
      {
        "id": 1,
        "value": "Value for custom field"
      }
    ],
    "copyrights": [
      "string"
    ]
  }'

Responses

OK

Delete the inventory

Request

delete inventory

Security
bearerAuth
Path
inventoryIdinteger(int64)required

ID of the Inventory

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

Responses

OK

Get history of an inventory

Request

Fetches the history for a given inventoryId, changes are grouped based on the revision id.

Security
bearerAuth
Path
inventoryIdinteger(int64)required

ID of the Inventory

Example: 1
Query
limitinteger(int64)>= 1

Page Size. Number Of Records to fetch per page

Default 25
offsetinteger(int64)>= 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/inventories/1/history?limit=25&offset=1' \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>'

Responses

OK

Bodyapplication/json
string
Response
application/json
"string"

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

vulnerability

Operations