Skip to main content

Depoyments

A deployment is a container for assets, environment variables, compiler options, and other data related to a deployed serverless application.

Get deployment details

GET/v1/deployments/{deploymentId}
Get details for a deployment with the given ID. This endpoint can be polled to track the results of a serverless app deployment.
Parameters
NameTypeDescription
deploymentId (required)undefined

Deployment ID

Responses
Response Type

application/json

Response Properties
NameTypeDescription
idundefined
projectIdstring (uuid)
statusundefined
domainsarray
databasesobject

The KV databases that this deployment has access to. Currently, only "default" database is supported.

createdAtstring (date-time)
updatedAtstring (date-time)

Get deployment build logs

GET/v1/deployments/{deploymentId}/build_logs
Get build logs for the deployment specified by ID. You can use this information to check on the current status of a build, or to figure out what went wrong in the case of a failure.

The response format can be controlled by the Accept header. If application/x-ndjson is specified, the response will be a stream of newline-delimited JSON objects. Otherwise it will be a JSON array of objects.
Parameters
NameTypeDescription
deploymentId (required)string

Deployment ID

Responses
Response Type

application/json

Response Properties
NameTypeDescription
levelstring
messagestring

Get deployment app logs

GET/v1/deployments/{deploymentId}/app_logs
Get execution logs of a deployment. This API can return either past logs or real-time logs depending on the presence of the since and until query parameters. If at least one of them is provided, past logs are returned. Otherwise real-time logs are returned.

Also, the response format can be controlled by the Accept  header. If application/x-ndjson is specified, the response will be a stream of newline-delimited JSON objects. Otherwise, it will be a JSON array of objects.
Parameters
NameTypeDescription
qstring

Text to search for in log message.

levelundefined

Log level(s) to filter logs by.

Defaults to all levels (i.e. no filter applied).

Multiple levels can be specified using comma-separated format.

regionundefined

Region(s) to filter logs by.

Defaults to all regions (i.e. no filter applied).

Multiple regions can be specified using comma-separated format.

sincestring (date-time)

Start time of the time range to filter logs by.

Defaults to the Unix Epoch (though the log retention period is 2 weeks as of now).

If neither since nor until is specified, real-time logs are returned.

untilstring (date-time)

End time of the time range to filter logs by.

Defaults to the current time.

If neither since nor until is specified, real-time logs are returned.

limitinteger

Maximum number of logs to return in one request.

This is only effective for the past log mode.

orderundefined

Order of logs to return.

cursorstring

Opaque value that represents the cursor of the last log returned in the previous request.

This is only effective for the past log mode.

deploymentId (required)string

Deployment ID

Responses
Response Type

application/json

Response Properties
NameTypeDescription
timestring (date-time)

Log timestamp

levelundefined
messagestring
regionundefined