deploy.previews.listList an app's preview settings and open previews, with what they cost
Request syntax
GET /deploy/api/apps/{id}/previewsPath parameters
idRequiredstring
Constraints: uuid
Response
200 with `data`: settings (null when not set up), the repository, the open previews (URL, branch, pull request, status, machine, €/h, cost so far, idle deletion time, newest deployment, database branch) and their totals. 409 for a preview itself.
A JSON response is wrapped as { "success": true, "data": … }; the CLI prints the whole body with --json.
Fields of data
settingsAlwaysobject, may be null
null: previews are not set upsettings.enabledAlwaysboolean
Whether pull requests (or branches) get preview environmentssettings.triggerWhen presentone of pull_request, branch
pull_request: a preview per open pull request into the app’s branch; branch: one per pushed branchsettings.envOverridesWhen presentmap
Plain variables set in every preview on top of the app’s (a key here wins)settings.sharedSecretKeysWhen presentarray of string
Secret-bound variables of the app that previews get too; every other secret is withheld (plain values are copied)settings.databaseBranchWhen presentboolean
Give each preview a Postgres branch of the app’s bound database; off: previews get no database bindingsettings.idleDaysWhen presentnumber
Delete a preview this many days after the last push to its branch, unless keptsettings.maxPreviewsWhen presentnumber
At most this many previews at once; the next one is refused with a commit statussettings.instanceTypeWhen presentstring, may be null
Machine type of a preview; null: the smallest the region offersrepositoryAlwaysobject, may be null
The repository the app builds from; previews need onerepository.idAlwaysstring
The repositoryrepository.nameAlwaysstring
Its namepreviewsAlwaysarray of object
Open previews, oldest firstpreviews[].idAlwaysstring
The preview’s own app idpreviews[].nameAlwaysstring
Its name: the app’s, with the pull request or branchpreviews[].branchAlwaysstring
The branch it deployspreviews[].prNumberAlwaysnumber, may be null
Its pull request; null for a branch previewpreviews[].urlAlwaysstring
Where it answerspreviews[].statusAlwaysstring
The app status: created, deploying, active, failed, deletingpreviews[].instanceTypeAlwaysstring
Its machine typepreviews[].eurPerHourAlwaysnumber, may be null
What its machine costs per hour, netpreviews[].costSoFarAlwaysnumber, may be null
Started hours since it was created × the hourly pricepreviews[].createdAtAlwaysstring
When it was createdpreviews[].lastPushAtAlwaysstring, may be null
The last push to its branchpreviews[].keepAlwaysboolean
Kept: never deleted for being idlepreviews[].idleDeleteAtAlwaysstring, may be null
When it is deleted if nobody pushes before; null when kept or previews are offpreviews[].lastDeploymentAlwaysobject, may be null
Its newest deploymentpreviews[].lastDeployment.idAlwaysstring
The deploymentpreviews[].lastDeployment.statusAlwaysstring
Its statuspreviews[].lastDeployment.commitAlwaysstring, may be null
The commit it deployspreviews[].databaseAlwaysstring, may be null
The database branch it is bound to, in words; null: nonetotalsAlwaysobject
What the open previews costtotals.eurPerHourAlwaysnumber
All open previews, per hourtotals.costSoFarAlwaysnumber
All open previews, since each was created
Checked against the handlers: every route test validates their answers against this schema.
Errors
- 400The request does not pass the schema above. The body is { "error": …, "issues": […] }, one issue per field.
- 401No credentials, or an access key that is unknown, revoked or expired.
- 403The caller's policies do not allow deploy:DescribeApp on this resource. The body names the action and the resource, and the refusal is recorded in the audit log.
- 404The resource does not exist in your organization.
Examples
The required parameters only, with example values. Replace id and the other placeholders with your own.
dcloud deploy previews list idcurl -X GET "https://console.platform.deutschecloud.app/deploy/api/apps/id/previews" \
-H "Authorization: EWS-ACCESS-KEY $ACCESS_KEY"import { DcloudClient } from '@dcloud/sdk';
const client = new DcloudClient();
const result = await client.deploy.previews.list({ id: "id" });from dcloud import Client
client = Client()
result = client.deploy.previews.list(id="id")Generated from the API description, the same one the API checks requests against and the CLI is built from. MCP tool: dcloud_deploy_previews_list.