Forum Discussion
HarshadS
Jun 28, 2022Altostratus
Restoring UCS archive using REST API
Hi, I was trying to figure out how to load an already uploaded UCS archive on bigip ltm using the rest API. The UCS file exists in /var/local/ucs and I'm trying to load it as shown below in the code...
Jun 28, 2022
Hi HarshadS,
Can you try this?
import requests
import json
url = "https://<mgmtip>/mgmt/tm/shared/sys/backup"
payload = json.dumps({
"file":"myucs.ucs",
"action":"RESTORE",
"generation":0,
"lastUpdateMicros":0
})
headers = {
'X-F5-Auth-Token': '<token>',
'Content-Type': 'application/json'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
I didn't test it.
Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects