Upload registry package
post
/restapi/local_change_management/upload_package/{filename}
This API uploads a registry package to the appliance for local change management.
Request
Path Parameters
-
filename:
The name of the registry package being uploaded
Response
200 Response
OK
400 Response
The request is malformed in some way or is missing required information and therefore cannot be processed.
405 Response
Invalid request method
Examples
Example of Accessing the API with cURL
The following example shows how to upload a registry package to the appliance for local change management by submitting a POST request on the REST resource using cURL. If the request requires a timestamp, use the timestamp from the response of the /login API. For more information about cURL, see Use cURL.
curl -X POST \
-b cookies.txt \
-d@request.json \
--header "Content-Type: application/json" \
"https://$IPADDR/restapi/local_change_management/upload_package/{filename}"
The following shows an example of the contents of the request.json
file sent as the request body.
{
"filename": "<filename>",
"timestamp": "<timestamp>"
}
Example of the Response Headers
The following shows an example of the response headers.
HTTP/1.1 200 Ok
Date: Thu, 10 Dec 2020 12:01:46 GMT
Server: Apache/2.4.6 () OpenSSL/1.0.2k-fips mod_fcgid/2.3.9 PHP/5.4.40
Vary: Accept-Encoding
X-UA-Compatible: IE=Edge,chrome=1
Transfer-Encoding: chunked
Content-Type: application/json; charset=ISO-8859-1
Example of the Response Body
The following example shows the contents of the response body in JSON format.
{
"status": "fail",
"message": "Error uploading EC310.cfg. <span class='error'>Error:</span> The uploaded file failed validation. The file is not an appliance package."
}