콘텐츠로 이동

createDeployment

POST
/api/v1/stations/{station_id}/deployments
curl --request POST \
--url https://dev.api.endueos.com/api/v1/stations/stn_01J9ZK3Q8M4XW7D2N5R6T0V1BC/deployments \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "name": "example", "resources": [ { "name": "example", "kind": "static_site", "bindings": {}, "secrets": {} } ] }'

A durable target independent of any workspace. Bindings can reference only this deployment’s databases.

station_id
필수
string
/^stn_[0-9A-HJKMNP-TV-Z]{26}$/
예시
stn_01J9ZK3Q8M4XW7D2N5R6T0V1BC
X-Idempotency-Key
string
/^[A-Za-z0-9._:-]{1,200}$/
Media typeapplication/json
object
name
필수
string
>= 1 characters <= 100 characters
resources
필수
Array<object>
>= 1 items <= 10 items
object
name
필수
string
/^[a-z][a-z0-9-]{0,39}$/
kind
필수
string
허용 값: static_site worker database
bindings
object
secrets

Worker only. Binding name -> secret in the same station; bound at deploy time when the secret grants this deployment use.

object

만들었다.

Media typeapplication/json
object
data
필수
object
deployment_id
필수
string
/^dep_[0-9A-HJKMNP-TV-Z]{26}$/
station_id
필수
string
/^stn_[0-9A-HJKMNP-TV-Z]{26}$/
name
필수
string
status
필수
string
허용 값: draft provisioning ready deploying failed deleting deleted
status_reason
필수
Any of:
string
active_release_id
필수
Any of:
string
/^rel_[0-9A-HJKMNP-TV-Z]{26}$/
resources
필수
Array<object>
object
resource_id
필수
string
deployment_id
필수
string
/^dep_[0-9A-HJKMNP-TV-Z]{26}$/
name
필수
string
kind
필수
string
허용 값: static_site worker database
provider
필수
string
허용 값: cloudflare
status
필수
string
허용 값: pending provisioning ready failed
bindings
필수
object
secrets
필수
object
url
필수
Any of:
string
created_at
필수
string format: date-time
updated_at
필수
string format: date-time
meta
필수
object
request_id
필수
string
timestamp
필수
string format: date-time
duration

서버 처리 시간(ms).

integer format: int32
예시
{
"data": {
"deployment_id": "dep_01J9ZK3Q8M4XW7D2N5R6T0V1BC",
"station_id": "stn_01J9ZK3Q8M4XW7D2N5R6T0V1BC",
"status": "draft",
"active_release_id": "rel_01J9ZK3Q8M4XW7D2N5R6T0V1BC",
"resources": [
{
"deployment_id": "dep_01J9ZK3Q8M4XW7D2N5R6T0V1BC",
"kind": "static_site",
"provider": "cloudflare",
"status": "pending"
}
]
}
}

요청 형식이 틀렸다 — VALIDATION_ERROR(details.errors[]) 또는 BAD_REQUEST. 본문은 오류 봉투.

인증이 없거나 무효다 — UNAUTHORIZED. 본문은 오류 봉투.

없거나 내 것이 아니다 — *_NOT_FOUND. 본문은 오류 봉투.

지금 상태와 충돌한다 — 코드는 위 설명을 본다. 본문은 오류 봉투.

한도를 넘었다 — Retry-After 초 뒤에 다시. 본문은 오류 봉투.

서버 오류 — INTERNAL_ERROR. 본문은 오류 봉투.

의존 서비스에 닿지 못했다 — 잠시 뒤 다시. 본문은 오류 봉투.