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]>
6.8 KiB
ReposApi
All URIs are relative to https://api.hanzo.ai
| Method | HTTP request | Description |
|---|---|---|
| gitCreateRepo | POST /v1/git/repos | Create a bare repo |
| gitDeleteRepo | DELETE /v1/git/repos/{name} | Delete a repo and purge its storage |
| gitGetRepo | GET /v1/git/repos/{name} | Repo detail (branches + resolved HEAD) |
| gitGitPush | POST /v1/git/repos/{name}/push | Client-less push (build a commit from posted files) |
| gitListRepos | GET /v1/git/repos | List the tenant's repos |
gitCreateRepo
GitRepo gitCreateRepo(gitCreateRepo)
Create a bare repo
Example
// Import classes:
//import ai.hanzo.sdk.infrastructure.*
//import ai.hanzo.sdk.models.*
val apiInstance = ReposApi()
val gitCreateRepo : GitCreateRepo = // GitCreateRepo |
try {
val result : GitRepo = apiInstance.gitCreateRepo(gitCreateRepo)
println(result)
} catch (e: ClientException) {
println("4xx response calling ReposApi#gitCreateRepo")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling ReposApi#gitCreateRepo")
e.printStackTrace()
}
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| gitCreateRepo | GitCreateRepo |
Return type
Authorization
Configure bearerAuth statically:
ApiClient.accessToken = ""
Configure bearerAuth dynamically:
apiInstance.accessTokenProvider = { "" }
HTTP request headers
- Content-Type: application/json
- Accept: application/json
gitDeleteRepo
gitDeleteRepo(name)
Delete a repo and purge its storage
Example
// Import classes:
//import ai.hanzo.sdk.infrastructure.*
//import ai.hanzo.sdk.models.*
val apiInstance = ReposApi()
val name : kotlin.String = name_example // kotlin.String | Repo name (a trailing \".git\" is stripped)
try {
apiInstance.gitDeleteRepo(name)
} catch (e: ClientException) {
println("4xx response calling ReposApi#gitDeleteRepo")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling ReposApi#gitDeleteRepo")
e.printStackTrace()
}
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| name | kotlin.String | Repo name (a trailing ".git" is stripped) |
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
gitGetRepo
GitRepo gitGetRepo(name)
Repo detail (branches + resolved HEAD)
Example
// Import classes:
//import ai.hanzo.sdk.infrastructure.*
//import ai.hanzo.sdk.models.*
val apiInstance = ReposApi()
val name : kotlin.String = name_example // kotlin.String | Repo name (a trailing \".git\" is stripped)
try {
val result : GitRepo = apiInstance.gitGetRepo(name)
println(result)
} catch (e: ClientException) {
println("4xx response calling ReposApi#gitGetRepo")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling ReposApi#gitGetRepo")
e.printStackTrace()
}
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| name | kotlin.String | Repo name (a trailing ".git" is stripped) |
Return type
Authorization
Configure bearerAuth statically:
ApiClient.accessToken = ""
Configure bearerAuth dynamically:
apiInstance.accessTokenProvider = { "" }
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
gitGitPush
GitPushResult gitGitPush(name, gitPushRequest)
Client-less push (build a commit from posted files)
Builds a tree + commit from the posted files, advances the branch ref, and fires the git-push-to-deploy build exactly as a real receive-pack would — for builders with no local git client. Creates the repo on the first push. File content is UTF-8 by default, or base64 when the file's `encoding` is `base64`.
Example
// Import classes:
//import ai.hanzo.sdk.infrastructure.*
//import ai.hanzo.sdk.models.*
val apiInstance = ReposApi()
val name : kotlin.String = name_example // kotlin.String | Repo name (a trailing \".git\" is stripped)
val gitPushRequest : GitPushRequest = // GitPushRequest |
try {
val result : GitPushResult = apiInstance.gitGitPush(name, gitPushRequest)
println(result)
} catch (e: ClientException) {
println("4xx response calling ReposApi#gitGitPush")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling ReposApi#gitGitPush")
e.printStackTrace()
}
Parameters
| name | kotlin.String| Repo name (a trailing ".git" is stripped) | |
| Name | Type | Description | Notes |
|---|---|---|---|
| gitPushRequest | GitPushRequest |
Return type
Authorization
Configure bearerAuth statically:
ApiClient.accessToken = ""
Configure bearerAuth dynamically:
apiInstance.accessTokenProvider = { "" }
HTTP request headers
- Content-Type: application/json
- Accept: application/json
gitListRepos
GitListRepos200Response gitListRepos()
List the tenant's repos
Example
// Import classes:
//import ai.hanzo.sdk.infrastructure.*
//import ai.hanzo.sdk.models.*
val apiInstance = ReposApi()
try {
val result : GitListRepos200Response = apiInstance.gitListRepos()
println(result)
} catch (e: ClientException) {
println("4xx response calling ReposApi#gitListRepos")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling ReposApi#gitListRepos")
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