Retrieve SSH Key Pair
1 min
GET
{{url}}/aioc-rest-web/rest/sc/ssh/retrieveSshKeyPair
Path Parameters
- urlstringDefaulturl
Header Parameters
- Content-TypestringDefaultapplication/json
- CookiestringDefault{{netrightCookie}}
- X-XSRF-TOKENstringDefault{{csrftoken}}
Responses
200
curl
curl --request GET \
--url {{url}}/aioc-rest-web/rest/sc/ssh/retrieveSshKeyPair \
--header 'accept: application/json' \
--cookie {{netrightCookie}} \
--header 'x-xsrf-token: {{csrftoken}}'javascript
var myHeaders = new Headers();
myHeaders.append("accept", "application/json");
myHeaders.append("content-type", "application/json");
myHeaders.append("cookie", "{{netrightCookie}}");
myHeaders.append("x-xsrf-token", "{{csrftoken}}");
var requestOptions = {
method: 'GET',
headers: myHeaders,
redirect: 'follow'
};
fetch("{{url}}/aioc-rest-web/rest/sc/ssh/retrieveSshKeyPair", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));ruby
require "uri"
require "json"
require "net/http"
url = URI("{{url}}/aioc-rest-web/rest/sc/ssh/retrieveSshKeyPair")
http = Net::HTTP.new(url.host, url.port);
request = Net::HTTP::Get.new(url)
request["accept"] = "application/json"
request["content-type"] = "application/json"
request["cookie"] = "{{netrightCookie}}"
request["x-xsrf-token"] = "{{csrftoken}}"
response = http.request(request)
puts response.read_body
python
import requests
import json
url = "{{url}}/aioc-rest-web/rest/sc/ssh/retrieveSshKeyPair"
payload = {}
headers = {
'accept': 'application/json',
'content-type': 'application/json',
'cookie': '{{netrightCookie}}',
'x-xsrf-token': '{{csrftoken}}'
}
response = requests.request("GET", url, headers=headers, data=payload)
print(response.text)
200
{
"dbId": 404706,
"userId": "a177be61-8850-4f03-be1c-3ce275f02c1f",
"publicKey": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCrlwdMY1idLMS6RRONNSBeIm7WR66CogWL3+x3UEh6ORlOCUbEFKPXTN8AhEZLB20qUxm/PZ8pw7/d2hpyW2DDq4XvMNzpspZXVLmJGDsKhuXNqxCx8lVJ1/9cZ1i7eyXqa6xfij+yxICzUvsi5T3JMUfXOm5KLDvoG9hBbLTcHOzIAls0cSO+IXVelbFkfERBHz2IBXbJXPRyjVaaB+kLo9BmVCL4TYcxdU/GGCe/BDWYpzy24k4FedhfyXAes/JujE+Edyc8EwERoCOms2K6RafmzbwrLjJIbTvt6mxiJKWmplSN/cn/BLEUt+us1hECoULLIoDj9VUKTqRbanmb testuser",
"privateKey": null,
"creationTime": 1548419866491,
"expirationTime": null
}