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]>
9.5 KiB
TriggersApi
All URIs are relative to https://api.hanzo.ai
| Method | HTTP request | Description |
|---|---|---|
| autoListTriggerEvents | GET /v1/auto/trigger-events | List trigger events for a flow |
| autoListTriggerRuns | GET /v1/auto/trigger-runs | List trigger run history |
| autoTestTrigger | POST /v1/auto/test-trigger | Test a trigger and get sample data |
| flowHandleAppEvent | POST /v1/flow/app-events/{pieceUrl} | Handle incoming app event for trigger routing |
| flowListTriggerEvents | GET /v1/flow/trigger-events | List trigger events for a flow |
| flowListTriggerRuns | GET /v1/flow/trigger-runs | List trigger run history |
| flowTestTrigger | POST /v1/flow/test-trigger | Test a trigger and get sample data |
autoListTriggerEvents
kotlin.Any autoListTriggerEvents(flowId)
List trigger events for a flow
Example
// Import classes:
//import ai.hanzo.sdk.infrastructure.*
//import ai.hanzo.sdk.models.*
val apiInstance = TriggersApi()
val flowId : kotlin.String = flowId_example // kotlin.String |
try {
val result : kotlin.Any = apiInstance.autoListTriggerEvents(flowId)
println(result)
} catch (e: ClientException) {
println("4xx response calling TriggersApi#autoListTriggerEvents")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling TriggersApi#autoListTriggerEvents")
e.printStackTrace()
}
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| flowId | kotlin.String |
Return type
Authorization
Configure bearerAuth statically:
ApiClient.accessToken = ""
Configure bearerAuth dynamically:
apiInstance.accessTokenProvider = { "" }
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
autoListTriggerRuns
kotlin.Any autoListTriggerRuns(flowId)
List trigger run history
Example
// Import classes:
//import ai.hanzo.sdk.infrastructure.*
//import ai.hanzo.sdk.models.*
val apiInstance = TriggersApi()
val flowId : kotlin.String = flowId_example // kotlin.String |
try {
val result : kotlin.Any = apiInstance.autoListTriggerRuns(flowId)
println(result)
} catch (e: ClientException) {
println("4xx response calling TriggersApi#autoListTriggerRuns")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling TriggersApi#autoListTriggerRuns")
e.printStackTrace()
}
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| flowId | kotlin.String | [optional] |
Return type
Authorization
Configure bearerAuth statically:
ApiClient.accessToken = ""
Configure bearerAuth dynamically:
apiInstance.accessTokenProvider = { "" }
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
autoTestTrigger
kotlin.Any autoTestTrigger(autoTestTriggerRequest)
Test a trigger and get sample data
Example
// Import classes:
//import ai.hanzo.sdk.infrastructure.*
//import ai.hanzo.sdk.models.*
val apiInstance = TriggersApi()
val autoTestTriggerRequest : AutoTestTriggerRequest = // AutoTestTriggerRequest |
try {
val result : kotlin.Any = apiInstance.autoTestTrigger(autoTestTriggerRequest)
println(result)
} catch (e: ClientException) {
println("4xx response calling TriggersApi#autoTestTrigger")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling TriggersApi#autoTestTrigger")
e.printStackTrace()
}
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| autoTestTriggerRequest | AutoTestTriggerRequest |
Return type
Authorization
Configure bearerAuth statically:
ApiClient.accessToken = ""
Configure bearerAuth dynamically:
apiInstance.accessTokenProvider = { "" }
HTTP request headers
- Content-Type: application/json
- Accept: application/json
flowHandleAppEvent
kotlin.Any flowHandleAppEvent(pieceUrl, body)
Handle incoming app event for trigger routing
Example
// Import classes:
//import ai.hanzo.sdk.infrastructure.*
//import ai.hanzo.sdk.models.*
val apiInstance = TriggersApi()
val pieceUrl : kotlin.String = pieceUrl_example // kotlin.String |
val body : kotlin.Any = Object // kotlin.Any |
try {
val result : kotlin.Any = apiInstance.flowHandleAppEvent(pieceUrl, body)
println(result)
} catch (e: ClientException) {
println("4xx response calling TriggersApi#flowHandleAppEvent")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling TriggersApi#flowHandleAppEvent")
e.printStackTrace()
}
Parameters
| pieceUrl | kotlin.String| | |
| Name | Type | Description | Notes |
|---|---|---|---|
| body | kotlin.Any | [optional] |
Return type
Authorization
No authorization required
HTTP request headers
- Content-Type: application/json
- Accept: application/json
flowListTriggerEvents
kotlin.Any flowListTriggerEvents(flowId)
List trigger events for a flow
Example
// Import classes:
//import ai.hanzo.sdk.infrastructure.*
//import ai.hanzo.sdk.models.*
val apiInstance = TriggersApi()
val flowId : kotlin.String = flowId_example // kotlin.String |
try {
val result : kotlin.Any = apiInstance.flowListTriggerEvents(flowId)
println(result)
} catch (e: ClientException) {
println("4xx response calling TriggersApi#flowListTriggerEvents")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling TriggersApi#flowListTriggerEvents")
e.printStackTrace()
}
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| flowId | kotlin.String |
Return type
Authorization
Configure bearerAuth statically:
ApiClient.accessToken = ""
Configure bearerAuth dynamically:
apiInstance.accessTokenProvider = { "" }
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
flowListTriggerRuns
kotlin.Any flowListTriggerRuns(flowId, cursor, limit)
List trigger run history
Example
// Import classes:
//import ai.hanzo.sdk.infrastructure.*
//import ai.hanzo.sdk.models.*
val apiInstance = TriggersApi()
val flowId : kotlin.String = flowId_example // kotlin.String |
val cursor : kotlin.String = cursor_example // kotlin.String |
val limit : kotlin.Int = 56 // kotlin.Int |
try {
val result : kotlin.Any = apiInstance.flowListTriggerRuns(flowId, cursor, limit)
println(result)
} catch (e: ClientException) {
println("4xx response calling TriggersApi#flowListTriggerRuns")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling TriggersApi#flowListTriggerRuns")
e.printStackTrace()
}
Parameters
| flowId | kotlin.String| | [optional] | | cursor | kotlin.String| | [optional] |
| Name | Type | Description | Notes |
|---|---|---|---|
| limit | kotlin.Int | [optional] |
Return type
Authorization
Configure bearerAuth statically:
ApiClient.accessToken = ""
Configure bearerAuth dynamically:
apiInstance.accessTokenProvider = { "" }
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
flowTestTrigger
kotlin.Any flowTestTrigger(autoTestTriggerRequest)
Test a trigger and get sample data
Example
// Import classes:
//import ai.hanzo.sdk.infrastructure.*
//import ai.hanzo.sdk.models.*
val apiInstance = TriggersApi()
val autoTestTriggerRequest : AutoTestTriggerRequest = // AutoTestTriggerRequest |
try {
val result : kotlin.Any = apiInstance.flowTestTrigger(autoTestTriggerRequest)
println(result)
} catch (e: ClientException) {
println("4xx response calling TriggersApi#flowTestTrigger")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling TriggersApi#flowTestTrigger")
e.printStackTrace()
}
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| autoTestTriggerRequest | AutoTestTriggerRequest |
Return type
Authorization
Configure bearerAuth statically:
ApiClient.accessToken = ""
Configure bearerAuth dynamically:
apiInstance.accessTokenProvider = { "" }
HTTP request headers
- Content-Type: application/json
- Accept: application/json