mirror of
https://github.com/hanzo-kt/sdk.git
synced 2026-10-30 20:43:57 +00:00
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]>
3.3 KiB
3.3 KiB
DeployWorkerApi
All URIs are relative to https://api.hanzo.ai
| Method | HTTP request | Description |
|---|---|---|
| platformDeployWorkerCancelDeployment | POST /v1/platform/cancel-deployment | Cancel an in-progress worker deployment |
| platformDeployWorkerDeploy | POST /v1/platform/deploy | Submit deployment job to worker queue |
platformDeployWorkerCancelDeployment
PlatformDeployWorkerCancelDeployment200Response platformDeployWorkerCancelDeployment(platformCancelDeploymentJob)
Cancel an in-progress worker deployment
Example
// Import classes:
//import ai.hanzo.sdk.infrastructure.*
//import ai.hanzo.sdk.models.*
val apiInstance = DeployWorkerApi()
val platformCancelDeploymentJob : PlatformCancelDeploymentJob = // PlatformCancelDeploymentJob |
try {
val result : PlatformDeployWorkerCancelDeployment200Response = apiInstance.platformDeployWorkerCancelDeployment(platformCancelDeploymentJob)
println(result)
} catch (e: ClientException) {
println("4xx response calling DeployWorkerApi#platformDeployWorkerCancelDeployment")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling DeployWorkerApi#platformDeployWorkerCancelDeployment")
e.printStackTrace()
}
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| platformCancelDeploymentJob | PlatformCancelDeploymentJob |
Return type
PlatformDeployWorkerCancelDeployment200Response
Authorization
Configure ApiKeyAuth: ApiClient.apiKey["X-API-Key"] = "" ApiClient.apiKeyPrefix["X-API-Key"] = ""
HTTP request headers
- Content-Type: application/json
- Accept: application/json
platformDeployWorkerDeploy
PlatformDeployWorkerDeploy200Response platformDeployWorkerDeploy(platformDeployJob)
Submit deployment job to worker queue
Example
// Import classes:
//import ai.hanzo.sdk.infrastructure.*
//import ai.hanzo.sdk.models.*
val apiInstance = DeployWorkerApi()
val platformDeployJob : PlatformDeployJob = // PlatformDeployJob |
try {
val result : PlatformDeployWorkerDeploy200Response = apiInstance.platformDeployWorkerDeploy(platformDeployJob)
println(result)
} catch (e: ClientException) {
println("4xx response calling DeployWorkerApi#platformDeployWorkerDeploy")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling DeployWorkerApi#platformDeployWorkerDeploy")
e.printStackTrace()
}
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| platformDeployJob | PlatformDeployJob |
Return type
PlatformDeployWorkerDeploy200Response
Authorization
Configure ApiKeyAuth: ApiClient.apiKey["X-API-Key"] = "" ApiClient.apiKeyPrefix["X-API-Key"] = ""
HTTP request headers
- Content-Type: application/json
- Accept: application/json