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
ProfilesApi
All URIs are relative to https://api.hanzo.ai
| Method | HTTP request | Description |
|---|---|---|
| didGetProfile | GET /v1/did/profiles/{profile_id} | Get a profile |
| didGetProfileHistory | GET /v1/did/profiles/{profile_id}/history | Get profile change history |
| didListProfiles | GET /v1/did/profiles | List profiles |
| didUpdateProfile | PUT /v1/did/profiles/{profile_id} | Update a profile |
didGetProfile
DidProfile didGetProfile(profileId)
Get a profile
Example
// Import classes:
//import ai.hanzo.sdk.infrastructure.*
//import ai.hanzo.sdk.models.*
val apiInstance = ProfilesApi()
val profileId : kotlin.String = profileId_example // kotlin.String |
try {
val result : DidProfile = apiInstance.didGetProfile(profileId)
println(result)
} catch (e: ClientException) {
println("4xx response calling ProfilesApi#didGetProfile")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling ProfilesApi#didGetProfile")
e.printStackTrace()
}
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| profileId | kotlin.String |
Return type
Authorization
Configure bearerAuth statically:
ApiClient.accessToken = ""
Configure bearerAuth dynamically:
apiInstance.accessTokenProvider = { "" }
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
didGetProfileHistory
DidGetProfileHistory200Response didGetProfileHistory(profileId, limit)
Get profile change history
Example
// Import classes:
//import ai.hanzo.sdk.infrastructure.*
//import ai.hanzo.sdk.models.*
val apiInstance = ProfilesApi()
val profileId : kotlin.String = profileId_example // kotlin.String |
val limit : kotlin.Int = 56 // kotlin.Int |
try {
val result : DidGetProfileHistory200Response = apiInstance.didGetProfileHistory(profileId, limit)
println(result)
} catch (e: ClientException) {
println("4xx response calling ProfilesApi#didGetProfileHistory")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling ProfilesApi#didGetProfileHistory")
e.printStackTrace()
}
Parameters
| profileId | kotlin.String| | |
| Name | Type | Description | Notes |
|---|---|---|---|
| limit | kotlin.Int | [optional] [default to 50] |
Return type
DidGetProfileHistory200Response
Authorization
Configure bearerAuth statically:
ApiClient.accessToken = ""
Configure bearerAuth dynamically:
apiInstance.accessTokenProvider = { "" }
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
didListProfiles
DidListProfiles200Response didListProfiles(organization, type, team, status, search, limit, cursor)
List profiles
List all profiles in an organization, with optional filtering.
Example
// Import classes:
//import ai.hanzo.sdk.infrastructure.*
//import ai.hanzo.sdk.models.*
val apiInstance = ProfilesApi()
val organization : kotlin.String = organization_example // kotlin.String | Organization to list profiles for
val type : kotlin.String = type_example // kotlin.String | Filter by profile type
val team : kotlin.String = team_example // kotlin.String | Filter by team membership
val status : kotlin.String = status_example // kotlin.String | Filter by status
val search : kotlin.String = search_example // kotlin.String | Search by name or email
val limit : kotlin.Int = 56 // kotlin.Int |
val cursor : kotlin.String = cursor_example // kotlin.String |
try {
val result : DidListProfiles200Response = apiInstance.didListProfiles(organization, type, team, status, search, limit, cursor)
println(result)
} catch (e: ClientException) {
println("4xx response calling ProfilesApi#didListProfiles")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling ProfilesApi#didListProfiles")
e.printStackTrace()
}
Parameters
| organization | kotlin.String| Organization to list profiles for | | | type | kotlin.String| Filter by profile type | [optional] [enum: user, service_account, bot] | | team | kotlin.String| Filter by team membership | [optional] | | status | kotlin.String| Filter by status | [optional] [enum: active, suspended, deactivated] | | search | kotlin.String| Search by name or email | [optional] | | limit | kotlin.Int| | [optional] [default to 50] |
| Name | Type | Description | Notes |
|---|---|---|---|
| cursor | kotlin.String | [optional] |
Return type
Authorization
Configure bearerAuth statically:
ApiClient.accessToken = ""
Configure bearerAuth dynamically:
apiInstance.accessTokenProvider = { "" }
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
didUpdateProfile
DidProfile didUpdateProfile(profileId, didUpdateProfileRequest)
Update a profile
Example
// Import classes:
//import ai.hanzo.sdk.infrastructure.*
//import ai.hanzo.sdk.models.*
val apiInstance = ProfilesApi()
val profileId : kotlin.String = profileId_example // kotlin.String |
val didUpdateProfileRequest : DidUpdateProfileRequest = // DidUpdateProfileRequest |
try {
val result : DidProfile = apiInstance.didUpdateProfile(profileId, didUpdateProfileRequest)
println(result)
} catch (e: ClientException) {
println("4xx response calling ProfilesApi#didUpdateProfile")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling ProfilesApi#didUpdateProfile")
e.printStackTrace()
}
Parameters
| profileId | kotlin.String| | |
| Name | Type | Description | Notes |
|---|---|---|---|
| didUpdateProfileRequest | DidUpdateProfileRequest |
Return type
Authorization
Configure bearerAuth statically:
ApiClient.accessToken = ""
Configure bearerAuth dynamically:
apiInstance.accessTokenProvider = { "" }
HTTP request headers
- Content-Type: application/json
- Accept: application/json