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]>
7.2 KiB
IndexesApi
All URIs are relative to https://api.hanzo.ai
| Method | HTTP request | Description |
|---|---|---|
| searchCreateIndex | POST /v1/search/indexes | Create a new index |
| searchDeleteIndex | DELETE /v1/search/indexes/{indexUid} | Delete an index |
| searchGetIndex | GET /v1/search/indexes/{indexUid} | Get index information |
| searchListIndexes | GET /v1/search/indexes | List all indexes |
| searchUpdateIndex | PATCH /v1/search/indexes/{indexUid} | Update index (primary key) |
searchCreateIndex
SearchSummarizedTaskView searchCreateIndex(searchIndexCreateRequest)
Create a new index
Example
// Import classes:
//import ai.hanzo.sdk.infrastructure.*
//import ai.hanzo.sdk.models.*
val apiInstance = IndexesApi()
val searchIndexCreateRequest : SearchIndexCreateRequest = // SearchIndexCreateRequest |
try {
val result : SearchSummarizedTaskView = apiInstance.searchCreateIndex(searchIndexCreateRequest)
println(result)
} catch (e: ClientException) {
println("4xx response calling IndexesApi#searchCreateIndex")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling IndexesApi#searchCreateIndex")
e.printStackTrace()
}
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| searchIndexCreateRequest | SearchIndexCreateRequest |
Return type
Authorization
Configure bearerAuth statically:
ApiClient.accessToken = ""
Configure bearerAuth dynamically:
apiInstance.accessTokenProvider = { "" }
HTTP request headers
- Content-Type: application/json
- Accept: application/json
searchDeleteIndex
SearchSummarizedTaskView searchDeleteIndex(indexUid)
Delete an index
Example
// Import classes:
//import ai.hanzo.sdk.infrastructure.*
//import ai.hanzo.sdk.models.*
val apiInstance = IndexesApi()
val indexUid : kotlin.String = indexUid_example // kotlin.String | Unique index identifier
try {
val result : SearchSummarizedTaskView = apiInstance.searchDeleteIndex(indexUid)
println(result)
} catch (e: ClientException) {
println("4xx response calling IndexesApi#searchDeleteIndex")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling IndexesApi#searchDeleteIndex")
e.printStackTrace()
}
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| indexUid | kotlin.String | Unique index identifier |
Return type
Authorization
Configure bearerAuth statically:
ApiClient.accessToken = ""
Configure bearerAuth dynamically:
apiInstance.accessTokenProvider = { "" }
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
searchGetIndex
SearchIndexView searchGetIndex(indexUid)
Get index information
Example
// Import classes:
//import ai.hanzo.sdk.infrastructure.*
//import ai.hanzo.sdk.models.*
val apiInstance = IndexesApi()
val indexUid : kotlin.String = indexUid_example // kotlin.String | Unique index identifier
try {
val result : SearchIndexView = apiInstance.searchGetIndex(indexUid)
println(result)
} catch (e: ClientException) {
println("4xx response calling IndexesApi#searchGetIndex")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling IndexesApi#searchGetIndex")
e.printStackTrace()
}
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| indexUid | kotlin.String | Unique index identifier |
Return type
Authorization
Configure bearerAuth statically:
ApiClient.accessToken = ""
Configure bearerAuth dynamically:
apiInstance.accessTokenProvider = { "" }
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
searchListIndexes
SearchPaginatedIndexes searchListIndexes(offset, limit)
List all indexes
Example
// Import classes:
//import ai.hanzo.sdk.infrastructure.*
//import ai.hanzo.sdk.models.*
val apiInstance = IndexesApi()
val offset : kotlin.Int = 56 // kotlin.Int |
val limit : kotlin.Int = 56 // kotlin.Int |
try {
val result : SearchPaginatedIndexes = apiInstance.searchListIndexes(offset, limit)
println(result)
} catch (e: ClientException) {
println("4xx response calling IndexesApi#searchListIndexes")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling IndexesApi#searchListIndexes")
e.printStackTrace()
}
Parameters
| offset | kotlin.Int| | [optional] [default to 0] |
| Name | Type | Description | Notes |
|---|---|---|---|
| limit | kotlin.Int | [optional] [default to 20] |
Return type
Authorization
Configure bearerAuth statically:
ApiClient.accessToken = ""
Configure bearerAuth dynamically:
apiInstance.accessTokenProvider = { "" }
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
searchUpdateIndex
SearchSummarizedTaskView searchUpdateIndex(indexUid, searchUpdateIndexRequest)
Update index (primary key)
Example
// Import classes:
//import ai.hanzo.sdk.infrastructure.*
//import ai.hanzo.sdk.models.*
val apiInstance = IndexesApi()
val indexUid : kotlin.String = indexUid_example // kotlin.String | Unique index identifier
val searchUpdateIndexRequest : SearchUpdateIndexRequest = // SearchUpdateIndexRequest |
try {
val result : SearchSummarizedTaskView = apiInstance.searchUpdateIndex(indexUid, searchUpdateIndexRequest)
println(result)
} catch (e: ClientException) {
println("4xx response calling IndexesApi#searchUpdateIndex")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling IndexesApi#searchUpdateIndex")
e.printStackTrace()
}
Parameters
| indexUid | kotlin.String| Unique index identifier | |
| Name | Type | Description | Notes |
|---|---|---|---|
| searchUpdateIndexRequest | SearchUpdateIndexRequest |
Return type
Authorization
Configure bearerAuth statically:
ApiClient.accessToken = ""
Configure bearerAuth dynamically:
apiInstance.accessTokenProvider = { "" }
HTTP request headers
- Content-Type: application/json
- Accept: application/json