Uploading software catalog
You use the
POST operation on the
sam/catalog/catalog_updates/upload element to upload the software
catalog to the BFI server for import. After successful upload you can run the catalog import
API or wait for the Data Import to import the software catalog.
Permissions
You must have the Manage Uploads permission to use the
API.
Resource URL
https://hostname:port/sam/catalog/catalog_updates/upload?token=token
Resource information
| Operation details | Description |
|---|---|
| HTTP method | GET |
| Request headers |
Negotiates the language of the response. If the header is not specified, the content is returned in the server language. |
|
Header
Values
Specifies the content type of the request. |
|
| Request format | application/json |
| Request payload |
|
| Response headers |
Header
Values
Specifies the content type of the response. |
|
Header
Values en-US, … Specifies the language of the response content. If the header is not specified, the content is returned in the server language. |
|
| Response format | application/json |
Example conversation
- Request
-
POST /sam/catalog_updates/upload?token=150463d565467e8619b86fa77090ff06963726c9 HTTP/1.1 Host: localhost:9081 Accept: application/json Content-Type: multipart/form-data; boundary=boundary --boundary Content-Disposition: form-data; name="upload[comments]" Some comments --boundary Content-Disposition: form-data; name="upload[catalog]"; filename="@/tmp/BFI_Catalog_20260826-20260826-0832.zip" Content-Type: application/zip (binary zip bytes here) --boundary--Curl alternative:
curl -k -sS -X POST \ "https://localhost:9081/sam/catalog_updates/upload?token=150463d565467e8619b86fa77090ff06963726c9" \ -H "Accept: application/json" \ -F "upload[comments]=Uploaded from curl" \ -F "upload[catalog]=@/tmp/BFI_Catalog_20260826-20260826-0832.zip;type=application/zip"
- Response body
-
{ "success":true, "message":"The version of the Canonical 2 software catalog that you uploaded is the same as the one that is currently used. The version of the Canonical 3 software catalog that you uploaded is the same as the one that is currently used. Charge unit data with version 2639030 was uploaded successfully. IBM catalog upload skipped: ( IBM License Metric Tool software catalog cannot be uploaded on this site. See the product documentation for more information about IBM License Metric Tool software catalog update. )"