hosting
POST /v1/sites/{siteId}/ssl
Request the free certificate for a site.
Նույնականացում
Ուղարկեք API բանալին որպես bearer token: Բանալին պետք է ունենա 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