hosting

POST /v1/sites/{siteId}/deploy

Deploy or redeploy a site.

Wszystkie punkty końcowe hosting

Uwierzytelnianie

Wyślij klucz API jako token bearer. Klucz musi posiadać uprawnienie hosting.deploy.manage; klucz bez niego jest odrzucany z kodem 403, a nie 404.

Ten punkt końcowy nie wymaga identyfikatora organizacji. Twój klucz już identyfikuje organizację, do której należy, a odpowiedź jest do niej ograniczona.

Wypróbuj

Zastąp wszystko w nawiasach ostrych własnymi wartościami, a zastępczy znacznik klucza kluczem ze swojego pulpitu nawigacyjnego.

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

Zalogowany? Konsola API w Twoim panelu uzupełnia rzeczywiste identyfikator organizacji oraz Twój własny klucz i wykonuje żądanie względem aktywnego API, dzięki czemu możesz zobaczyć rzeczywistą odpowiedź. Otwórz ten punkt końcowy w konsoli API

Szczegóły

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`.

Parametry

NazwaTypWymaganeCo to jest
siteId (path)UuidTakSite ID (UUIDv7).
Idempotency-Key (header)stringNieClient-generated key that makes an unsafe request replay-safe: the server stores the first response and returns it verbatim for repeats.

Odpowiedź

NazwaTypWymaganeCo to jest
site_idUuidTakUUIDv7 identifier — sortable by creation time (docs/02 §8).
targetDeployTarget | nullTakNull when no target can be derived yet.
statusDeployStatusTak`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_atobjectTakWhen the site last went live, or null if it never has. Null means nothing to show — never zero and never an epoch date.
live_urlobjectTakThe served URL once live, always https, else null. A non-HTTPS value is rejected server-side rather than returned.
repoobjectTakSource repository for the Pages targets, else null.
commitobjectTakThe deployed commit ref, else null.
messageobjectTakWhy the last deploy failed, else null. Rendered to the customer verbatim.
can_deploybooleanTakFalse while a deploy is in flight or the site cannot be deployed.

Błędy, które ten punkt końcowy może zwrócić

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