All URIs are relative to http://localhost
| Method | HTTP request | Description |
|---|---|---|
| CustomerDetail | Get /api/v1/customers/{cUUID} | Get a customer's details |
| DeleteCustomer | Delete /api/v1/customers/{cUUID} | Delete a customer |
| GetHostInfo | Get /api/v1/customers/{cUUID}/host_info | Get a customer's host info |
| ListOfCustomers | Get /api/v1/customers | List customers |
| Metrics | Post /api/v1/customers/{cUUID}/metrics | Add metrics to a customer |
| UpdateCustomer | Put /api/v1/customers/{cUUID} | Update a customer |
CustomerDetailsData CustomerDetail(ctx, cUUID).Execute()
Get a customer's details
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/yugabyte/platform-go-client/v1"
)
func main() {
cUUID := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.CustomerManagementAPI.CustomerDetail(context.Background(), cUUID).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `CustomerManagementAPI.CustomerDetail``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `CustomerDetail`: CustomerDetailsData
fmt.Fprintf(os.Stdout, "Response from `CustomerManagementAPI.CustomerDetail`: %v\n", resp)
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| cUUID | string |
Other parameters are passed through a pointer to a apiCustomerDetailRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
YBPSuccess DeleteCustomer(ctx, cUUID).Request(request).Execute()
Delete a customer
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/yugabyte/platform-go-client/v1"
)
func main() {
cUUID := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string |
request := TODO // interface{} | (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.CustomerManagementAPI.DeleteCustomer(context.Background(), cUUID).Request(request).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `CustomerManagementAPI.DeleteCustomer``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `DeleteCustomer`: YBPSuccess
fmt.Fprintf(os.Stdout, "Response from `CustomerManagementAPI.DeleteCustomer`: %v\n", resp)
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| cUUID | string |
Other parameters are passed through a pointer to a apiDeleteCustomerRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
request | interface{} | |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
map[string]map[string]interface{} GetHostInfo(ctx, cUUID).Execute()
Get a customer's host info
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/yugabyte/platform-go-client/v1"
)
func main() {
cUUID := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.CustomerManagementAPI.GetHostInfo(context.Background(), cUUID).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `CustomerManagementAPI.GetHostInfo``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetHostInfo`: map[string]map[string]interface{}
fmt.Fprintf(os.Stdout, "Response from `CustomerManagementAPI.GetHostInfo`: %v\n", resp)
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| cUUID | string |
Other parameters are passed through a pointer to a apiGetHostInfoRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
map[string]map[string]interface{}
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
[]Customer ListOfCustomers(ctx).Request(request).Execute()
List customers
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/yugabyte/platform-go-client/v1"
)
func main() {
request := TODO // interface{} | (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.CustomerManagementAPI.ListOfCustomers(context.Background()).Request(request).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `CustomerManagementAPI.ListOfCustomers``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `ListOfCustomers`: []Customer
fmt.Fprintf(os.Stdout, "Response from `CustomerManagementAPI.ListOfCustomers`: %v\n", resp)
}Other parameters are passed through a pointer to a apiListOfCustomersRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|---|---|---|
| request | interface{} |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
map[string]map[string]interface{} Metrics(ctx, cUUID).Metrics(metrics).Request(request).Execute()
Add metrics to a customer
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/yugabyte/platform-go-client/v1"
)
func main() {
cUUID := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string |
metrics := *openapiclient.NewMetricQueryParams(false, int64(123), "XclusterConfigUuid_example") // MetricQueryParams | Metrics to be added
request := TODO // interface{} | (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.CustomerManagementAPI.Metrics(context.Background(), cUUID).Metrics(metrics).Request(request).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `CustomerManagementAPI.Metrics``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `Metrics`: map[string]map[string]interface{}
fmt.Fprintf(os.Stdout, "Response from `CustomerManagementAPI.Metrics`: %v\n", resp)
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| cUUID | string |
Other parameters are passed through a pointer to a apiMetricsRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
metrics | MetricQueryParams | Metrics to be added | request | interface{} | |
map[string]map[string]interface{}
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Customer UpdateCustomer(ctx, cUUID).Customer(customer).Request(request).Execute()
Update a customer
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/yugabyte/platform-go-client/v1"
)
func main() {
cUUID := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string |
customer := *openapiclient.NewCustomerAlertData(*openapiclient.NewAlertingData(), "CallhomeLevel_example", *openapiclient.NewSmtpData()) // CustomerAlertData | Customer data to be updated
request := TODO // interface{} | (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.CustomerManagementAPI.UpdateCustomer(context.Background(), cUUID).Customer(customer).Request(request).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `CustomerManagementAPI.UpdateCustomer``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `UpdateCustomer`: Customer
fmt.Fprintf(os.Stdout, "Response from `CustomerManagementAPI.UpdateCustomer`: %v\n", resp)
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| cUUID | string |
Other parameters are passed through a pointer to a apiUpdateCustomerRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
customer | CustomerAlertData | Customer data to be updated | request | interface{} | |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]