/cloud/stack/ssl/lets_encrypt/list_all


GET https://api.sitehost.nz/1.0/cloud/stack/ssl/lets_encrypt/list_all.json

Lists any SSL certificates for a stack.

Query Parameters

ParameterTypeRequiredDescription
client_idintegerYesThe ID for the client that the stack belongs to.Example: 1
serverstringYesThe server where the stack resides.Example: ch-servername
namestringYesThe name of the stack.Example: examplenz
containers[]stringA list of individual containers in the stack. This parameter accepts one or more values in the format of containers[]=x, containers[]=y.Example: example.nz

Code Samples

JavaScript PHP Rails Python
var xmlHttp = new XMLHttpRequest();
xmlHttp.open("GET", "https://api.sitehost.nz/1.0/cloud/stack/ssl/lets_encrypt/list_all.json?apikey=your_key_here&client_id=1&server=ch-servername&name=examplenz&containers[]=example.nz", false);

xmlHttp.send();

var response = xmlHttp.responseText;
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://api.sitehost.nz/1.0/cloud/stack/ssl/lets_encrypt/list_all.json?apikey=your_key_here&client_id=1&server=ch-servername&name=examplenz&containers[]=example.nz");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$response = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
require 'net/http'
require 'uri'

uri = URI.parse("https://api.sitehost.nz/1.0/cloud/stack/ssl/lets_encrypt/list_all.json?apikey=your_key_here&client_id=1&server=ch-servername&name=examplenz&containers[]=example.nz")
http = Net::HTTP.new(uri.host, uri.port)
request = Net::HTTP::Get.new(uri.request_uri)

response = http.request(request)
import requests

uri = 'https://api.sitehost.nz/1.0/cloud/stack/ssl/lets_encrypt/list_all.json?apikey=your_key_here&client_id=1&server=ch-servername&name=examplenz&containers[]=example.nz'

response = requests.get(uri)

Response

200:

application/json
{
    "return": {
        "examle.com": {
            "issuer": "Example LE Intermediate X1",
            "not_before": "2016-04-19 15:08:00",
            "not_after": "2016-07-18 15:08:00",
            "serial": "21811627382994550590400010408235325759509012",
            "expired": "0",
            "is_missing": "0"
        }
    },
    "msg": "Successful",
    "status": true
}