hosting
GET /v1/sites/{siteId}/ssl
Get a site's certificates and HTTPS enforcement.
Authentification
Envoyez une clé API en tant que jeton du porteur. La clé doit posséder l'autorisation sites.view ; une clé qui ne l'a pas est refusée avec le code 403, et non 404.
Cet endpoint ne prend aucun identifiant d'organisation. Votre clé identifie déjà l'organisation à laquelle elle appartient, et la réponse y est limitée.
Essayer
Remplacez tout ce qui se trouve entre crochets par vos propres valeurs, et le espace réservé à la clé par une clé de votre tableau de bord.
curl -X GET https://api.zinndigital.com/v1/sites/{siteId}/ssl \
-H "Authorization: Bearer zdk_live_…"Connecté ? La console d'API de votre tableau de bord saisit votre véritable ID d'organisation ainsi que votre propre clé, et exécute la requête sur l'API de production afin que vous puissiez voir la réponse réelle. Ouvrir ce point de terminaison dans la console API
Détails
What is actually protecting the site today: the certificates its hosting package holds, and whether plain HTTP is redirected to HTTPS. The `free_ssl` entitlement has been sold on these packages from the start and, until this resource existed, was read by nothing — a customer paying for a certificate had no surface on which to see whether one had ever been issued. `available` says whether the package type exposes certificates at all, and the two `*_permitted` flags say the same thing per action, so the client can explain *"your plan does not include this"* instead of offering a control whose request would come back refused. An absent vendor capability is a **refusal**, never an assumption that it is probably on. A site that does not run on a vendor hosting package has no such resource and returns `404`, exactly as an out-of-scope or unknown id does — the same policy as `getSiteHosting`. Requires `sites.view`.
Paramètres
| Nom | Type | Obligatoire | Qu'est-ce que c'est |
|---|---|---|---|
siteId (path) | Uuid | Oui | Site ID (UUIDv7). |
Réponse
| Nom | Type | Obligatoire | Qu'est-ce que c'est |
|---|---|---|---|
available | boolean | Oui | Whether the package type exposes a certificate surface at all. False renders an explanation rather than an empty list, so "nothing has been issued yet" and "not part of this pla… |
certificates | SiteSslCertificate[] | Oui | The certificates installed on the package. |
force_https | boolean | Oui | Whether plain HTTP is redirected to HTTPS, or null when the package does not report the setting. Null is a third state the client must render as unknown: an unchecked toggle wou… |
free_ssl_permitted | boolean | Oui | Whether this package type permits requesting the free certificate. An absent vendor capability means **refused**, never "probably on" — the refusal is ours, in our words, before… |
force_ssl_permitted | boolean | Oui | Whether this package type permits changing HTTPS enforcement. |
external_ssl_permitted | boolean | Oui | Whether this package type permits installing a certificate the customer obtained elsewhere (`installSiteExternalSsl`). Reported separately from `free_ssl_permitted` because they… |
Erreurs que cet point de terminaison peut renvoyer
401 · 403 · 404 · 429 · 503