Consumption Of Licenses
Usage upload API to upload VCF Operations usages. The usage file is a of .gzip format, which contains signed usages.
The API will take the gzip formatted file of JWS entity , which has list of usages as part of request payload of JWS.
{
"file": "string"
}
file
Usage is uploaded/accepted, processing of data is yet to happen.
"UsageForLicenseUploadResponse Object"
upload_id
The status of the operation.
- UPLOADING: The usage file is getting uploaded to VCF BSC portal.
- SUCCESS: The usage file is uploaded successfully the usage processing is yet to start.
- FAILED: The usage file upload has failed.
uploaded_on
Bad request
{
"major_error_code": "USAGE_UPLOAD_FAILED",
"minor_error_code": "FILE_TYPE_NOT_SUPPORTED",
"error_message": "Only gzip file is supported."
}
parameter_list
message
major_error_code
minor_error_code
Unauthorized
{
"major_error_code": "USAGE_UPLOAD_FAILED",
"minor_error_code": "NOT_AUTHORIZED",
"message": "User is not authorized into the system."
}
parameter_list
message
major_error_code
minor_error_code
Forbidden Request
{
"major_error_code": "USAGE_UPLOAD_FAILED",
"minor_error_code": "NO_SUFFICIENT_PRIVILEGES",
"message": "User doesn't have enough privileges to upload."
}
parameter_list
message
major_error_code
minor_error_code
Duplicate file uploaded
{
"major_error_code": "USAGE_UPLOAD_FAILED",
"minor_error_code": "DUPLICATE_FILE_UPLOADED",
"message": "Duplicate file uploaded."
}
parameter_list
message
major_error_code
minor_error_code
INTERNAL_SERVER_ERROR .In case upload has failed
"ErrorResponse Object"
parameter_list
message
major_error_code
minor_error_code
curl -X POST -H 'Authorization: <value>' -H 'Content-Type: multipart/form-data' -d '{"file:"string"}' https://{api_host}/vcf/license-mgmt/api/v1/tenants/{tenant_id}/license-usage/upload