hosting

POST /v1/sites/{siteId}/deploy

Deploy or redeploy a site.

Bütün hosting nöqtələri

Doğrulama

API açarını bearer token kimi göndərin. Açar hosting.deploy.manage icazəsinə malik olmalıdır; bu icazəsi olmayan açar 404 deyil, 403 xətası ilə rədd edilir.

Bu endpoint heç bir təşkilat ID-si tələb etmir. Sizin açarınız artıq aid olduğu təşkilatı müəyyən edir və cavab həmin təşkilat üçün məhdudlaşdırılır.

Sınaqdan keçir

Bucaqlı mötərizələrdə olan hór şeyi öz qiymətlərinizlə, açar yertutucusunu isə idarə panelinizdən bir açarla əvəz edin.

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

Sistemə daxil olmusunuz? İdarə panelinizdəki API konsolu real təşkilatınızın identifikatorunu və öz açarınızı avtomatik doldurur, sorğunu canlı API-yə qarşı icra edir ki, siz faktiki cavabı görə biləsiniz. Bu son nöqtəni API konsolunda açın

Təfərrüatlar

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

Parametrlər

AdTipTələb olunurNədir
siteId (path)UuidBəliSite ID (UUIDv7).
Idempotency-Key (header)stringXeyrClient-generated key that makes an unsafe request replay-safe: the server stores the first response and returns it verbatim for repeats.

Cavab

AdTipTələb olunurNədir
site_idUuidBəliUUIDv7 identifier — sortable by creation time (docs/02 §8).
targetDeployTarget | nullBəliNull when no target can be derived yet.
statusDeployStatusBəli`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_atobjectBəliWhen the site last went live, or null if it never has. Null means nothing to show — never zero and never an epoch date.
live_urlobjectBəliThe served URL once live, always https, else null. A non-HTTPS value is rejected server-side rather than returned.
repoobjectBəliSource repository for the Pages targets, else null.
commitobjectBəliThe deployed commit ref, else null.
messageobjectBəliWhy the last deploy failed, else null. Rendered to the customer verbatim.
can_deploybooleanBəliFalse while a deploy is in flight or the site cannot be deployed.

Bu son nöqtənin qaytara biləcəyi xətalar

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