List the account's API keys
curl --request GET \
--url https://dev.api.nestapi.com/admin/keys \
--header 'Accept: <accept>' \
--header 'Authorization: <api-key>'import requests
url = "https://dev.api.nestapi.com/admin/keys"
headers = {
"Accept": "<accept>",
"Authorization": "<api-key>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Accept: '<accept>', Authorization: '<api-key>'}};
fetch('https://dev.api.nestapi.com/admin/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://dev.api.nestapi.com/admin/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 => [
"Accept: <accept>",
"Authorization: <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://dev.api.nestapi.com/admin/keys"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Accept", "<accept>")
req.Header.Add("Authorization", "<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://dev.api.nestapi.com/admin/keys")
.header("Accept", "<accept>")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://dev.api.nestapi.com/admin/keys")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Accept"] = '<accept>'
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body[
{
"ApiKey": "<string>",
"ClientRef": "<string>",
"Expired": true,
"IsActive": true,
"Expires": "2023-11-07T05:31:56Z",
"CancelledDate": "2023-11-07T05:31:56Z",
"Parallelism": 123,
"IsTrial": true,
"KeyType": "Usage"
}
][
{
"ApiKey": "<string>",
"ClientRef": "<string>",
"Expired": true,
"IsActive": true,
"Expires": "2023-11-07T05:31:56Z",
"CancelledDate": "2023-11-07T05:31:56Z",
"Parallelism": 123,
"IsTrial": true,
"KeyType": "Usage"
}
][
{
"ApiKey": "<string>",
"ClientRef": "<string>",
"Expired": true,
"IsActive": true,
"Expires": "2023-11-07T05:31:56Z",
"CancelledDate": "2023-11-07T05:31:56Z",
"Parallelism": 123,
"IsTrial": true,
"KeyType": "Usage"
}
]Account & keys
List the account's API keys
Admin only (an Admin API key or the account owner). Returns the account’s keys with their type and fairness weight. Expired keys are included so they can be seen and revoked; revoked keys are not. Each key’s Expired flag is true once its expiry date has passed, and IsActive is true only for a key that is neither expired nor revoked - filter on IsActive to find the keys that still work.
GET
/
admin
/
keys
List the account's API keys
curl --request GET \
--url https://dev.api.nestapi.com/admin/keys \
--header 'Accept: <accept>' \
--header 'Authorization: <api-key>'import requests
url = "https://dev.api.nestapi.com/admin/keys"
headers = {
"Accept": "<accept>",
"Authorization": "<api-key>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Accept: '<accept>', Authorization: '<api-key>'}};
fetch('https://dev.api.nestapi.com/admin/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://dev.api.nestapi.com/admin/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 => [
"Accept: <accept>",
"Authorization: <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://dev.api.nestapi.com/admin/keys"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Accept", "<accept>")
req.Header.Add("Authorization", "<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://dev.api.nestapi.com/admin/keys")
.header("Accept", "<accept>")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://dev.api.nestapi.com/admin/keys")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Accept"] = '<accept>'
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body[
{
"ApiKey": "<string>",
"ClientRef": "<string>",
"Expired": true,
"IsActive": true,
"Expires": "2023-11-07T05:31:56Z",
"CancelledDate": "2023-11-07T05:31:56Z",
"Parallelism": 123,
"IsTrial": true,
"KeyType": "Usage"
}
][
{
"ApiKey": "<string>",
"ClientRef": "<string>",
"Expired": true,
"IsActive": true,
"Expires": "2023-11-07T05:31:56Z",
"CancelledDate": "2023-11-07T05:31:56Z",
"Parallelism": 123,
"IsTrial": true,
"KeyType": "Usage"
}
][
{
"ApiKey": "<string>",
"ClientRef": "<string>",
"Expired": true,
"IsActive": true,
"Expires": "2023-11-07T05:31:56Z",
"CancelledDate": "2023-11-07T05:31:56Z",
"Parallelism": 123,
"IsTrial": true,
"KeyType": "Usage"
}
]Authorizations
Headers
Accept Header
Available options:
application/json