15 KiB
\FlowAPI
All URIs are relative to https://api.hanzo.ai
| Method | HTTP request | Description |
|---|---|---|
| DeleteFlowWorkflowsByWorkflow | Delete /v1/flow/workflows/{workflow} | Deletes one of the caller's workflows and its runs. |
| GetFlowRuns | Get /v1/flow/runs | Reads one workflow's recorded runs: every component build with its result, keyed by component. |
| GetFlowStatus | Get /v1/flow/status | Reports whether the flow service is reachable and which version it runs. |
| GetFlowWorkflows | Get /v1/flow/workflows | Lists the caller's workflows, paged. |
| GetFlowWorkflowsByWorkflow | Get /v1/flow/workflows/{workflow} | Reads one of the caller's workflows — the full record, graph included. |
| PatchFlowWorkflowsByWorkflow | Patch /v1/flow/workflows/{workflow} | Patches one of the caller's workflows: name, description, graph, or the locked flag — only the stated fields move. |
| PostFlowRuns | Post /v1/flow/runs | Executes one of the caller's workflows synchronously: the graph runs in the flow service and the response carries the run's session and outputs. |
| PostFlowWorkflows | Post /v1/flow/workflows | Creates a workflow in the caller's org. |
DeleteFlowWorkflowsByWorkflow
interface{} DeleteFlowWorkflowsByWorkflow(ctx, workflow).Execute()
Deletes one of the caller's workflows and its runs.
Example
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/hanzoai/go-sdk/v8"
)
func main() {
workflow := "workflow_example" // string | Workflow is the workflow's UUID, taken from the path.
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.FlowAPI.DeleteFlowWorkflowsByWorkflow(context.Background(), workflow).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `FlowAPI.DeleteFlowWorkflowsByWorkflow``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `DeleteFlowWorkflowsByWorkflow`: interface{}
fmt.Fprintf(os.Stdout, "Response from `FlowAPI.DeleteFlowWorkflowsByWorkflow`: %v\n", resp)
}
Path Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| workflow | string | Workflow is the workflow's UUID, taken from the path. |
Other Parameters
Other parameters are passed through a pointer to a apiDeleteFlowWorkflowsByWorkflowRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
Return type
interface{}
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: application/json, application/problem+json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
GetFlowRuns
interface{} GetFlowRuns(ctx).Workflow(workflow).Execute()
Reads one workflow's recorded runs: every component build with its result, keyed by component.
Example
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/hanzoai/go-sdk/v8"
)
func main() {
workflow := "workflow_example" // string | Workflow is the UUID of the workflow whose run records to read. It rides the query string. (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.FlowAPI.GetFlowRuns(context.Background()).Workflow(workflow).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `FlowAPI.GetFlowRuns``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetFlowRuns`: interface{}
fmt.Fprintf(os.Stdout, "Response from `FlowAPI.GetFlowRuns`: %v\n", resp)
}
Path Parameters
Other Parameters
Other parameters are passed through a pointer to a apiGetFlowRunsRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|---|---|---|
| workflow | string | Workflow is the UUID of the workflow whose run records to read. It rides the query string. |
Return type
interface{}
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: application/json, application/problem+json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
GetFlowStatus
FlowFlowStatus GetFlowStatus(ctx).Execute()
Reports whether the flow service is reachable and which version it runs.
Example
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/hanzoai/go-sdk/v8"
)
func main() {
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.FlowAPI.GetFlowStatus(context.Background()).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `FlowAPI.GetFlowStatus``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetFlowStatus`: FlowFlowStatus
fmt.Fprintf(os.Stdout, "Response from `FlowAPI.GetFlowStatus`: %v\n", resp)
}
Path Parameters
This endpoint does not need any parameter.
Other Parameters
Other parameters are passed through a pointer to a apiGetFlowStatusRequest struct via the builder pattern
Return type
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: application/json, application/problem+json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
GetFlowWorkflows
interface{} GetFlowWorkflows(ctx).Page(page).Size(size).Execute()
Lists the caller's workflows, paged.
Example
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/hanzoai/go-sdk/v8"
)
func main() {
page := "page_example" // string | Page is the 1-based page of workflows to return. (optional)
size := "size_example" // string | Size is how many workflows one page holds (the product caps it at 100). (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.FlowAPI.GetFlowWorkflows(context.Background()).Page(page).Size(size).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `FlowAPI.GetFlowWorkflows``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetFlowWorkflows`: interface{}
fmt.Fprintf(os.Stdout, "Response from `FlowAPI.GetFlowWorkflows`: %v\n", resp)
}
Path Parameters
Other Parameters
Other parameters are passed through a pointer to a apiGetFlowWorkflowsRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|---|---|---|
| page | string | Page is the 1-based page of workflows to return. | |
| size | string | Size is how many workflows one page holds (the product caps it at 100). |
Return type
interface{}
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: application/json, application/problem+json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
GetFlowWorkflowsByWorkflow
interface{} GetFlowWorkflowsByWorkflow(ctx, workflow).Execute()
Reads one of the caller's workflows — the full record, graph included.
Example
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/hanzoai/go-sdk/v8"
)
func main() {
workflow := "workflow_example" // string | Workflow is the workflow's UUID, taken from the path.
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.FlowAPI.GetFlowWorkflowsByWorkflow(context.Background(), workflow).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `FlowAPI.GetFlowWorkflowsByWorkflow``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetFlowWorkflowsByWorkflow`: interface{}
fmt.Fprintf(os.Stdout, "Response from `FlowAPI.GetFlowWorkflowsByWorkflow`: %v\n", resp)
}
Path Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| workflow | string | Workflow is the workflow's UUID, taken from the path. |
Other Parameters
Other parameters are passed through a pointer to a apiGetFlowWorkflowsByWorkflowRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
Return type
interface{}
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: application/json, application/problem+json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
PatchFlowWorkflowsByWorkflow
interface{} PatchFlowWorkflowsByWorkflow(ctx, workflow).FlowFlowUpdate(flowFlowUpdate).Execute()
Patches one of the caller's workflows: name, description, graph, or the locked flag — only the stated fields move.
Example
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/hanzoai/go-sdk/v8"
)
func main() {
workflow := "workflow_example" // string | Workflow is the workflow's UUID, taken from the path.
flowFlowUpdate := *openapiclient.NewFlowFlowUpdate() // FlowFlowUpdate |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.FlowAPI.PatchFlowWorkflowsByWorkflow(context.Background(), workflow).FlowFlowUpdate(flowFlowUpdate).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `FlowAPI.PatchFlowWorkflowsByWorkflow``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `PatchFlowWorkflowsByWorkflow`: interface{}
fmt.Fprintf(os.Stdout, "Response from `FlowAPI.PatchFlowWorkflowsByWorkflow`: %v\n", resp)
}
Path Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| workflow | string | Workflow is the workflow's UUID, taken from the path. |
Other Parameters
Other parameters are passed through a pointer to a apiPatchFlowWorkflowsByWorkflowRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
flowFlowUpdate | FlowFlowUpdate | |
Return type
interface{}
Authorization
HTTP request headers
- Content-Type: application/json
- Accept: application/json, application/problem+json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
PostFlowRuns
interface{} PostFlowRuns(ctx).FlowFlowRun(flowFlowRun).Execute()
Executes one of the caller's workflows synchronously: the graph runs in the flow service and the response carries the run's session and outputs.
Example
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/hanzoai/go-sdk/v8"
)
func main() {
flowFlowRun := *openapiclient.NewFlowFlowRun() // FlowFlowRun |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.FlowAPI.PostFlowRuns(context.Background()).FlowFlowRun(flowFlowRun).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `FlowAPI.PostFlowRuns``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `PostFlowRuns`: interface{}
fmt.Fprintf(os.Stdout, "Response from `FlowAPI.PostFlowRuns`: %v\n", resp)
}
Path Parameters
Other Parameters
Other parameters are passed through a pointer to a apiPostFlowRunsRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|---|---|---|
| flowFlowRun | FlowFlowRun |
Return type
interface{}
Authorization
HTTP request headers
- Content-Type: application/json
- Accept: application/json, application/problem+json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
PostFlowWorkflows
interface{} PostFlowWorkflows(ctx).FlowFlowCreate(flowFlowCreate).Execute()
Creates a workflow in the caller's org.
Example
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/hanzoai/go-sdk/v8"
)
func main() {
flowFlowCreate := *openapiclient.NewFlowFlowCreate() // FlowFlowCreate |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.FlowAPI.PostFlowWorkflows(context.Background()).FlowFlowCreate(flowFlowCreate).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `FlowAPI.PostFlowWorkflows``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `PostFlowWorkflows`: interface{}
fmt.Fprintf(os.Stdout, "Response from `FlowAPI.PostFlowWorkflows`: %v\n", resp)
}
Path Parameters
Other Parameters
Other parameters are passed through a pointer to a apiPostFlowWorkflowsRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|---|---|---|
| flowFlowCreate | FlowFlowCreate |
Return type
interface{}
Authorization
HTTP request headers
- Content-Type: application/json
- Accept: application/json, application/problem+json
[Back to top] [Back to API list] [Back to Model list] [Back to README]