import os
from gcore import Gcore
client = Gcore(
api_key=os.environ.get("GCORE_API_KEY"), # This is the default and can be omitted
)
ssl_request_status = client.cdn.certificates.get_status(
cert_id=0,
)
print(ssl_request_status.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"),
)
sslRequestStatus, err := client.CDN.Certificates.GetStatus(
context.TODO(),
0,
cdn.CertificateGetStatusParams{},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", sslRequestStatus.ID)
}
curl --request GET \
--url https://api.gcore.com/cdn/sslData/{cert_id}/status \
--header 'Authorization: <api-key>'const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://api.gcore.com/cdn/sslData/{cert_id}/status', 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/sslData/{cert_id}/status",
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/sslData/{cert_id}/status")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.gcore.com/cdn/sslData/{cert_id}/status")
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{
"id": 1,
"statuses": [
{
"id": 1,
"status": "DONE",
"error": "",
"details": "",
"created": "2021-10-29T13:21:01.550849Z",
"retry_after": "2024-01-01T10:00:00Z"
}
],
"latest_status": {
"id": 1,
"status": "DONE",
"error": "",
"details": "",
"created": "2021-10-29T13:21:01.550849Z",
"retry_after": "2024-01-01T10:00:00Z"
},
"started": "2021-10-29T13:20:56.543678Z",
"finished": "2021-10-29T13:21:01.550849Z",
"active": false,
"attempts_count": 1,
"next_attempt_time": "2021-10-29T13:21:01.550849Z",
"resource": 1
}{
"errors": {
"certificate": [
"Certificate is not attached to a resource."
]
}
}Get Let's Encrypt certificate issuing details
Get details about the latest Let’s Encrypt certificate issuing attempt for the CDN resource. Returns attempts in all statuses.
import os
from gcore import Gcore
client = Gcore(
api_key=os.environ.get("GCORE_API_KEY"), # This is the default and can be omitted
)
ssl_request_status = client.cdn.certificates.get_status(
cert_id=0,
)
print(ssl_request_status.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"),
)
sslRequestStatus, err := client.CDN.Certificates.GetStatus(
context.TODO(),
0,
cdn.CertificateGetStatusParams{},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", sslRequestStatus.ID)
}
curl --request GET \
--url https://api.gcore.com/cdn/sslData/{cert_id}/status \
--header 'Authorization: <api-key>'const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://api.gcore.com/cdn/sslData/{cert_id}/status', 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/sslData/{cert_id}/status",
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/sslData/{cert_id}/status")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.gcore.com/cdn/sslData/{cert_id}/status")
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{
"id": 1,
"statuses": [
{
"id": 1,
"status": "DONE",
"error": "",
"details": "",
"created": "2021-10-29T13:21:01.550849Z",
"retry_after": "2024-01-01T10:00:00Z"
}
],
"latest_status": {
"id": 1,
"status": "DONE",
"error": "",
"details": "",
"created": "2021-10-29T13:21:01.550849Z",
"retry_after": "2024-01-01T10:00:00Z"
},
"started": "2021-10-29T13:20:56.543678Z",
"finished": "2021-10-29T13:21:01.550849Z",
"active": false,
"attempts_count": 1,
"next_attempt_time": "2021-10-29T13:21:01.550849Z",
"resource": 1
}{
"errors": {
"certificate": [
"Certificate is not attached to a resource."
]
}
}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
Path Parameters
Let's Encrypt certificate ID.
Query Parameters
Listed fields will be excluded from the response.
Response
Successful.
ID of the attempt to issue a Let's Encrypt certificate.
1
Detailed information about attempts to issue a Let's Encrypt certificate.
Show child attributes
Show child attributes
Detailed information about last attempt to issue a Let's Encrypt certificate.
Show child attributes
Show child attributes
Date when the process of issuing a Let's Encrypt certificate was started (ISO 8601/RFC 3339 format, UTC).
"2021-10-29T13:20:56.543678Z"
Date when the process of issuing a Let's Encrypt certificate was finished (ISO 8601/RFC 3339 format, UTC).
The field is null if the issuing process is not finished.
"2021-10-29T13:21:01.550849Z"
Defines whether the Let's Encrypt certificate issuing process is active.
Possible values:
- true - Issuing process is active.
- false - Issuing process is completed.
false
Number of attempts to issue the Let's Encrypt certificate.
1
Time of the next scheduled attempt to issue the Let's Encrypt certificate (ISO 8601/RFC 3339 format, UTC).
"2021-10-29T13:21:01.550849Z"
CDN resource ID.
1
Was this page helpful?