Skip to content

Latest commit

 

History

History
333 lines (234 loc) · 11.1 KB

SavedViewsAPI.md

File metadata and controls

333 lines (234 loc) · 11.1 KB

\SavedViewsAPI

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}

CreateSavedViews

CreateViewResponse CreateSavedViews(ctx, orgId).CreateViewRequest(createViewRequest).Execute()

Example

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)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
orgId string Organization name

Other Parameters

Other parameters are passed through a pointer to a apiCreateSavedViewsRequest struct via the builder pattern

Name Type Description Notes

createViewRequest | CreateViewRequest | Create view data |

Return type

CreateViewResponse

Authorization

Authorization

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

DeleteSavedViews

DeleteViewResponse DeleteSavedViews(ctx, orgId, viewId).Execute()

Example

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)
}

Path Parameters

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

Other parameters are passed through a pointer to a apiDeleteSavedViewsRequest struct via the builder pattern

Name Type Description Notes

Return type

DeleteViewResponse

Authorization

Authorization

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

GetSavedView

View GetSavedView(ctx, orgId, viewId).Execute()

Example

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)
}

Path Parameters

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

Other parameters are passed through a pointer to a apiGetSavedViewRequest struct via the builder pattern

Name Type Description Notes

Return type

View

Authorization

Authorization

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

ListSavedViews

ViewsWithoutData ListSavedViews(ctx, orgId).Execute()

Example

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)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
orgId string Organization name

Other Parameters

Other parameters are passed through a pointer to a apiListSavedViewsRequest struct via the builder pattern

Name Type Description Notes

Return type

ViewsWithoutData

Authorization

Authorization

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

UpdateSavedViews

View UpdateSavedViews(ctx, orgId, viewId).UpdateViewRequest(updateViewRequest).Execute()

Example

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)
}

Path Parameters

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

Other parameters are passed through a pointer to a apiUpdateSavedViewsRequest struct via the builder pattern

Name Type Description Notes

updateViewRequest | UpdateViewRequest | Update view data |

Return type

View

Authorization

Authorization

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]