Returns one flow's versions, newest first.
Returns one flow's versions, newest first.
GET /v1/auto/flows/{id}/versions
| Address | https://api.hanzo.ai/v1/auto/flows/{id}/versions |
| Method | GET |
| Operation | get_auto_flows_by_id_versions |
| Auth | Authorization: Bearer $HANZO_API_KEY |
Returns one flow's versions, newest first. The optional limit
query bounds the page.
Request
2 fields.
| Field | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | yes | ID is the flow whose versions to list, from the path. |
limit | query | integer | — | Limit bounds the page (default 200, maximum 1000). |
Response
| Status | Body | Meaning |
|---|---|---|
200 | versionPage | ok |
200 body — 36 fields.
| Field | In | Type | Always | Description |
|---|---|---|---|---|
data | body | FlowVersion[] | — | Data is the page of versions, newest first. |
data[].created | body | integer | — | |
data[].displayName | body | string | — | |
data[].flowId | body | string | — | |
data[].id | body | string | — | |
data[].schemaVersion | body | string | — | |
data[].state | body | string | — | |
data[].trigger | body | FlowTrigger | — | |
data[].trigger.displayName | body | string | — | |
data[].trigger.name | body | string | — | |
data[].trigger.nextAction | body | FlowAction | — | |
data[].trigger.nextAction.displayName | body | string | — | |
data[].trigger.nextAction.name | body | string | — | |
data[].trigger.nextAction.nextAction | body | FlowAction | — | |
data[].trigger.nextAction.settings | body | StepSettings | — | |
data[].trigger.nextAction.settings.actionName | body | string | — | |
data[].trigger.nextAction.settings.input | body | object | — | |
data[].trigger.nextAction.settings.input.* | body | object | — | |
data[].trigger.nextAction.settings.pieceName | body | string | — | |
data[].trigger.nextAction.settings.pieceVersion | body | string | — | |
data[].trigger.nextAction.settings.triggerName | body | string | — | |
data[].trigger.nextAction.skip | body | boolean | — | |
data[].trigger.nextAction.type | body | string | — | PIECE | CODE | ROUTER | LOOP_ON_ITEMS |
data[].trigger.nextAction.valid | body | boolean | — | |
data[].trigger.settings | body | StepSettings | — | |
data[].trigger.settings.actionName | body | string | — | |
data[].trigger.settings.input | body | object | — | |
data[].trigger.settings.input.* | body | object | — | |
data[].trigger.settings.pieceName | body | string | — | |
data[].trigger.settings.pieceVersion | body | string | — | |
data[].trigger.settings.triggerName | body | string | — | |
data[].trigger.strategy | body | string | — | |
data[].trigger.type | body | string | — | PIECE_TRIGGER | EMPTY |
data[].trigger.valid | body | boolean | — | |
data[].updated | body | integer | — | |
data[].valid | body | boolean | — |
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, AutoApi } from 'hanzoai';
const api = new AutoApi(new Configuration({ accessToken: process.env.HANZO_API_KEY }));
const { data } = await api.getAutoFlowsByIdVersions({ id: 'id' });from hanzoai.cloud import ApiClient, Configuration
from hanzoai.cloud.api import AutoApi
client = ApiClient(Configuration(access_token=os.environ["HANZO_API_KEY"]))
result = AutoApi(client).get_auto_flows_by_id_versions(id='id')cfg := cloud.NewConfiguration()
cfg.AddDefaultHeader("Authorization", "Bearer "+os.Getenv("HANZO_API_KEY"))
client := cloud.NewAPIClient(cfg)
resp, _, err := client.AutoAPI.GetAutoFlowsByIdVersions(context.Background()).Execute()
if err != nil {
return err
}use hanzo_cloud::apis::{configuration::Configuration, auto_api};
let mut cfg = Configuration::new();
cfg.bearer_access_token = std::env::var("HANZO_API_KEY").ok();
let result = auto_api::get_auto_flows_by_id_versions(&cfg, Default::default()).await?;import ai.hanzo.cloud.ApiClient;
import ai.hanzo.cloud.api.AutoApi;
ApiClient client = new ApiClient();
client.setRequestInterceptor(b -> b.header("Authorization", "Bearer " + System.getenv("HANZO_API_KEY")));
var result = new AutoApi(client).getAutoFlowsByIdVersions();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/auto/flows/<id>/versions \
-H "Authorization: Bearer $HANZO_API_KEY"The door reaches auto through the auto tool, which names its 11 operations with its own verbs — this one among them, under a name only the door 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_auto_flows"
}
}
}'How is this guide?