BOM Stream Upload

The API uploads a Bill of Materials (either CBOM or SBOM) file as a binary stream to the AppViewX CLM platform.

Before you begin

Ensure the following before attempting to upload a BOM file:

  • The authenticated user must have the PQC_BOM_UPLOAD.
  • The BOM file must be in a supported format (CycloneDX JSON or XML).
  • Refer to Prerequisites in the CLM User Guide for environment setup requirements.

Request Structure

Endpoint: cert-pqc-cbom-stream-upload
Type: POST
Sample URL:

https://<IP/HostName/TenantName>:<GWPORT>/avxapi/cert-pqc-cbom-stream-upload?gwsource=external

To understand the elements of the sample URL, click here.

Content-Type: Request headers

application/octet-stream

Permission Required: PQC_BOM_UPLOAD

Request Headers

Name Description
sessionId

(Mandatory) Session ID received after login.

Type: String

Constraint: Required if username and password are not provided.

username

(Mandatory) AppViewX login username.

Type: String

Constraint: Required if sessionId is not provided.

password

(Mandatory) AppViewX login password.

Type: String

Constraint: Required if sessionId is not provided.

X-File-Name

(Mandatory) Name of the BOM file being uploaded. Example: sbom.json

Type: String

X-File-Size

(Mandatory) Size of the file in bytes.

Type: String

X-Upload-ID

(Optional) Upload ID for re-uploading a previously uploaded BOM file.

Type: String

Payload

Body Parameters

Name Description
Request Body

(Mandatory) The BOM file content sent as a raw binary stream.

Type: InputStream

Response Structure

Response returns string of type application/json with the following body parameters:

Name Description
response Contains the response attributes for the BOM stream upload request.
message

Success message or failure description in case of error.

Type: String

appStatusCode

Application specific status code for the response. It is a non-null value for a failure response.

Type: String

tags Additional information in case of failure response.
uploadId

Unique identifier assigned to the uploaded BOM file.

Type: String

fileName

Name of the uploaded BOM file as specified in the request header.

Type: String

status

Status of the upload operation (for example, SUCCESS, FAILED).

Type: String

Status Codes

HTTP Code appStatusCode Response Message
200 OK null BOM file upload has been triggered successfully.
400 Bad Request

INVALID_CBOM_ FILE_FORMAT

PQC-BOM-0001 Invalid file selected. Please upload a valid file (json/xml).
400 Bad Request PQC-BOM-0002 Uploaded file exceeds the maximum allowed size of 50 MB.

Remediation: Reduce the file size to under 50 MB and retry the upload.

400 Bad Request PQC-BOM-0003 FileName header is required.

Remediation: Include the FileName header in your request and retry.

400 Bad Request PQC-BOM-0004 Unable to verify file size.

Remediation: Ensure the file is not empty and retry the upload.

400 Bad Request PQC-BOM-0005 FileName exceeds the maximum allowed length of 255 characters.

Remediation: Shorten the file name to 255 characters or fewer and retry.

400 Bad Request PQC-BOM-0006 Invalid file name.

Remediation: Ensure the file name meets the required format and retry.

400 Bad Request PQC-BOM-0007 Uploaded file is empty.

Remediation: Ensure the file contains data and retry the upload.

400 Bad Request PQC-BOM-0008 Invalid delete request.

Remediation: Ensure the delete request is valid and retry.

400 Bad Request PQC-BOM-0009 Delete request limit exceeded.

Remediation: Reduce the number of items in the delete request to 100 or fewer and retry.

400 Bad Request PQC-BOM-0010 BOM parsing failed.

Remediation: Ensure the file is a valid BOM format and retry.

400 Bad Request PQC-BOM-0011 BOM file exceeds the maximum allowed depth of 25 levels.

Remediation: Flatten the BOM structure to 25 levels or fewer and retry.

500 Internal Server Error PQC-BOM-0012 BOM evaluation failure.

Remediation: Retry the request. If the issue persists, contact support.

400 Bad Request PQC-BOM-0013 Reupload request mismatch with existing BOM Spec version, Serial Number, and version.

Remediation: Ensure the Spec version, Serial Number, and version match the existing BOM record before reuploading.

400 Bad Request PQC-BOM-0014 Field value exceeds the maximum allowed length of 255 characters.

Remediation: Shorten the field value to 255 characters or fewer and retry.

400 Bad Request PQC-BOM-0015 BOM file metadata is missing.

Remediation: Ensure the file is properly uploaded with all required metadata and retry.

500 Internal Server Error PQC-BOM-0016 Failed to store the BOM file.

Remediation: Retry the request. If the issue persists, contact support.

400 Bad Request PQC-BOM-0017 Field value array exceeds the maximum size of 25.

Remediation: Reduce the number of values in the field array to 25 or fewer and retry.

401 Unauthorized AVX_GW_003

Authentication failed, reason - Invalid Credentials.

Remediation: Ensure that valid username and password or a valid sessionId is provided as header parameters.

413 Payload Too Large AVX_CLM_413

Uploaded file exceeds the maximum allowed size.

Remediation: Reduce the file size and retry the upload.

Sample Request

POST https://<IP/HostName/TenantName>:<GWPORT>/avxapi/cert-pqc-cbom-stream-upload?gwsource=external

Headers:
Content-Type: application/octet-stream
sessionId: <your-session-id>
X-File-Name: sbom.json
X-File-Size: 204800

Body:
<binary stream of the BOM file>

Sample Response

{
  "response": {
    "uploadId": "cbom-upload-9a3f2b1e",
    "fileName": "sbom.json",
    "status": "SUCCESS"
  },
  "message": null,
  "appStatusCode": null,
  "tags": {},
  "headers": null
}

References

  • IP/HostName/TenantName: Replace with the actual IP address, hostname, or tenant name based on the specific configuration in AppViewX.
    • IP: A unique identifier assigned to each device connected to a computer network that uses the Internet Protocol for communication. The IP address will be included in the endpoint URL for an on-prem deployment.
    • HostName: A human-readable label assigned to a device (host) on a network. The hostname will be included in the endpoint URL for an on-prem deployment.
    • TenantName: An identifier label for a tenant given to indicate which tenant's data the API request will access/modify. The tenant name will be included in the endpoint URL for a SaaS deployment.
  • GWPORT: AppViewX gateway port. A gateway port refers to a network port through which data is sent and received to communicate with a gateway in an on-prem deployment.

    Example: 31443

  • avxapi: Path parameter value (static) that is part of the endpoint's URL.
  • Endpoint: Endpoint of the API, for example: cert-pqc-cbom-stream-upload
  • gwsource: Source or origin of a gateway, for example: external