Skip to content

Import Project Data
deprecated

Request

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 curl as follows

curl -X POST "http://HOST:PORT/codeinsight/api/importer/importProjectData?projectId=PROJECT_ID&checkInventory=false&checkReviewed=false&createEmptyInventory=false&overwriteInventoryNotes=true" -H "accept: application/json" -H "Authorization: Bearer JWT_TOKEN" -H "content-type: application/octet-stream" --data-binary "@path/filename.zip"

Since this is deprecated, you can find the new api under projects api i.e., /projects/{projectId}/import

Security
bearerAuth
Query
projectIdinteger, (int64)required

ID of the Project

Example:projectId=1
checkInventorystring

Check file MD5 for inventory. If enabled, only files with matching MD5 in the import data file and the scanned file will be associated to inventory.

checkReviewedstring

Check file MD5 for review. If enabled, only files with matching MD5 in the import data file and the scanned file will be marked as reviewed.

createEmptyInventorystring

Create inventory even if no matching file is found. By default value of this parameter is retrieved from the Project Setting(On data import or rescan, delete inventory with no associated files). If you wish to override the project setting you can pass true or false.

overwriteInventoryNotesstring

Choose to overwrite or append inventory notes (Audit Notes, Notices Text, Usage Guidance, Remediation Notes). By default notes will be overwritten if the inventory is same. If set to false, notes will be appended to existing ones.

Bodyapplication/octet-streamrequired

Project data to import

string, (binary)read-only
curl -i -X POST \
  'https://codeinsightapi.redocly.app/_mock/swagger/importer/importProjectData?projectId=1&checkInventory=string&checkReviewed=string&createEmptyInventory=string&overwriteInventoryNotes=string' \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>' \
  -H 'Content-Type: application/octet-stream'

Responses

OK

Bodyapplication/json