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.9 KiB
3.9 KiB
SSHKeysApi
All URIs are relative to https://api.hanzo.ai
| Method | HTTP request | Description |
|---|---|---|
| gitDeleteGitKey | DELETE /v1/git/keys/{id} | Remove an SSH key |
| gitListGitKeys | GET /v1/git/keys | List the tenant's SSH keys |
| gitRegisterGitKey | POST /v1/git/keys | Register an SSH public key |
gitDeleteGitKey
gitDeleteGitKey(id)
Remove an SSH key
Example
// Import classes:
//import ai.hanzo.sdk.infrastructure.*
//import ai.hanzo.sdk.models.*
val apiInstance = SSHKeysApi()
val id : kotlin.String = id_example // kotlin.String | Key id
try {
apiInstance.gitDeleteGitKey(id)
} catch (e: ClientException) {
println("4xx response calling SSHKeysApi#gitDeleteGitKey")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling SSHKeysApi#gitDeleteGitKey")
e.printStackTrace()
}
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| id | kotlin.String | Key id |
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: application/json
gitListGitKeys
GitListGitKeys200Response gitListGitKeys()
List the tenant's SSH keys
Example
// Import classes:
//import ai.hanzo.sdk.infrastructure.*
//import ai.hanzo.sdk.models.*
val apiInstance = SSHKeysApi()
try {
val result : GitListGitKeys200Response = apiInstance.gitListGitKeys()
println(result)
} catch (e: ClientException) {
println("4xx response calling SSHKeysApi#gitListGitKeys")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling SSHKeysApi#gitListGitKeys")
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
gitRegisterGitKey
GitKey gitRegisterGitKey(gitRegisterKey)
Register an SSH public key
Registers an OpenSSH public key for the tenant. The key is validated, canonicalized, and stored with its SHA256 fingerprint (the global unique handle). A key belongs to exactly one org; re-registering it under another org is a 409.
Example
// Import classes:
//import ai.hanzo.sdk.infrastructure.*
//import ai.hanzo.sdk.models.*
val apiInstance = SSHKeysApi()
val gitRegisterKey : GitRegisterKey = // GitRegisterKey |
try {
val result : GitKey = apiInstance.gitRegisterGitKey(gitRegisterKey)
println(result)
} catch (e: ClientException) {
println("4xx response calling SSHKeysApi#gitRegisterGitKey")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling SSHKeysApi#gitRegisterGitKey")
e.printStackTrace()
}
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| gitRegisterKey | GitRegisterKey |
Return type
Authorization
Configure bearerAuth statically:
ApiClient.accessToken = ""
Configure bearerAuth dynamically:
apiInstance.accessTokenProvider = { "" }
HTTP request headers
- Content-Type: application/json
- Accept: application/json