StaticSiteDeployment
Operations
Every route this entity exposes. Each route links to its own reference on this page.
| Method | Route | SDK operation | Returns |
|---|---|---|---|
POST |
/api/v1/static_sites/{static_site_id}/deployments/{id}/activate |
create |
Activated static site deployment |
POST |
/api/v1/static_sites/{static_site_id}/deployments/{id}/cancel |
create |
Success |
POST |
/api/v1/static_sites/{static_site_id}/deployments/{id}/finalize |
create |
Success |
POST |
/api/v1/static_sites/{static_site_id}/deployments |
create |
Success |
GET |
/api/v1/static_sites/{static_site_id}/deployments |
list |
Recent static site deployments |
GET |
/api/v1/static_sites/{static_site_id}/deployments/{id} |
load |
Success |
Examples
One example per SDK, generated from the API model. The argument names are the parameters and fields of this entity, and the values are placeholders. The examples are not compiled or executed.
Golang
Construct client as shown in the Golang setup, then call the operations:
static_site_deployments, err := client.StaticSiteDeployment(nil).List(map[string]any{"static_site_id": "example"}, nil)
if err != nil {
panic(err)
}
fmt.Println(static_site_deployments)
static_site_deployment, err := client.StaticSiteDeployment(nil).Load(map[string]any{"id": "example_id", "static_site_id": "example"}, nil)
if err != nil {
panic(err)
}
fmt.Println(static_site_deployment)
created, err := client.StaticSiteDeployment(nil).Create(map[string]any{"static_site_id": "example"}, nil)
if err != nil {
panic(err)
}
fmt.Println(created)
Lua
Construct client as shown in the Lua setup, then call the operations:
local static_site_deployments, err = client:StaticSiteDeployment():list({ static_site_id = "example" })
local static_site_deployment, err = client:StaticSiteDeployment():load({ id = "example_id", static_site_id = "example" })
local created, err = client:StaticSiteDeployment():create({ static_site_id = "example" })
PHP
Construct client as shown in the PHP setup, then call the operations:
$static_site_deployments = $client->StaticSiteDeployment()->list(["static_site_id" => "example"]);
$static_site_deployment = $client->StaticSiteDeployment()->load(["id" => "example_id", "static_site_id" => "example"]);
$created = $client->StaticSiteDeployment()->create(["static_site_id" => "example"]);
Python
Construct client as shown in the Python setup, then call the operations:
static_site_deployments = client.StaticSiteDeployment().list({"static_site_id": "example"})
static_site_deployment = client.StaticSiteDeployment().load({"id": "example_id", "static_site_id": "example"})
created = client.StaticSiteDeployment().create({ "static_site_id": "example" })
Ruby
Construct client as shown in the Ruby setup, then call the operations:
static_site_deployments = client.StaticSiteDeployment.list({ "static_site_id" => "example" })
static_site_deployment = client.StaticSiteDeployment.load({ "id" => "example_id", "static_site_id" => "example" })
created = client.StaticSiteDeployment.create({ "static_site_id" => "example" })
TypeScript
Construct client as shown in the TypeScript setup, then call the operations:
const static_site_deployments = await client.StaticSiteDeployment().list({ static_site_id: "example" })
const static_site_deployment = await client.StaticSiteDeployment().load({ id: "example_id", static_site_id: "example" })
const created = await client.StaticSiteDeployment().create({ static_site_id: "example" })
Fields
| Field | Type | Required | Description |
|---|---|---|---|
activated_at |
one,string,null |
Yes | Activated At |
activated_at_label |
one,string,null |
Yes | Activated At Label |
commit_sha |
one,string,null |
Yes | Commit Sha |
created_at |
string |
Yes | Created At |
created_at_label |
one,string,null |
Yes | Created At Label |
creator_user_id |
one,string,null |
Yes | Creator User Id |
deploy_slug |
string |
Yes | Deploy Slug |
failure_message |
one,string,null |
Yes | Failure Message |
file_count |
integer |
Yes | File Count |
file_count_label |
string |
Yes | File Count Label |
finished_at |
one,string,null |
Yes | Finished At |
finished_at_label |
one,string,null |
Yes | Finished At Label |
id |
string |
Yes | Id |
is_active |
boolean |
Yes | Is Active |
source_ref |
one,string,null |
Yes | Source Ref |
started_at |
one,string,null |
Yes | Started At |
started_at_label |
one,string,null |
Yes | Started At Label |
static_site_id |
string |
Yes | Static Site Id |
status |
string |
Yes | Status |
total_bytes |
integer |
Yes | Total Bytes |
total_bytes_label |
string |
Yes | Total Bytes Label |
trigger_kind |
string |
Yes | Trigger Kind |
updated_at |
string |
Yes | Updated At |
updated_at_label |
one,string,null |
Yes | Updated At Label |
uploaded_at |
one,string,null |
Yes | Uploaded At |
uploaded_at_label |
one,string,null |
Yes | Uploaded At Label |
create
POST /api/v1/static_sites/{static_site_id}/deployments/{id}/activate
Operation ID: activate_api_v1_static_site_deployment.
Authentication: bearer token (bearerAuth).
Parameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
static_site_id |
path |
string |
Yes | |
id |
path |
string |
Yes |
Request body
application/json
The request body is object.
Responses
200: Activated static site deployment
application/json
| Property | Type | Required | Description |
|---|---|---|---|
deployment |
object |
Yes | |
deployment.activated_at |
string (date-time) |
Yes | |
deployment.activated_at_label |
string |
Yes | |
deployment.commit_sha |
string |
Yes | |
deployment.created_at |
string (date-time) |
Yes | |
deployment.created_at_label |
string |
Yes | |
deployment.creator_user_id |
string |
Yes | |
deployment.deploy_slug |
string |
Yes | |
deployment.failure_message |
string |
Yes | |
deployment.file_count |
integer |
Yes | |
deployment.file_count_label |
string |
Yes | |
deployment.finished_at |
string (date-time) |
Yes | |
deployment.finished_at_label |
string |
Yes | |
deployment.id |
string |
Yes | |
deployment.is_active |
boolean |
Yes | |
deployment.source_ref |
string |
Yes | |
deployment.started_at |
string (date-time) |
Yes | |
deployment.started_at_label |
string |
Yes | |
deployment.static_site_id |
string |
Yes | |
deployment.status |
enum: pending, uploading, uploaded, activating, active, failed, ... |
Yes | |
deployment.total_bytes |
integer |
Yes | |
deployment.total_bytes_label |
string |
Yes | |
deployment.trigger_kind |
enum: cli, api, dashboard, ci |
Yes | |
deployment.updated_at |
string (date-time) |
Yes | |
deployment.updated_at_label |
string |
Yes | |
deployment.uploaded_at |
string (date-time) |
Yes | |
deployment.uploaded_at_label |
string |
Yes |
401: Unauthorized
403: Forbidden
404: Not found
422: Static site request failed validation
application/json
| Property | Type | Required | Description |
|---|---|---|---|
details |
array of string |
No | |
error |
string |
Yes | |
failure_message |
string |
No | |
status |
string |
No |
502: CDN provider activation failed
application/json
The response is object and object.
POST /api/v1/static_sites/{static_site_id}/deployments/{id}/cancel
Operation ID: cancel_api_v1_static_site_deployment.
Authentication: bearer token (bearerAuth).
Parameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
static_site_id |
path |
string |
Yes | |
id |
path |
string |
Yes |
Request body
application/json
The request body is object.
Responses
200: Success
application/json
The response is object.
401: Unauthorized
403: Forbidden
404: Not found
422: Unprocessable entity
502: Bad gateway
POST /api/v1/static_sites/{static_site_id}/deployments/{id}/finalize
Operation ID: finalize_api_v1_static_site_deployment.
Authentication: bearer token (bearerAuth).
Parameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
static_site_id |
path |
string |
Yes | |
id |
path |
string |
Yes |
Request body
application/json
The request body is object.
Responses
200: Success
application/json
The response is object.
401: Unauthorized
403: Forbidden
404: Not found
422: Unprocessable entity
502: Bad gateway
POST /api/v1/static_sites/{static_site_id}/deployments
Operation ID: post_api_v1_static_sites_static_site_id_deployments.
Authentication: bearer token (bearerAuth).
Parameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
static_site_id |
path |
string |
Yes |
Request body
application/json
The request body is object.
Responses
200: Success
application/json
The response is object.
401: Unauthorized
403: Forbidden
404: Not found
422: Unprocessable entity
502: Bad gateway
list
GET /api/v1/static_sites/{static_site_id}/deployments
Operation ID: api_v1_static_site_deployments.
Authentication: bearer token (bearerAuth).
Parameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
static_site_id |
path |
string |
Yes |
Responses
200: Recent static site deployments
application/json
| Property | Type | Required | Description |
|---|---|---|---|
deployments |
array of object |
Yes | |
deployments[].activated_at |
string (date-time) |
Yes | |
deployments[].activated_at_label |
string |
Yes | |
deployments[].commit_sha |
string |
Yes | |
deployments[].created_at |
string (date-time) |
Yes | |
deployments[].created_at_label |
string |
Yes | |
deployments[].creator_user_id |
string |
Yes | |
deployments[].deploy_slug |
string |
Yes | |
deployments[].failure_message |
string |
Yes | |
deployments[].file_count |
integer |
Yes | |
deployments[].file_count_label |
string |
Yes | |
deployments[].finished_at |
string (date-time) |
Yes | |
deployments[].finished_at_label |
string |
Yes | |
deployments[].id |
string |
Yes | |
deployments[].is_active |
boolean |
Yes | |
deployments[].source_ref |
string |
Yes | |
deployments[].started_at |
string (date-time) |
Yes | |
deployments[].started_at_label |
string |
Yes | |
deployments[].static_site_id |
string |
Yes | |
deployments[].status |
enum: pending, uploading, uploaded, activating, active, failed, ... |
Yes | |
deployments[].total_bytes |
integer |
Yes | |
deployments[].total_bytes_label |
string |
Yes | |
deployments[].trigger_kind |
enum: cli, api, dashboard, ci |
Yes | |
deployments[].updated_at |
string (date-time) |
Yes | |
deployments[].updated_at_label |
string |
Yes | |
deployments[].uploaded_at |
string (date-time) |
Yes | |
deployments[].uploaded_at_label |
string |
Yes |
401: Unauthorized
403: Forbidden
404: Not found
422: Unprocessable entity
502: Bad gateway
load
GET /api/v1/static_sites/{static_site_id}/deployments/{id}
Operation ID: api_v1_static_site_deployment.
Authentication: bearer token (bearerAuth).
Parameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
static_site_id |
path |
string |
Yes | |
id |
path |
string |
Yes |
Responses
200: Success
application/json
The response is object.