Upload the output of all the individual commands or the configurations together and a single file containing the data for all commands together.
The minimum curl stable version 7.70.0 is required for the OCA API POST call to be executed using file bulk command upload via curl command.
HTTP Status Code
- 200: OK
- 400: Bad Request
- 401: Unauthorized user
- 403: Forbidden
- 404: Not Found
Input ParametersInput Parameters
Input Parameter |
Mandatory/ Optional |
Data Type |
Description |
---|---|---|---|
asset_uuid |
Mandatory |
Text |
Provide the UUID of the asset. |
manifest_types |
Mandatory |
String |
Manifest type of asset. Allowed value: PolicyCompliance |
data |
Mandatory |
Text |
File containing the consolidated output of all the individual commands to be provisioned. Accepted Files: .txt. Example: sample-bulk-command-upload.txt
|
Header ParametersHeader Parameters
Header Parameter |
Mandatory/ Optional |
Data Type |
Description |
---|---|---|---|
assetFlowType |
Optional |
Text |
Provide asset flow type. The default value is DEFAULT. |
authorization |
Mandatory |
Text |
he token that was generated using the Fetch Authentication Token API. |
Request:
curl -X POST 'https://
<api_gateway_url>/ocaapi/v2.0/asset/asset_uuid/command/bulk/output/PolicyCompliance"
-H "accept: application/json"
-H "assetFlowType: DEFAULT"
-H "Authorization: Bearer
<token>'
-H "Content-Type: multipart/form-data"
-F "data=@samplefile.txt;type=text/plain"
Response: Successful upload response
{
" "{
"code":200,
"message":"Command Bulk Output Uploaded Successfully."
}"
Response":"Unsuccessful upload response"{
"_error":{
"code":400,
"message":"ERR-2070 - Invalid file format. Only txt file type is
supported. Please upload a file appropriately"
}
}