Files
zeekayandHanzo Dev b55332704a feat: Hanzo Cloud SDK for Kotlin (generated from OpenAPI v8.0.0)
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]>
2026-07-25 07:10:32 -07:00

12 KiB

LogsApi

All URIs are relative to https://api.hanzo.ai

Method HTTP request Description
edgeGetFunctionLogs GET /v1/edge/functions/{slug}/logs Get function logs
observeGetLogs GET /v1/o11y/logs Live org-scoped log stream for a product
paasGetContainerLogs GET /v1/paas/org/{orgId}/project/{projectId}/env/{envId}/containers/{containerId}/logs Get container logs
searchGetStderrLogs GET /v1/search/logs/stderr Get stderr log configuration
searchResetStderrLogs DELETE /v1/search/logs/stderr Reset stderr log level to default
searchStreamLogs POST /v1/search/logs/stream Stream logs
searchUpdateStderrLogs PUT /v1/search/logs/stderr Update stderr log level

edgeGetFunctionLogs

kotlin.collections.List<EdgeLogEntry> edgeGetFunctionLogs(slug, since, until, level, limit)

Get function logs

Returns function execution logs. Supports SSE streaming via Accept: text/event-stream header for live tailing.

Example

// Import classes:
//import ai.hanzo.sdk.infrastructure.*
//import ai.hanzo.sdk.models.*

val apiInstance = LogsApi()
val slug : kotlin.String = slug_example // kotlin.String | 
val since : java.time.OffsetDateTime = 2013-10-20T19:20:30+01:00 // java.time.OffsetDateTime | Return logs after this timestamp
val until : java.time.OffsetDateTime = 2013-10-20T19:20:30+01:00 // java.time.OffsetDateTime | 
val level : kotlin.String = level_example // kotlin.String | 
val limit : kotlin.Int = 56 // kotlin.Int | 
try {
    val result : kotlin.collections.List<EdgeLogEntry> = apiInstance.edgeGetFunctionLogs(slug, since, until, level, limit)
    println(result)
} catch (e: ClientException) {
    println("4xx response calling LogsApi#edgeGetFunctionLogs")
    e.printStackTrace()
} catch (e: ServerException) {
    println("5xx response calling LogsApi#edgeGetFunctionLogs")
    e.printStackTrace()
}

Parameters

| slug | kotlin.String| | | | since | java.time.OffsetDateTime| Return logs after this timestamp | [optional] | | until | java.time.OffsetDateTime| | [optional] | | level | kotlin.String| | [optional] [enum: info, warn, error, debug] |

Name Type Description Notes
limit kotlin.Int [optional] [default to 100]

Return type

kotlin.collections.List<EdgeLogEntry>

Authorization

Configure bearerAuth statically:

ApiClient.accessToken = ""

Configure bearerAuth dynamically:

apiInstance.accessTokenProvider = { "" }

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

observeGetLogs

ObserveLogsResponse observeGetLogs(product, sinceNs, window, limit)

Live org-scoped log stream for a product

Returns a live, org-scoped log stream for a product. The admin org (`IAM_ADMIN_ORG`) receives the product's raw infra stdout stream (`view: infra`); every other org receives its OWN request log stream derived from org-tagged spans (`view: request`). Live-tail by polling with `sinceNs` set to the prior response's `nextCursor`; absent a cursor, the last `window` seconds are returned. Every query is LIMIT-bounded.

Example

// Import classes:
//import ai.hanzo.sdk.infrastructure.*
//import ai.hanzo.sdk.models.*

val apiInstance = LogsApi()
val product : kotlin.String = product_example // kotlin.String | Console product slug. Must match `^[a-z0-9][a-z0-9._-]{0,62}$`.
val sinceNs : kotlin.Long = 789 // kotlin.Long | Nanosecond cursor from the prior response's `nextCursor`; 0/absent starts a fresh window.
val window : kotlin.Int = 56 // kotlin.Int | Initial look-back window in seconds when no cursor is supplied (default 900, max 86400).
val limit : kotlin.Int = 56 // kotlin.Int | Max lines returned (default 200, max 1000).
try {
    val result : ObserveLogsResponse = apiInstance.observeGetLogs(product, sinceNs, window, limit)
    println(result)
} catch (e: ClientException) {
    println("4xx response calling LogsApi#observeGetLogs")
    e.printStackTrace()
} catch (e: ServerException) {
    println("5xx response calling LogsApi#observeGetLogs")
    e.printStackTrace()
}

Parameters

| product | kotlin.String| Console product slug. Must match `^[a-z0-9][a-z0-9._-]{0,62}$`. | | | sinceNs | kotlin.Long| Nanosecond cursor from the prior response's `nextCursor`; 0/absent starts a fresh window. | [optional] | | window | kotlin.Int| Initial look-back window in seconds when no cursor is supplied (default 900, max 86400). | [optional] [default to 900] |

Name Type Description Notes
limit kotlin.Int Max lines returned (default 200, max 1000). [optional] [default to 200]

Return type

ObserveLogsResponse

Authorization

Configure bearerAuth statically:

ApiClient.accessToken = ""

Configure bearerAuth dynamically:

apiInstance.accessTokenProvider = { "" }

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

paasGetContainerLogs

kotlin.String paasGetContainerLogs(orgId, projectId, envId, containerId, tail, follow)

Get container logs

Example

// Import classes:
//import ai.hanzo.sdk.infrastructure.*
//import ai.hanzo.sdk.models.*

val apiInstance = LogsApi()
val orgId : kotlin.String = orgId_example // kotlin.String | 
val projectId : kotlin.String = projectId_example // kotlin.String | 
val envId : kotlin.String = envId_example // kotlin.String | 
val containerId : kotlin.String = containerId_example // kotlin.String | 
val tail : kotlin.Int = 56 // kotlin.Int | 
val follow : kotlin.Boolean = true // kotlin.Boolean | 
try {
    val result : kotlin.String = apiInstance.paasGetContainerLogs(orgId, projectId, envId, containerId, tail, follow)
    println(result)
} catch (e: ClientException) {
    println("4xx response calling LogsApi#paasGetContainerLogs")
    e.printStackTrace()
} catch (e: ServerException) {
    println("5xx response calling LogsApi#paasGetContainerLogs")
    e.printStackTrace()
}

Parameters

| orgId | kotlin.String| | | | projectId | kotlin.String| | | | envId | kotlin.String| | | | containerId | kotlin.String| | | | tail | kotlin.Int| | [optional] [default to 100] |

Name Type Description Notes
follow kotlin.Boolean [optional] [default to false]

Return type

kotlin.String

Authorization

Configure bearerAuth statically:

ApiClient.accessToken = ""

Configure bearerAuth dynamically:

apiInstance.accessTokenProvider = { "" }

HTTP request headers

  • Content-Type: Not defined
  • Accept: text/plain

searchGetStderrLogs

SearchGetStderrLogs200Response searchGetStderrLogs()

Get stderr log configuration

Example

// Import classes:
//import ai.hanzo.sdk.infrastructure.*
//import ai.hanzo.sdk.models.*

val apiInstance = LogsApi()
try {
    val result : SearchGetStderrLogs200Response = apiInstance.searchGetStderrLogs()
    println(result)
} catch (e: ClientException) {
    println("4xx response calling LogsApi#searchGetStderrLogs")
    e.printStackTrace()
} catch (e: ServerException) {
    println("5xx response calling LogsApi#searchGetStderrLogs")
    e.printStackTrace()
}

Parameters

This endpoint does not need any parameter.

Return type

SearchGetStderrLogs200Response

Authorization

Configure bearerAuth statically:

ApiClient.accessToken = ""

Configure bearerAuth dynamically:

apiInstance.accessTokenProvider = { "" }

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

searchResetStderrLogs

SearchGetStderrLogs200Response searchResetStderrLogs()

Reset stderr log level to default

Example

// Import classes:
//import ai.hanzo.sdk.infrastructure.*
//import ai.hanzo.sdk.models.*

val apiInstance = LogsApi()
try {
    val result : SearchGetStderrLogs200Response = apiInstance.searchResetStderrLogs()
    println(result)
} catch (e: ClientException) {
    println("4xx response calling LogsApi#searchResetStderrLogs")
    e.printStackTrace()
} catch (e: ServerException) {
    println("5xx response calling LogsApi#searchResetStderrLogs")
    e.printStackTrace()
}

Parameters

This endpoint does not need any parameter.

Return type

SearchGetStderrLogs200Response

Authorization

Configure bearerAuth statically:

ApiClient.accessToken = ""

Configure bearerAuth dynamically:

apiInstance.accessTokenProvider = { "" }

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

searchStreamLogs

kotlin.String searchStreamLogs(searchStreamLogsRequest)

Stream logs

Example

// Import classes:
//import ai.hanzo.sdk.infrastructure.*
//import ai.hanzo.sdk.models.*

val apiInstance = LogsApi()
val searchStreamLogsRequest : SearchStreamLogsRequest =  // SearchStreamLogsRequest | 
try {
    val result : kotlin.String = apiInstance.searchStreamLogs(searchStreamLogsRequest)
    println(result)
} catch (e: ClientException) {
    println("4xx response calling LogsApi#searchStreamLogs")
    e.printStackTrace()
} catch (e: ServerException) {
    println("5xx response calling LogsApi#searchStreamLogs")
    e.printStackTrace()
}

Parameters

Name Type Description Notes
searchStreamLogsRequest SearchStreamLogsRequest

Return type

kotlin.String

Authorization

Configure bearerAuth statically:

ApiClient.accessToken = ""

Configure bearerAuth dynamically:

apiInstance.accessTokenProvider = { "" }

HTTP request headers

  • Content-Type: application/json
  • Accept: text/plain

searchUpdateStderrLogs

SearchGetStderrLogs200Response searchUpdateStderrLogs(searchUpdateStderrLogsRequest)

Update stderr log level

Example

// Import classes:
//import ai.hanzo.sdk.infrastructure.*
//import ai.hanzo.sdk.models.*

val apiInstance = LogsApi()
val searchUpdateStderrLogsRequest : SearchUpdateStderrLogsRequest =  // SearchUpdateStderrLogsRequest | 
try {
    val result : SearchGetStderrLogs200Response = apiInstance.searchUpdateStderrLogs(searchUpdateStderrLogsRequest)
    println(result)
} catch (e: ClientException) {
    println("4xx response calling LogsApi#searchUpdateStderrLogs")
    e.printStackTrace()
} catch (e: ServerException) {
    println("5xx response calling LogsApi#searchUpdateStderrLogs")
    e.printStackTrace()
}

Parameters

Name Type Description Notes
searchUpdateStderrLogsRequest SearchUpdateStderrLogsRequest

Return type

SearchGetStderrLogs200Response

Authorization

Configure bearerAuth statically:

ApiClient.accessToken = ""

Configure bearerAuth dynamically:

apiInstance.accessTokenProvider = { "" }

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json