OpenapiSync
List returns every sync link the caller's org has, each with its two endpoints,…
List returns every sync link the caller's org has, each with its two endpoints, its direction and trigger policy, and the time it last reconciled.
GET /v1/sync
| Address | https://api.hanzo.ai/v1/sync |
| Method | GET |
| Operation | get_sync |
| Auth | Authorization: Bearer $HANZO_API_KEY |
List returns every sync link the caller's org has, each with its two endpoints, its direction and trigger policy, and the time it last reconciled. Scoped to the caller's own org — another tenant's links are structurally unreachable.
Request
GET /v1/sync takes no parameters and no body — the credential is the whole request.
Response
| Status | Body | Meaning |
|---|---|---|
200 | syncList | ok |
200 body — 16 fields.
| Field | In | Type | Always | Description |
|---|---|---|---|---|
data | body | syncView[] | — | Data is the org's syncs, each with its endpoints, policy and last-synced time. |
data[].actor | body | string | — | Actor is the identity a reconcile writes AS. |
data[].createdAt | body | string | — | CreatedAt is when the link was first declared, RFC3339 in UTC. |
data[].direction | body | string | — | Direction is which way work flows: "both", "pull" (target ← source), "push" (source → target), or "off" — which keeps the link declared and moves nothing. |
data[].id | body | string | — | ID is the link's handle, derived from its source and target — which is what makes re-declaring the same pair an update rather than a duplicate. |
data[].kind | body | string | — | Kind is what is being synced. |
data[].source | body | endpointView | — | |
data[].source.connector | body | string | — | Connector names a connected account from the org's connector registry, when the endpoint reaches its provider through one. |
data[].source.locator | body | string | — | Locator addresses the thing INSIDE that provider, in the provider's own terms — an https clone URL for a hosted forge, a bare repository name for hanzo-git. |
data[].source.provider | body | string | — | Provider is the concrete integration: "github", "gitlab" or "hanzo-git". |
data[].target | body | endpointView | — | |
data[].target.connector | body | string | — | Connector names a connected account from the org's connector registry, when the endpoint reaches its provider through one. |
data[].target.locator | body | string | — | Locator addresses the thing INSIDE that provider, in the provider's own terms — an https clone URL for a hosted forge, a bare repository name for hanzo-git. |
data[].target.provider | body | string | — | Provider is the concrete integration: "github", "gitlab" or "hanzo-git". |
data[].trigger | body | string | — | Trigger is what starts a reconcile: "webhook" (the provider tells us), "poll" (we ask on a schedule), or "manual" (only an explicit call). |
data[].updatedAt | body | string | — | UpdatedAt is bumped by every reconcile, so it reads as the LAST-SYNCED time rather than the last edit. |
Failure carries the platform error shape — see Errors.
Examples
hanzo sync listimport { Configuration, SyncApi } from 'hanzoai';
const api = new SyncApi(new Configuration({ accessToken: process.env.HANZO_API_KEY }));
const { data } = await api.getSync();from hanzoai.cloud import ApiClient, Configuration
from hanzoai.cloud.api import SyncApi
client = ApiClient(Configuration(access_token=os.environ["HANZO_API_KEY"]))
result = SyncApi(client).get_sync()cfg := cloud.NewConfiguration()
cfg.AddDefaultHeader("Authorization", "Bearer "+os.Getenv("HANZO_API_KEY"))
client := cloud.NewAPIClient(cfg)
resp, _, err := client.SyncAPI.GetSync(context.Background()).Execute()
if err != nil {
return err
}use hanzo_cloud::apis::{configuration::Configuration, sync_api};
let mut cfg = Configuration::new();
cfg.bearer_access_token = std::env::var("HANZO_API_KEY").ok();
let result = sync_api::get_sync(&cfg, Default::default()).await?;import ai.hanzo.cloud.ApiClient;
import ai.hanzo.cloud.api.SyncApi;
ApiClient client = new ApiClient();
client.setRequestInterceptor(b -> b.header("Authorization", "Bearer " + System.getenv("HANZO_API_KEY")));
var result = new SyncApi(client).getSync();curl https://api.hanzo.ai/v1/sync \
-H "Authorization: Bearer $HANZO_API_KEY"Tool sync, op get_sync — POST the JSON-RPC envelope to https://api.hanzo.ai/v1/mcp.
curl -X POST https://api.hanzo.ai/v1/mcp \
-H "Authorization: Bearer $HANZO_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "sync",
"arguments": {
"op": "get_sync",
"input": {}
}
}
}'How is this guide?