KRON PAM API Collection v3.7.0
SSH Key Management
Retrieve SSH Key Pair
1 min
code examples curl location globoff '{{url}}/aioc rest web/rest/sc/ssh/retrievesshkeypair' \\ \ header 'accept application/json' \\ \ header 'content type application/json' \\ \ header 'cookie {{netrightcookie}}' \\ \ header 'x xsrf token {{csrftoken}}'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));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 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) responses { "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 }