All URIs are relative to http://localhost
Method | HTTP request | Description |
---|---|---|
CreateSavedViews | Post /api/{org_id}/savedviews | |
DeleteSavedViews | Delete /api/{org_id}/savedviews/{view_id} | |
GetSavedView | Get /api/{org_id}/savedviews/{view_id} | |
ListSavedViews | Get /api/{org_id}/savedviews | |
UpdateSavedViews | Put /api/{org_id}/savedviews/{view_id} |
CreateViewResponse CreateSavedViews(ctx, orgId).CreateViewRequest(createViewRequest).Execute()
package main
import (
"context"
"fmt"
"os"
openobserve "github.com/rachzy/sdk-go-openobserve"
)
func main() {
orgId := "orgId_example" // string | Organization name
createViewRequest := *openobserve.NewCreateViewRequest(interface{}(123), "ViewName_example") // CreateViewRequest | Create view data
configuration := openobserve.NewConfiguration()
apiClient := openobserve.NewAPIClient(configuration)
resp, r, err := apiClient.SavedViewsAPI.CreateSavedViews(context.Background(), orgId).CreateViewRequest(createViewRequest).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `SavedViewsAPI.CreateSavedViews``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `CreateSavedViews`: CreateViewResponse
fmt.Fprintf(os.Stdout, "Response from `SavedViewsAPI.CreateSavedViews`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
orgId | string | Organization name |
Other parameters are passed through a pointer to a apiCreateSavedViewsRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
createViewRequest | CreateViewRequest | Create view data |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
DeleteViewResponse DeleteSavedViews(ctx, orgId, viewId).Execute()
package main
import (
"context"
"fmt"
"os"
openobserve "github.com/rachzy/sdk-go-openobserve"
)
func main() {
orgId := "orgId_example" // string | Organization name
viewId := "viewId_example" // string | The view_id to delete
configuration := openobserve.NewConfiguration()
apiClient := openobserve.NewAPIClient(configuration)
resp, r, err := apiClient.SavedViewsAPI.DeleteSavedViews(context.Background(), orgId, viewId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `SavedViewsAPI.DeleteSavedViews``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `DeleteSavedViews`: DeleteViewResponse
fmt.Fprintf(os.Stdout, "Response from `SavedViewsAPI.DeleteSavedViews`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
orgId | string | Organization name | |
viewId | string | The view_id to delete |
Other parameters are passed through a pointer to a apiDeleteSavedViewsRequest 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]
View GetSavedView(ctx, orgId, viewId).Execute()
package main
import (
"context"
"fmt"
"os"
openobserve "github.com/rachzy/sdk-go-openobserve"
)
func main() {
orgId := "orgId_example" // string | Organization name
viewId := "viewId_example" // string | The view_id which was stored
configuration := openobserve.NewConfiguration()
apiClient := openobserve.NewAPIClient(configuration)
resp, r, err := apiClient.SavedViewsAPI.GetSavedView(context.Background(), orgId, viewId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `SavedViewsAPI.GetSavedView``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetSavedView`: View
fmt.Fprintf(os.Stdout, "Response from `SavedViewsAPI.GetSavedView`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
orgId | string | Organization name | |
viewId | string | The view_id which was stored |
Other parameters are passed through a pointer to a apiGetSavedViewRequest 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]
ViewsWithoutData ListSavedViews(ctx, orgId).Execute()
package main
import (
"context"
"fmt"
"os"
openobserve "github.com/rachzy/sdk-go-openobserve"
)
func main() {
orgId := "orgId_example" // string | Organization name
configuration := openobserve.NewConfiguration()
apiClient := openobserve.NewAPIClient(configuration)
resp, r, err := apiClient.SavedViewsAPI.ListSavedViews(context.Background(), orgId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `SavedViewsAPI.ListSavedViews``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `ListSavedViews`: ViewsWithoutData
fmt.Fprintf(os.Stdout, "Response from `SavedViewsAPI.ListSavedViews`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
orgId | string | Organization name |
Other parameters are passed through a pointer to a apiListSavedViewsRequest 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]
View UpdateSavedViews(ctx, orgId, viewId).UpdateViewRequest(updateViewRequest).Execute()
package main
import (
"context"
"fmt"
"os"
openobserve "github.com/rachzy/sdk-go-openobserve"
)
func main() {
orgId := "orgId_example" // string | Organization name
viewId := "viewId_example" // string | View id to be updated
updateViewRequest := *openobserve.NewUpdateViewRequest(interface{}(123), "ViewName_example") // UpdateViewRequest | Update view data
configuration := openobserve.NewConfiguration()
apiClient := openobserve.NewAPIClient(configuration)
resp, r, err := apiClient.SavedViewsAPI.UpdateSavedViews(context.Background(), orgId, viewId).UpdateViewRequest(updateViewRequest).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `SavedViewsAPI.UpdateSavedViews``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `UpdateSavedViews`: View
fmt.Fprintf(os.Stdout, "Response from `SavedViewsAPI.UpdateSavedViews`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
orgId | string | Organization name | |
viewId | string | View id to be updated |
Other parameters are passed through a pointer to a apiUpdateSavedViewsRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
updateViewRequest | UpdateViewRequest | Update view data |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]