cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2568
Views
1
Helpful
8
Replies

Cisco ISE API - Download file from local disk ISE

yayaa
Level 1
Level 1

Hello,

 

I want to download the local backup file via HTTP / HTTPS using my Linux server. I have Python installed on my Linux server so I thought I would be able to use the REST API on ISE to download this file. HTTP/HTTPS repository is not supported on Cisco ISE 2.7, and other protocols I am not able to use. So thought of this way to make local ISE backups and than create a script to download this via the REST API. I am fairly new to scripting with API's and have basic Python knowledge. This looks to me a simple exercise but not sure where to start. Anyone with an example that can advice me ? Thanks in advance

3 Accepted Solutions

Accepted Solutions

@yayaa why not just setup your linux server as the remote repository in ISE, to push the backup?

View solution in original post

Yeah, sorry, David, the ISE Backup API is supported from ISE 3.1+ :

https://cs.co/ise-api > Versioning

View solution in original post

thomas
Cisco Employee
Cisco Employee

Backups MUST be done to an ISE Repository using a supported protocol. See the ISE Administrator Guide for all supported ISE repository types.

image.png

 

You may initiate a backup via the REST API call above - using ISE 3.1+ (sorry, not 2.7) - to a supported ISE repository that you configured but not HTTP repositories because they are Read-Only as the table above shows. 

Again, no API exists for transferring data from the LOCALDISK repository - you would need to make a feature request @ https://cs.co/ise-wish

View solution in original post

8 Replies 8

davidgfriedman
Level 1
Level 1

Deleted, re-read and I was not commenting on the same topic.

thomas
Cisco Employee
Cisco Employee

While HTTP/S POST could be used to upload a backup file, there is no standard POST request across any servers for handling file uploads.  I would love to hear how you would expect this to work on any random Apache or NGINX web server.  Maybe then you could request it it as an enhancement @ https://cs.co/ise-wish

You may certainly trigger a backup in ISE via REST API to your repository of choice including the LOCALDISK.

 

curl  --include  --insecure  --location \
  --header 'Accept: application/json' \
  --header 'Content-Type: application/json' \
  --user $ISE_USERNAME:$ISE_PASSWORD  \
  --request POST https://$ISE_HOSTNAME/api/v1/backup-restore/config/backup \
  --data '
{
  "backupEncryptionKey": "$ISE_BACKUP_ENCRYPTION_KEY",
  "backupName": "My_Backup",
  "repositoryName": "My_Repository"
}'

 

However there is no REST API for downloading from the LOCALDISK once the backup is completed. You would need to do it via the GUI. For API download support from the LOCALDISK, you would need to make a feature request @ https://cs.co/ise-wish

 

Thanks for your feedback Thomas! What if I schedule a local backup via ISE GUI and create another script on my Linux server using python to transfer this file to my Linux server using the REST API ?  Could I do that? If so, how would I be able to transfer this file via the REST API to my linux server? Thanks for the feedback!

@yayaa why not just setup your linux server as the remote repository in ISE, to push the backup?

thomas
Cisco Employee
Cisco Employee

Backups MUST be done to an ISE Repository using a supported protocol. See the ISE Administrator Guide for all supported ISE repository types.

image.png

 

You may initiate a backup via the REST API call above - using ISE 3.1+ (sorry, not 2.7) - to a supported ISE repository that you configured but not HTTP repositories because they are Read-Only as the table above shows. 

Again, no API exists for transferring data from the LOCALDISK repository - you would need to make a feature request @ https://cs.co/ise-wish

Thanks for the feedback that is clear. Unfortunately it's not possible in my situation to use the other protocols for backup so was looking for a workaround.

Thread may be closed. Thank you all.

He wrote version 2.7, is that API available in 2.7?  If so, doc links please.

Yeah, sorry, David, the ISE Backup API is supported from ISE 3.1+ :

https://cs.co/ise-api > Versioning