deploy.apps.live-diff

Compare what one machine runs with what it was asked to run

GET /deploy/api/apps/{id}/resources/diffIAM deploy:DescribeAppRead

state is match, differs or unknown (the machine has not sent a summary yet). Containers, images, states, published ports, routes and the health check are compared; environment keys only for a caller with deploy:ManageEnv, by keyed hash. Values never leave the machine.

Request syntax

GET /deploy/api/apps/{id}/resources/diff

Path parameters

  • idRequired

    string

    Constraints: uuid

Query parameters

  • instanceRequired

    string

    The machine to compare, by its id as the resources tree names it (i-…)

    Constraints: /^i-[a-z0-9]{1,40}$/

Response

200 with `data`: `state`, `reason`, `items` (each difference: scope, message, severity differs, missing or extra), `checkedAt` (when the machine took its summary, null for unknown) and, except for unknown, `envCompared`. 404 when the machine is not one of the app’s.

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

Fields of data

  • stateWhen present

    "unknown"

    The machine has not sent a summary yet
  • reasonWhen present

    string

    Why, in one sentence
  • itemsWhen present

    array of object

    Always empty
  • items[].​scopeWhen present

    string

    Where: a container name, routes, health check
  • items[].​messageWhen present

    string

    The difference, in one sentence
  • items[].​severityWhen present

    one of differs, missing, extra

    differs, missing or extra
  • checkedAtWhen present

    null

    Always null
  • envComparedWhen present

    boolean

    Whether environment keys were compared (only with deploy:ManageEnv)

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 apps live-diff id --instance example

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