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]>
7.2 KiB
ConsumerGroupsApi
All URIs are relative to https://api.hanzo.ai
| Method | HTTP request | Description |
|---|---|---|
| streamCommitOffsets | PUT /v1/stream/groups/{group_id}/offsets | Commit offsets |
| streamDeleteConsumerGroup | DELETE /v1/stream/groups/{group_id} | Delete a consumer group |
| streamGetConsumerGroup | GET /v1/stream/groups/{group_id} | Get consumer group details |
| streamGetGroupOffsets | GET /v1/stream/groups/{group_id}/offsets | Get committed offsets |
| streamListConsumerGroups | GET /v1/stream/groups | List consumer groups |
streamCommitOffsets
streamCommitOffsets(groupId, streamGetGroupOffsets200Response)
Commit offsets
Manually commit offsets for a consumer group.
Example
// Import classes:
//import ai.hanzo.sdk.infrastructure.*
//import ai.hanzo.sdk.models.*
val apiInstance = ConsumerGroupsApi()
val groupId : kotlin.String = groupId_example // kotlin.String |
val streamGetGroupOffsets200Response : StreamGetGroupOffsets200Response = // StreamGetGroupOffsets200Response |
try {
apiInstance.streamCommitOffsets(groupId, streamGetGroupOffsets200Response)
} catch (e: ClientException) {
println("4xx response calling ConsumerGroupsApi#streamCommitOffsets")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling ConsumerGroupsApi#streamCommitOffsets")
e.printStackTrace()
}
Parameters
| groupId | kotlin.String| | |
| Name | Type | Description | Notes |
|---|---|---|---|
| streamGetGroupOffsets200Response | StreamGetGroupOffsets200Response |
Return type
null (empty response body)
Authorization
Configure bearerAuth statically:
ApiClient.accessToken = ""
Configure bearerAuth dynamically:
apiInstance.accessTokenProvider = { "" }
HTTP request headers
- Content-Type: application/json
- Accept: Not defined
streamDeleteConsumerGroup
streamDeleteConsumerGroup(groupId)
Delete a consumer group
Example
// Import classes:
//import ai.hanzo.sdk.infrastructure.*
//import ai.hanzo.sdk.models.*
val apiInstance = ConsumerGroupsApi()
val groupId : kotlin.String = groupId_example // kotlin.String |
try {
apiInstance.streamDeleteConsumerGroup(groupId)
} catch (e: ClientException) {
println("4xx response calling ConsumerGroupsApi#streamDeleteConsumerGroup")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling ConsumerGroupsApi#streamDeleteConsumerGroup")
e.printStackTrace()
}
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| groupId | kotlin.String |
Return type
null (empty response body)
Authorization
Configure bearerAuth statically:
ApiClient.accessToken = ""
Configure bearerAuth dynamically:
apiInstance.accessTokenProvider = { "" }
HTTP request headers
- Content-Type: Not defined
- Accept: Not defined
streamGetConsumerGroup
StreamConsumerGroup streamGetConsumerGroup(groupId)
Get consumer group details
Returns consumer group state, members, and committed offsets with lag.
Example
// Import classes:
//import ai.hanzo.sdk.infrastructure.*
//import ai.hanzo.sdk.models.*
val apiInstance = ConsumerGroupsApi()
val groupId : kotlin.String = groupId_example // kotlin.String |
try {
val result : StreamConsumerGroup = apiInstance.streamGetConsumerGroup(groupId)
println(result)
} catch (e: ClientException) {
println("4xx response calling ConsumerGroupsApi#streamGetConsumerGroup")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling ConsumerGroupsApi#streamGetConsumerGroup")
e.printStackTrace()
}
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| groupId | 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
streamGetGroupOffsets
StreamGetGroupOffsets200Response streamGetGroupOffsets(groupId, topic)
Get committed offsets
Example
// Import classes:
//import ai.hanzo.sdk.infrastructure.*
//import ai.hanzo.sdk.models.*
val apiInstance = ConsumerGroupsApi()
val groupId : kotlin.String = groupId_example // kotlin.String |
val topic : kotlin.String = topic_example // kotlin.String | Filter by topic
try {
val result : StreamGetGroupOffsets200Response = apiInstance.streamGetGroupOffsets(groupId, topic)
println(result)
} catch (e: ClientException) {
println("4xx response calling ConsumerGroupsApi#streamGetGroupOffsets")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling ConsumerGroupsApi#streamGetGroupOffsets")
e.printStackTrace()
}
Parameters
| groupId | kotlin.String| | |
| Name | Type | Description | Notes |
|---|---|---|---|
| topic | kotlin.String | Filter by topic | [optional] |
Return type
StreamGetGroupOffsets200Response
Authorization
Configure bearerAuth statically:
ApiClient.accessToken = ""
Configure bearerAuth dynamically:
apiInstance.accessTokenProvider = { "" }
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
streamListConsumerGroups
StreamListConsumerGroups200Response streamListConsumerGroups()
List consumer groups
Example
// Import classes:
//import ai.hanzo.sdk.infrastructure.*
//import ai.hanzo.sdk.models.*
val apiInstance = ConsumerGroupsApi()
try {
val result : StreamListConsumerGroups200Response = apiInstance.streamListConsumerGroups()
println(result)
} catch (e: ClientException) {
println("4xx response calling ConsumerGroupsApi#streamListConsumerGroups")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling ConsumerGroupsApi#streamListConsumerGroups")
e.printStackTrace()
}
Parameters
This endpoint does not need any parameter.
Return type
StreamListConsumerGroups200Response
Authorization
Configure bearerAuth statically:
ApiClient.accessToken = ""
Configure bearerAuth dynamically:
apiInstance.accessTokenProvider = { "" }
HTTP request headers
- Content-Type: Not defined
- Accept: application/json