All URIs are relative to http://127.0.0.1:9308
| Method | HTTP request | Description |
|---|---|---|
| Sql | Post /sql | Perform SQL requests |
| Token | Post /token | Create or rotate a bearer token |
SqlResponse Sql(ctx).Body(body).RawResponse(rawResponse).Execute()
Perform SQL requests
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/manticoresoftware/manticoresearch-go"
)
func main() {
body := "SHOW TABLES" // string | A query parameter string.
rawResponse := true // bool | Optional parameter, defines a format of response. Can be set to `False` for Select only queries and set to `True` for any type of queries. Default value is 'True'. (optional) (default to true)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.UtilsAPI.Sql(context.Background()).Body(body).RawResponse(rawResponse).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `UtilsAPI.Sql``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `Sql`: SqlResponse
fmt.Fprintf(os.Stdout, "Response from `UtilsAPI.Sql`: %v\n", resp)
}Other parameters are passed through a pointer to a apiSqlRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|---|---|---|
| body | string | A query parameter string. | |
| rawResponse | bool | Optional parameter, defines a format of response. Can be set to `False` for Select only queries and set to `True` for any type of queries. Default value is 'True'. | [default to true] |
- Content-Type: text/plain
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
string Token(ctx).Body(body).Execute()
Create or rotate a bearer token
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/manticoresoftware/manticoresearch-go"
)
func main() {
body := map[string]interface{}{ ... } // map[string]interface{} |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.UtilsAPI.Token(context.Background()).Body(body).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `UtilsAPI.Token``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `Token`: string
fmt.Fprintf(os.Stdout, "Response from `UtilsAPI.Token`: %v\n", resp)
}Other parameters are passed through a pointer to a apiTokenRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|---|---|---|
| body | map[string]interface{} |
string
- Content-Type: application/json
- Accept: application/json, text/plain
[Back to top] [Back to API list] [Back to Model list] [Back to README]