Adding Products using the CLI
A product is a collection of assets. These assets are added to the product either in the UI Manually, or at time of generation/upload through the CLI.
For adding to the Product using the CLI, you generally create the product in the tool first. This looks like:
- Go to Products in the left menu.
- Click Create Product in the top right.
- Enter product details.
- Click Create to confirm.
- Once created, you will be taken directly to the page for the product you just created
- Take a look at the URL, and copy the ID string out of the URL
- In the example picture below, the ID is "6812.....66cb"
- This is your "Product ID"
 
 
Product ID
The Product ID is specific to a Product combined with a version number. You set a version number when you created the product. The version number won't change unless you create a new version of the product.
If you make a new version of the product, the ID will change. Keep this in mind as you are implementing product organization into your SBOM Generation Automation.
Using the CLI to organize a product
We just need to add the product ID to our CLI commands to get the right SBOM to the right place.
Here is an example command:
manifest-cli generate ./ -n AssetNameInManifestApp -f localfilename.json --publish -k your_api_token_key --product-id=your_product_id_from_the_urlUsing labels
A label applies to an asset. You are specifying an asset label when you do this.
You can also specify a product label to help organize products but that is a separate product-label value
Here is the example command for this:
manifest-cli generate ./ -n testlabel -f test.json --publish -k your_api_token_key --asset-label "sampleLabelCLIGenerated"Putting it all together
If you want to apply an asset label, and add the SBOM(Asset) to a product, here is an example command that combines both. Its really just smashing the two previous examples together.
manifest-cli generate ./ -n AssetNameInManifestApp -f localfilename.json --publish -k your_api_token_key --asset-label "sampleAssetLabel" --product-id=your_product_id_from_the_urlUpdated 2 days ago
