List domains
curl --request GET \
--url https://console.perfgrid.com/api/v1/domains \
--header 'Authorization: Bearer <token>'import requests
url = "https://console.perfgrid.com/api/v1/domains"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://console.perfgrid.com/api/v1/domains', 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://console.perfgrid.com/api/v1/domains",
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://console.perfgrid.com/api/v1/domains"
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://console.perfgrid.com/api/v1/domains")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://console.perfgrid.com/api/v1/domains")
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{
"data": [
{
"id": "<string>",
"name": "<string>",
"ascii_name": "<string>",
"status": "pending_registration",
"registered_on": "<string>",
"expires_on": "<string>",
"next_due_date": "<string>",
"auto_renew": true,
"whois_privacy": true,
"is_locked": true,
"manageable": true,
"nameservers": [
"<string>"
],
"dnssec": [
"<unknown>"
],
"registrant": {}
}
],
"links": {
"first": "<string>",
"last": "<string>",
"prev": "<string>",
"next": "<string>"
},
"meta": {
"path": "<string>",
"per_page": 1,
"next_cursor": "<string>",
"prev_cursor": "<string>"
}
}{
"message": "<string>"
}{
"message": "<string>",
"errors": {}
}Domains
List domains
The billing account’s domains, newest first; status narrows the
list. An ended domain PerfGrid hid from the account’s lists is left
out, but is still found by its id. Needs domains.view.
GET
/
domains
List domains
curl --request GET \
--url https://console.perfgrid.com/api/v1/domains \
--header 'Authorization: Bearer <token>'import requests
url = "https://console.perfgrid.com/api/v1/domains"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://console.perfgrid.com/api/v1/domains', 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://console.perfgrid.com/api/v1/domains",
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://console.perfgrid.com/api/v1/domains"
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://console.perfgrid.com/api/v1/domains")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://console.perfgrid.com/api/v1/domains")
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{
"data": [
{
"id": "<string>",
"name": "<string>",
"ascii_name": "<string>",
"status": "pending_registration",
"registered_on": "<string>",
"expires_on": "<string>",
"next_due_date": "<string>",
"auto_renew": true,
"whois_privacy": true,
"is_locked": true,
"manageable": true,
"nameservers": [
"<string>"
],
"dnssec": [
"<unknown>"
],
"registrant": {}
}
],
"links": {
"first": "<string>",
"last": "<string>",
"prev": "<string>",
"next": "<string>"
},
"meta": {
"path": "<string>",
"per_page": 1,
"next_cursor": "<string>",
"prev_cursor": "<string>"
}
}{
"message": "<string>"
}{
"message": "<string>",
"errors": {}
}Authorizations
An API token from API tokens in the console, sent as Authorization: Bearer pgapi_.... It works for one billing account, and its permissions decide which endpoints it may call.
Query Parameters
live (pending, active, expired or in redemption) or ended (cancelled or transferred away).
Available options:
live, ended, null