身份验证
请将 API 密钥作为 bearer 令牌发送。该密钥必须具有 sites.view 权限;缺少该权限的密钥将被拒绝并返回 403 状态码,而非 404。
此端点不需要组织 ID。您的密钥已用于识别其所属的组织,且响应范围也仅限于该组织。
免费试用
将尖括号中的内容替换为您自己的值,并将键占位符替换为您仪表板中的一个键。
curl -X POST https://api.zinndigital.com/v1/sites/{siteId}/ssl \
-H "Authorization: Bearer zdk_live_…"已登录?您仪表板中的 API 控制台会自动填入您真实的组织 ID 和您自己的密钥,并针对实时 API 运行请求,以便您查看实际的响应。 在 API 控制台中打开此端点
详细信息
Asks the vendor to issue the free certificate the package includes, then returns the site's TLS state as getSiteSsl would. It returns 200 and the whole resource rather than 201 and a certificate, because issuance is not instant: what the customer needs back is the state of the thing they were looking at, and the certificate appears in it once the authority has answered. Issuing again while a certificate is already valid is not an error — the request is safe to repeat, which matters because the customer's most likely next action after seeing nothing happen is to press the button again. A package type that does not permit free certificates is refused 422 before the vendor is called, with our sentence rather than a vendor error string. 404 for a site with no vendor hosting package, exactly as getSiteHosting. Requires sites.view and hosting.ssl.manage.
参数
| 名称 | 类型 | 必填 | 内容简介 |
|---|---|---|---|
siteId (path) | Uuid | 是 | Site ID (UUIDv7). |
响应
| 名称 | 类型 | 必填 | 内容简介 |
|---|---|---|---|
available | boolean | 是 | 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 plan"… |
certificates | SiteSslCertificate[] | 是 | The certificates installed on the package. |
force_https | boolean | 是 | 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 would… |
free_ssl_permitted | boolean | 是 | 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 | 是 | Whether this package type permits changing HTTPS enforcement. |
external_ssl_permitted | boolean | 是 | Whether this package type permits installing a certificate the customer obtained elsewhere (installSiteExternalSsl). Reported separately from free_ssl_permitted because they… |
此端点可能返回的错误
401 · 403 · 404 · 409 · 422 · 429 · 503