import os
from gcore import Gcore
client = Gcore(
api_key=os.environ.get("GCORE_API_KEY"), # This is the default and can be omitted
)
page = client.cdn.aliases.list()
page = page.results[0]
print(page.id)package main
import (
"context"
"fmt"
"github.com/G-Core/gcore-go"
"github.com/G-Core/gcore-go/cdn"
"github.com/G-Core/gcore-go/option"
)
func main() {
client := gcore.NewClient(
option.WithAPIKey("My API Key"),
)
page, err := client.CDN.Aliases.List(context.TODO(), cdn.AliasListParams{})
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", page)
}
curl --request GET \
--url https://api.gcore.com/cdn/aliases \
--header 'Authorization: <api-key>'const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://api.gcore.com/cdn/aliases', 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.gcore.com/cdn/aliases",
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: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}HttpResponse<String> response = Unirest.get("https://api.gcore.com/cdn/aliases")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.gcore.com/cdn/aliases")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"count": 1,
"next": null,
"previous": null,
"results": [
{
"id": 123,
"cname": "shop.example.com",
"resource_id": 4567,
"automated": true,
"challenge_type": "http_01",
"ssl_id": null,
"active": true,
"enabled": true,
"status": "http_only",
"ssl_status": "pending",
"ssl_validity_not_after": null,
"created": "2026-09-01T10:00:00Z",
"updated": "2026-09-01T10:00:00Z"
}
]
}Get aliases list
Get information about aliases.
The response is always paginated.
import os
from gcore import Gcore
client = Gcore(
api_key=os.environ.get("GCORE_API_KEY"), # This is the default and can be omitted
)
page = client.cdn.aliases.list()
page = page.results[0]
print(page.id)package main
import (
"context"
"fmt"
"github.com/G-Core/gcore-go"
"github.com/G-Core/gcore-go/cdn"
"github.com/G-Core/gcore-go/option"
)
func main() {
client := gcore.NewClient(
option.WithAPIKey("My API Key"),
)
page, err := client.CDN.Aliases.List(context.TODO(), cdn.AliasListParams{})
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", page)
}
curl --request GET \
--url https://api.gcore.com/cdn/aliases \
--header 'Authorization: <api-key>'const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://api.gcore.com/cdn/aliases', 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.gcore.com/cdn/aliases",
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: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}HttpResponse<String> response = Unirest.get("https://api.gcore.com/cdn/aliases")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.gcore.com/cdn/aliases")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"count": 1,
"next": null,
"previous": null,
"results": [
{
"id": 123,
"cname": "shop.example.com",
"resource_id": 4567,
"automated": true,
"challenge_type": "http_01",
"ssl_id": null,
"active": true,
"enabled": true,
"status": "http_only",
"ssl_status": "pending",
"ssl_validity_not_after": null,
"created": "2026-09-01T10:00:00Z",
"updated": "2026-09-01T10:00:00Z"
}
]
}Authorizations
API key for authentication. Make sure to include the word apikey, followed by a single space and then your token.
Example: apikey 1234_abcdef
Query Parameters
CDN resource ID. Only aliases of this CDN resource are returned.
Comma-separated list of CDN resource IDs.
Alias status.
Possible values:
inactive– The alias or its CDN resource is disabled; the alias is not served.pending– The alias configuration has not reached the CDN yet.http_only– The alias is served over HTTP only.active– The alias is served over HTTP and HTTPS.
inactive, pending, http_only, active "active"
Comma-separated list of alias statuses.
Outcome of the certificate we manage for the alias.
Possible values:
pending– A certificate attempt is in progress, or was stopped by pausing the alias and starts again after it is resumed.issued– The latest attempt succeeded.failed– The latest attempt ended without a certificate.null– No certificate is managed for the alias: the alias uses a certificate you provided, or is automated and has never opened an attempt.
pending, issued, failed "issued"
Comma-separated list of certificate outcomes.
Only aliases whose served certificate expires at or before this date and time (ISO 8601/RFC 3339 format, UTC).
Only aliases whose served certificate expires at or after this date and time (ISO 8601/RFC 3339 format, UTC).
How the alias certificate is managed.
Possible values:
true– A Let's Encrypt certificate is issued and renewed automatically.false– The certificate was added by you.
SSL certificate ID. Only aliases linked to this certificate are returned.
Hostname substring, case-insensitive.
Hostname prefix, case-insensitive.
Hostname suffix, case-insensitive.
Search by alias ID or hostname.
Field to sort by. Prefix with - for descending order.
Possible values: id, cname, status, created, updated, resource_id.
Maximum number of items to return in the response. Cannot exceed 1000.
1 <= x <= 1000Number of items to skip from the beginning of the list.
x >= 0Response
Successful.
Total number of items.
URL to the next page of results. Null if current page is the last one.
URL to the previous page of results. Null if current page is the first one.
List of items on the current page.
Show child attributes
Show child attributes
Was this page helpful?