List diff
Answers what syncing one app would change.
GET /v1/platform/apps/{app}/diff
| Address | https://api.hanzo.ai/v1/platform/apps/{app}/diff |
| Method | GET |
| Operation | get_platform_apps_by_app_diff |
| Auth | Authorization: Bearer $HANZO_API_KEY |
Answers what syncing one app would change.
It reads the CD Application the declaration renders as: the commit CD compared the cluster against, the commit it last applied, and every object it manages with CD's verdict on each — the ones that differ from git are what a sync applies. Object-level, as CD reports it; the field-level diff stays on cd.hanzo.ai. SuperAdmin only, the same predicate CD's own RBAC applies to viewing an Application. 404 when CD holds no Application for the declaration.
Request
2 fields.
| Field | In | Type | Required | Description |
|---|---|---|---|---|
app | path | string | yes | App is the declaration's name, from the path. |
org | query | string | — | Org is the values directory the declaration lives in, defaulting to the caller's own org. |
Response
| Status | Body | Meaning |
|---|---|---|
200 | platform.cdDiff | ok |
default | problem-details | refused |
200 body — 21 fields.
| Field | In | Type | Always | Description |
|---|---|---|---|---|
application | body | string | — | Application is the CD Application the declaration renders as. |
applied | body | string | — | Applied is the universe commit CD last synced, "" before its first sync. |
compared | body | string | — | Compared is the universe commit CD compared the cluster against — the one a sync applies. |
operation | body | string | — | Operation is the phase of a sync in flight or last run, "" when none ran. |
pending | body | platform.CDResource[] | — | Pending are the objects that differ from git: what a sync would apply. |
pending[].group | body | string | — | Group is the object's API group, "" for the core group. |
pending[].health | body | string | — | Health is the object's health, "" for a kind CD holds no health for. |
pending[].kind | body | string | — | Kind is the object's kind. |
pending[].name | body | string | — | Name is the object's name. |
pending[].namespace | body | string | — | Namespace is the object's namespace, "" for a cluster-scoped one. |
pending[].prune | body | boolean | — | Prune is true for a live object git no longer declares. |
pending[].status | body | string | — | Status is CD's verdict on the object: Synced or OutOfSync. |
resources | body | platform.CDResource[] | — | Resources is every object the Application manages. |
resources[].group | body | string | — | Group is the object's API group, "" for the core group. |
resources[].health | body | string | — | Health is the object's health, "" for a kind CD holds no health for. |
resources[].kind | body | string | — | Kind is the object's kind. |
resources[].name | body | string | — | Name is the object's name. |
resources[].namespace | body | string | — | Namespace is the object's namespace, "" for a cluster-scoped one. |
resources[].prune | body | boolean | — | Prune is true for a live object git no longer declares. |
resources[].status | body | string | — | Status is CD's verdict on the object: Synced or OutOfSync. |
sync | body | string | — | Sync is CD's verdict: Synced or OutOfSync. |
Failure carries the platform error shape — see Errors.
Examples
hanzo has no subcommand for this operation — the CLI serves only what cloud's live route table confirms. Use HTTP or an SDK.
import { Configuration, PlatformApi } from 'hanzoai';
const api = new PlatformApi(new Configuration({ accessToken: process.env.HANZO_API_KEY }));
const { data } = await api.getPlatformAppsByAppDiff({ app: 'app' });from hanzoai.cloud import ApiClient, Configuration
from hanzoai.cloud.api import PlatformApi
client = ApiClient(Configuration(access_token=os.environ["HANZO_API_KEY"]))
result = PlatformApi(client).get_platform_apps_by_app_diff(app='app')cfg := hanzoai.NewConfiguration()
cfg.AddDefaultHeader("Authorization", "Bearer "+os.Getenv("HANZO_API_KEY"))
client := hanzoai.NewAPIClient(cfg)
resp, _, err := client.PlatformAPI.GetPlatformAppsByAppDiff(context.Background()).Execute()
if err != nil {
return err
}use hanzo_client::apis::{configuration::Configuration, platform_api};
let mut cfg = Configuration::new();
cfg.bearer_access_token = std::env::var("HANZO_API_KEY").ok();
let result = platform_api::get_platform_apps_by_app_diff(&cfg, Default::default()).await?;import ai.hanzo.cloud.ApiClient;
import ai.hanzo.cloud.api.PlatformApi;
ApiClient client = new ApiClient();
client.setBearerToken(System.getenv("HANZO_API_KEY"));
var result = new PlatformApi(client).getPlatformAppsByAppDiff();The method above is the one at the current release of the document. [email protected] (npm) and [email protected] (PyPI) were generated from an earlier release, where this operation carried a different id, so it spells the method differently — regenerating the clients is what makes the two agree. SDKs →
curl https://api.hanzo.ai/v1/platform/apps/<app>/diff \
-H "Authorization: Bearer $HANZO_API_KEY"MCP reaches platform through the platform tool, which names its 39 operations with its own verbs — this one among them, under a name only MCP declares. describe explains any of them:
curl -X POST https://api.hanzo.ai/v1/mcp \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "describe",
"arguments": {
"op": "list_builds"
}
}
}'How is this guide?