Retrieve a software or configuration package
post
http://<SDWAN_TENANT_IP>/restapi/change_management/get_package_file
Request
There are no request parameters for this operation.
Supported Media Types
- application/json
A JSON object containing the details of the file to be fetched. The file details can be obtained using the endpoint restapi/change_management/get_status
Root Schema : schema
Type:
Show Source
object
-
appliance_id: number
Allowed Values:
[ 0, 1 ]
0 is for HA-Active and 1 is HA-StandbyExample:0
-
site_name: string
Example:
Site0
-
staging_or_active: string
Allowed Values:
[ "staging", "active" ]
File to be fetched, either Active or StagedExample:staging
-
timestamp: string
Example:
MXe8234hjDs23==
Response
Supported Media Types
- application/binary
200 Response
Result OK
Root Schema : schema
Type:
string(binary)
400 Response
Malformed JSON string in POST data
Root Schema : 400MalformedPOST
Type:
Show Source
object
-
message: string
Example:
Malformed JSON string in POST data
-
status: string
Example:
fail
401 Response
Not Logged into the SDWAN-Edge device
Root Schema : 401NotLoggedin
Type:
Show Source
object
-
message: string
Example:
Not logged in.
-
status: string
Example:
fail
403 Response
Invalid POST request
405 Response
Invalid request method
Examples
Example of Accessing the API with cURL
The following example shows how to retrieve a software or configuration package 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" \
-o package.zip \
"https://$IPADDR/restapi/change_management/get_package_file"
The following shows an example of the contents of the request.json
file sent as the request body.
{
"site_name":"NCN0",
"appliance_id":"0",
"staging_or_active":"active",
"timestamp":<timestamp>
}
Example of the Response Body
The response body is saved to the file specified by the -o option.