bunnyshell.com/sdk@v0.16.0/docs/EventAPI.md (about) 1 # \EventAPI 2 3 All URIs are relative to *https://api.environments.bunnyshell.com* 4 5 Method | HTTP request | Description 6 ------------- | ------------- | ------------- 7 [**EventList**](EventAPI.md#EventList) | **Get** /v1/events | List events matching any selected filters. 8 [**EventView**](EventAPI.md#EventView) | **Get** /v1/events/{id} | View a specific event. 9 10 11 12 ## EventList 13 14 > PaginatedEventCollection EventList(ctx).Page(page).Type_(type_).Status(status).Environment(environment).Organization(organization).Execute() 15 16 List events matching any selected filters. 17 18 19 20 ### Example 21 22 ```go 23 package main 24 25 import ( 26 "context" 27 "fmt" 28 "os" 29 openapiclient "bunnyshell.com/sdk" 30 ) 31 32 func main() { 33 page := int32(56) // int32 | The collection page number (optional) (default to 1) 34 type_ := "env_create" // string | Filter by type (optional) 35 status := "new" // string | Filter by status (optional) 36 environment := "environment_example" // string | Filter by environment (optional) 37 organization := "organization_example" // string | Filter by organization (optional) 38 39 configuration := openapiclient.NewConfiguration() 40 apiClient := openapiclient.NewAPIClient(configuration) 41 resp, r, err := apiClient.EventAPI.EventList(context.Background()).Page(page).Type_(type_).Status(status).Environment(environment).Organization(organization).Execute() 42 if err != nil { 43 fmt.Fprintf(os.Stderr, "Error when calling `EventAPI.EventList``: %v\n", err) 44 fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) 45 } 46 // response from `EventList`: PaginatedEventCollection 47 fmt.Fprintf(os.Stdout, "Response from `EventAPI.EventList`: %v\n", resp) 48 } 49 ``` 50 51 ### Path Parameters 52 53 54 55 ### Other Parameters 56 57 Other parameters are passed through a pointer to a apiEventListRequest struct via the builder pattern 58 59 60 Name | Type | Description | Notes 61 ------------- | ------------- | ------------- | ------------- 62 **page** | **int32** | The collection page number | [default to 1] 63 **type_** | **string** | Filter by type | 64 **status** | **string** | Filter by status | 65 **environment** | **string** | Filter by environment | 66 **organization** | **string** | Filter by organization | 67 68 ### Return type 69 70 [**PaginatedEventCollection**](PaginatedEventCollection.md) 71 72 ### Authorization 73 74 [JWT](../README.md#JWT), [ApiKeyAuth](../README.md#ApiKeyAuth) 75 76 ### HTTP request headers 77 78 - **Content-Type**: Not defined 79 - **Accept**: application/hal+json, application/problem+json 80 81 [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) 82 [[Back to Model list]](../README.md#documentation-for-models) 83 [[Back to README]](../README.md) 84 85 86 ## EventView 87 88 > EventItem EventView(ctx, id).Execute() 89 90 View a specific event. 91 92 93 94 ### Example 95 96 ```go 97 package main 98 99 import ( 100 "context" 101 "fmt" 102 "os" 103 openapiclient "bunnyshell.com/sdk" 104 ) 105 106 func main() { 107 id := "id_example" // string | Resource identifier 108 109 configuration := openapiclient.NewConfiguration() 110 apiClient := openapiclient.NewAPIClient(configuration) 111 resp, r, err := apiClient.EventAPI.EventView(context.Background(), id).Execute() 112 if err != nil { 113 fmt.Fprintf(os.Stderr, "Error when calling `EventAPI.EventView``: %v\n", err) 114 fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) 115 } 116 // response from `EventView`: EventItem 117 fmt.Fprintf(os.Stdout, "Response from `EventAPI.EventView`: %v\n", resp) 118 } 119 ``` 120 121 ### Path Parameters 122 123 124 Name | Type | Description | Notes 125 ------------- | ------------- | ------------- | ------------- 126 **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. 127 **id** | **string** | Resource identifier | 128 129 ### Other Parameters 130 131 Other parameters are passed through a pointer to a apiEventViewRequest struct via the builder pattern 132 133 134 Name | Type | Description | Notes 135 ------------- | ------------- | ------------- | ------------- 136 137 138 ### Return type 139 140 [**EventItem**](EventItem.md) 141 142 ### Authorization 143 144 [JWT](../README.md#JWT), [ApiKeyAuth](../README.md#ApiKeyAuth) 145 146 ### HTTP request headers 147 148 - **Content-Type**: Not defined 149 - **Accept**: application/hal+json, application/problem+json 150 151 [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) 152 [[Back to Model list]](../README.md#documentation-for-models) 153 [[Back to README]](../README.md) 154