cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1034
Views
5
Helpful
3
Replies

Fetch multiple SSH keys with RESTCONF?

scadora
Cisco Employee
Cisco Employee

Hi,

 

I can use RESTCONF to fetch the ssh host keys for a single device like this:

 

curl -X POST \
http://x.x.x.x:8080/restconf/operations/devices/device=P5/ssh/fetch-host-keys \
-H 'Authorization: Basic xxxxxxxxxxxx=' \
-H 'Cache-Control: no-cache' \
-H 'Content-Type: application/yang-data+xml'

 

Is it possible to fetch keys from multiple devices (P1, P2, P3...) in a single POST or do I have to POST to a unique path for each device?

 

Thanks,

Shelly

 

1 Accepted Solution

Accepted Solutions

I don’t know much RESTCONF without looking it up, but I think it ought to be /restconf/operations/devices/fetch-ssh-host-keys

View solution in original post

3 Replies 3

vleijon
Cisco Employee
Cisco Employee
You can easily fetch the ssh keys for all devices at once if you call fetch-ssh-host-keys on the devices level, if that is enough for your use-case.

That would work for my use case.  However, I can't figure out how to do that in RESTCONF.  

 

These don't work:

/restconf/operations/devices/ssh/fetch-host-keys

/restconf/operations/devices/device/ssh/fetch-host-keys

/restconf/operations/devices/device=(*)/ssh/fetch-host-keys

 

Help?

I don’t know much RESTCONF without looking it up, but I think it ought to be /restconf/operations/devices/fetch-ssh-host-keys

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the NSO Developer community: