Coroutine-native client covering the full Hanzo /v1 cloud surface, for JVM and Android. Generated with openapi-generator kotlin (library=jvm-okhttp4, useCoroutines=true). Coordinate: ai.hanzo:sdk. Base URL: https://api.hanzo.ai. Co-authored-by: Hanzo Dev <[email protected]>
18 KiB
PiecesApi
All URIs are relative to https://api.hanzo.ai
| Method | HTTP request | Description |
|---|---|---|
| autoGetPiece | GET /v1/auto/pieces/{name} | Get piece metadata by name |
| autoGetPieceOptions | POST /v1/auto/pieces/options | Get dynamic property options for a piece action/trigger |
| autoListPieceCategories | GET /v1/auto/pieces/categories | List piece categories |
| autoListPieceVersions | GET /v1/auto/pieces/versions | List available versions of a piece |
| autoListPieces | GET /v1/auto/pieces | List available pieces |
| automationsListPieces | GET /v1/automations/pieces | List the connector/piece catalogue |
| flowGetPiece | GET /v1/flow/pieces/{name} | Get piece metadata by name |
| flowGetPieceOptions | POST /v1/flow/pieces/options | Get dynamic property options for a piece action/trigger |
| flowGetPieceRegistry | GET /v1/flow/pieces/registry | Get piece registry metadata |
| flowGetScopedPiece | GET /v1/flow/pieces/{scope}/{name} | Get scoped piece metadata |
| flowListPieceCategories | GET /v1/flow/pieces/categories | List piece categories |
| flowListPieceVersions | GET /v1/flow/pieces/versions | List available versions of a piece |
| flowListPieces | GET /v1/flow/pieces | List available pieces |
| flowSyncPieces | POST /v1/flow/pieces/sync | Sync piece metadata from registry |
autoGetPiece
AutoPiece autoGetPiece(name, version)
Get piece metadata by name
Example
// Import classes:
//import ai.hanzo.sdk.infrastructure.*
//import ai.hanzo.sdk.models.*
val apiInstance = PiecesApi()
val name : kotlin.String = name_example // kotlin.String |
val version : kotlin.String = version_example // kotlin.String |
try {
val result : AutoPiece = apiInstance.autoGetPiece(name, version)
println(result)
} catch (e: ClientException) {
println("4xx response calling PiecesApi#autoGetPiece")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling PiecesApi#autoGetPiece")
e.printStackTrace()
}
Parameters
| name | kotlin.String| | |
| Name | Type | Description | Notes |
|---|---|---|---|
| version | kotlin.String | [optional] |
Return type
Authorization
No authorization required
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
autoGetPieceOptions
kotlin.Any autoGetPieceOptions(autoGetPieceOptionsRequest)
Get dynamic property options for a piece action/trigger
Example
// Import classes:
//import ai.hanzo.sdk.infrastructure.*
//import ai.hanzo.sdk.models.*
val apiInstance = PiecesApi()
val autoGetPieceOptionsRequest : AutoGetPieceOptionsRequest = // AutoGetPieceOptionsRequest |
try {
val result : kotlin.Any = apiInstance.autoGetPieceOptions(autoGetPieceOptionsRequest)
println(result)
} catch (e: ClientException) {
println("4xx response calling PiecesApi#autoGetPieceOptions")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling PiecesApi#autoGetPieceOptions")
e.printStackTrace()
}
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| autoGetPieceOptionsRequest | AutoGetPieceOptionsRequest |
Return type
Authorization
Configure bearerAuth statically:
ApiClient.accessToken = ""
Configure bearerAuth dynamically:
apiInstance.accessTokenProvider = { "" }
HTTP request headers
- Content-Type: application/json
- Accept: application/json
autoListPieceCategories
kotlin.Any autoListPieceCategories()
List piece categories
Example
// Import classes:
//import ai.hanzo.sdk.infrastructure.*
//import ai.hanzo.sdk.models.*
val apiInstance = PiecesApi()
try {
val result : kotlin.Any = apiInstance.autoListPieceCategories()
println(result)
} catch (e: ClientException) {
println("4xx response calling PiecesApi#autoListPieceCategories")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling PiecesApi#autoListPieceCategories")
e.printStackTrace()
}
Parameters
This endpoint does not need any parameter.
Return type
Authorization
No authorization required
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
autoListPieceVersions
kotlin.Any autoListPieceVersions(name)
List available versions of a piece
Example
// Import classes:
//import ai.hanzo.sdk.infrastructure.*
//import ai.hanzo.sdk.models.*
val apiInstance = PiecesApi()
val name : kotlin.String = name_example // kotlin.String |
try {
val result : kotlin.Any = apiInstance.autoListPieceVersions(name)
println(result)
} catch (e: ClientException) {
println("4xx response calling PiecesApi#autoListPieceVersions")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling PiecesApi#autoListPieceVersions")
e.printStackTrace()
}
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| name | kotlin.String |
Return type
Authorization
No authorization required
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
autoListPieces
kotlin.collections.List<AutoPiece> autoListPieces(searchQuery, categories)
List available pieces
Example
// Import classes:
//import ai.hanzo.sdk.infrastructure.*
//import ai.hanzo.sdk.models.*
val apiInstance = PiecesApi()
val searchQuery : kotlin.String = searchQuery_example // kotlin.String |
val categories : kotlin.collections.List<kotlin.String> = // kotlin.collections.List<kotlin.String> |
try {
val result : kotlin.collections.List<AutoPiece> = apiInstance.autoListPieces(searchQuery, categories)
println(result)
} catch (e: ClientException) {
println("4xx response calling PiecesApi#autoListPieces")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling PiecesApi#autoListPieces")
e.printStackTrace()
}
Parameters
| searchQuery | kotlin.String| | [optional] |
| Name | Type | Description | Notes |
|---|---|---|---|
| categories | kotlin.collections.List<kotlin.String> | [optional] |
Return type
kotlin.collections.List<AutoPiece>
Authorization
No authorization required
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
automationsListPieces
AutomationsCatalog automationsListPieces()
List the connector/piece catalogue
Example
// Import classes:
//import ai.hanzo.sdk.infrastructure.*
//import ai.hanzo.sdk.models.*
val apiInstance = PiecesApi()
try {
val result : AutomationsCatalog = apiInstance.automationsListPieces()
println(result)
} catch (e: ClientException) {
println("4xx response calling PiecesApi#automationsListPieces")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling PiecesApi#automationsListPieces")
e.printStackTrace()
}
Parameters
This endpoint does not need any parameter.
Return type
Authorization
Configure bearerAuth statically:
ApiClient.accessToken = ""
Configure bearerAuth dynamically:
apiInstance.accessTokenProvider = { "" }
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
flowGetPiece
FlowPiece flowGetPiece(name, version)
Get piece metadata by name
Example
// Import classes:
//import ai.hanzo.sdk.infrastructure.*
//import ai.hanzo.sdk.models.*
val apiInstance = PiecesApi()
val name : kotlin.String = name_example // kotlin.String |
val version : kotlin.String = version_example // kotlin.String |
try {
val result : FlowPiece = apiInstance.flowGetPiece(name, version)
println(result)
} catch (e: ClientException) {
println("4xx response calling PiecesApi#flowGetPiece")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling PiecesApi#flowGetPiece")
e.printStackTrace()
}
Parameters
| name | kotlin.String| | |
| Name | Type | Description | Notes |
|---|---|---|---|
| version | kotlin.String | [optional] |
Return type
Authorization
No authorization required
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
flowGetPieceOptions
kotlin.Any flowGetPieceOptions(autoGetPieceOptionsRequest)
Get dynamic property options for a piece action/trigger
Example
// Import classes:
//import ai.hanzo.sdk.infrastructure.*
//import ai.hanzo.sdk.models.*
val apiInstance = PiecesApi()
val autoGetPieceOptionsRequest : AutoGetPieceOptionsRequest = // AutoGetPieceOptionsRequest |
try {
val result : kotlin.Any = apiInstance.flowGetPieceOptions(autoGetPieceOptionsRequest)
println(result)
} catch (e: ClientException) {
println("4xx response calling PiecesApi#flowGetPieceOptions")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling PiecesApi#flowGetPieceOptions")
e.printStackTrace()
}
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| autoGetPieceOptionsRequest | AutoGetPieceOptionsRequest |
Return type
Authorization
Configure bearerAuth statically:
ApiClient.accessToken = ""
Configure bearerAuth dynamically:
apiInstance.accessTokenProvider = { "" }
HTTP request headers
- Content-Type: application/json
- Accept: application/json
flowGetPieceRegistry
kotlin.Any flowGetPieceRegistry()
Get piece registry metadata
Example
// Import classes:
//import ai.hanzo.sdk.infrastructure.*
//import ai.hanzo.sdk.models.*
val apiInstance = PiecesApi()
try {
val result : kotlin.Any = apiInstance.flowGetPieceRegistry()
println(result)
} catch (e: ClientException) {
println("4xx response calling PiecesApi#flowGetPieceRegistry")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling PiecesApi#flowGetPieceRegistry")
e.printStackTrace()
}
Parameters
This endpoint does not need any parameter.
Return type
Authorization
No authorization required
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
flowGetScopedPiece
FlowPiece flowGetScopedPiece(scope, name, version)
Get scoped piece metadata
Example
// Import classes:
//import ai.hanzo.sdk.infrastructure.*
//import ai.hanzo.sdk.models.*
val apiInstance = PiecesApi()
val scope : kotlin.String = scope_example // kotlin.String |
val name : kotlin.String = name_example // kotlin.String |
val version : kotlin.String = version_example // kotlin.String |
try {
val result : FlowPiece = apiInstance.flowGetScopedPiece(scope, name, version)
println(result)
} catch (e: ClientException) {
println("4xx response calling PiecesApi#flowGetScopedPiece")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling PiecesApi#flowGetScopedPiece")
e.printStackTrace()
}
Parameters
| scope | kotlin.String| | | | name | kotlin.String| | |
| Name | Type | Description | Notes |
|---|---|---|---|
| version | kotlin.String | [optional] |
Return type
Authorization
No authorization required
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
flowListPieceCategories
kotlin.collections.List<kotlin.String> flowListPieceCategories()
List piece categories
Example
// Import classes:
//import ai.hanzo.sdk.infrastructure.*
//import ai.hanzo.sdk.models.*
val apiInstance = PiecesApi()
try {
val result : kotlin.collections.List<kotlin.String> = apiInstance.flowListPieceCategories()
println(result)
} catch (e: ClientException) {
println("4xx response calling PiecesApi#flowListPieceCategories")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling PiecesApi#flowListPieceCategories")
e.printStackTrace()
}
Parameters
This endpoint does not need any parameter.
Return type
kotlin.collections.List<kotlin.String>
Authorization
No authorization required
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
flowListPieceVersions
kotlin.Any flowListPieceVersions(name)
List available versions of a piece
Example
// Import classes:
//import ai.hanzo.sdk.infrastructure.*
//import ai.hanzo.sdk.models.*
val apiInstance = PiecesApi()
val name : kotlin.String = name_example // kotlin.String |
try {
val result : kotlin.Any = apiInstance.flowListPieceVersions(name)
println(result)
} catch (e: ClientException) {
println("4xx response calling PiecesApi#flowListPieceVersions")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling PiecesApi#flowListPieceVersions")
e.printStackTrace()
}
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| name | kotlin.String |
Return type
Authorization
No authorization required
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
flowListPieces
kotlin.collections.List<FlowPiece> flowListPieces(searchQuery, categories, includeHidden, includeTags, sortBy, orderBy)
List available pieces
Example
// Import classes:
//import ai.hanzo.sdk.infrastructure.*
//import ai.hanzo.sdk.models.*
val apiInstance = PiecesApi()
val searchQuery : kotlin.String = searchQuery_example // kotlin.String |
val categories : kotlin.collections.List<kotlin.String> = // kotlin.collections.List<kotlin.String> |
val includeHidden : kotlin.Boolean = true // kotlin.Boolean |
val includeTags : kotlin.Boolean = true // kotlin.Boolean |
val sortBy : kotlin.String = sortBy_example // kotlin.String |
val orderBy : kotlin.String = orderBy_example // kotlin.String |
try {
val result : kotlin.collections.List<FlowPiece> = apiInstance.flowListPieces(searchQuery, categories, includeHidden, includeTags, sortBy, orderBy)
println(result)
} catch (e: ClientException) {
println("4xx response calling PiecesApi#flowListPieces")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling PiecesApi#flowListPieces")
e.printStackTrace()
}
Parameters
| searchQuery | kotlin.String| | [optional] | | categories | kotlin.collections.List<kotlin.String>| | [optional] | | includeHidden | kotlin.Boolean| | [optional] [default to false] | | includeTags | kotlin.Boolean| | [optional] [default to false] | | sortBy | kotlin.String| | [optional] |
| Name | Type | Description | Notes |
|---|---|---|---|
| orderBy | kotlin.String | [optional] |
Return type
kotlin.collections.List<FlowPiece>
Authorization
No authorization required
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
flowSyncPieces
kotlin.Any flowSyncPieces()
Sync piece metadata from registry
Example
// Import classes:
//import ai.hanzo.sdk.infrastructure.*
//import ai.hanzo.sdk.models.*
val apiInstance = PiecesApi()
try {
val result : kotlin.Any = apiInstance.flowSyncPieces()
println(result)
} catch (e: ClientException) {
println("4xx response calling PiecesApi#flowSyncPieces")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling PiecesApi#flowSyncPieces")
e.printStackTrace()
}
Parameters
This endpoint does not need any parameter.
Return type
Authorization
Configure bearerAuth statically:
ApiClient.accessToken = ""
Configure bearerAuth dynamically:
apiInstance.accessTokenProvider = { "" }
HTTP request headers
- Content-Type: Not defined
- Accept: application/json