# Create Inventory Create an inventory. Name and Inventory type is a mandatory field. 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. Endpoint: POST /inventories Version: v1 Security: bearerAuth ## Request fields (application/json): - `projectId` (integer, required) projectId Example: 1 - `inventoryModel` (object) inventoryModel - `inventoryModel.name` (string) name Example: "maven-artifact 3.6.1 (Apache-2.0)" - `inventoryModel.description` (string) description Example: "Sources: scm:git:https://git-wip-us.apache.org/repos/asf/maven.git" - `inventoryModel.url` (string) url Example: "https://repo1.maven.org/maven2/org/apache/maven/maven-artifact" - `inventoryModel.priority` (string) priority Enum: "P1", "P2", "P3", "P4" - `inventoryModel.disclosed` (string) disclosed Enum: "YES", "NO" - `inventoryModel.distribution` (string) distribution Enum: "UNKNOWN", "INTERNAL", "EXTERNAL", "HOSTED_ANY", "HOSTED_INTERNAL", "HOSTED_EXTERNAL" - `inventoryModel.partOfProduct` (string) partOfProduct Enum: "UNKNOWN", "YES", "NO" - `inventoryModel.linking` (string) linking Enum: "UNKNOWN", "NOT_LINKED", "STATIC", "DYNAMIC" - `inventoryModel.modified` (string) modified Enum: "UNKNOWN", "YES", "NO" - `inventoryModel.encryption` (string) encryption Enum: "UNKNOWN", "YES", "NO" - `inventoryModel.auditorReviewNotes` (string) auditorReviewNotes - `inventoryModel.noticeText` (string) noticeText - `inventoryModel.usageGuidance` (string) usageGuidance - `inventoryModel.remediationNotes` (string) remediationNotes - `inventoryModel.confidenceLevel` (string) confidenceLevel Enum: "HIGH", "MEDIUM", "LOW" - `inventoryModel.inventoryType` (string) inventoryType Example: "COMPONENT | LICENSE | WORK_IN_PROGRESS" - `inventoryModel.component` (object) component - `inventoryModel.component.id` (string, required) id Example: "58316" - `inventoryModel.component.versionId` (string, required) versionId Example: "3704669" - `inventoryModel.component.licenseId` (string, required) licenseId Example: "158" - `inventoryModel.rememberLicense` (string) rememberLicense Example: "GLOBAL | INVENTORY default: INVENTORY" - `inventoryModel.workflowURL` (string) workflowURL Example: "SVM-123 | https://www.example.com | default: None" - `inventoryModel.invProvenanceId` (integer) invProvenanceId Example: 1 - `inventoryModel.customFields` (array) customFields - `inventoryModel.customFields.value` (string, required) value Example: "Value for custom field" ## Response 201 fields ## Response 400 fields ## Response 401 fields ## Response 500 fields