Skip to content

deployment_static_upload_create

Start a static-site upload: mint a signed PUT URL (valid 15 min) for a site archive and reserve the deployment it will become.

Tool

deployment_static_upload_create

Start a static-site upload: mint a signed PUT URL (valid 15 min) for a site archive and reserve the deployment it will become.

Start a static-site upload: mint a signed PUT URL (valid 15 min) for a site archive and reserve the deployment it will become. Only for a static service. If the upload fails or you abandon it, call deployment_deployment_cancel with this deployId — the service cannot deploy again until you do. Publish a pre-built static site (no git repo): 1) deployment_service_create with source: { type: 'static' } (no repo) — once per site; 2) deployment_static_upload_create with the serviceId and format ('tgz' default, or 'zip') — returns uploadUrl, deployId, contentType, expiresAt; 3) within 15 min, curl -X PUT -H 'Content-Type: <contentType>' --upload-file <file> '<uploadUrl>' (the header must be exactly contentType or the PUT is refused); 4) deployment_static_deploy with serviceId and deployId; 5) poll deployment_deployment_get with the deployId until status is Active (or Failed — read lastErrorMessage). The archive root is published as-is; if it has no index.html and holds only one directory (e.g. dist/, macOS __MACOSX/ and .DS_Store ignored), that directory is published instead. Each upload deploys once; for a new version start again from step 2.

Behavior

HTTP
POST /deployment/services/:serviceId/static/uploads

Arguments

Name
Type
Required
Description
format
string
—
Archive format of the file you will PUT: 'tgz' (gzipped tarball, the default) or 'zip'.
serviceId
string
•
No description in the catalog.

Response

Field
Type
Always
Description
object
string
•
gs:// URL the archive lands at.
deployId
string
•
Pass to deployment_static_deploy once the PUT succeeded.
expiresAt
string
•
When uploadUrl stops accepting the PUT (ISO 8601).
uploadUrl
string
•
Signed URL; PUT the archive here.
contentType
string
•
The Content-Type header the PUT must send; the URL is signed for exactly this value.

Try it

Start a static-site upload: mint a signed PUT URL (valid 15 min) for a site archive and reserve the deployment it will become.

When to use

Start a static-site upload: mint a signed PUT URL (valid 15 min) for a site archive and reserve the deployment it will become. Only for a static service. If the upload fails or you abandon it, call deployment_deployment_cancel with this deployId — the service cannot deploy again until you do. Publish a pre-built static site (no git repo): 1) deployment_service_create with source: { type: 'static' } (no repo) — once per site; 2) deployment_static_upload_create with the serviceId and format ('tgz' default, or 'zip') — returns uploadUrl, deployId, contentType, expiresAt; 3) within 15 min, curl -X PUT -H 'Content-Type: <contentType>' --upload-file <file> '<uploadUrl>' (the header must be exactly contentType or the PUT is refused); 4) deployment_static_deploy with serviceId and deployId; 5) poll deployment_deployment_get with the deployId until status is Active (or Failed — read lastErrorMessage). The archive root is published as-is; if it has no index.html and holds only one directory (e.g. dist/, macOS __MACOSX/ and .DS_Store ignored), that directory is published instead. Each upload deploys once; for a new version start again from step 2.

Example

Ask your agent something like this:

Start a static-site upload: mint a signed PUT URL (valid 15 min) for a site archive and reserve the deployment it will become.

The agent will invoke deployment_static_upload_create with these arguments:

{
  "serviceId": "<serviceId>"
}

Esc

Start typing to search the docs.

↑↓navigate↵select