Get key Details.
curl --request GET \
--url https://{tenant}/admin/org/keys/{keyId} \
--header 'Admin-Auth: <api-key>'import requests
url = "https://{tenant}/admin/org/keys/{keyId}"
headers = {"Admin-Auth": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'Admin-Auth': '<api-key>'}};
fetch('https://{tenant}/admin/org/keys/{keyId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{tenant}/admin/org/keys/{keyId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Admin-Auth: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://{tenant}/admin/org/keys/{keyId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Admin-Auth", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://{tenant}/admin/org/keys/{keyId}")
.header("Admin-Auth", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{tenant}/admin/org/keys/{keyId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Admin-Auth"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"api_model": {},
"data": {
"access_rights": {},
"alias": "<string>",
"allowance": 123,
"apply_policies": [
"<string>"
],
"apply_policy_id": "<string>",
"basic_auth_data": {
"hash_type": "<string>",
"password": "<string>",
"user": "<string>"
},
"certificate": "<string>",
"data_expires": 123,
"date_created": "2023-11-07T05:31:56Z",
"enable_detailed_recording": true,
"expires": 123,
"hmac_enabled": true,
"hmac_string": "<string>",
"id_extractor_deadline": 123,
"is_inactive": true,
"jwt_data": {
"secret": "<string>"
},
"key_id": "<string>",
"last_check": 123,
"last_updated": "<string>",
"max_query_depth": 123,
"meta_data": "<unknown>",
"monitor": {
"trigger_limits": [
123
]
},
"oauth_client_id": "<string>",
"oauth_keys": {},
"org_id": "<string>",
"per": 123,
"quota_max": 123,
"quota_remaining": 123,
"quota_renewal_rate": 123,
"quota_renews": 123,
"rate": 123,
"session_lifetime": 123,
"smoothing": {
"delay": 123,
"enabled": true,
"step": 123,
"threshold": 123,
"trigger": 123
},
"tags": [
"<string>"
],
"throttle_interval": 123,
"throttle_retry_limit": 123
},
"key_hash": "<string>",
"key_id": "<string>"
}{
"Message": "Could not get Org key details",
"Meta": null,
"Status": "Error"
}{
"Message": "Failed to unmarshal key data from Tyk API",
"Meta": null,
"Status": "Error"
}Keys
Get key Details.
Get the details of a key.
GET
/
admin
/
org
/
keys
/
{keyId}
Get key Details.
curl --request GET \
--url https://{tenant}/admin/org/keys/{keyId} \
--header 'Admin-Auth: <api-key>'import requests
url = "https://{tenant}/admin/org/keys/{keyId}"
headers = {"Admin-Auth": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'Admin-Auth': '<api-key>'}};
fetch('https://{tenant}/admin/org/keys/{keyId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{tenant}/admin/org/keys/{keyId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Admin-Auth: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://{tenant}/admin/org/keys/{keyId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Admin-Auth", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://{tenant}/admin/org/keys/{keyId}")
.header("Admin-Auth", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{tenant}/admin/org/keys/{keyId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Admin-Auth"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"api_model": {},
"data": {
"access_rights": {},
"alias": "<string>",
"allowance": 123,
"apply_policies": [
"<string>"
],
"apply_policy_id": "<string>",
"basic_auth_data": {
"hash_type": "<string>",
"password": "<string>",
"user": "<string>"
},
"certificate": "<string>",
"data_expires": 123,
"date_created": "2023-11-07T05:31:56Z",
"enable_detailed_recording": true,
"expires": 123,
"hmac_enabled": true,
"hmac_string": "<string>",
"id_extractor_deadline": 123,
"is_inactive": true,
"jwt_data": {
"secret": "<string>"
},
"key_id": "<string>",
"last_check": 123,
"last_updated": "<string>",
"max_query_depth": 123,
"meta_data": "<unknown>",
"monitor": {
"trigger_limits": [
123
]
},
"oauth_client_id": "<string>",
"oauth_keys": {},
"org_id": "<string>",
"per": 123,
"quota_max": 123,
"quota_remaining": 123,
"quota_renewal_rate": 123,
"quota_renews": 123,
"rate": 123,
"session_lifetime": 123,
"smoothing": {
"delay": 123,
"enabled": true,
"step": 123,
"threshold": 123,
"trigger": 123
},
"tags": [
"<string>"
],
"throttle_interval": 123,
"throttle_retry_limit": 123
},
"key_hash": "<string>",
"key_id": "<string>"
}{
"Message": "Could not get Org key details",
"Meta": null,
"Status": "Error"
}{
"Message": "Failed to unmarshal key data from Tyk API",
"Meta": null,
"Status": "Error"
}Was this page helpful?
⌘I