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