deploy.hosting.get

Show how a pooled app is served: its URLs, deployments and previews, what is served from files and what needs its server, and whether the server runs

GET /deploy/api/apps/{id}/hostingIAM deploy:DescribeAppRead

Request syntax

GET /deploy/api/apps/{id}/hosting

Path parameters

  • idRequired

    string

    Constraints: uuid

Response

200 with `data`: for an app on its own machines only { hosting: "machine" }. For a pooled app: hosting, url, memoryMb, idleSeconds, dataSavedAt and dataBytes, `host` (the pool host’s name and state, or null), `deployments` (each served one with commitSha, branch, production, status, createdAt, urls, summary and its running instance) and `requests` (request counters, or null).

A JSON response is wrapped as { "success": true, "data": … }; the CLI prints the whole body with --json.

Fields of data

  • hostingWhen present

    "machine"

    The app runs on its own machines
  • urlWhen present

    string

    The app’s production URL
  • memoryMbWhen present

    number

    Memory reserved for the server while it runs, in MB
  • idleSecondsWhen present

    number

    Seconds without a request before the server stops
  • dataSavedAtWhen present

    string, may be null

    When the data directory was last saved; null if never
  • dataBytesWhen present

    number, may be null

    Size of the last saved data, in bytes
  • hostWhen present

    object, may be null

    The shared host the app is placed on; null until placed
  • host.​nameWhen present

    string

    Name of the shared host
  • host.​stateWhen present

    one of provisioning, ready, draining, lost

    Its state
  • host.​lastReportAtWhen present

    string, may be null

    When it last reported; null if never
  • host.​siteWhen present

    boolean

    Whether it runs on your own hosts
  • deploymentsWhen present

    array of object

    Every deployment served now: production and previews
  • deployments[].​idWhen present

    string

    Deployment id
  • deployments[].​commitShaWhen present

    string, may be null

    Commit
  • deployments[].​branchWhen present

    string, may be null

    Branch it was pushed to
  • deployments[].​productionWhen present

    boolean

    Whether it is the production deployment
  • deployments[].​statusWhen present

    one of queued, building, pushing, deploying, live, failed, superseded

    live or superseded
  • deployments[].​createdAtWhen present

    string

    When it was started
  • deployments[].​urlsWhen present

    array of string

    URLs it is served at
  • deployments[].​summaryWhen present

    object, may be null

    Pooled hosting: what the bundle contains; null until read
  • deployments[].​summary.​kindWhen present

    one of static, hybrid, fallback

    static: files only; hybrid: some routes need the server; fallback: all do
  • deployments[].​summary.​nextVersionWhen present

    string, may be null

    Next.js version of the build; null if unknown
  • deployments[].​summary.​filesWhen present

    number

    Number of files served without the server
  • deployments[].​summary.​nodeRoutesWhen present

    array of object

    Routes the app’s server answers
  • deployments[].​summary.​nodeRoutes[].​pathWhen present

    string

    Route
  • deployments[].​summary.​nodeRoutes[].​reasonWhen present

    string

    Why it needs the server
  • deployments[].​instanceWhen present

    object, may be null

    Its server on the host; null if none
  • deployments[].​instance.​deploymentWhen present

    string

    Deployment it serves
  • deployments[].​instance.​appWhen present

    string

    App
  • deployments[].​instance.​runningWhen present

    boolean

    Whether the server runs now
  • deployments[].​instance.​kindWhen present

    one of restore, boot, may be null

    How it last started: restored from a snapshot or booted; null if not yet
  • deployments[].​instance.​startMsWhen present

    number, may be null

    How long the last start took, in ms
  • deployments[].​instance.​runningSecondsWhen present

    number, may be null

    Seconds it has been running; null when stopped
  • deployments[].​instance.​inflightWhen present

    number

    Requests being answered now
  • deployments[].​instance.​memoryBytesWhen present

    number, may be null

    Memory in use, in bytes; null when stopped
  • deployments[].​instance.​snapshotWhen present

    boolean

    Whether a snapshot to restore from exists
  • deployments[].​instance.​snapshotBytesWhen present

    number, may be null

    Size of the snapshot, in bytes
  • deployments[].​instance.​noteWhen present

    string, may be null

    Anything worth knowing about it; null if nothing
  • deployments[].​instance.​startsWhen present

    number

    Number of boots
  • deployments[].​instance.​restoresWhen present

    number

    Number of restores from a snapshot
  • requestsWhen present

    map, may be null

    Request counters by kind (files, server, redirects, not found, wakes); null if none

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 hosting get id

Generated from the API description, the same one the API checks requests against and the CLI is built from. MCP tool: dcloud_deploy_hosting_get.