List an agent's API keys
curl --request GET \
--url https://api.skydive.com/v1/agents/{agentId}/api-keys \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.skydive.com/v1/agents/{agentId}/api-keys"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.skydive.com/v1/agents/{agentId}/api-keys', 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://api.skydive.com/v1/agents/{agentId}/api-keys",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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://api.skydive.com/v1/agents/{agentId}/api-keys"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.skydive.com/v1/agents/{agentId}/api-keys")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.skydive.com/v1/agents/{agentId}/api-keys")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"keys": [
{
"id": "<string>",
"name": "<string>",
"prefix": "sky_live_1a2",
"lastUsedAt": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z"
}
]
}{
"error": "invalid api key",
"code": "<string>"
}{
"error": "invalid api key",
"code": "<string>"
}{
"error": "invalid api key",
"code": "<string>"
}API keys
List an agent's API keys
Returns metadata for an agent’s active (non-revoked) API keys: name, display prefix, creation and last-use timestamps. The secret key value is never included; only the first characters are shown, enough to tell keys apart. You must have edit access to the agent.
GET
/
agents
/
{agentId}
/
api-keys
List an agent's API keys
curl --request GET \
--url https://api.skydive.com/v1/agents/{agentId}/api-keys \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.skydive.com/v1/agents/{agentId}/api-keys"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.skydive.com/v1/agents/{agentId}/api-keys', 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://api.skydive.com/v1/agents/{agentId}/api-keys",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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://api.skydive.com/v1/agents/{agentId}/api-keys"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.skydive.com/v1/agents/{agentId}/api-keys")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.skydive.com/v1/agents/{agentId}/api-keys")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"keys": [
{
"id": "<string>",
"name": "<string>",
"prefix": "sky_live_1a2",
"lastUsedAt": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z"
}
]
}{
"error": "invalid api key",
"code": "<string>"
}{
"error": "invalid api key",
"code": "<string>"
}{
"error": "invalid api key",
"code": "<string>"
}Authorizations
A Skydive API key, sent as Authorization: Bearer sky_live_.... Keys are scoped to a single agent and carry a use or edit scope. The full key value is shown once at creation and never again.
Path Parameters
The agent id.
Response
The agent's active API keys.
Show child attributes
Show child attributes
⌘I