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
description
Example:"Sources: scm:git:https://git-wip-us.apache.org/repos/asf/maven.git"
url
Example:"https://repo1.maven.org/maven2/org/apache/maven/maven-artifact"
distribution
Enum:"UNKNOWN""INTERNAL""EXTERNAL""HOSTED_ANY""HOSTED_INTERNAL""HOSTED_EXTERNAL"
Example:"UNKNOWN | INTERNAL | EXTERNAL | HOSTED_ANY | HOSTED_INTERNAL | HOSTED_EXTERNAL"
linking
Enum:"UNKNOWN""NOT_LINKED""STATIC""DYNAMIC"
Example:"UNKNOWN | NOT_LINKED | STATIC | DYNAMIC"
confidenceLevel
Enum:"HIGH""MEDIUM""LOW"
Example:"HIGH | MEDIUM | LOW default: HIGH"
inventoryType
Example:"COMPONENT | LICENSE | WORK_IN_PROGRESS"
- Mock serverhttps://codeinsightapi.redocly.app/_mock/swagger/inventories/{inventoryId}
- Code Insight REST API Serverhttps://codeinsightapi.redocly.app/codeinsight/api/inventories/{inventoryId}
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",
"licenseExpression": "7 OR 20"
},
"licenseId": "158",
"rememberLicense": "GLOBAL | INVENTORY default: INVENTORY",
"workflowURL": "SVM-123 | https://www.example.com | default: None",
"eccn": "5A002.a.1",
"invProvenanceId": 1,
"customFields": [
{
"id": 1,
"value": "Value for custom field"
}
],
"copyrights": [
"string"
]
}'