Project API

Generate ReportDeprecated

This API is deprecated please refer to /projects/{projectId}/reports/{reportId}/generate to Generate a report.
Refer /projects/{projectId}/reports/{reportId}/download to Download a report.
Generates Reports (PROJECT, AUDIT, NOTICES, CUSTOM_REPORT) for a given projectId. For CUSTOM_REPORT provide the name of the report. All project users including Observer, Reviewer and Analyst can generate reports for private projects.
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/generateReport?reportType=REPORT_TYPE&projectId=PROJECT_ID" -H "accept: application/octet-stream" -H "Authorization: Bearer JWT_TOKEN" > report.zip
SecuritybearerAuth
Request
query Parameters
projectId
required
integer <int64>

ID of the Project

Example: projectId=1
reportType
required
string

Report Type

Example: reportType=PROJECT
otherProjectId
integer <int64> >= 1

Project Id of the secondary project to be included in the report. This parameter is required, if the enableProjectPicker property for this report type is set to true. (Example: 2)

Responses
200

OK

400

Bad request: No project with id x

get/project/generateReport

Create ProjectDeprecated

Use the enhanced '/projects' api.

SecuritybearerAuth
Request
Request Body schema: application/json
required

To create a project the projectName field is required and other fields are optional. If the optional fields are left blank, the 'Project Default' values are applied for them.

projectName
required
string

projectName

projectType
string

projectType

Enum: "INVENTORY_ONLY" "STANDARD"
description
string

description

projectFolderName
string

projectFolderName

policyProfileName
string

policyProfileName

scanProfileName
string

scanProfileName

Enum: "Basic Scan Profile (Without CL)" "Standard Scan Profile" "Comprehensive Scan Profile"
ownerLogin
string

ownerLogin

risk
string

risk

Enum: "HIGH" "MEDIUM" "LOW"
privateProject
string

privateProject

autoPublish
string

autoPublish

markAssociatedFilesAsReviewed
string

markAssociatedFilesAsReviewed

Responses
200

OK

500

Error : error message

post/project/createProject
Request samples
application/json
{
  • "projectName": "eportal",
  • "projectType": "INVENTORY_ONLY | default: STANDARD",
  • "description": "description",
  • "projectFolderName": "eportal-v1",
  • "policyProfileName": "Default License Policy Profile",
  • "scanProfileName": "Basic Scan - Without CL | default: Standard Scan Profile",
  • "ownerLogin": "admin",
  • "risk": "HIGH | default: MEDIUM",
  • "privateProject": "false",
  • "autoPublish": "true",
  • "markAssociatedFilesAsReviewed": "true"
}
Response samples
application/json
0
0

Get Project Inventories Delta from latest scan

Returns a Delta list of inventory after latest scan and relevant details for a given project. All project users including Observer, Reviewer and Analyst can view project inventory of private/public projects.

SecuritybearerAuth
Request
path Parameters
projectId
required
integer <int64>

ID of the Project

Example: 1
query Parameters
inventoryUpdatedType
string
Default: "All"

Required param for inventoryUpdatedType: All | New Inventories | Updated Inventories | Removed Inventories

size
integer <int64>
Default: 100

Page Size. Number Of Records to fetch per page

page
integer <int64>
Default: 1

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

Responses
200

OK

400

Bad request: The project Id entered was not found

get/project/inventoryDeltaFromLastScan/{projectId}

Get Project Id

Returns projectId for a given projectName.

SecuritybearerAuth
Request
query Parameters
projectName
required
string

Name of the Project (Example: eportal)

Responses
200

OK

400

Bad request: The project name entered was not found

get/project/id
Response samples
application/json
0
0

Get Project Inventory

Returns a list of inventory and inventory details for a given project; includes a flag for a short/long version. All project users including Observer, Reviewer and Analyst can view project inventory of private projects.

SecuritybearerAuth
Request
path Parameters
projectId
required
integer <int64>

ID of the Project

Example: 1
query Parameters
skipVulnerabilities
boolean
Default: false

If true , hide vulnerability details in the response

published
boolean
Default: true

If true, then only published inventory items are returned; if false, then only not-published inventory items are returned;; if all, then all inventory items are returned

vendor
string

CPE Vendor name (Example: gnu)

product
string

CPE Product name (Example: zlib)

size
integer <int64>
Default: 100

Page Size. Number Of Records to fetch per page

page
integer <int64>
Default: 1

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

reviewStatus
string

return items based on the reviewStatus which we selected. Ex: if reviewStatus is APPROVED then only APPROVED items returned

Enum: "READY_TO_REVIEW" "DRAFT" "APPROVED" "REJECTED"
alerts
string

return items based the alert status selected. If alert status selected as OPEN then only open alerts returned

Enum: "OPEN" "CLOSED" "ANY"
includeFiles
boolean
Default: true

If true, display the associated files to an Inventory(Default is true)

includeCopyrights
boolean
Default: false

If true, display the copyrights of an Inventory(Default is false)

Responses
200

OK

400

Bad request: The project Id entered was not found

get/project/inventory/{projectId}
Response samples
application/json
{
  • "partOfProduct": "Unknown",
  • "linking": "Unknown",
  • "modified": "Unknown",
  • "inventoryType": "Work in Progress",
  • "confidence": "1",
  • "disclosed": true,
  • "usageText": "usage",
  • "repositoryItem": {
    },
  • "noticeText": "Notice text",
  • "encrypted": "Unknown",
  • "distributed": "Unknown",
  • "priorityId": 0,
  • "copyrightText": "string",
  • "projectId": 1,
  • "provenanceId": 0,
  • "updateDate": "2019-08-24T14:15:22Z",
  • "createDate": "2019-08-24T14:15:22Z",
  • "publishedDate": "2019-08-24T14:15:22Z",
  • "associatedComponentVersion": {
    },
  • "workflowURL": "string",
  • "associatedComponent": {
    },
  • "associatedLicense": 1,
  • "openVulnerabilityAlerts": [
    ],
  • "vulnerabilityAlerts": [
    ],
  • "closedVulnerabilityAlerts": [
    ],
  • "parentGroupId": 0,
  • "systemGenerated": true,
  • "rejectedByUpdate": true,
  • "autoStatus": "DRAFT",
  • "statusPolicyId": 0,
  • "name": "git",
  • "priority": {
    },
  • "id": 1,
  • "owner": "antlr",
  • "description": "Description",
  • "links": [
    ],
  • "license": 1,
  • "published": true,
  • "status": "UNUSED0",
  • "fileCount": 2000,
  • "dependencyScope": "string",
  • "userUpdatedStatus": "string",
  • "autoDetectionNotes": "Note",
  • "asFoundLicenseText": "Sample from file LICENSE.txt in file ePortal-2.0",
  • "remediationNotes": "update this immediately",
  • "auditorReviewNotes": "good to go"
}

Get Project Inventory by Date

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.

SecuritybearerAuth
Request
path Parameters
projectId
required
integer <int64>

ID of the Project

Example: 1
query Parameters
startTime
string

Start time for an inventory (Format: YYYY-MM-DD HH:MM:SS)

endTime
string

End time for an inventory (Format: YYYY-MM-DD HH:MM:SS)

size
integer <int64>
Default: 100

Page Size. Number Of Records to fetch per page

page
integer <int64>
Default: 1

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

Responses
200

OK

400

Bad request: The project Id entered was not found

get/project/inventoryLite/{projectId}

Get Scan Status

Returns a scan status for a given taskId which is obtained from /projectScan/{projectId}

SecuritybearerAuth
Request
path Parameters
taskId
required
integer <int64>

ID of the project scan task

Example: 1
Responses
200

SCHEDULED | ACTIVE | TERMINATED | FAILED | COMPLETED

400

Bad request: The task Id entered was not found

get/project/scanStatus/{taskId}
Response samples
application/json
"new"

Upload Project Files.

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"
SecuritybearerAuth
Request
query Parameters
projectId
required
integer <int64>

ID of the Project

Example: projectId=1
deleteExistingFileOnServer
boolean
Default: false

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.

expansionLevel
integer <int64>

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.

deleteArchiveAfterExpand
boolean
Default: false

Delete inner archives after expansion

archiveDirSuffix
string

Suffix to be added to the expanded folder. Value cannot be more than 20 characters and cannot contain the following special characters \ / : * ? " < > | \0 (Example: _Expanded)

Request Body schema: application/octet-stream
required

Zipped codebase to scan

boolean
Responses
200

OK

400

Bad Request

500

Internal Server Error

503

Service Unavailable

post/project/uploadProjectCodebase

Export Project Data

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
SecuritybearerAuth
Request
query Parameters
projectId
required
integer <int64>

ID of the Project

Example: projectId=1
Responses
200

OK

400

Bad request: No project named x

get/project/exportProjectData

Download Report

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
SecuritybearerAuth
Request
path Parameters
projectId
required
integer <int64> >= 1

ID of the Project

Example: 1
reportId
required
integer <int64> >= 1

ID of the Report that is to be generated or downloaded

Example: 1
query Parameters
taskId
required
integer <int64> >= 1

ID of the Report Task that is to be downloaded

Example: taskId=1
Responses
200

OK

202

Accepted

400

Bad request

401

Unauthorized

404

Not Found

500

Internal Server Error

get/projects/{projectId}/reports/{reportId}/download

Generate Report

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.

SecuritybearerAuth
Request
path Parameters
projectId
required
integer <int64> >= 1

ID of the Project

Example: 1
reportId
required
integer <int64> >= 1

ID of the Report that is to be generated

Example: 1
Request Body schema: application/json

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.

otherProjectId
integer <int32>

otherProjectId

object

options

Responses
200

OK

400

Bad request

401

Unauthorized

404

Not Found

500

Internal Server Error

503

Service Unavailable

post/projects/{projectId}/reports/{reportId}/generate
Request samples
application/json
{
  • "otherProjectId": 1,
  • "options": {
    }
}

Add child projects to parent project

Add child projects to parent project.

SecuritybearerAuth
Request
path Parameters
projectId
required
integer <int64> >= 1

Id of Parent Project

Example: 1
query Parameters
childProjectIds
required
Array of integers <int32>

Id of Child Projects

Responses
200

OK

400

Bad Request

401

Unauthorized

404

Not Found

500

Internal Server Error

post/projects/{projectId}/children

Remove child Projects from parent project

Remove child project from parent project

SecuritybearerAuth
Request
path Parameters
projectId
required
integer <int64> >= 1

Id of Parent Project

Example: 1
query Parameters
childProjectIds
required
Array of integers <int32>

Id of Child Projects

Responses
200

OK

400

Bad Request

401

Unauthorized

404

Not found

500

Internal Server Error

delete/projects/{projectId}/children

Users

Get Project Users with respect to Role

SecuritybearerAuth
Request
path Parameters
projectId
required
integer <int64> >= 1

ID of the Project

Example: 1
query Parameters
roleId
required
stringANALYST|REVIEWER|OBSERVER|PROJECT_ADMIN
Default: "ANALYST"
Enum: "ANALYST" "REVIEWER" "OBSERVER" "PROJECT_ADMIN"
Responses
200

OK

400

Bad Request

404

Not Found

500

Internal Server Error

get/projects/{projectId}/users

Assign Role

Assign a Users to a specific Project Role.
Here "ownerId refers to the "contactId of the project.

SecuritybearerAuth
Request
path Parameters
projectId
required
integer <int64> >= 1

ID of the Project

Example: 1
Request Body schema: application/json
required

Add a Users to a specific Project Role. Accepted RoleId: PROJECT_ADMIN, ANALYST, REVIEWER, OBSERVER

ownerId
string

ownerId

securityContactId
string

securityContactId

developerContactId
string

developerContactId

legalContactId
string

legalContactId

object (usersRole)
legalContact
string
Responses
200

OK

400

Bad Request

401

Unauthorized

404

Not Found

500

Internal Server Error

post/projects/{projectId}/users
Request samples
application/json
{
  • "ownerId": "admin",
  • "securityContactId": "admin",
  • "developerContactId": "admin",
  • "legalContactId": "admin",
  • "userRoles": {
    },
  • "legalContact": "string"
}

Unassign Project Role

Remove User(s) from a specific Project Role

SecuritybearerAuth
Request
path Parameters
projectId
required
integer <int64> >= 1

ID of the Project

Example: 1
Responses
200

OK

400

Bad Request

401

Unauthorized

404

Not Found

500

Internal Server Error

delete/projects/{projectId}/users

Get Projects

Get All The Projects

SecuritybearerAuth
Request
query Parameters
offset
integer <int64> >= 1
Default: 1

Index of the page to start with

limit
integer <int64> >= 1
Default: 25

Number Of Records to fetch

Responses
200

OK

400

Bad Request

401

Unauthorized

500

Internal Server Error

get/projects

Create Project

Creates a project for the given input, updates project custom field values and returns projectId with success message.

SecuritybearerAuth
Request
Request Body schema: application/json
required

To create a project the projectName field is required and other fields are optional. If the optional fields are left blank, the 'Project Default' values are applied for them. Note: For 'folderName', passing entire folder path like 'folder1/folder2' is not supported.

name
required
string

name

description
string

description

folderName
string

folderName

policyProfileName
string

policyProfileName

scanProfileName
string

scanProfileName

autoPublish
boolean

autoPublish

markAssociatedFilesAsReviewed
boolean

markAssociatedFilesAsReviewed

owner
string

owner

risk
stringHIGH|MEDIUM|LOW

risk

Enum: "HIGH" "MEDIUM" "LOW"
privateProject
boolean

privateProject

scanServerAlias
string

scanServerAlias

deleteEmptyInventory
boolean

deleteEmptyInventory

doNotPublishInventoryUnknownLicense
boolean

doNotPublishInventoryUnknownLicense

folderId
integer <int32>
expandJarArchives
boolean

expandJarArchives

Array of objects (CustomFieldModel)

customFields

Responses
201

Created

400

Bad Request

401

Unauthorized

500

Internal Server Error

post/projects
Request samples
application/json
{
  • "name": "eportal",
  • "description": "description",
  • "folderName": "Projects",
  • "policyProfileName": "Default License Policy Profile",
  • "scanProfileName": "Basic Scan Profile (Without CL)",
  • "autoPublish": true,
  • "markAssociatedFilesAsReviewed": true,
  • "owner": "admin",
  • "risk": "HIGH | default: MEDIUM",
  • "privateProject": false,
  • "scanServerAlias": "null",
  • "deleteEmptyInventory": false,
  • "doNotPublishInventoryUnknownLicense": true,
  • "folderId": 1,
  • "expandJarArchives": false,
  • "customFields": [
    ]
}

Get Project Information

Get Project Information By Id

SecuritybearerAuth
Request
path Parameters
projectId
required
integer <int64>

ID of the Project

Example: 1
Responses
200

OK

400

Bad Request

401

Unauthorized

404

Not Found

500

Internal Server Error

get/projects/{projectId}

Update Project

Updates a project, custom field values for the given projectId.
Here "owner" field refers to the "contact" of the project.

SecuritybearerAuth
Request
path Parameters
projectId
required
integer <int64> >= 1

ID of the Project

Example: 1
Request Body schema: application/json
required

Updates a project, autoPublish is required when markAssociatedFilesAsReviewed and doNotPublishInventoryUnknownLicense is part of a request.

name
string

name

description
string

description

folderName
string

folderName

policyProfileName
string

policyProfileName

scanProfileName
string

scanProfileName

autoPublish
boolean

autoPublish

markAssociatedFilesAsReviewed
boolean

markAssociatedFilesAsReviewed

owner
string

owner

risk
stringHIGH|MEDIUM|LOW

risk

Enum: "HIGH" "MEDIUM" "LOW"
privateProject
boolean

privateProject

deleteEmptyInventory
boolean

deleteEmptyInventory

doNotPublishInventoryUnknownLicense
boolean

doNotPublishInventoryUnknownLicense

folderId
integer <int32>
expandJarArchives
boolean

expandJarArchives

Array of objects (CustomFieldModel)

customFields

Responses
200

OK

400

Bad Request

401

Unauthorized

404

Not Found

500

Internal Server Error

put/projects/{projectId}
Request samples
application/json
{
  • "name": "eportal",
  • "description": "description",
  • "folderName": "Projects",
  • "policyProfileName": "Default License Policy Profile",
  • "scanProfileName": "Basic Scan Profile (Without CL)",
  • "autoPublish": true,
  • "markAssociatedFilesAsReviewed": true,
  • "owner": "admin",
  • "risk": "HIGH | default: MEDIUM",
  • "privateProject": false,
  • "deleteEmptyInventory": false,
  • "doNotPublishInventoryUnknownLicense": true,
  • "folderId": 1,
  • "expandJarArchives": false,
  • "customFields": [
    ]
}

Delete a project, deletion operation will be added to queue. To get status of project deletion use jobs/{jobId} API

Deleting a project will delete all project inventory, custom field values, corresponding notes and all code base files permanently from the server.

SecuritybearerAuth
Request
path Parameters
projectId
required
integer <int64> >= 1

ID of the Project

Example: 1
Responses
202

Accepted

400

Bad Request

401

Unauthorized

404

Not Found

500

Internal Server Error

delete/projects/{projectId}

get all child projects

Get all child projects. parentProject property will not be shown in the response.

SecuritybearerAuth
Request
path Parameters
projectId
required
integer <int64> >= 1

ID of the Project

Example: 1
query Parameters
recursive
boolean
Default: false
Responses
200

OK

400

Bad Request

404

Not Found

500

Internal Server Error

get/projects/{projectId}/childProjects

get all parent projects

Get all parent projects. childProject property will not be shown in the response.

SecuritybearerAuth
Request
path Parameters
projectId
required
integer <int64> >= 1

ID of the Project

Example: 1
query Parameters
recursive
boolean
Default: false
Responses
200

OK

400

Bad Request

404

Not Found

500

Internal Server Error

get/projects/{projectId}/parentProjects

Fetch all scanned files for a project

SecuritybearerAuth
Request
path Parameters
projectId
required
integer <int64> >= 1

ID of the Project

Example: 1
query Parameters
includeMD5Hash
string <boolean>
Default: "false"

if true, display MD5 of the files

includeSHA1Hash
string <boolean>
Default: "false"

if true, display SHA1 of the files

offset
integer <int64> >= 1
Default: 1

Index of the page to start with

limit
integer <int64> >= 1
Default: 25

Number Of Records to fetch

Responses
200

OK

401

Unauthorized

404

Not Found

500

Internal Server Error

get/projects/{projectId}/allscannedfiles

Fetch Evidences for a project

SecuritybearerAuth
Request
path Parameters
projectId
required
integer <int64> >= 1

ID of the Project

Example: 1
Responses
200

OK

401

Unauthorized

404

Not Found

500

Internal Server Error

get/projects/{projectId}/evidences

Get Id of file or folder

Returns the ID of file and/or folder

SecuritybearerAuth
Request
path Parameters
projectId
required
integer <int64> >= 1

ID of the Project

Example: 1
query Parameters
filePath
string

Path of File (Example: git.0/angular/packages/forms/package.json)

folderPath
string

Path of Folder (Example: git.0/angular/packages/forms)

Responses
200

OK

400

Bad Request

401

Unauthorized

404

Not Found

500

Internal Server Error

get/projects/{projectId}/files

Get Project Contact

Get project contact for the given projectId.

SecuritybearerAuth
Request
path Parameters
projectId
required
integer <int64> >= 1

ID of the Project

Example: 1
Responses
200

OK

401

Unauthorized

404

Not Found

500

Internal Server Error

get/projects/{projectId}/contact

Update Project Contact

Updates project contact for the given projectId.

SecuritybearerAuth
Request
path Parameters
projectId
required
integer <int64> >= 1

ID of the Project

Example: 1
Request Body schema: application/json
required

Updates a project contact

contact
required
string

contact

Responses
200

OK

400

Bad Request

401

Unauthorized

404

Not Found

500

Internal Server Error

put/projects/{projectId}/contact
Request samples
application/json
{
  • "contact": "admin"
}

Get project inventories for the given scan-agent or scan-server alias

Returns all inventories of the project associated with the given scan-agent or scan-server alias

SecuritybearerAuth
Request
path Parameters
projectId
required
integer <int64> >= 1

ID of the Project

Example: 1
alias
required
string

Alias of scan-server or scan-agent (Example: generic-plugin-test)

query Parameters
limit
integer <int64> >= 1
Default: 25

Page Size. Number Of Records to fetch per page

offset
integer <int64> >= 1
Default: 1

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

Responses
200

OK

400

Bad Request

401

Unauthorized

403

Forbidden

404

Not Found

409

Conflict

500

Internal Server Error

get/projects/{projectId}/inventories/{alias}

Get Inventory Summary of the project

Get Project level inventory summary

SecuritybearerAuth
Request
path Parameters
projectId
required
integer <int64> >= 1

ID of the Project

Example: 1
query Parameters
vulnerabilitySummary
boolean
Default: false

If false , hide vulnerabilty summary details

cvssVersion
string

CVSS : This field is required only if vulnerabilitySummary is set to true

Enum: "V2" "V3" "ANY"
published
string
Default: "PUBLISHED"

If published, then only published inventory items are returned; if unpublished, then only not-published inventory items are returned; if all, then return all inventories

Enum: "PUBLISHED" "UNPUBLISHED" "ALL"
offset
integer <int64> >= 1
Default: 1

Index of the page to start with

limit
integer <int64> >= 1
Default: 25

Number Of Records to fetch

Responses
200

OK

400

Bad Request

401

Unauthorized

404

Not Found

500

Internal Server Error

get/projects/{projectId}/inventorySummary

Fetch all scan nodes (alias) of a project

Returns all the alias node information of a project

SecuritybearerAuth
Request
path Parameters
projectId
required
integer <int64> >= 1

ID of the Project

Example: 1
Responses
200

OK

400

Bad Request

401

Unauthorized

404

Not Found

500

Internal Server Error

get/projects/{projectId}/scanNodes

project status

Updates the status of a project. By default, a newly created project has the status "Not Started". After scanning begins, the status is automatically updated to "Analysis In Progress". Note: ProjectAction can be specified with below values:

  • Update Status Only: Only updates the status of the project, if project status is kept COMPLETED, it will lock the current project.
  • Lock Child Projects: Locks all child projects of the current project. (allowed only if project status is kept COMPLETED)
  • Unlock Child Projects: Unlocks all child projects of the current project. (allowed only if project status is not COMPLETED) Use projectAction to control the locking behavior in relation to the project's current status.
SecuritybearerAuth
Request
path Parameters
projectId
required
integer <int64> >= 1

ID of the Project

Example: 1
query Parameters
status
required
string
Default: "Not Started"
Enum: "Not Started" "Analysis In Progress" "Analysis Completed" "Project Completed"
projectAction
required
string
Default: "Update Status Only"
Enum: "Update Status Only" "Lock Child Projects" "Unlock Child Projects"
Responses
200

OK

400

Bad Request

401

Unauthorized

404

Not Found

500

Internal Server Error

put/projects/{projectId}/status

Upload Report.

Uploads and extracts a report zip file for a project.curl -H "Authorization: Bearer %jwt%" --form projectId=%projectId% --form reportId=%reportId% --form file=@"pdf_reports.zip" http://localhost:8888/codeinsight/api/projects/uploadReport

SecuritybearerAuth
Request
Request Body schema: multipart/form-data
projectId
integer <int32>
reportId
integer <int32>
object (FormDataContentDisposition)
Responses
200

OK

400

Bad Request

401

Unauthorized

404

Not Found

500

Internal Server Error

post/projects/uploadReport

Import Project Data

Imports project data for a given projectId. Only Project Owner and Analyst can Import Project Data into a private 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 either of the curl commands.
Save the required attributes in a json or a text file for project import and provide that file in the command. If you are using text file, don't give .txt extension.

curl -H "Authorization:Bearer %jwt%" -F importFile=@"fileToImport.zip" -F projectImportModel=@"JsonFile.json Or textFile;type=application/json" http://localhost:8888/codeinsight/api/projects/%projectId%/import

Or else, instead of providing file, you can directly define the attributes for projectImportModel inside curly braces.
Provide 'FileMatchingCriteria' either of the below values:
COMPLETE_FILEPATH|PARTIAL_FILEPATH|FILENAME|MD5|MD5_AND_FILENAME|MD5_AND_COMPLETE_FILEPATH|MD5_AND_PARTIAL_FILEPATH

SecuritybearerAuth
Request
path Parameters
projectId
required
integer <int32> >= 1
Request Body schema: multipart/form-data
File to import
object
object (ProjectImportModel)
Responses
200

OK

400

Bad Request

401

Unauthorized

404

Not Found

500

Internal Server Error

post/projects/{projectId}/import

Import Sbom

Imports Sbom for a given projectId. Only Project Owner and Analyst can Import Project Sbom into a private 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 either of the curl commands.

curl -H "Authorization:Bearer %jwt%" -F sbomFile=@"fileToImport.json;type=application/json" http://localhost:8888/codeinsight/api/projects/%projectId%/importSbom
SecuritybearerAuth
Request
path Parameters
projectId
required
integer <int32> >= 1
Request Body schema: multipart/form-data
Sbom File to import
object
object (FormDataContentDisposition)
Delete SBOM bucket
string
Responses
200

OK

400

Bad Request

401

Unauthorized

404

Not Found

500

Internal Server Error

post/projects/{projectId}/importSbom