hosting

POST /v1/sites/{siteId}/deploy

Deploy or redeploy a site.

Барлық hosting соңғы нүктелері

Аутентификация

API кілтін bearer токені ретінде жіберіңіз. Кілтте hosting.deploy.manage рұқсаты болуы тиіс; онсыз кілтке 404 емес, 403 қатесі қайтарылады.

Бұл соңғы нүкте ұйым идентификаторын қабылдамайды. Сіздің кілтіңіз оның қай ұйымға тиесілі екенін өзі анықтайды және жауап соған шектеледі.

Әрекет етіп көру

Бұрыштық жақшалардағы кез келген нәрсені өз мәндеріңізбен, ал кілт орналастырушысын басқару тақтасынан алынған кілтпен алмастырыңыз.

curl -X POST https://api.zinndigital.com/v1/sites/{siteId}/deploy \
  -H "Authorization: Bearer zdk_live_…"

Жүйеге кіргенсіз бе? Бақылау тақтасындағы API консолі ұйымыңыздың нақты идентификаторы мен жеке кілтіңізді автоматты түрде толтырады да, нақты жауапты көре алуыңыз үшін сұрауды тікелей жұмыс істеп тұрған API арқылы орындайды. Бұл соңғы нүктені API консолінде ашыңыз

Мәліметтер

Starts a durable deploy workflow and returns immediately with the new in-flight state. The target is derived from the site's stack and its connected accounts; there is no target to choose. A site with a deploy already running returns `DEPLOY_IN_PROGRESS`, and one with no usable target returns `DEPLOY_TARGET_UNAVAILABLE`. Requires `hosting.deploy.manage`.

Параметрлер

АтыTүріМіндеттіМазмұны
siteId (path)UuidИәSite ID (UUIDv7).
Idempotency-Key (header)stringЖоқClient-generated key that makes an unsafe request replay-safe: the server stores the first response and returns it verbatim for repeats.

Жауап

АтыTүріМіндеттіМазмұны
site_idUuidИәUUIDv7 identifier — sortable by creation time (docs/02 §8).
targetDeployTarget | nullИәNull when no target can be derived yet.
statusDeployStatusИә`idle` means the site has never been deployed. It is reported, never stored — a stored idle would be a second way to say "no deployments" that could contradict the first.
last_deployed_atobjectИәWhen the site last went live, or null if it never has. Null means nothing to show — never zero and never an epoch date.
live_urlobjectИәThe served URL once live, always https, else null. A non-HTTPS value is rejected server-side rather than returned.
repoobjectИәSource repository for the Pages targets, else null.
commitobjectИәThe deployed commit ref, else null.
messageobjectИәWhy the last deploy failed, else null. Rendered to the customer verbatim.
can_deploybooleanИәFalse while a deploy is in flight or the site cannot be deployed.

Бұл соңғы нүкте қайтара алатын қателер

401 · 403 · 404 · 409 · 422 · 429 · 503