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]>
5.3 KiB
5.3 KiB
SshKeyApi
All URIs are relative to https://api.hanzo.ai
| Method | HTTP request | Description |
|---|---|---|
| platformSshKeyAll | GET /v1/platform/sshKey/all | List all SSH keys |
| platformSshKeyCreate | POST /v1/platform/sshKey/create | Add an SSH key |
| platformSshKeyGenerate | POST /v1/platform/sshKey/generate | Generate a new SSH key pair |
| platformSshKeyRemove | POST /v1/platform/sshKey/remove | Remove an SSH key |
platformSshKeyAll
PlatformTRPCResult platformSshKeyAll()
List all SSH keys
Example
// Import classes:
//import ai.hanzo.sdk.infrastructure.*
//import ai.hanzo.sdk.models.*
val apiInstance = SshKeyApi()
try {
val result : PlatformTRPCResult = apiInstance.platformSshKeyAll()
println(result)
} catch (e: ClientException) {
println("4xx response calling SshKeyApi#platformSshKeyAll")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling SshKeyApi#platformSshKeyAll")
e.printStackTrace()
}
Parameters
This endpoint does not need any parameter.
Return type
Authorization
Configure bearerAuth statically:
ApiClient.accessToken = ""
Configure bearerAuth dynamically:
apiInstance.accessTokenProvider = { "" }
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
platformSshKeyCreate
PlatformTRPCResult platformSshKeyCreate(platformSshKeyCreateRequest)
Add an SSH key
Example
// Import classes:
//import ai.hanzo.sdk.infrastructure.*
//import ai.hanzo.sdk.models.*
val apiInstance = SshKeyApi()
val platformSshKeyCreateRequest : PlatformSshKeyCreateRequest = // PlatformSshKeyCreateRequest |
try {
val result : PlatformTRPCResult = apiInstance.platformSshKeyCreate(platformSshKeyCreateRequest)
println(result)
} catch (e: ClientException) {
println("4xx response calling SshKeyApi#platformSshKeyCreate")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling SshKeyApi#platformSshKeyCreate")
e.printStackTrace()
}
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| platformSshKeyCreateRequest | PlatformSshKeyCreateRequest |
Return type
Authorization
Configure bearerAuth statically:
ApiClient.accessToken = ""
Configure bearerAuth dynamically:
apiInstance.accessTokenProvider = { "" }
HTTP request headers
- Content-Type: application/json
- Accept: application/json
platformSshKeyGenerate
PlatformTRPCResult platformSshKeyGenerate()
Generate a new SSH key pair
Example
// Import classes:
//import ai.hanzo.sdk.infrastructure.*
//import ai.hanzo.sdk.models.*
val apiInstance = SshKeyApi()
try {
val result : PlatformTRPCResult = apiInstance.platformSshKeyGenerate()
println(result)
} catch (e: ClientException) {
println("4xx response calling SshKeyApi#platformSshKeyGenerate")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling SshKeyApi#platformSshKeyGenerate")
e.printStackTrace()
}
Parameters
This endpoint does not need any parameter.
Return type
Authorization
Configure bearerAuth statically:
ApiClient.accessToken = ""
Configure bearerAuth dynamically:
apiInstance.accessTokenProvider = { "" }
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
platformSshKeyRemove
PlatformTRPCResult platformSshKeyRemove(platformSshKeyRemoveRequest)
Remove an SSH key
Example
// Import classes:
//import ai.hanzo.sdk.infrastructure.*
//import ai.hanzo.sdk.models.*
val apiInstance = SshKeyApi()
val platformSshKeyRemoveRequest : PlatformSshKeyRemoveRequest = // PlatformSshKeyRemoveRequest |
try {
val result : PlatformTRPCResult = apiInstance.platformSshKeyRemove(platformSshKeyRemoveRequest)
println(result)
} catch (e: ClientException) {
println("4xx response calling SshKeyApi#platformSshKeyRemove")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling SshKeyApi#platformSshKeyRemove")
e.printStackTrace()
}
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| platformSshKeyRemoveRequest | PlatformSshKeyRemoveRequest |
Return type
Authorization
Configure bearerAuth statically:
ApiClient.accessToken = ""
Configure bearerAuth dynamically:
apiInstance.accessTokenProvider = { "" }
HTTP request headers
- Content-Type: application/json
- Accept: application/json