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]>
5.0 KiB
AccountsApi
All URIs are relative to https://api.hanzo.ai
| Method | HTTP request | Description |
|---|---|---|
| mqGetAccount | GET /v1/mq/accounts/{id} | Get account info |
| mqListAccountConnections | GET /v1/mq/accounts/{id}/connections | List account connections |
| mqListAccounts | GET /v1/mq/accounts | List accounts |
mqGetAccount
MqAccount mqGetAccount(id)
Get account info
Returns account details including connection count, subscription count, data throughput, and slow consumer metrics.
Example
// Import classes:
//import ai.hanzo.sdk.infrastructure.*
//import ai.hanzo.sdk.models.*
val apiInstance = AccountsApi()
val id : kotlin.String = id_example // kotlin.String | Account ID (maps to IAM org_id).
try {
val result : MqAccount = apiInstance.mqGetAccount(id)
println(result)
} catch (e: ClientException) {
println("4xx response calling AccountsApi#mqGetAccount")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling AccountsApi#mqGetAccount")
e.printStackTrace()
}
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| id | kotlin.String | Account ID (maps to IAM org_id). |
Return type
Authorization
Configure bearerAuth statically:
ApiClient.accessToken = ""
Configure bearerAuth dynamically:
apiInstance.accessTokenProvider = { "" }
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
mqListAccountConnections
MqListAccountConnections200Response mqListAccountConnections(id, limit, offset)
List account connections
Returns all active connections for the account.
Example
// Import classes:
//import ai.hanzo.sdk.infrastructure.*
//import ai.hanzo.sdk.models.*
val apiInstance = AccountsApi()
val id : kotlin.String = id_example // kotlin.String | Account ID (maps to IAM org_id).
val limit : kotlin.Int = 56 // kotlin.Int | Maximum number of items to return.
val offset : kotlin.Int = 56 // kotlin.Int | Number of items to skip.
try {
val result : MqListAccountConnections200Response = apiInstance.mqListAccountConnections(id, limit, offset)
println(result)
} catch (e: ClientException) {
println("4xx response calling AccountsApi#mqListAccountConnections")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling AccountsApi#mqListAccountConnections")
e.printStackTrace()
}
Parameters
| id | kotlin.String| Account ID (maps to IAM org_id). | | | limit | kotlin.Int| Maximum number of items to return. | [optional] [default to 100] |
| Name | Type | Description | Notes |
|---|---|---|---|
| offset | kotlin.Int | Number of items to skip. | [optional] [default to 0] |
Return type
MqListAccountConnections200Response
Authorization
Configure bearerAuth statically:
ApiClient.accessToken = ""
Configure bearerAuth dynamically:
apiInstance.accessTokenProvider = { "" }
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
mqListAccounts
MqListAccounts200Response mqListAccounts(limit, offset)
List accounts
Returns all MQ accounts visible to the authenticated user. Each account maps to a Hanzo IAM organization.
Example
// Import classes:
//import ai.hanzo.sdk.infrastructure.*
//import ai.hanzo.sdk.models.*
val apiInstance = AccountsApi()
val limit : kotlin.Int = 56 // kotlin.Int | Maximum number of items to return.
val offset : kotlin.Int = 56 // kotlin.Int | Number of items to skip.
try {
val result : MqListAccounts200Response = apiInstance.mqListAccounts(limit, offset)
println(result)
} catch (e: ClientException) {
println("4xx response calling AccountsApi#mqListAccounts")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling AccountsApi#mqListAccounts")
e.printStackTrace()
}
Parameters
| limit | kotlin.Int| Maximum number of items to return. | [optional] [default to 100] |
| Name | Type | Description | Notes |
|---|---|---|---|
| offset | kotlin.Int | Number of items to skip. | [optional] [default to 0] |
Return type
Authorization
Configure bearerAuth statically:
ApiClient.accessToken = ""
Configure bearerAuth dynamically:
apiInstance.accessTokenProvider = { "" }
HTTP request headers
- Content-Type: Not defined
- Accept: application/json