diff --git a/docs/AppsApi.md b/docs/AppsApi.md deleted file mode 100644 index 9574c66..0000000 --- a/docs/AppsApi.md +++ /dev/null @@ -1,219 +0,0 @@ -# \AppsAPI - -All URIs are relative to *https://api.opal.dev/v1* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**GetApp**](AppsAPI.md#GetApp) | **Get** /apps/{app_id} | -[**GetApps**](AppsAPI.md#GetApps) | **Get** /apps | -[**GetSyncErrors**](AppsAPI.md#GetSyncErrors) | **Get** /sync_errors | - - - -## GetApp - -> App GetApp(ctx, appId).Execute() - - - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "github.com/opalsecurity/opal-go" -) - -func main() { - appId := "32acc112-21ff-4669-91c2-21e27683eaa1" // string | The ID of the app. - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.AppsAPI.GetApp(context.Background(), appId).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `AppsAPI.GetApp``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetApp`: App - fmt.Fprintf(os.Stdout, "Response from `AppsAPI.GetApp`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**appId** | **string** | The ID of the app. | - -### Other Parameters - -Other parameters are passed through a pointer to a apiGetAppRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - -### Return type - -[**App**](App.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## GetApps - -> AppsList GetApps(ctx).AppTypeFilter(appTypeFilter).OwnerFilter(ownerFilter).Execute() - - - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "github.com/opalsecurity/opal-go" -) - -func main() { - appTypeFilter := []openapiclient.AppTypeEnum{openapiclient.AppTypeEnum("ACTIVE_DIRECTORY")} // []AppTypeEnum | A list of app types to filter by. (optional) - ownerFilter := "29827fb8-f2dd-4e80-9576-28e31e9934ac" // string | An owner ID to filter by. (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.AppsAPI.GetApps(context.Background()).AppTypeFilter(appTypeFilter).OwnerFilter(ownerFilter).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `AppsAPI.GetApps``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetApps`: AppsList - fmt.Fprintf(os.Stdout, "Response from `AppsAPI.GetApps`: %v\n", resp) -} -``` - -### Path Parameters - - - -### Other Parameters - -Other parameters are passed through a pointer to a apiGetAppsRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **appTypeFilter** | [**[]AppTypeEnum**](AppTypeEnum.md) | A list of app types to filter by. | - **ownerFilter** | **string** | An owner ID to filter by. | - -### Return type - -[**AppsList**](AppsList.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## GetSyncErrors - -> []SyncErrorList GetSyncErrors(ctx).AppId(appId).ResourceId(resourceId).GroupId(groupId).Execute() - - - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "github.com/opalsecurity/opal-go" -) - -func main() { - appId := "29827fb8-f2dd-4e80-9576-28e31e9934ac" // string | The ID of the app to list sync errors for. (optional) - resourceId := "4baf8423-db0a-4037-a4cf-f79c60cb67a5" // string | The ID of the resource to list sync errors for. (optional) - groupId := "9546209c-42c2-4801-96d7-9ec42df0f59c" // string | The ID of the group to list sync errors for. (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.AppsAPI.GetSyncErrors(context.Background()).AppId(appId).ResourceId(resourceId).GroupId(groupId).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `AppsAPI.GetSyncErrors``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetSyncErrors`: []SyncErrorList - fmt.Fprintf(os.Stdout, "Response from `AppsAPI.GetSyncErrors`: %v\n", resp) -} -``` - -### Path Parameters - - - -### Other Parameters - -Other parameters are passed through a pointer to a apiGetSyncErrorsRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **appId** | **string** | The ID of the app to list sync errors for. | - **resourceId** | **string** | The ID of the resource to list sync errors for. | - **groupId** | **string** | The ID of the group to list sync errors for. | - -### Return type - -[**[]SyncErrorList**](SyncErrorList.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/docs/ConfigurationTemplatesApi.md b/docs/ConfigurationTemplatesApi.md deleted file mode 100644 index 5837df6..0000000 --- a/docs/ConfigurationTemplatesApi.md +++ /dev/null @@ -1,273 +0,0 @@ -# \ConfigurationTemplatesAPI - -All URIs are relative to *https://api.opal.dev/v1* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**CreateConfigurationTemplate**](ConfigurationTemplatesAPI.md#CreateConfigurationTemplate) | **Post** /configuration-templates | -[**DeleteConfigurationTemplate**](ConfigurationTemplatesAPI.md#DeleteConfigurationTemplate) | **Delete** /configuration-templates/{configuration_template_id} | -[**GetConfigurationTemplates**](ConfigurationTemplatesAPI.md#GetConfigurationTemplates) | **Get** /configuration-templates | -[**UpdateConfigurationTemplate**](ConfigurationTemplatesAPI.md#UpdateConfigurationTemplate) | **Put** /configuration-templates | - - - -## CreateConfigurationTemplate - -> ConfigurationTemplate CreateConfigurationTemplate(ctx).CreateConfigurationTemplateInfo(createConfigurationTemplateInfo).Execute() - - - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "github.com/opalsecurity/opal-go" -) - -func main() { - createConfigurationTemplateInfo := *openapiclient.NewCreateConfigurationTemplateInfo("7c86c85d-0651-43e2-a748-d69d658418e8", *openapiclient.NewVisibilityInfo(openapiclient.VisibilityTypeEnum("GLOBAL")), false, false, "Prod AWS Template") // CreateConfigurationTemplateInfo | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.ConfigurationTemplatesAPI.CreateConfigurationTemplate(context.Background()).CreateConfigurationTemplateInfo(createConfigurationTemplateInfo).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `ConfigurationTemplatesAPI.CreateConfigurationTemplate``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `CreateConfigurationTemplate`: ConfigurationTemplate - fmt.Fprintf(os.Stdout, "Response from `ConfigurationTemplatesAPI.CreateConfigurationTemplate`: %v\n", resp) -} -``` - -### Path Parameters - - - -### Other Parameters - -Other parameters are passed through a pointer to a apiCreateConfigurationTemplateRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **createConfigurationTemplateInfo** | [**CreateConfigurationTemplateInfo**](CreateConfigurationTemplateInfo.md) | | - -### Return type - -[**ConfigurationTemplate**](ConfigurationTemplate.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## DeleteConfigurationTemplate - -> DeleteConfigurationTemplate(ctx, configurationTemplateId).Execute() - - - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "github.com/opalsecurity/opal-go" -) - -func main() { - configurationTemplateId := "4baf8423-db0a-4037-a4cf-f79c60cb67a5" // string | The ID of the configuration template. - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - r, err := apiClient.ConfigurationTemplatesAPI.DeleteConfigurationTemplate(context.Background(), configurationTemplateId).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `ConfigurationTemplatesAPI.DeleteConfigurationTemplate``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**configurationTemplateId** | **string** | The ID of the configuration template. | - -### Other Parameters - -Other parameters are passed through a pointer to a apiDeleteConfigurationTemplateRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - -### Return type - - (empty response body) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: Not defined - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## GetConfigurationTemplates - -> PaginatedConfigurationTemplateList GetConfigurationTemplates(ctx).Execute() - - - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "github.com/opalsecurity/opal-go" -) - -func main() { - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.ConfigurationTemplatesAPI.GetConfigurationTemplates(context.Background()).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `ConfigurationTemplatesAPI.GetConfigurationTemplates``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetConfigurationTemplates`: PaginatedConfigurationTemplateList - fmt.Fprintf(os.Stdout, "Response from `ConfigurationTemplatesAPI.GetConfigurationTemplates`: %v\n", resp) -} -``` - -### Path Parameters - -This endpoint does not need any parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a apiGetConfigurationTemplatesRequest struct via the builder pattern - - -### Return type - -[**PaginatedConfigurationTemplateList**](PaginatedConfigurationTemplateList.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## UpdateConfigurationTemplate - -> ConfigurationTemplate UpdateConfigurationTemplate(ctx).UpdateConfigurationTemplateInfo(updateConfigurationTemplateInfo).Execute() - - - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "github.com/opalsecurity/opal-go" -) - -func main() { - updateConfigurationTemplateInfo := *openapiclient.NewUpdateConfigurationTemplateInfo("7c86c85d-0651-43e2-a748-d69d658418e8") // UpdateConfigurationTemplateInfo | Configuration template to be updated - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.ConfigurationTemplatesAPI.UpdateConfigurationTemplate(context.Background()).UpdateConfigurationTemplateInfo(updateConfigurationTemplateInfo).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `ConfigurationTemplatesAPI.UpdateConfigurationTemplate``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `UpdateConfigurationTemplate`: ConfigurationTemplate - fmt.Fprintf(os.Stdout, "Response from `ConfigurationTemplatesAPI.UpdateConfigurationTemplate`: %v\n", resp) -} -``` - -### Path Parameters - - - -### Other Parameters - -Other parameters are passed through a pointer to a apiUpdateConfigurationTemplateRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **updateConfigurationTemplateInfo** | [**UpdateConfigurationTemplateInfo**](UpdateConfigurationTemplateInfo.md) | Configuration template to be updated | - -### Return type - -[**ConfigurationTemplate**](ConfigurationTemplate.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/docs/EventsApi.md b/docs/EventsApi.md deleted file mode 100644 index a13e861..0000000 --- a/docs/EventsApi.md +++ /dev/null @@ -1,89 +0,0 @@ -# \EventsAPI - -All URIs are relative to *https://api.opal.dev/v1* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**Events**](EventsAPI.md#Events) | **Get** /events | - - - -## Events - -> PaginatedEventList Events(ctx).StartDateFilter(startDateFilter).EndDateFilter(endDateFilter).ActorFilter(actorFilter).ObjectFilter(objectFilter).EventTypeFilter(eventTypeFilter).ApiTokenFilter(apiTokenFilter).Cursor(cursor).PageSize(pageSize).Execute() - - - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "github.com/opalsecurity/opal-go" -) - -func main() { - startDateFilter := "2021-11-01" // string | A start date filter for the events. (optional) - endDateFilter := "2021-11-12" // string | An end date filter for the events. (optional) - actorFilter := "29827fb8-f2dd-4e80-9576-28e31e9934ac" // string | An actor filter for the events. Supply the ID of the actor. (optional) - objectFilter := "29827fb8-f2dd-4e80-9576-28e31e9934ac" // string | An object filter for the events. Supply the ID of the object. (optional) - eventTypeFilter := "USER_MFA_RESET" // string | An event type filter for the events. (optional) - apiTokenFilter := "fullaccess:**************************M_g==" // string | An API filter for the events. Supply the name and preview of the API token. (optional) - cursor := "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" // string | The pagination cursor value. (optional) - pageSize := int32(200) // int32 | Number of results to return per page. Default is 200. (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.EventsAPI.Events(context.Background()).StartDateFilter(startDateFilter).EndDateFilter(endDateFilter).ActorFilter(actorFilter).ObjectFilter(objectFilter).EventTypeFilter(eventTypeFilter).ApiTokenFilter(apiTokenFilter).Cursor(cursor).PageSize(pageSize).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `EventsAPI.Events``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `Events`: PaginatedEventList - fmt.Fprintf(os.Stdout, "Response from `EventsAPI.Events`: %v\n", resp) -} -``` - -### Path Parameters - - - -### Other Parameters - -Other parameters are passed through a pointer to a apiEventsRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **startDateFilter** | **string** | A start date filter for the events. | - **endDateFilter** | **string** | An end date filter for the events. | - **actorFilter** | **string** | An actor filter for the events. Supply the ID of the actor. | - **objectFilter** | **string** | An object filter for the events. Supply the ID of the object. | - **eventTypeFilter** | **string** | An event type filter for the events. | - **apiTokenFilter** | **string** | An API filter for the events. Supply the name and preview of the API token. | - **cursor** | **string** | The pagination cursor value. | - **pageSize** | **int32** | Number of results to return per page. Default is 200. | - -### Return type - -[**PaginatedEventList**](PaginatedEventList.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/docs/GroupsApi.md b/docs/GroupsApi.md deleted file mode 100644 index 913de32..0000000 --- a/docs/GroupsApi.md +++ /dev/null @@ -1,2038 +0,0 @@ -# \GroupsAPI - -All URIs are relative to *https://api.opal.dev/v1* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**AddGroupContainingGroup**](GroupsAPI.md#AddGroupContainingGroup) | **Post** /groups/{group_id}/containing-groups | -[**AddGroupResource**](GroupsAPI.md#AddGroupResource) | **Post** /groups/{group_id}/resources/{resource_id} | -[**AddGroupUser**](GroupsAPI.md#AddGroupUser) | **Post** /groups/{group_id}/users/{user_id} | -[**CreateGroup**](GroupsAPI.md#CreateGroup) | **Post** /groups | -[**DeleteGroup**](GroupsAPI.md#DeleteGroup) | **Delete** /groups/{group_id} | -[**DeleteGroupUser**](GroupsAPI.md#DeleteGroupUser) | **Delete** /groups/{group_id}/users/{user_id} | -[**GetGroup**](GroupsAPI.md#GetGroup) | **Get** /groups/{group_id} | Get group by ID -[**GetGroupContainingGroup**](GroupsAPI.md#GetGroupContainingGroup) | **Get** /groups/{group_id}/containing-groups/{containing_group_id} | Get nested group by ID -[**GetGroupContainingGroups**](GroupsAPI.md#GetGroupContainingGroups) | **Get** /groups/{group_id}/containing-groups | Get nested groups -[**GetGroupMessageChannels**](GroupsAPI.md#GetGroupMessageChannels) | **Get** /groups/{group_id}/message-channels | -[**GetGroupOnCallSchedules**](GroupsAPI.md#GetGroupOnCallSchedules) | **Get** /groups/{group_id}/on-call-schedules | -[**GetGroupResources**](GroupsAPI.md#GetGroupResources) | **Get** /groups/{group_id}/resources | -[**GetGroupReviewerStages**](GroupsAPI.md#GetGroupReviewerStages) | **Get** /groups/{group_id}/reviewer-stages | -[**GetGroupReviewers**](GroupsAPI.md#GetGroupReviewers) | **Get** /groups/{group_id}/reviewers | -[**GetGroupTags**](GroupsAPI.md#GetGroupTags) | **Get** /groups/{group_id}/tags | -[**GetGroupUsers**](GroupsAPI.md#GetGroupUsers) | **Get** /groups/{group_id}/users | -[**GetGroupVisibility**](GroupsAPI.md#GetGroupVisibility) | **Get** /groups/{group_id}/visibility | -[**GetGroups**](GroupsAPI.md#GetGroups) | **Get** /groups | Get groups -[**GetUserGroups**](GroupsAPI.md#GetUserGroups) | **Get** /groups/users/{user_id} | -[**RemoveGroupContainingGroup**](GroupsAPI.md#RemoveGroupContainingGroup) | **Delete** /groups/{group_id}/containing-groups/{containing_group_id} | -[**SetGroupMessageChannels**](GroupsAPI.md#SetGroupMessageChannels) | **Put** /groups/{group_id}/message-channels | -[**SetGroupOnCallSchedules**](GroupsAPI.md#SetGroupOnCallSchedules) | **Put** /groups/{group_id}/on-call-schedules | -[**SetGroupResources**](GroupsAPI.md#SetGroupResources) | **Put** /groups/{group_id}/resources | -[**SetGroupReviewerStages**](GroupsAPI.md#SetGroupReviewerStages) | **Put** /groups/{group_id}/reviewer-stages | -[**SetGroupReviewers**](GroupsAPI.md#SetGroupReviewers) | **Put** /groups/{group_id}/reviewers | -[**SetGroupVisibility**](GroupsAPI.md#SetGroupVisibility) | **Put** /groups/{group_id}/visibility | -[**UpdateGroupUser**](GroupsAPI.md#UpdateGroupUser) | **Put** /groups/{group_id}/users/{user_id} | -[**UpdateGroups**](GroupsAPI.md#UpdateGroups) | **Put** /groups | - - - -## AddGroupContainingGroup - -> GroupContainingGroup AddGroupContainingGroup(ctx, groupId).GroupContainingGroup(groupContainingGroup).Execute() - - - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "github.com/opalsecurity/opal-go" -) - -func main() { - groupId := "4baf8423-db0a-4037-a4cf-f79c60cb67a5" // string | The ID of the group. - groupContainingGroup := *openapiclient.NewGroupContainingGroup("f454d283-ca87-4a8a-bdbb-df212eca5353") // GroupContainingGroup | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.GroupsAPI.AddGroupContainingGroup(context.Background(), groupId).GroupContainingGroup(groupContainingGroup).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `GroupsAPI.AddGroupContainingGroup``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `AddGroupContainingGroup`: GroupContainingGroup - fmt.Fprintf(os.Stdout, "Response from `GroupsAPI.AddGroupContainingGroup`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**groupId** | **string** | The ID of the group. | - -### Other Parameters - -Other parameters are passed through a pointer to a apiAddGroupContainingGroupRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - **groupContainingGroup** | [**GroupContainingGroup**](GroupContainingGroup.md) | | - -### Return type - -[**GroupContainingGroup**](GroupContainingGroup.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## AddGroupResource - -> GroupResource AddGroupResource(ctx, groupId, resourceId).AccessLevelRemoteId(accessLevelRemoteId).AddGroupResourceRequest(addGroupResourceRequest).Execute() - - - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "github.com/opalsecurity/opal-go" -) - -func main() { - groupId := "4baf8423-db0a-4037-a4cf-f79c60cb67a5" // string | The ID of the group. - resourceId := "4baf8423-db0a-4037-a4cf-f79c60cb67a5" // string | The ID of the resource. - accessLevelRemoteId := "arn:aws:iam::590304332660:role/AdministratorAccess" // string | The remote ID of the access level to grant to this user. If omitted, the default access level remote ID value (empty string) is used. (optional) - addGroupResourceRequest := *openapiclient.NewAddGroupResourceRequest() // AddGroupResourceRequest | (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.GroupsAPI.AddGroupResource(context.Background(), groupId, resourceId).AccessLevelRemoteId(accessLevelRemoteId).AddGroupResourceRequest(addGroupResourceRequest).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `GroupsAPI.AddGroupResource``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `AddGroupResource`: GroupResource - fmt.Fprintf(os.Stdout, "Response from `GroupsAPI.AddGroupResource`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**groupId** | **string** | The ID of the group. | -**resourceId** | **string** | The ID of the resource. | - -### Other Parameters - -Other parameters are passed through a pointer to a apiAddGroupResourceRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - - **accessLevelRemoteId** | **string** | The remote ID of the access level to grant to this user. If omitted, the default access level remote ID value (empty string) is used. | - **addGroupResourceRequest** | [**AddGroupResourceRequest**](AddGroupResourceRequest.md) | | - -### Return type - -[**GroupResource**](GroupResource.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## AddGroupUser - -> GroupUser AddGroupUser(ctx, groupId, userId).DurationMinutes(durationMinutes).AccessLevelRemoteId(accessLevelRemoteId).AddGroupUserRequest(addGroupUserRequest).Execute() - - - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "github.com/opalsecurity/opal-go" -) - -func main() { - groupId := "4baf8423-db0a-4037-a4cf-f79c60cb67a5" // string | The ID of the group. - userId := "f92aa855-cea9-4814-b9d8-f2a60d3e4a06" // string | The ID of the user to add. - durationMinutes := int32(60) // int32 | The duration for which the group can be accessed (in minutes). Use 0 to set to indefinite. (optional) - accessLevelRemoteId := "arn:aws:iam::590304332660:role/AdministratorAccess" // string | The remote ID of the access level to grant to this user. If omitted, the default access level remote ID value (empty string) is used. (optional) - addGroupUserRequest := *openapiclient.NewAddGroupUserRequest(int32(60)) // AddGroupUserRequest | (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.GroupsAPI.AddGroupUser(context.Background(), groupId, userId).DurationMinutes(durationMinutes).AccessLevelRemoteId(accessLevelRemoteId).AddGroupUserRequest(addGroupUserRequest).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `GroupsAPI.AddGroupUser``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `AddGroupUser`: GroupUser - fmt.Fprintf(os.Stdout, "Response from `GroupsAPI.AddGroupUser`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**groupId** | **string** | The ID of the group. | -**userId** | **string** | The ID of the user to add. | - -### Other Parameters - -Other parameters are passed through a pointer to a apiAddGroupUserRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - - **durationMinutes** | **int32** | The duration for which the group can be accessed (in minutes). Use 0 to set to indefinite. | - **accessLevelRemoteId** | **string** | The remote ID of the access level to grant to this user. If omitted, the default access level remote ID value (empty string) is used. | - **addGroupUserRequest** | [**AddGroupUserRequest**](AddGroupUserRequest.md) | | - -### Return type - -[**GroupUser**](GroupUser.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## CreateGroup - -> Group CreateGroup(ctx).CreateGroupInfo(createGroupInfo).Execute() - - - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "github.com/opalsecurity/opal-go" -) - -func main() { - createGroupInfo := *openapiclient.NewCreateGroupInfo("mongo-db-prod", openapiclient.GroupTypeEnum("ACTIVE_DIRECTORY_GROUP"), "f454d283-ca87-4a8a-bdbb-df212eca5353") // CreateGroupInfo | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.GroupsAPI.CreateGroup(context.Background()).CreateGroupInfo(createGroupInfo).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `GroupsAPI.CreateGroup``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `CreateGroup`: Group - fmt.Fprintf(os.Stdout, "Response from `GroupsAPI.CreateGroup`: %v\n", resp) -} -``` - -### Path Parameters - - - -### Other Parameters - -Other parameters are passed through a pointer to a apiCreateGroupRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **createGroupInfo** | [**CreateGroupInfo**](CreateGroupInfo.md) | | - -### Return type - -[**Group**](Group.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## DeleteGroup - -> DeleteGroup(ctx, groupId).Execute() - - - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "github.com/opalsecurity/opal-go" -) - -func main() { - groupId := "4baf8423-db0a-4037-a4cf-f79c60cb67a5" // string | The ID of the group. - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - r, err := apiClient.GroupsAPI.DeleteGroup(context.Background(), groupId).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `GroupsAPI.DeleteGroup``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**groupId** | **string** | The ID of the group. | - -### Other Parameters - -Other parameters are passed through a pointer to a apiDeleteGroupRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - -### Return type - - (empty response body) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: Not defined - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## DeleteGroupUser - -> DeleteGroupUser(ctx, groupId, userId).AccessLevelRemoteId(accessLevelRemoteId).Execute() - - - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "github.com/opalsecurity/opal-go" -) - -func main() { - groupId := "4baf8423-db0a-4037-a4cf-f79c60cb67a5" // string | The ID of the group. - userId := "f92aa855-cea9-4814-b9d8-f2a60d3e4a06" // string | The ID of a user to remove from this group. - accessLevelRemoteId := "30" // string | The remote ID of the access level for which this user has direct access. If omitted, the default access level remote ID value (empty string) is assumed. (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - r, err := apiClient.GroupsAPI.DeleteGroupUser(context.Background(), groupId, userId).AccessLevelRemoteId(accessLevelRemoteId).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `GroupsAPI.DeleteGroupUser``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**groupId** | **string** | The ID of the group. | -**userId** | **string** | The ID of a user to remove from this group. | - -### Other Parameters - -Other parameters are passed through a pointer to a apiDeleteGroupUserRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - - **accessLevelRemoteId** | **string** | The remote ID of the access level for which this user has direct access. If omitted, the default access level remote ID value (empty string) is assumed. | - -### Return type - - (empty response body) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: Not defined - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## GetGroup - -> Group GetGroup(ctx, groupId).Execute() - -Get group by ID - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "github.com/opalsecurity/opal-go" -) - -func main() { - groupId := "32acc112-21ff-4669-91c2-21e27683eaa1" // string | The ID of the group. - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.GroupsAPI.GetGroup(context.Background(), groupId).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `GroupsAPI.GetGroup``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetGroup`: Group - fmt.Fprintf(os.Stdout, "Response from `GroupsAPI.GetGroup`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**groupId** | **string** | The ID of the group. | - -### Other Parameters - -Other parameters are passed through a pointer to a apiGetGroupRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - -### Return type - -[**Group**](Group.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## GetGroupContainingGroup - -> GroupContainingGroup GetGroupContainingGroup(ctx, groupId, containingGroupId).Execute() - -Get nested group by ID - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "github.com/opalsecurity/opal-go" -) - -func main() { - groupId := "4baf8423-db0a-4037-a4cf-f79c60cb67a5" // string | The ID of the group. - containingGroupId := "4baf8423-db0a-4037-a4cf-f79c60cb67a5" // string | The ID of the containing group. - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.GroupsAPI.GetGroupContainingGroup(context.Background(), groupId, containingGroupId).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `GroupsAPI.GetGroupContainingGroup``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetGroupContainingGroup`: GroupContainingGroup - fmt.Fprintf(os.Stdout, "Response from `GroupsAPI.GetGroupContainingGroup`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**groupId** | **string** | The ID of the group. | -**containingGroupId** | **string** | The ID of the containing group. | - -### Other Parameters - -Other parameters are passed through a pointer to a apiGetGroupContainingGroupRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - - -### Return type - -[**GroupContainingGroup**](GroupContainingGroup.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## GetGroupContainingGroups - -> GroupContainingGroupList GetGroupContainingGroups(ctx, groupId).Execute() - -Get nested groups - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "github.com/opalsecurity/opal-go" -) - -func main() { - groupId := "4baf8423-db0a-4037-a4cf-f79c60cb67a5" // string | The ID of the group. - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.GroupsAPI.GetGroupContainingGroups(context.Background(), groupId).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `GroupsAPI.GetGroupContainingGroups``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetGroupContainingGroups`: GroupContainingGroupList - fmt.Fprintf(os.Stdout, "Response from `GroupsAPI.GetGroupContainingGroups`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**groupId** | **string** | The ID of the group. | - -### Other Parameters - -Other parameters are passed through a pointer to a apiGetGroupContainingGroupsRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - -### Return type - -[**GroupContainingGroupList**](GroupContainingGroupList.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## GetGroupMessageChannels - -> MessageChannelList GetGroupMessageChannels(ctx, groupId).Execute() - - - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "github.com/opalsecurity/opal-go" -) - -func main() { - groupId := "4baf8423-db0a-4037-a4cf-f79c60cb67a5" // string | The ID of the group. - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.GroupsAPI.GetGroupMessageChannels(context.Background(), groupId).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `GroupsAPI.GetGroupMessageChannels``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetGroupMessageChannels`: MessageChannelList - fmt.Fprintf(os.Stdout, "Response from `GroupsAPI.GetGroupMessageChannels`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**groupId** | **string** | The ID of the group. | - -### Other Parameters - -Other parameters are passed through a pointer to a apiGetGroupMessageChannelsRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - -### Return type - -[**MessageChannelList**](MessageChannelList.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## GetGroupOnCallSchedules - -> OnCallScheduleList GetGroupOnCallSchedules(ctx, groupId).Execute() - - - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "github.com/opalsecurity/opal-go" -) - -func main() { - groupId := "4baf8423-db0a-4037-a4cf-f79c60cb67a5" // string | The ID of the group. - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.GroupsAPI.GetGroupOnCallSchedules(context.Background(), groupId).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `GroupsAPI.GetGroupOnCallSchedules``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetGroupOnCallSchedules`: OnCallScheduleList - fmt.Fprintf(os.Stdout, "Response from `GroupsAPI.GetGroupOnCallSchedules`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**groupId** | **string** | The ID of the group. | - -### Other Parameters - -Other parameters are passed through a pointer to a apiGetGroupOnCallSchedulesRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - -### Return type - -[**OnCallScheduleList**](OnCallScheduleList.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## GetGroupResources - -> GroupResourceList GetGroupResources(ctx, groupId).Execute() - - - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "github.com/opalsecurity/opal-go" -) - -func main() { - groupId := "4baf8423-db0a-4037-a4cf-f79c60cb67a5" // string | The ID of the group. - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.GroupsAPI.GetGroupResources(context.Background(), groupId).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `GroupsAPI.GetGroupResources``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetGroupResources`: GroupResourceList - fmt.Fprintf(os.Stdout, "Response from `GroupsAPI.GetGroupResources`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**groupId** | **string** | The ID of the group. | - -### Other Parameters - -Other parameters are passed through a pointer to a apiGetGroupResourcesRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - -### Return type - -[**GroupResourceList**](GroupResourceList.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## GetGroupReviewerStages - -> []ReviewerStage GetGroupReviewerStages(ctx, groupId).Execute() - - - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "github.com/opalsecurity/opal-go" -) - -func main() { - groupId := "4baf8423-db0a-4037-a4cf-f79c60cb67a5" // string | The ID of the group. - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.GroupsAPI.GetGroupReviewerStages(context.Background(), groupId).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `GroupsAPI.GetGroupReviewerStages``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetGroupReviewerStages`: []ReviewerStage - fmt.Fprintf(os.Stdout, "Response from `GroupsAPI.GetGroupReviewerStages`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**groupId** | **string** | The ID of the group. | - -### Other Parameters - -Other parameters are passed through a pointer to a apiGetGroupReviewerStagesRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - -### Return type - -[**[]ReviewerStage**](ReviewerStage.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## GetGroupReviewers - -> []string GetGroupReviewers(ctx, groupId).Execute() - - - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "github.com/opalsecurity/opal-go" -) - -func main() { - groupId := "4baf8423-db0a-4037-a4cf-f79c60cb67a5" // string | The ID of the group. - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.GroupsAPI.GetGroupReviewers(context.Background(), groupId).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `GroupsAPI.GetGroupReviewers``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetGroupReviewers`: []string - fmt.Fprintf(os.Stdout, "Response from `GroupsAPI.GetGroupReviewers`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**groupId** | **string** | The ID of the group. | - -### Other Parameters - -Other parameters are passed through a pointer to a apiGetGroupReviewersRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - -### Return type - -**[]string** - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## GetGroupTags - -> TagsList GetGroupTags(ctx, groupId).Execute() - - - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "github.com/opalsecurity/opal-go" -) - -func main() { - groupId := "1b978423-db0a-4037-a4cf-f79c60cb67b3" // string | The ID of the group whose tags to return. - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.GroupsAPI.GetGroupTags(context.Background(), groupId).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `GroupsAPI.GetGroupTags``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetGroupTags`: TagsList - fmt.Fprintf(os.Stdout, "Response from `GroupsAPI.GetGroupTags`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**groupId** | **string** | The ID of the group whose tags to return. | - -### Other Parameters - -Other parameters are passed through a pointer to a apiGetGroupTagsRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - -### Return type - -[**TagsList**](TagsList.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## GetGroupUsers - -> GroupUserList GetGroupUsers(ctx, groupId).Cursor(cursor).PageSize(pageSize).Execute() - - - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "github.com/opalsecurity/opal-go" -) - -func main() { - groupId := "4baf8423-db0a-4037-a4cf-f79c60cb67a5" // string | The ID of the group. - cursor := "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" // string | The pagination cursor value. (optional) - pageSize := int32(200) // int32 | Number of results to return per page. Default is 200. (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.GroupsAPI.GetGroupUsers(context.Background(), groupId).Cursor(cursor).PageSize(pageSize).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `GroupsAPI.GetGroupUsers``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetGroupUsers`: GroupUserList - fmt.Fprintf(os.Stdout, "Response from `GroupsAPI.GetGroupUsers`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**groupId** | **string** | The ID of the group. | - -### Other Parameters - -Other parameters are passed through a pointer to a apiGetGroupUsersRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - **cursor** | **string** | The pagination cursor value. | - **pageSize** | **int32** | Number of results to return per page. Default is 200. | - -### Return type - -[**GroupUserList**](GroupUserList.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## GetGroupVisibility - -> VisibilityInfo GetGroupVisibility(ctx, groupId).Execute() - - - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "github.com/opalsecurity/opal-go" -) - -func main() { - groupId := "4baf8423-db0a-4037-a4cf-f79c60cb67a5" // string | The ID of the group. - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.GroupsAPI.GetGroupVisibility(context.Background(), groupId).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `GroupsAPI.GetGroupVisibility``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetGroupVisibility`: VisibilityInfo - fmt.Fprintf(os.Stdout, "Response from `GroupsAPI.GetGroupVisibility`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**groupId** | **string** | The ID of the group. | - -### Other Parameters - -Other parameters are passed through a pointer to a apiGetGroupVisibilityRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - -### Return type - -[**VisibilityInfo**](VisibilityInfo.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## GetGroups - -> PaginatedGroupsList GetGroups(ctx).Cursor(cursor).PageSize(pageSize).GroupTypeFilter(groupTypeFilter).GroupIds(groupIds).GroupName(groupName).Execute() - -Get groups - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "github.com/opalsecurity/opal-go" -) - -func main() { - cursor := "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" // string | The pagination cursor value. (optional) - pageSize := int32(200) // int32 | Number of results to return per page. Default is 200. (optional) - groupTypeFilter := openapiclient.GroupTypeEnum("ACTIVE_DIRECTORY_GROUP") // GroupTypeEnum | The group type to filter by. (optional) - groupIds := []string{"1b978423-db0a-4037-a4cf-f79c60cb67b3"} // []string | The group ids to filter by. (optional) - groupName := "example-name" // string | Group name. (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.GroupsAPI.GetGroups(context.Background()).Cursor(cursor).PageSize(pageSize).GroupTypeFilter(groupTypeFilter).GroupIds(groupIds).GroupName(groupName).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `GroupsAPI.GetGroups``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetGroups`: PaginatedGroupsList - fmt.Fprintf(os.Stdout, "Response from `GroupsAPI.GetGroups`: %v\n", resp) -} -``` - -### Path Parameters - - - -### Other Parameters - -Other parameters are passed through a pointer to a apiGetGroupsRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **cursor** | **string** | The pagination cursor value. | - **pageSize** | **int32** | Number of results to return per page. Default is 200. | - **groupTypeFilter** | [**GroupTypeEnum**](GroupTypeEnum.md) | The group type to filter by. | - **groupIds** | **[]string** | The group ids to filter by. | - **groupName** | **string** | Group name. | - -### Return type - -[**PaginatedGroupsList**](PaginatedGroupsList.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## GetUserGroups - -> GroupUserList GetUserGroups(ctx, userId).Cursor(cursor).PageSize(pageSize).Execute() - - - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "github.com/opalsecurity/opal-go" -) - -func main() { - userId := "1b978423-db0a-4037-a4cf-f79c60cb67b3" // string | The ID of the user whose groups to return. - cursor := "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" // string | The pagination cursor value. (optional) - pageSize := int32(200) // int32 | Number of results to return per page. Default is 200. (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.GroupsAPI.GetUserGroups(context.Background(), userId).Cursor(cursor).PageSize(pageSize).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `GroupsAPI.GetUserGroups``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetUserGroups`: GroupUserList - fmt.Fprintf(os.Stdout, "Response from `GroupsAPI.GetUserGroups`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**userId** | **string** | The ID of the user whose groups to return. | - -### Other Parameters - -Other parameters are passed through a pointer to a apiGetUserGroupsRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - **cursor** | **string** | The pagination cursor value. | - **pageSize** | **int32** | Number of results to return per page. Default is 200. | - -### Return type - -[**GroupUserList**](GroupUserList.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## RemoveGroupContainingGroup - -> RemoveGroupContainingGroup(ctx, groupId, containingGroupId).Execute() - - - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "github.com/opalsecurity/opal-go" -) - -func main() { - groupId := "4baf8423-db0a-4037-a4cf-f79c60cb67a5" // string | The ID of the group. - containingGroupId := "4baf8423-db0a-4037-a4cf-f79c60cb67a5" // string | The ID of the containing group. - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - r, err := apiClient.GroupsAPI.RemoveGroupContainingGroup(context.Background(), groupId, containingGroupId).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `GroupsAPI.RemoveGroupContainingGroup``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**groupId** | **string** | The ID of the group. | -**containingGroupId** | **string** | The ID of the containing group. | - -### Other Parameters - -Other parameters are passed through a pointer to a apiRemoveGroupContainingGroupRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - - -### Return type - - (empty response body) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: Not defined - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## SetGroupMessageChannels - -> []string SetGroupMessageChannels(ctx, groupId).MessageChannelIDList(messageChannelIDList).Execute() - - - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "github.com/opalsecurity/opal-go" -) - -func main() { - groupId := "4baf8423-db0a-4037-a4cf-f79c60cb67a5" // string | The ID of the group. - messageChannelIDList := *openapiclient.NewMessageChannelIDList([]string{"MessageChannelIds_example"}) // MessageChannelIDList | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.GroupsAPI.SetGroupMessageChannels(context.Background(), groupId).MessageChannelIDList(messageChannelIDList).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `GroupsAPI.SetGroupMessageChannels``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `SetGroupMessageChannels`: []string - fmt.Fprintf(os.Stdout, "Response from `GroupsAPI.SetGroupMessageChannels`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**groupId** | **string** | The ID of the group. | - -### Other Parameters - -Other parameters are passed through a pointer to a apiSetGroupMessageChannelsRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - **messageChannelIDList** | [**MessageChannelIDList**](MessageChannelIDList.md) | | - -### Return type - -**[]string** - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## SetGroupOnCallSchedules - -> []string SetGroupOnCallSchedules(ctx, groupId).OnCallScheduleIDList(onCallScheduleIDList).Execute() - - - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "github.com/opalsecurity/opal-go" -) - -func main() { - groupId := "4baf8423-db0a-4037-a4cf-f79c60cb67a5" // string | The ID of the group. - onCallScheduleIDList := *openapiclient.NewOnCallScheduleIDList([]string{"OnCallScheduleIds_example"}) // OnCallScheduleIDList | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.GroupsAPI.SetGroupOnCallSchedules(context.Background(), groupId).OnCallScheduleIDList(onCallScheduleIDList).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `GroupsAPI.SetGroupOnCallSchedules``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `SetGroupOnCallSchedules`: []string - fmt.Fprintf(os.Stdout, "Response from `GroupsAPI.SetGroupOnCallSchedules`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**groupId** | **string** | The ID of the group. | - -### Other Parameters - -Other parameters are passed through a pointer to a apiSetGroupOnCallSchedulesRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - **onCallScheduleIDList** | [**OnCallScheduleIDList**](OnCallScheduleIDList.md) | | - -### Return type - -**[]string** - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## SetGroupResources - -> SetGroupResources(ctx, groupId).UpdateGroupResourcesInfo(updateGroupResourcesInfo).Execute() - - - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "github.com/opalsecurity/opal-go" -) - -func main() { - groupId := "4baf8423-db0a-4037-a4cf-f79c60cb67a5" // string | The ID of the group. - updateGroupResourcesInfo := *openapiclient.NewUpdateGroupResourcesInfo([]openapiclient.ResourceWithAccessLevel{*openapiclient.NewResourceWithAccessLevel("b5a5ca27-0ea3-4d86-9199-2126d57d1fbd")}) // UpdateGroupResourcesInfo | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - r, err := apiClient.GroupsAPI.SetGroupResources(context.Background(), groupId).UpdateGroupResourcesInfo(updateGroupResourcesInfo).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `GroupsAPI.SetGroupResources``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**groupId** | **string** | The ID of the group. | - -### Other Parameters - -Other parameters are passed through a pointer to a apiSetGroupResourcesRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - **updateGroupResourcesInfo** | [**UpdateGroupResourcesInfo**](UpdateGroupResourcesInfo.md) | | - -### Return type - - (empty response body) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: Not defined - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## SetGroupReviewerStages - -> []ReviewerStage SetGroupReviewerStages(ctx, groupId).ReviewerStageList(reviewerStageList).Execute() - - - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "github.com/opalsecurity/opal-go" -) - -func main() { - groupId := "4baf8423-db0a-4037-a4cf-f79c60cb67a5" // string | The ID of the group. - reviewerStageList := *openapiclient.NewReviewerStageList([]openapiclient.ReviewerStage{*openapiclient.NewReviewerStage(false, "AND", []string{"OwnerIds_example"})}) // ReviewerStageList | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.GroupsAPI.SetGroupReviewerStages(context.Background(), groupId).ReviewerStageList(reviewerStageList).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `GroupsAPI.SetGroupReviewerStages``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `SetGroupReviewerStages`: []ReviewerStage - fmt.Fprintf(os.Stdout, "Response from `GroupsAPI.SetGroupReviewerStages`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**groupId** | **string** | The ID of the group. | - -### Other Parameters - -Other parameters are passed through a pointer to a apiSetGroupReviewerStagesRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - **reviewerStageList** | [**ReviewerStageList**](ReviewerStageList.md) | | - -### Return type - -[**[]ReviewerStage**](ReviewerStage.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## SetGroupReviewers - -> []string SetGroupReviewers(ctx, groupId).ReviewerIDList(reviewerIDList).Execute() - - - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "github.com/opalsecurity/opal-go" -) - -func main() { - groupId := "4baf8423-db0a-4037-a4cf-f79c60cb67a5" // string | The ID of the group. - reviewerIDList := *openapiclient.NewReviewerIDList([]string{"ReviewerIds_example"}) // ReviewerIDList | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.GroupsAPI.SetGroupReviewers(context.Background(), groupId).ReviewerIDList(reviewerIDList).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `GroupsAPI.SetGroupReviewers``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `SetGroupReviewers`: []string - fmt.Fprintf(os.Stdout, "Response from `GroupsAPI.SetGroupReviewers`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**groupId** | **string** | The ID of the group. | - -### Other Parameters - -Other parameters are passed through a pointer to a apiSetGroupReviewersRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - **reviewerIDList** | [**ReviewerIDList**](ReviewerIDList.md) | | - -### Return type - -**[]string** - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## SetGroupVisibility - -> VisibilityInfo SetGroupVisibility(ctx, groupId).VisibilityInfo(visibilityInfo).Execute() - - - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "github.com/opalsecurity/opal-go" -) - -func main() { - groupId := "4baf8423-db0a-4037-a4cf-f79c60cb67a5" // string | The ID of the group. - visibilityInfo := *openapiclient.NewVisibilityInfo(openapiclient.VisibilityTypeEnum("GLOBAL")) // VisibilityInfo | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.GroupsAPI.SetGroupVisibility(context.Background(), groupId).VisibilityInfo(visibilityInfo).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `GroupsAPI.SetGroupVisibility``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `SetGroupVisibility`: VisibilityInfo - fmt.Fprintf(os.Stdout, "Response from `GroupsAPI.SetGroupVisibility`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**groupId** | **string** | The ID of the group. | - -### Other Parameters - -Other parameters are passed through a pointer to a apiSetGroupVisibilityRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - **visibilityInfo** | [**VisibilityInfo**](VisibilityInfo.md) | | - -### Return type - -[**VisibilityInfo**](VisibilityInfo.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## UpdateGroupUser - -> GroupUser UpdateGroupUser(ctx, groupId, userId).UpdateGroupUserRequest(updateGroupUserRequest).Execute() - - - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "github.com/opalsecurity/opal-go" -) - -func main() { - groupId := "4baf8423-db0a-4037-a4cf-f79c60cb67a5" // string | The ID of the group. - userId := "f92aa855-cea9-4814-b9d8-f2a60d3e4a06" // string | The ID of the user whose access is being updated. - updateGroupUserRequest := *openapiclient.NewUpdateGroupUserRequest(int32(120)) // UpdateGroupUserRequest | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.GroupsAPI.UpdateGroupUser(context.Background(), groupId, userId).UpdateGroupUserRequest(updateGroupUserRequest).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `GroupsAPI.UpdateGroupUser``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `UpdateGroupUser`: GroupUser - fmt.Fprintf(os.Stdout, "Response from `GroupsAPI.UpdateGroupUser`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**groupId** | **string** | The ID of the group. | -**userId** | **string** | The ID of the user whose access is being updated. | - -### Other Parameters - -Other parameters are passed through a pointer to a apiUpdateGroupUserRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - - **updateGroupUserRequest** | [**UpdateGroupUserRequest**](UpdateGroupUserRequest.md) | | - -### Return type - -[**GroupUser**](GroupUser.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## UpdateGroups - -> UpdateGroupInfoList UpdateGroups(ctx).UpdateGroupInfoList(updateGroupInfoList).Execute() - - - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "github.com/opalsecurity/opal-go" -) - -func main() { - updateGroupInfoList := *openapiclient.NewUpdateGroupInfoList([]openapiclient.UpdateGroupInfo{*openapiclient.NewUpdateGroupInfo("f454d283-ca87-4a87-bdbb-df212eca5353")}) // UpdateGroupInfoList | Groups to be updated - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.GroupsAPI.UpdateGroups(context.Background()).UpdateGroupInfoList(updateGroupInfoList).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `GroupsAPI.UpdateGroups``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `UpdateGroups`: UpdateGroupInfoList - fmt.Fprintf(os.Stdout, "Response from `GroupsAPI.UpdateGroups`: %v\n", resp) -} -``` - -### Path Parameters - - - -### Other Parameters - -Other parameters are passed through a pointer to a apiUpdateGroupsRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **updateGroupInfoList** | [**UpdateGroupInfoList**](UpdateGroupInfoList.md) | Groups to be updated | - -### Return type - -[**UpdateGroupInfoList**](UpdateGroupInfoList.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/docs/MessageChannelsApi.md b/docs/MessageChannelsApi.md deleted file mode 100644 index a1af9f9..0000000 --- a/docs/MessageChannelsApi.md +++ /dev/null @@ -1,208 +0,0 @@ -# \MessageChannelsAPI - -All URIs are relative to *https://api.opal.dev/v1* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**CreateMessageChannel**](MessageChannelsAPI.md#CreateMessageChannel) | **Post** /message-channels | -[**GetMessageChannel**](MessageChannelsAPI.md#GetMessageChannel) | **Get** /message-channels/{message_channel_id} | Get message channel by ID -[**GetMessageChannels**](MessageChannelsAPI.md#GetMessageChannels) | **Get** /message-channels | Get message channels - - - -## CreateMessageChannel - -> MessageChannel CreateMessageChannel(ctx).CreateMessageChannelInfo(createMessageChannelInfo).Execute() - - - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "github.com/opalsecurity/opal-go" -) - -func main() { - createMessageChannelInfo := *openapiclient.NewCreateMessageChannelInfo(openapiclient.MessageChannelProviderEnum("SLACK"), "C03FJR97276") // CreateMessageChannelInfo | The `MessageChannel` object to be created. - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.MessageChannelsAPI.CreateMessageChannel(context.Background()).CreateMessageChannelInfo(createMessageChannelInfo).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `MessageChannelsAPI.CreateMessageChannel``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `CreateMessageChannel`: MessageChannel - fmt.Fprintf(os.Stdout, "Response from `MessageChannelsAPI.CreateMessageChannel`: %v\n", resp) -} -``` - -### Path Parameters - - - -### Other Parameters - -Other parameters are passed through a pointer to a apiCreateMessageChannelRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **createMessageChannelInfo** | [**CreateMessageChannelInfo**](CreateMessageChannelInfo.md) | The `MessageChannel` object to be created. | - -### Return type - -[**MessageChannel**](MessageChannel.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## GetMessageChannel - -> MessageChannel GetMessageChannel(ctx, messageChannelId).Execute() - -Get message channel by ID - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "github.com/opalsecurity/opal-go" -) - -func main() { - messageChannelId := "4baf8423-db0a-4037-a4cf-f79c60cb67a5" // string | The ID of the message_channel. - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.MessageChannelsAPI.GetMessageChannel(context.Background(), messageChannelId).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `MessageChannelsAPI.GetMessageChannel``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetMessageChannel`: MessageChannel - fmt.Fprintf(os.Stdout, "Response from `MessageChannelsAPI.GetMessageChannel`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**messageChannelId** | **string** | The ID of the message_channel. | - -### Other Parameters - -Other parameters are passed through a pointer to a apiGetMessageChannelRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - -### Return type - -[**MessageChannel**](MessageChannel.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## GetMessageChannels - -> MessageChannelList GetMessageChannels(ctx).Execute() - -Get message channels - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "github.com/opalsecurity/opal-go" -) - -func main() { - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.MessageChannelsAPI.GetMessageChannels(context.Background()).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `MessageChannelsAPI.GetMessageChannels``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetMessageChannels`: MessageChannelList - fmt.Fprintf(os.Stdout, "Response from `MessageChannelsAPI.GetMessageChannels`: %v\n", resp) -} -``` - -### Path Parameters - -This endpoint does not need any parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a apiGetMessageChannelsRequest struct via the builder pattern - - -### Return type - -[**MessageChannelList**](MessageChannelList.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/docs/OnCallSchedulesApi.md b/docs/OnCallSchedulesApi.md deleted file mode 100644 index c0e0b40..0000000 --- a/docs/OnCallSchedulesApi.md +++ /dev/null @@ -1,208 +0,0 @@ -# \OnCallSchedulesAPI - -All URIs are relative to *https://api.opal.dev/v1* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**CreateOnCallSchedule**](OnCallSchedulesAPI.md#CreateOnCallSchedule) | **Post** /on-call-schedules | -[**GetOnCallSchedule**](OnCallSchedulesAPI.md#GetOnCallSchedule) | **Get** /on-call-schedules/{on_call_schedule_id} | Get on call schedule by ID -[**GetOnCallSchedules**](OnCallSchedulesAPI.md#GetOnCallSchedules) | **Get** /on-call-schedules | Get on call schedules - - - -## CreateOnCallSchedule - -> OnCallSchedule CreateOnCallSchedule(ctx).CreateOnCallScheduleInfo(createOnCallScheduleInfo).Execute() - - - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "github.com/opalsecurity/opal-go" -) - -func main() { - createOnCallScheduleInfo := *openapiclient.NewCreateOnCallScheduleInfo(openapiclient.OnCallScheduleProviderEnum("OPSGENIE"), "PNZNINN") // CreateOnCallScheduleInfo | The `OnCallSchedule` object to be created. - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.OnCallSchedulesAPI.CreateOnCallSchedule(context.Background()).CreateOnCallScheduleInfo(createOnCallScheduleInfo).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `OnCallSchedulesAPI.CreateOnCallSchedule``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `CreateOnCallSchedule`: OnCallSchedule - fmt.Fprintf(os.Stdout, "Response from `OnCallSchedulesAPI.CreateOnCallSchedule`: %v\n", resp) -} -``` - -### Path Parameters - - - -### Other Parameters - -Other parameters are passed through a pointer to a apiCreateOnCallScheduleRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **createOnCallScheduleInfo** | [**CreateOnCallScheduleInfo**](CreateOnCallScheduleInfo.md) | The `OnCallSchedule` object to be created. | - -### Return type - -[**OnCallSchedule**](OnCallSchedule.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## GetOnCallSchedule - -> OnCallSchedule GetOnCallSchedule(ctx, onCallScheduleId).Execute() - -Get on call schedule by ID - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "github.com/opalsecurity/opal-go" -) - -func main() { - onCallScheduleId := "9546209c-42c2-4801-96d7-9ec42df0f59c" // string | The ID of the on_call_schedule. - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.OnCallSchedulesAPI.GetOnCallSchedule(context.Background(), onCallScheduleId).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `OnCallSchedulesAPI.GetOnCallSchedule``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetOnCallSchedule`: OnCallSchedule - fmt.Fprintf(os.Stdout, "Response from `OnCallSchedulesAPI.GetOnCallSchedule`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**onCallScheduleId** | **string** | The ID of the on_call_schedule. | - -### Other Parameters - -Other parameters are passed through a pointer to a apiGetOnCallScheduleRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - -### Return type - -[**OnCallSchedule**](OnCallSchedule.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## GetOnCallSchedules - -> OnCallScheduleList GetOnCallSchedules(ctx).Execute() - -Get on call schedules - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "github.com/opalsecurity/opal-go" -) - -func main() { - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.OnCallSchedulesAPI.GetOnCallSchedules(context.Background()).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `OnCallSchedulesAPI.GetOnCallSchedules``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetOnCallSchedules`: OnCallScheduleList - fmt.Fprintf(os.Stdout, "Response from `OnCallSchedulesAPI.GetOnCallSchedules`: %v\n", resp) -} -``` - -### Path Parameters - -This endpoint does not need any parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a apiGetOnCallSchedulesRequest struct via the builder pattern - - -### Return type - -[**OnCallScheduleList**](OnCallScheduleList.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/docs/OwnersApi.md b/docs/OwnersApi.md deleted file mode 100644 index 3624687..0000000 --- a/docs/OwnersApi.md +++ /dev/null @@ -1,568 +0,0 @@ -# \OwnersAPI - -All URIs are relative to *https://api.opal.dev/v1* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**CreateOwner**](OwnersAPI.md#CreateOwner) | **Post** /owners | -[**DeleteOwner**](OwnersAPI.md#DeleteOwner) | **Delete** /owners/{owner_id} | -[**GetOwner**](OwnersAPI.md#GetOwner) | **Get** /owners/{owner_id} | Get owner by ID -[**GetOwnerFromName**](OwnersAPI.md#GetOwnerFromName) | **Get** /owners/name/{owner_name} | -[**GetOwnerUsers**](OwnersAPI.md#GetOwnerUsers) | **Get** /owners/{owner_id}/users | -[**GetOwners**](OwnersAPI.md#GetOwners) | **Get** /owners | Get owners -[**SetOwnerUsers**](OwnersAPI.md#SetOwnerUsers) | **Put** /owners/{owner_id}/users | -[**UpdateOwners**](OwnersAPI.md#UpdateOwners) | **Put** /owners | - - - -## CreateOwner - -> Owner CreateOwner(ctx).CreateOwnerInfo(createOwnerInfo).Execute() - - - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "github.com/opalsecurity/opal-go" -) - -func main() { - createOwnerInfo := *openapiclient.NewCreateOwnerInfo("API Owner", []string{"UserIds_example"}) // CreateOwnerInfo | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.OwnersAPI.CreateOwner(context.Background()).CreateOwnerInfo(createOwnerInfo).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `OwnersAPI.CreateOwner``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `CreateOwner`: Owner - fmt.Fprintf(os.Stdout, "Response from `OwnersAPI.CreateOwner`: %v\n", resp) -} -``` - -### Path Parameters - - - -### Other Parameters - -Other parameters are passed through a pointer to a apiCreateOwnerRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **createOwnerInfo** | [**CreateOwnerInfo**](CreateOwnerInfo.md) | | - -### Return type - -[**Owner**](Owner.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## DeleteOwner - -> DeleteOwner(ctx, ownerId).Execute() - - - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "github.com/opalsecurity/opal-go" -) - -func main() { - ownerId := "4baf8423-db0a-4037-a4cf-f79c60cb67a5" // string | The ID of the owner. - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - r, err := apiClient.OwnersAPI.DeleteOwner(context.Background(), ownerId).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `OwnersAPI.DeleteOwner``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**ownerId** | **string** | The ID of the owner. | - -### Other Parameters - -Other parameters are passed through a pointer to a apiDeleteOwnerRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - -### Return type - - (empty response body) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: Not defined - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## GetOwner - -> Owner GetOwner(ctx, ownerId).Execute() - -Get owner by ID - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "github.com/opalsecurity/opal-go" -) - -func main() { - ownerId := "32acc112-21ff-4669-91c2-21e27683eaa1" // string | The ID of the owner. - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.OwnersAPI.GetOwner(context.Background(), ownerId).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `OwnersAPI.GetOwner``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetOwner`: Owner - fmt.Fprintf(os.Stdout, "Response from `OwnersAPI.GetOwner`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**ownerId** | **string** | The ID of the owner. | - -### Other Parameters - -Other parameters are passed through a pointer to a apiGetOwnerRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - -### Return type - -[**Owner**](Owner.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## GetOwnerFromName - -> Owner GetOwnerFromName(ctx, ownerName).Execute() - - - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "github.com/opalsecurity/opal-go" -) - -func main() { - ownerName := "MyOwner" // string | The name of the owner. - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.OwnersAPI.GetOwnerFromName(context.Background(), ownerName).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `OwnersAPI.GetOwnerFromName``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetOwnerFromName`: Owner - fmt.Fprintf(os.Stdout, "Response from `OwnersAPI.GetOwnerFromName`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**ownerName** | **string** | The name of the owner. | - -### Other Parameters - -Other parameters are passed through a pointer to a apiGetOwnerFromNameRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - -### Return type - -[**Owner**](Owner.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## GetOwnerUsers - -> UserList GetOwnerUsers(ctx, ownerId).Execute() - - - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "github.com/opalsecurity/opal-go" -) - -func main() { - ownerId := "4baf8423-db0a-4037-a4cf-f79c60cb67a5" // string | The ID of the owner. - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.OwnersAPI.GetOwnerUsers(context.Background(), ownerId).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `OwnersAPI.GetOwnerUsers``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetOwnerUsers`: UserList - fmt.Fprintf(os.Stdout, "Response from `OwnersAPI.GetOwnerUsers`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**ownerId** | **string** | The ID of the owner. | - -### Other Parameters - -Other parameters are passed through a pointer to a apiGetOwnerUsersRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - -### Return type - -[**UserList**](UserList.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## GetOwners - -> PaginatedOwnersList GetOwners(ctx).Cursor(cursor).PageSize(pageSize).Name(name).Execute() - -Get owners - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "github.com/opalsecurity/opal-go" -) - -func main() { - cursor := "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" // string | The pagination cursor value. (optional) - pageSize := int32(200) // int32 | Number of results to return per page. Default is 200. (optional) - name := "200" // string | Owner name to filter by. (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.OwnersAPI.GetOwners(context.Background()).Cursor(cursor).PageSize(pageSize).Name(name).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `OwnersAPI.GetOwners``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetOwners`: PaginatedOwnersList - fmt.Fprintf(os.Stdout, "Response from `OwnersAPI.GetOwners`: %v\n", resp) -} -``` - -### Path Parameters - - - -### Other Parameters - -Other parameters are passed through a pointer to a apiGetOwnersRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **cursor** | **string** | The pagination cursor value. | - **pageSize** | **int32** | Number of results to return per page. Default is 200. | - **name** | **string** | Owner name to filter by. | - -### Return type - -[**PaginatedOwnersList**](PaginatedOwnersList.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## SetOwnerUsers - -> UserList SetOwnerUsers(ctx, ownerId).UserIDList(userIDList).Execute() - - - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "github.com/opalsecurity/opal-go" -) - -func main() { - ownerId := "4baf8423-db0a-4037-a4cf-f79c60cb67a5" // string | The ID of the owner. - userIDList := *openapiclient.NewUserIDList([]string{"UserIds_example"}) // UserIDList | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.OwnersAPI.SetOwnerUsers(context.Background(), ownerId).UserIDList(userIDList).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `OwnersAPI.SetOwnerUsers``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `SetOwnerUsers`: UserList - fmt.Fprintf(os.Stdout, "Response from `OwnersAPI.SetOwnerUsers`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**ownerId** | **string** | The ID of the owner. | - -### Other Parameters - -Other parameters are passed through a pointer to a apiSetOwnerUsersRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - **userIDList** | [**UserIDList**](UserIDList.md) | | - -### Return type - -[**UserList**](UserList.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## UpdateOwners - -> UpdateOwnerInfoList UpdateOwners(ctx).UpdateOwnerInfoList(updateOwnerInfoList).Execute() - - - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "github.com/opalsecurity/opal-go" -) - -func main() { - updateOwnerInfoList := *openapiclient.NewUpdateOwnerInfoList([]openapiclient.UpdateOwnerInfo{*openapiclient.NewUpdateOwnerInfo("f454d283-ca87-4a8a-bdbb-df212eca5353")}) // UpdateOwnerInfoList | Owners to be updated - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.OwnersAPI.UpdateOwners(context.Background()).UpdateOwnerInfoList(updateOwnerInfoList).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `OwnersAPI.UpdateOwners``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `UpdateOwners`: UpdateOwnerInfoList - fmt.Fprintf(os.Stdout, "Response from `OwnersAPI.UpdateOwners`: %v\n", resp) -} -``` - -### Path Parameters - - - -### Other Parameters - -Other parameters are passed through a pointer to a apiUpdateOwnersRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **updateOwnerInfoList** | [**UpdateOwnerInfoList**](UpdateOwnerInfoList.md) | Owners to be updated | - -### Return type - -[**UpdateOwnerInfoList**](UpdateOwnerInfoList.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/docs/RequestsApi.md b/docs/RequestsApi.md deleted file mode 100644 index 019dfec..0000000 --- a/docs/RequestsApi.md +++ /dev/null @@ -1,594 +0,0 @@ -# \RequestsAPI - -All URIs are relative to *https://api.opal.dev/v1* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**ApproveRequest**](RequestsAPI.md#ApproveRequest) | **Post** /requests/{id}/approve | -[**CreateRequest**](RequestsAPI.md#CreateRequest) | **Post** /requests | -[**CreateRequestComment**](RequestsAPI.md#CreateRequestComment) | **Post** /requests/{id}/comments | -[**DenyRequest**](RequestsAPI.md#DenyRequest) | **Post** /requests/{id}/deny | -[**GetRequest**](RequestsAPI.md#GetRequest) | **Get** /requests/{id} | Get request by ID -[**GetRequestComments**](RequestsAPI.md#GetRequestComments) | **Get** /requests/{id}/comments | -[**GetRequests**](RequestsAPI.md#GetRequests) | **Get** /requests | Get requests -[**GetRequestsRelay**](RequestsAPI.md#GetRequestsRelay) | **Get** /requests/relay | Get requests via Relay - - - -## ApproveRequest - -> ApproveRequest200Response ApproveRequest(ctx, id).ApproveRequestRequest(approveRequestRequest).Execute() - - - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "github.com/opalsecurity/opal-go" -) - -func main() { - id := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | The ID of the request to approve - approveRequestRequest := *openapiclient.NewApproveRequestRequest(openapiclient.RequestApprovalEnum("REGULAR")) // ApproveRequestRequest | Approval parameters - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.RequestsAPI.ApproveRequest(context.Background(), id).ApproveRequestRequest(approveRequestRequest).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `RequestsAPI.ApproveRequest``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `ApproveRequest`: ApproveRequest200Response - fmt.Fprintf(os.Stdout, "Response from `RequestsAPI.ApproveRequest`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**id** | **string** | The ID of the request to approve | - -### Other Parameters - -Other parameters are passed through a pointer to a apiApproveRequestRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - **approveRequestRequest** | [**ApproveRequestRequest**](ApproveRequestRequest.md) | Approval parameters | - -### Return type - -[**ApproveRequest200Response**](ApproveRequest200Response.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## CreateRequest - -> CreateRequest200Response CreateRequest(ctx).CreateRequestInfo(createRequestInfo).Execute() - - - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "github.com/opalsecurity/opal-go" -) - -func main() { - createRequestInfo := *openapiclient.NewCreateRequestInfo([]openapiclient.CreateRequestInfoResourcesInner{*openapiclient.NewCreateRequestInfoResourcesInner()}, []openapiclient.CreateRequestInfoGroupsInner{*openapiclient.NewCreateRequestInfoGroupsInner("f454d283-ca87-4a8a-bdbb-df212eca5353")}, "Reason_example", int32(123)) // CreateRequestInfo | Resources to be updated - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.RequestsAPI.CreateRequest(context.Background()).CreateRequestInfo(createRequestInfo).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `RequestsAPI.CreateRequest``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `CreateRequest`: CreateRequest200Response - fmt.Fprintf(os.Stdout, "Response from `RequestsAPI.CreateRequest`: %v\n", resp) -} -``` - -### Path Parameters - - - -### Other Parameters - -Other parameters are passed through a pointer to a apiCreateRequestRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **createRequestInfo** | [**CreateRequestInfo**](CreateRequestInfo.md) | Resources to be updated | - -### Return type - -[**CreateRequest200Response**](CreateRequest200Response.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## CreateRequestComment - -> ApproveRequest200Response CreateRequestComment(ctx, id).CreateRequestCommentRequest(createRequestCommentRequest).Execute() - - - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "github.com/opalsecurity/opal-go" -) - -func main() { - id := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | The ID of the request to comment on - createRequestCommentRequest := *openapiclient.NewCreateRequestCommentRequest("Comment_example") // CreateRequestCommentRequest | Comment parameters - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.RequestsAPI.CreateRequestComment(context.Background(), id).CreateRequestCommentRequest(createRequestCommentRequest).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `RequestsAPI.CreateRequestComment``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `CreateRequestComment`: ApproveRequest200Response - fmt.Fprintf(os.Stdout, "Response from `RequestsAPI.CreateRequestComment`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**id** | **string** | The ID of the request to comment on | - -### Other Parameters - -Other parameters are passed through a pointer to a apiCreateRequestCommentRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - **createRequestCommentRequest** | [**CreateRequestCommentRequest**](CreateRequestCommentRequest.md) | Comment parameters | - -### Return type - -[**ApproveRequest200Response**](ApproveRequest200Response.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## DenyRequest - -> ApproveRequest200Response DenyRequest(ctx, id).DenyRequestRequest(denyRequestRequest).Execute() - - - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "github.com/opalsecurity/opal-go" -) - -func main() { - id := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | The ID of the request to deny - denyRequestRequest := *openapiclient.NewDenyRequestRequest("Denied due to insufficient justification") // DenyRequestRequest | Denial parameters - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.RequestsAPI.DenyRequest(context.Background(), id).DenyRequestRequest(denyRequestRequest).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `RequestsAPI.DenyRequest``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `DenyRequest`: ApproveRequest200Response - fmt.Fprintf(os.Stdout, "Response from `RequestsAPI.DenyRequest`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**id** | **string** | The ID of the request to deny | - -### Other Parameters - -Other parameters are passed through a pointer to a apiDenyRequestRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - **denyRequestRequest** | [**DenyRequestRequest**](DenyRequestRequest.md) | Denial parameters | - -### Return type - -[**ApproveRequest200Response**](ApproveRequest200Response.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## GetRequest - -> Request GetRequest(ctx, id).Execute() - -Get request by ID - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "github.com/opalsecurity/opal-go" -) - -func main() { - id := "4baf8423-db0a-4037-a4cf-f79c60cb67a5" // string | The ID of the request. - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.RequestsAPI.GetRequest(context.Background(), id).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `RequestsAPI.GetRequest``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetRequest`: Request - fmt.Fprintf(os.Stdout, "Response from `RequestsAPI.GetRequest`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**id** | **string** | The ID of the request. | - -### Other Parameters - -Other parameters are passed through a pointer to a apiGetRequestRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - -### Return type - -[**Request**](Request.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## GetRequestComments - -> RequestCommentList GetRequestComments(ctx, id).Execute() - - - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "github.com/opalsecurity/opal-go" -) - -func main() { - id := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | The ID of the request to get comments for - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.RequestsAPI.GetRequestComments(context.Background(), id).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `RequestsAPI.GetRequestComments``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetRequestComments`: RequestCommentList - fmt.Fprintf(os.Stdout, "Response from `RequestsAPI.GetRequestComments`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**id** | **string** | The ID of the request to get comments for | - -### Other Parameters - -Other parameters are passed through a pointer to a apiGetRequestCommentsRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - -### Return type - -[**RequestCommentList**](RequestCommentList.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## GetRequests - -> RequestList GetRequests(ctx).StartDateFilter(startDateFilter).EndDateFilter(endDateFilter).RequesterId(requesterId).TargetUserId(targetUserId).Cursor(cursor).PageSize(pageSize).ShowPendingOnly(showPendingOnly).Execute() - -Get requests - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "github.com/opalsecurity/opal-go" -) - -func main() { - startDateFilter := "2021-11-01" // string | A start date filter for the events. (optional) - endDateFilter := "2021-11-12" // string | An end date filter for the events. (optional) - requesterId := "37cb7e41-12ba-46da-92ff-030abe0450b1" // string | Filter requests by their requester ID. (optional) - targetUserId := "37cb7e41-12ba-46da-92ff-030abe0450b1" // string | Filter requests by their target user ID. (optional) - cursor := "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" // string | The pagination cursor value. (optional) - pageSize := int32(200) // int32 | Number of results to return per page. Default is 200. (optional) - showPendingOnly := true // bool | Boolean toggle for if it should only show pending requests. (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.RequestsAPI.GetRequests(context.Background()).StartDateFilter(startDateFilter).EndDateFilter(endDateFilter).RequesterId(requesterId).TargetUserId(targetUserId).Cursor(cursor).PageSize(pageSize).ShowPendingOnly(showPendingOnly).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `RequestsAPI.GetRequests``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetRequests`: RequestList - fmt.Fprintf(os.Stdout, "Response from `RequestsAPI.GetRequests`: %v\n", resp) -} -``` - -### Path Parameters - - - -### Other Parameters - -Other parameters are passed through a pointer to a apiGetRequestsRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **startDateFilter** | **string** | A start date filter for the events. | - **endDateFilter** | **string** | An end date filter for the events. | - **requesterId** | **string** | Filter requests by their requester ID. | - **targetUserId** | **string** | Filter requests by their target user ID. | - **cursor** | **string** | The pagination cursor value. | - **pageSize** | **int32** | Number of results to return per page. Default is 200. | - **showPendingOnly** | **bool** | Boolean toggle for if it should only show pending requests. | - -### Return type - -[**RequestList**](RequestList.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## GetRequestsRelay - -> RequestConnection GetRequestsRelay(ctx).First(first).After(after).Last(last).Before(before).Status(status).To(to).From(from).Execute() - -Get requests via Relay - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "github.com/opalsecurity/opal-go" -) - -func main() { - first := int32(10) // int32 | Number of results to return after the cursor. Use either first/after or last/before, not both. (optional) - after := "Y3Vyc29yOnYyOpK5MjAyMS0wMS0wN1QwNzo0MToyNy4xMTlaFjYwZmM2YmJlZjk4YzE1N2ZhNjFhYjk4Nw==" // string | Cursor to fetch results after. Used with 'first' for forward pagination. (optional) - last := int32(10) // int32 | Number of results to return before the cursor. Use either first/after or last/before, not both. (optional) - before := "Y3Vyc29yOnYyOpK5MjAyMS0wMS0wN1QwNzo0MToyNy4xMTlaFjYwZmM2YmJlZjk4YzE1N2ZhNjFhYjk4Nw==" // string | Cursor to fetch results before. Used with 'last' for backward pagination. (optional) - status := openapiclient.RequestStatusEnum("PENDING") // RequestStatusEnum | Filter requests by their status. (optional) - to := "37cb7e41-12ba-46da-92ff-030abe0450b1" // string | Filter requests assigned to a specific user ID. (optional) - from := "37cb7e41-12ba-46da-92ff-030abe0450b1" // string | Filter requests made by a specific user ID. (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.RequestsAPI.GetRequestsRelay(context.Background()).First(first).After(after).Last(last).Before(before).Status(status).To(to).From(from).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `RequestsAPI.GetRequestsRelay``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetRequestsRelay`: RequestConnection - fmt.Fprintf(os.Stdout, "Response from `RequestsAPI.GetRequestsRelay`: %v\n", resp) -} -``` - -### Path Parameters - - - -### Other Parameters - -Other parameters are passed through a pointer to a apiGetRequestsRelayRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **first** | **int32** | Number of results to return after the cursor. Use either first/after or last/before, not both. | - **after** | **string** | Cursor to fetch results after. Used with 'first' for forward pagination. | - **last** | **int32** | Number of results to return before the cursor. Use either first/after or last/before, not both. | - **before** | **string** | Cursor to fetch results before. Used with 'last' for backward pagination. | - **status** | [**RequestStatusEnum**](RequestStatusEnum.md) | Filter requests by their status. | - **to** | **string** | Filter requests assigned to a specific user ID. | - **from** | **string** | Filter requests made by a specific user ID. | - -### Return type - -[**RequestConnection**](RequestConnection.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/docs/ResourcesApi.md b/docs/ResourcesApi.md deleted file mode 100644 index f818e80..0000000 --- a/docs/ResourcesApi.md +++ /dev/null @@ -1,1913 +0,0 @@ -# \ResourcesAPI - -All URIs are relative to *https://api.opal.dev/v1* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**AddResourceNhi**](ResourcesAPI.md#AddResourceNhi) | **Post** /resources/{resource_id}/non-human-identities/{non_human_identity_id} | -[**AddResourceUser**](ResourcesAPI.md#AddResourceUser) | **Post** /resources/{resource_id}/users/{user_id} | -[**CreateResource**](ResourcesAPI.md#CreateResource) | **Post** /resources | -[**DeleteResource**](ResourcesAPI.md#DeleteResource) | **Delete** /resources/{resource_id} | -[**DeleteResourceNhi**](ResourcesAPI.md#DeleteResourceNhi) | **Delete** /resources/{resource_id}/non-human-identities/{non_human_identity_id} | -[**DeleteResourceUser**](ResourcesAPI.md#DeleteResourceUser) | **Delete** /resources/{resource_id}/users/{user_id} | -[**GetResource**](ResourcesAPI.md#GetResource) | **Get** /resources/{resource_id} | Get resource by ID -[**GetResourceMessageChannels**](ResourcesAPI.md#GetResourceMessageChannels) | **Get** /resources/{resource_id}/message-channels | -[**GetResourceNhis**](ResourcesAPI.md#GetResourceNhis) | **Get** /resources/{resource_id}/non-human-identities | -[**GetResourceReviewerStages**](ResourcesAPI.md#GetResourceReviewerStages) | **Get** /resources/{resource_id}/reviewer-stages | -[**GetResourceReviewers**](ResourcesAPI.md#GetResourceReviewers) | **Get** /resources/{resource_id}/reviewers | -[**GetResourceScopedRolePermissions**](ResourcesAPI.md#GetResourceScopedRolePermissions) | **Get** /resources/{resource_id}/scoped-role-permissions | -[**GetResourceTags**](ResourcesAPI.md#GetResourceTags) | **Get** /resources/{resource_id}/tags | -[**GetResourceUser**](ResourcesAPI.md#GetResourceUser) | **Get** /resources/{resource_id}/users/{user_id} | Get resource user -[**GetResourceUsers**](ResourcesAPI.md#GetResourceUsers) | **Get** /resources/{resource_id}/users | Get resource users -[**GetResourceVisibility**](ResourcesAPI.md#GetResourceVisibility) | **Get** /resources/{resource_id}/visibility | -[**GetResources**](ResourcesAPI.md#GetResources) | **Get** /resources | Get resources -[**GetUserResources**](ResourcesAPI.md#GetUserResources) | **Get** /resources/users/{user_id} | -[**ResourceUserAccessStatusRetrieve**](ResourcesAPI.md#ResourceUserAccessStatusRetrieve) | **Get** /resource-user-access-status/{resource_id}/{user_id} | -[**SetResourceMessageChannels**](ResourcesAPI.md#SetResourceMessageChannels) | **Put** /resources/{resource_id}/message-channels | -[**SetResourceReviewerStages**](ResourcesAPI.md#SetResourceReviewerStages) | **Put** /resources/{resource_id}/reviewer-stages | -[**SetResourceReviewers**](ResourcesAPI.md#SetResourceReviewers) | **Put** /resources/{resource_id}/reviewers | -[**SetResourceScopedRolePermissions**](ResourcesAPI.md#SetResourceScopedRolePermissions) | **Put** /resources/{resource_id}/scoped-role-permissions | -[**SetResourceVisibility**](ResourcesAPI.md#SetResourceVisibility) | **Put** /resources/{resource_id}/visibility | -[**UpdateResourceUser**](ResourcesAPI.md#UpdateResourceUser) | **Put** /resources/{resource_id}/users/{user_id} | -[**UpdateResources**](ResourcesAPI.md#UpdateResources) | **Put** /resources | - - - -## AddResourceNhi - -> ResourceNHI AddResourceNhi(ctx, resourceId, nonHumanIdentityId).AddResourceNhiRequest(addResourceNhiRequest).Execute() - - - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "github.com/opalsecurity/opal-go" -) - -func main() { - resourceId := "4baf8423-db0a-4037-a4cf-f79c60cb67a5" // string | The ID of the resource. - nonHumanIdentityId := "f92aa855-cea9-4814-b9d8-f2a60d3e4a06" // string | The resource ID of the non-human identity to add. - addResourceNhiRequest := *openapiclient.NewAddResourceNhiRequest(int32(60)) // AddResourceNhiRequest | (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.ResourcesAPI.AddResourceNhi(context.Background(), resourceId, nonHumanIdentityId).AddResourceNhiRequest(addResourceNhiRequest).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `ResourcesAPI.AddResourceNhi``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `AddResourceNhi`: ResourceNHI - fmt.Fprintf(os.Stdout, "Response from `ResourcesAPI.AddResourceNhi`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**resourceId** | **string** | The ID of the resource. | -**nonHumanIdentityId** | **string** | The resource ID of the non-human identity to add. | - -### Other Parameters - -Other parameters are passed through a pointer to a apiAddResourceNhiRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - - **addResourceNhiRequest** | [**AddResourceNhiRequest**](AddResourceNhiRequest.md) | | - -### Return type - -[**ResourceNHI**](ResourceNHI.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## AddResourceUser - -> ResourceUser AddResourceUser(ctx, resourceId, userId).DurationMinutes(durationMinutes).AccessLevelRemoteId(accessLevelRemoteId).AddResourceUserRequest(addResourceUserRequest).Execute() - - - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "github.com/opalsecurity/opal-go" -) - -func main() { - resourceId := "4baf8423-db0a-4037-a4cf-f79c60cb67a5" // string | The ID of the resource. - userId := "f92aa855-cea9-4814-b9d8-f2a60d3e4a06" // string | The ID of the user to add. - durationMinutes := int32(60) // int32 | The duration for which the resource can be accessed (in minutes). Use 0 to set to indefinite. (optional) - accessLevelRemoteId := "arn:aws:iam::590304332660:role/AdministratorAccess" // string | The remote ID of the access level to grant to this user. If omitted, the default access level remote ID value (empty string) is used. (optional) - addResourceUserRequest := *openapiclient.NewAddResourceUserRequest(int32(60)) // AddResourceUserRequest | (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.ResourcesAPI.AddResourceUser(context.Background(), resourceId, userId).DurationMinutes(durationMinutes).AccessLevelRemoteId(accessLevelRemoteId).AddResourceUserRequest(addResourceUserRequest).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `ResourcesAPI.AddResourceUser``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `AddResourceUser`: ResourceUser - fmt.Fprintf(os.Stdout, "Response from `ResourcesAPI.AddResourceUser`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**resourceId** | **string** | The ID of the resource. | -**userId** | **string** | The ID of the user to add. | - -### Other Parameters - -Other parameters are passed through a pointer to a apiAddResourceUserRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - - **durationMinutes** | **int32** | The duration for which the resource can be accessed (in minutes). Use 0 to set to indefinite. | - **accessLevelRemoteId** | **string** | The remote ID of the access level to grant to this user. If omitted, the default access level remote ID value (empty string) is used. | - **addResourceUserRequest** | [**AddResourceUserRequest**](AddResourceUserRequest.md) | | - -### Return type - -[**ResourceUser**](ResourceUser.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## CreateResource - -> Resource CreateResource(ctx).CreateResourceInfo(createResourceInfo).Execute() - - - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "github.com/opalsecurity/opal-go" -) - -func main() { - createResourceInfo := *openapiclient.NewCreateResourceInfo("mongo-db-prod", openapiclient.ResourceTypeEnum("AWS_IAM_ROLE"), "f454d283-ca87-4a8a-bdbb-df212eca5353") // CreateResourceInfo | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.ResourcesAPI.CreateResource(context.Background()).CreateResourceInfo(createResourceInfo).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `ResourcesAPI.CreateResource``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `CreateResource`: Resource - fmt.Fprintf(os.Stdout, "Response from `ResourcesAPI.CreateResource`: %v\n", resp) -} -``` - -### Path Parameters - - - -### Other Parameters - -Other parameters are passed through a pointer to a apiCreateResourceRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **createResourceInfo** | [**CreateResourceInfo**](CreateResourceInfo.md) | | - -### Return type - -[**Resource**](Resource.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## DeleteResource - -> DeleteResource(ctx, resourceId).Execute() - - - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "github.com/opalsecurity/opal-go" -) - -func main() { - resourceId := "4baf8423-db0a-4037-a4cf-f79c60cb67a5" // string | The ID of the resource. - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - r, err := apiClient.ResourcesAPI.DeleteResource(context.Background(), resourceId).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `ResourcesAPI.DeleteResource``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**resourceId** | **string** | The ID of the resource. | - -### Other Parameters - -Other parameters are passed through a pointer to a apiDeleteResourceRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - -### Return type - - (empty response body) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: Not defined - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## DeleteResourceNhi - -> DeleteResourceNhi(ctx, resourceId, nonHumanIdentityId).AccessLevelRemoteId(accessLevelRemoteId).Execute() - - - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "github.com/opalsecurity/opal-go" -) - -func main() { - resourceId := "4baf8423-db0a-4037-a4cf-f79c60cb67a5" // string | The ID of the resource. - nonHumanIdentityId := "f92aa855-cea9-4814-b9d8-f2a60d3e4a06" // string | The resource ID of the non-human identity to remove from this resource. - accessLevelRemoteId := "roles/cloudsql.instanceUser" // string | The remote ID of the access level for which this non-human identity has direct access. If omitted, the default access level remote ID value (empty string) is assumed. (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - r, err := apiClient.ResourcesAPI.DeleteResourceNhi(context.Background(), resourceId, nonHumanIdentityId).AccessLevelRemoteId(accessLevelRemoteId).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `ResourcesAPI.DeleteResourceNhi``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**resourceId** | **string** | The ID of the resource. | -**nonHumanIdentityId** | **string** | The resource ID of the non-human identity to remove from this resource. | - -### Other Parameters - -Other parameters are passed through a pointer to a apiDeleteResourceNhiRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - - **accessLevelRemoteId** | **string** | The remote ID of the access level for which this non-human identity has direct access. If omitted, the default access level remote ID value (empty string) is assumed. | - -### Return type - - (empty response body) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: Not defined - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## DeleteResourceUser - -> DeleteResourceUser(ctx, resourceId, userId).AccessLevelRemoteId(accessLevelRemoteId).Execute() - - - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "github.com/opalsecurity/opal-go" -) - -func main() { - resourceId := "4baf8423-db0a-4037-a4cf-f79c60cb67a5" // string | The ID of the resource. - userId := "f92aa855-cea9-4814-b9d8-f2a60d3e4a06" // string | The ID of a user to remove from this resource. - accessLevelRemoteId := "arn:aws:iam::590304332660:role/AdministratorAccess" // string | The remote ID of the access level for which this user has direct access. If omitted, the default access level remote ID value (empty string) is assumed. (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - r, err := apiClient.ResourcesAPI.DeleteResourceUser(context.Background(), resourceId, userId).AccessLevelRemoteId(accessLevelRemoteId).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `ResourcesAPI.DeleteResourceUser``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**resourceId** | **string** | The ID of the resource. | -**userId** | **string** | The ID of a user to remove from this resource. | - -### Other Parameters - -Other parameters are passed through a pointer to a apiDeleteResourceUserRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - - **accessLevelRemoteId** | **string** | The remote ID of the access level for which this user has direct access. If omitted, the default access level remote ID value (empty string) is assumed. | - -### Return type - - (empty response body) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: Not defined - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## GetResource - -> Resource GetResource(ctx, resourceId).Execute() - -Get resource by ID - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "github.com/opalsecurity/opal-go" -) - -func main() { - resourceId := "4baf8423-db0a-4037-a4cf-f79c60cb67a5" // string | The ID of the resource. - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.ResourcesAPI.GetResource(context.Background(), resourceId).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `ResourcesAPI.GetResource``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetResource`: Resource - fmt.Fprintf(os.Stdout, "Response from `ResourcesAPI.GetResource`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**resourceId** | **string** | The ID of the resource. | - -### Other Parameters - -Other parameters are passed through a pointer to a apiGetResourceRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - -### Return type - -[**Resource**](Resource.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## GetResourceMessageChannels - -> MessageChannelList GetResourceMessageChannels(ctx, resourceId).Execute() - - - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "github.com/opalsecurity/opal-go" -) - -func main() { - resourceId := "4baf8423-db0a-4037-a4cf-f79c60cb67a5" // string | The ID of the resource. - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.ResourcesAPI.GetResourceMessageChannels(context.Background(), resourceId).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `ResourcesAPI.GetResourceMessageChannels``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetResourceMessageChannels`: MessageChannelList - fmt.Fprintf(os.Stdout, "Response from `ResourcesAPI.GetResourceMessageChannels`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**resourceId** | **string** | The ID of the resource. | - -### Other Parameters - -Other parameters are passed through a pointer to a apiGetResourceMessageChannelsRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - -### Return type - -[**MessageChannelList**](MessageChannelList.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## GetResourceNhis - -> AccessList GetResourceNhis(ctx, resourceId).Limit(limit).Execute() - - - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "github.com/opalsecurity/opal-go" -) - -func main() { - resourceId := "4baf8423-db0a-4037-a4cf-f79c60cb67a5" // string | The ID of the resource. - limit := int32(200) // int32 | Limit the number of results returned. (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.ResourcesAPI.GetResourceNhis(context.Background(), resourceId).Limit(limit).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `ResourcesAPI.GetResourceNhis``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetResourceNhis`: AccessList - fmt.Fprintf(os.Stdout, "Response from `ResourcesAPI.GetResourceNhis`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**resourceId** | **string** | The ID of the resource. | - -### Other Parameters - -Other parameters are passed through a pointer to a apiGetResourceNhisRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - **limit** | **int32** | Limit the number of results returned. | - -### Return type - -[**AccessList**](AccessList.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## GetResourceReviewerStages - -> []ReviewerStage GetResourceReviewerStages(ctx, resourceId).Execute() - - - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "github.com/opalsecurity/opal-go" -) - -func main() { - resourceId := "4baf8423-db0a-4037-a4cf-f79c60cb67a5" // string | The ID of the resource. - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.ResourcesAPI.GetResourceReviewerStages(context.Background(), resourceId).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `ResourcesAPI.GetResourceReviewerStages``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetResourceReviewerStages`: []ReviewerStage - fmt.Fprintf(os.Stdout, "Response from `ResourcesAPI.GetResourceReviewerStages`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**resourceId** | **string** | The ID of the resource. | - -### Other Parameters - -Other parameters are passed through a pointer to a apiGetResourceReviewerStagesRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - -### Return type - -[**[]ReviewerStage**](ReviewerStage.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## GetResourceReviewers - -> []string GetResourceReviewers(ctx, resourceId).Execute() - - - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "github.com/opalsecurity/opal-go" -) - -func main() { - resourceId := "4baf8423-db0a-4037-a4cf-f79c60cb67a5" // string | The ID of the resource. - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.ResourcesAPI.GetResourceReviewers(context.Background(), resourceId).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `ResourcesAPI.GetResourceReviewers``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetResourceReviewers`: []string - fmt.Fprintf(os.Stdout, "Response from `ResourcesAPI.GetResourceReviewers`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**resourceId** | **string** | The ID of the resource. | - -### Other Parameters - -Other parameters are passed through a pointer to a apiGetResourceReviewersRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - -### Return type - -**[]string** - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## GetResourceScopedRolePermissions - -> ScopedRolePermissionList GetResourceScopedRolePermissions(ctx, resourceId).Execute() - - - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "github.com/opalsecurity/opal-go" -) - -func main() { - resourceId := "1b978423-db0a-4037-a4cf-f79c60cb67b3" // string | The ID of the resource whose scoped role permissions belong to. - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.ResourcesAPI.GetResourceScopedRolePermissions(context.Background(), resourceId).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `ResourcesAPI.GetResourceScopedRolePermissions``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetResourceScopedRolePermissions`: ScopedRolePermissionList - fmt.Fprintf(os.Stdout, "Response from `ResourcesAPI.GetResourceScopedRolePermissions`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**resourceId** | **string** | The ID of the resource whose scoped role permissions belong to. | - -### Other Parameters - -Other parameters are passed through a pointer to a apiGetResourceScopedRolePermissionsRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - -### Return type - -[**ScopedRolePermissionList**](ScopedRolePermissionList.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## GetResourceTags - -> TagsList GetResourceTags(ctx, resourceId).Execute() - - - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "github.com/opalsecurity/opal-go" -) - -func main() { - resourceId := "1b978423-db0a-4037-a4cf-f79c60cb67b3" // string | The ID of the resource whose tags to return. - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.ResourcesAPI.GetResourceTags(context.Background(), resourceId).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `ResourcesAPI.GetResourceTags``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetResourceTags`: TagsList - fmt.Fprintf(os.Stdout, "Response from `ResourcesAPI.GetResourceTags`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**resourceId** | **string** | The ID of the resource whose tags to return. | - -### Other Parameters - -Other parameters are passed through a pointer to a apiGetResourceTagsRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - -### Return type - -[**TagsList**](TagsList.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## GetResourceUser - -> GetResourceUser200Response GetResourceUser(ctx, resourceId, userId).Cursor(cursor).Execute() - -Get resource user - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "github.com/opalsecurity/opal-go" -) - -func main() { - resourceId := "32acc112-21ff-4669-91c2-21e27683eaa1" // string | The ID of the resource. - userId := "29827fb8-f2dd-4e80-9576-28e31e9934ac" // string | The ID of the user. - cursor := "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" // string | The pagination cursor value. (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.ResourcesAPI.GetResourceUser(context.Background(), resourceId, userId).Cursor(cursor).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `ResourcesAPI.GetResourceUser``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetResourceUser`: GetResourceUser200Response - fmt.Fprintf(os.Stdout, "Response from `ResourcesAPI.GetResourceUser`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**resourceId** | **string** | The ID of the resource. | -**userId** | **string** | The ID of the user. | - -### Other Parameters - -Other parameters are passed through a pointer to a apiGetResourceUserRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - - **cursor** | **string** | The pagination cursor value. | - -### Return type - -[**GetResourceUser200Response**](GetResourceUser200Response.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## GetResourceUsers - -> ResourceAccessUserList GetResourceUsers(ctx, resourceId).Limit(limit).Execute() - -Get resource users - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "github.com/opalsecurity/opal-go" -) - -func main() { - resourceId := "4baf8423-db0a-4037-a4cf-f79c60cb67a5" // string | The ID of the resource. - limit := int32(200) // int32 | Limit the number of results returned. (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.ResourcesAPI.GetResourceUsers(context.Background(), resourceId).Limit(limit).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `ResourcesAPI.GetResourceUsers``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetResourceUsers`: ResourceAccessUserList - fmt.Fprintf(os.Stdout, "Response from `ResourcesAPI.GetResourceUsers`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**resourceId** | **string** | The ID of the resource. | - -### Other Parameters - -Other parameters are passed through a pointer to a apiGetResourceUsersRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - **limit** | **int32** | Limit the number of results returned. | - -### Return type - -[**ResourceAccessUserList**](ResourceAccessUserList.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## GetResourceVisibility - -> VisibilityInfo GetResourceVisibility(ctx, resourceId).Execute() - - - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "github.com/opalsecurity/opal-go" -) - -func main() { - resourceId := "4baf8423-db0a-4037-a4cf-f79c60cb67a5" // string | The ID of the resource. - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.ResourcesAPI.GetResourceVisibility(context.Background(), resourceId).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `ResourcesAPI.GetResourceVisibility``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetResourceVisibility`: VisibilityInfo - fmt.Fprintf(os.Stdout, "Response from `ResourcesAPI.GetResourceVisibility`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**resourceId** | **string** | The ID of the resource. | - -### Other Parameters - -Other parameters are passed through a pointer to a apiGetResourceVisibilityRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - -### Return type - -[**VisibilityInfo**](VisibilityInfo.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## GetResources - -> PaginatedResourcesList GetResources(ctx).Cursor(cursor).PageSize(pageSize).ResourceTypeFilter(resourceTypeFilter).ResourceIds(resourceIds).ResourceName(resourceName).ParentResourceId(parentResourceId).AncestorResourceId(ancestorResourceId).RemoteId(remoteId).Execute() - -Get resources - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "github.com/opalsecurity/opal-go" -) - -func main() { - cursor := "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" // string | The pagination cursor value. (optional) - pageSize := int32(200) // int32 | Number of results to return per page. Default is 200. (optional) - resourceTypeFilter := openapiclient.ResourceTypeEnum("AWS_IAM_ROLE") // ResourceTypeEnum | The resource type to filter by. Required when remote_id is provided. (optional) - resourceIds := []string{"1b978423-db0a-4037-a4cf-f79c60cb67b3"} // []string | The resource ids to filter by. (optional) - resourceName := "example-name" // string | Resource name. (optional) - parentResourceId := "["4baf8423-db0a-4037-a4cf-f79c60cb67a5"]" // string | The parent resource id to filter by. (optional) - ancestorResourceId := "["4baf8423-db0a-4037-a4cf-f79c60cb67a5"]" // string | The ancestor resource id to filter by. Returns all resources that are descendants of the specified resource. (optional) - remoteId := "remoteId_example" // string | Filter resources by their remote id. This will return all resources that have a remote id that matches the provided remote id. Note that this requires resource_type_filter to be provided. (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.ResourcesAPI.GetResources(context.Background()).Cursor(cursor).PageSize(pageSize).ResourceTypeFilter(resourceTypeFilter).ResourceIds(resourceIds).ResourceName(resourceName).ParentResourceId(parentResourceId).AncestorResourceId(ancestorResourceId).RemoteId(remoteId).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `ResourcesAPI.GetResources``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetResources`: PaginatedResourcesList - fmt.Fprintf(os.Stdout, "Response from `ResourcesAPI.GetResources`: %v\n", resp) -} -``` - -### Path Parameters - - - -### Other Parameters - -Other parameters are passed through a pointer to a apiGetResourcesRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **cursor** | **string** | The pagination cursor value. | - **pageSize** | **int32** | Number of results to return per page. Default is 200. | - **resourceTypeFilter** | [**ResourceTypeEnum**](ResourceTypeEnum.md) | The resource type to filter by. Required when remote_id is provided. | - **resourceIds** | **[]string** | The resource ids to filter by. | - **resourceName** | **string** | Resource name. | - **parentResourceId** | **string** | The parent resource id to filter by. | - **ancestorResourceId** | **string** | The ancestor resource id to filter by. Returns all resources that are descendants of the specified resource. | - **remoteId** | **string** | Filter resources by their remote id. This will return all resources that have a remote id that matches the provided remote id. Note that this requires resource_type_filter to be provided. | - -### Return type - -[**PaginatedResourcesList**](PaginatedResourcesList.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## GetUserResources - -> ResourceAccessUserList GetUserResources(ctx, userId).Limit(limit).Cursor(cursor).IncludeUnmanaged(includeUnmanaged).Execute() - - - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "github.com/opalsecurity/opal-go" -) - -func main() { - userId := "4baf8423-db0a-4037-a4cf-f79c60cb67a5" // string | The ID of the user. - limit := int32(200) // int32 | Limit the number of results returned. (optional) - cursor := "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" // string | The pagination cursor value. (optional) - includeUnmanaged := false // bool | Include user's access to unmanaged resources. (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.ResourcesAPI.GetUserResources(context.Background(), userId).Limit(limit).Cursor(cursor).IncludeUnmanaged(includeUnmanaged).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `ResourcesAPI.GetUserResources``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetUserResources`: ResourceAccessUserList - fmt.Fprintf(os.Stdout, "Response from `ResourcesAPI.GetUserResources`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**userId** | **string** | The ID of the user. | - -### Other Parameters - -Other parameters are passed through a pointer to a apiGetUserResourcesRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - **limit** | **int32** | Limit the number of results returned. | - **cursor** | **string** | The pagination cursor value. | - **includeUnmanaged** | **bool** | Include user's access to unmanaged resources. | - -### Return type - -[**ResourceAccessUserList**](ResourceAccessUserList.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## ResourceUserAccessStatusRetrieve - -> ResourceUserAccessStatus ResourceUserAccessStatusRetrieve(ctx, resourceId, userId).AccessLevelRemoteId(accessLevelRemoteId).Cursor(cursor).PageSize(pageSize).Execute() - - - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "github.com/opalsecurity/opal-go" -) - -func main() { - resourceId := "1b978423-db0a-4037-a4cf-f79c60cb67b3" // string | The ID of the resource. - userId := "29827fb8-f2dd-4e80-9576-28e31e9934ac" // string | The ID of the user. - accessLevelRemoteId := "arn:aws:iam::590304332660:role/AdministratorAccess" // string | The remote ID of the access level that you wish to query for the resource. If omitted, the default access level remote ID value (empty string) is used. (optional) - cursor := "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" // string | The pagination cursor value. (optional) - pageSize := int32(200) // int32 | Number of results to return per page. Default is 200. (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.ResourcesAPI.ResourceUserAccessStatusRetrieve(context.Background(), resourceId, userId).AccessLevelRemoteId(accessLevelRemoteId).Cursor(cursor).PageSize(pageSize).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `ResourcesAPI.ResourceUserAccessStatusRetrieve``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `ResourceUserAccessStatusRetrieve`: ResourceUserAccessStatus - fmt.Fprintf(os.Stdout, "Response from `ResourcesAPI.ResourceUserAccessStatusRetrieve`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**resourceId** | **string** | The ID of the resource. | -**userId** | **string** | The ID of the user. | - -### Other Parameters - -Other parameters are passed through a pointer to a apiResourceUserAccessStatusRetrieveRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - - **accessLevelRemoteId** | **string** | The remote ID of the access level that you wish to query for the resource. If omitted, the default access level remote ID value (empty string) is used. | - **cursor** | **string** | The pagination cursor value. | - **pageSize** | **int32** | Number of results to return per page. Default is 200. | - -### Return type - -[**ResourceUserAccessStatus**](ResourceUserAccessStatus.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## SetResourceMessageChannels - -> []string SetResourceMessageChannels(ctx, resourceId).MessageChannelIDList(messageChannelIDList).Execute() - - - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "github.com/opalsecurity/opal-go" -) - -func main() { - resourceId := "4baf8423-db0a-4037-a4cf-f79c60cb67a5" // string | The ID of the resource. - messageChannelIDList := *openapiclient.NewMessageChannelIDList([]string{"MessageChannelIds_example"}) // MessageChannelIDList | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.ResourcesAPI.SetResourceMessageChannels(context.Background(), resourceId).MessageChannelIDList(messageChannelIDList).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `ResourcesAPI.SetResourceMessageChannels``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `SetResourceMessageChannels`: []string - fmt.Fprintf(os.Stdout, "Response from `ResourcesAPI.SetResourceMessageChannels`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**resourceId** | **string** | The ID of the resource. | - -### Other Parameters - -Other parameters are passed through a pointer to a apiSetResourceMessageChannelsRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - **messageChannelIDList** | [**MessageChannelIDList**](MessageChannelIDList.md) | | - -### Return type - -**[]string** - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## SetResourceReviewerStages - -> []ReviewerStage SetResourceReviewerStages(ctx, resourceId).ReviewerStageList(reviewerStageList).Execute() - - - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "github.com/opalsecurity/opal-go" -) - -func main() { - resourceId := "4baf8423-db0a-4037-a4cf-f79c60cb67a5" // string | The ID of the resource. - reviewerStageList := *openapiclient.NewReviewerStageList([]openapiclient.ReviewerStage{*openapiclient.NewReviewerStage(false, "AND", []string{"OwnerIds_example"})}) // ReviewerStageList | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.ResourcesAPI.SetResourceReviewerStages(context.Background(), resourceId).ReviewerStageList(reviewerStageList).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `ResourcesAPI.SetResourceReviewerStages``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `SetResourceReviewerStages`: []ReviewerStage - fmt.Fprintf(os.Stdout, "Response from `ResourcesAPI.SetResourceReviewerStages`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**resourceId** | **string** | The ID of the resource. | - -### Other Parameters - -Other parameters are passed through a pointer to a apiSetResourceReviewerStagesRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - **reviewerStageList** | [**ReviewerStageList**](ReviewerStageList.md) | | - -### Return type - -[**[]ReviewerStage**](ReviewerStage.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## SetResourceReviewers - -> []string SetResourceReviewers(ctx, resourceId).ReviewerIDList(reviewerIDList).Execute() - - - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "github.com/opalsecurity/opal-go" -) - -func main() { - resourceId := "4baf8423-db0a-4037-a4cf-f79c60cb67a5" // string | The ID of the resource. - reviewerIDList := *openapiclient.NewReviewerIDList([]string{"ReviewerIds_example"}) // ReviewerIDList | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.ResourcesAPI.SetResourceReviewers(context.Background(), resourceId).ReviewerIDList(reviewerIDList).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `ResourcesAPI.SetResourceReviewers``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `SetResourceReviewers`: []string - fmt.Fprintf(os.Stdout, "Response from `ResourcesAPI.SetResourceReviewers`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**resourceId** | **string** | The ID of the resource. | - -### Other Parameters - -Other parameters are passed through a pointer to a apiSetResourceReviewersRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - **reviewerIDList** | [**ReviewerIDList**](ReviewerIDList.md) | | - -### Return type - -**[]string** - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## SetResourceScopedRolePermissions - -> ScopedRolePermissionList SetResourceScopedRolePermissions(ctx, resourceId).ScopedRolePermissionList(scopedRolePermissionList).Execute() - - - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "github.com/opalsecurity/opal-go" -) - -func main() { - resourceId := "1b978423-db0a-4037-a4cf-f79c60cb67b3" // string | The ID of the resource whose scoped role permissions belong to. Must be of OPAL_SCOPED_ROLE resource type. - scopedRolePermissionList := *openapiclient.NewScopedRolePermissionList([]openapiclient.ScopedRolePermission{*openapiclient.NewScopedRolePermission(openapiclient.RolePermissionTargetTypeEnum("RESOURCE"), openapiclient.RolePermissionNameEnum("READ"), false)}) // ScopedRolePermissionList | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.ResourcesAPI.SetResourceScopedRolePermissions(context.Background(), resourceId).ScopedRolePermissionList(scopedRolePermissionList).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `ResourcesAPI.SetResourceScopedRolePermissions``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `SetResourceScopedRolePermissions`: ScopedRolePermissionList - fmt.Fprintf(os.Stdout, "Response from `ResourcesAPI.SetResourceScopedRolePermissions`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**resourceId** | **string** | The ID of the resource whose scoped role permissions belong to. Must be of OPAL_SCOPED_ROLE resource type. | - -### Other Parameters - -Other parameters are passed through a pointer to a apiSetResourceScopedRolePermissionsRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - **scopedRolePermissionList** | [**ScopedRolePermissionList**](ScopedRolePermissionList.md) | | - -### Return type - -[**ScopedRolePermissionList**](ScopedRolePermissionList.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## SetResourceVisibility - -> VisibilityInfo SetResourceVisibility(ctx, resourceId).VisibilityInfo(visibilityInfo).Execute() - - - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "github.com/opalsecurity/opal-go" -) - -func main() { - resourceId := "4baf8423-db0a-4037-a4cf-f79c60cb67a5" // string | The ID of the resource. - visibilityInfo := *openapiclient.NewVisibilityInfo(openapiclient.VisibilityTypeEnum("GLOBAL")) // VisibilityInfo | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.ResourcesAPI.SetResourceVisibility(context.Background(), resourceId).VisibilityInfo(visibilityInfo).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `ResourcesAPI.SetResourceVisibility``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `SetResourceVisibility`: VisibilityInfo - fmt.Fprintf(os.Stdout, "Response from `ResourcesAPI.SetResourceVisibility`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**resourceId** | **string** | The ID of the resource. | - -### Other Parameters - -Other parameters are passed through a pointer to a apiSetResourceVisibilityRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - **visibilityInfo** | [**VisibilityInfo**](VisibilityInfo.md) | | - -### Return type - -[**VisibilityInfo**](VisibilityInfo.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## UpdateResourceUser - -> ResourceUser UpdateResourceUser(ctx, resourceId, userId).UpdateResourceUserRequest(updateResourceUserRequest).Execute() - - - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "github.com/opalsecurity/opal-go" -) - -func main() { - resourceId := "4baf8423-db0a-4037-a4cf-f79c60cb67a5" // string | The ID of the resource. - userId := "f92aa855-cea9-4814-b9d8-f2a60d3e4a06" // string | The ID of the user whose access is being updated. - updateResourceUserRequest := *openapiclient.NewUpdateResourceUserRequest(int32(120)) // UpdateResourceUserRequest | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.ResourcesAPI.UpdateResourceUser(context.Background(), resourceId, userId).UpdateResourceUserRequest(updateResourceUserRequest).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `ResourcesAPI.UpdateResourceUser``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `UpdateResourceUser`: ResourceUser - fmt.Fprintf(os.Stdout, "Response from `ResourcesAPI.UpdateResourceUser`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**resourceId** | **string** | The ID of the resource. | -**userId** | **string** | The ID of the user whose access is being updated. | - -### Other Parameters - -Other parameters are passed through a pointer to a apiUpdateResourceUserRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - - **updateResourceUserRequest** | [**UpdateResourceUserRequest**](UpdateResourceUserRequest.md) | | - -### Return type - -[**ResourceUser**](ResourceUser.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## UpdateResources - -> UpdateResourceInfoList UpdateResources(ctx).UpdateResourceInfoList(updateResourceInfoList).Execute() - - - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "github.com/opalsecurity/opal-go" -) - -func main() { - updateResourceInfoList := *openapiclient.NewUpdateResourceInfoList([]openapiclient.UpdateResourceInfo{*openapiclient.NewUpdateResourceInfo("f454d283-ca87-4a8a-bdbb-df212eca5353")}) // UpdateResourceInfoList | Resources to be updated - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.ResourcesAPI.UpdateResources(context.Background()).UpdateResourceInfoList(updateResourceInfoList).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `ResourcesAPI.UpdateResources``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `UpdateResources`: UpdateResourceInfoList - fmt.Fprintf(os.Stdout, "Response from `ResourcesAPI.UpdateResources`: %v\n", resp) -} -``` - -### Path Parameters - - - -### Other Parameters - -Other parameters are passed through a pointer to a apiUpdateResourcesRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **updateResourceInfoList** | [**UpdateResourceInfoList**](UpdateResourceInfoList.md) | Resources to be updated | - -### Return type - -[**UpdateResourceInfoList**](UpdateResourceInfoList.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/docs/SessionsApi.md b/docs/SessionsApi.md deleted file mode 100644 index bc51571..0000000 --- a/docs/SessionsApi.md +++ /dev/null @@ -1,77 +0,0 @@ -# \SessionsAPI - -All URIs are relative to *https://api.opal.dev/v1* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**Sessions**](SessionsAPI.md#Sessions) | **Get** /sessions | - - - -## Sessions - -> SessionsList Sessions(ctx).ResourceId(resourceId).UserId(userId).Execute() - - - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "github.com/opalsecurity/opal-go" -) - -func main() { - resourceId := "1b978423-db0a-4037-a4cf-f79c60cb67b3" // string | The ID of the resource. - userId := "32acc112-21ff-4669-91c2-21e27683eaa1" // string | The ID of the user you wish to query sessions for. (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.SessionsAPI.Sessions(context.Background()).ResourceId(resourceId).UserId(userId).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `SessionsAPI.Sessions``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `Sessions`: SessionsList - fmt.Fprintf(os.Stdout, "Response from `SessionsAPI.Sessions`: %v\n", resp) -} -``` - -### Path Parameters - - - -### Other Parameters - -Other parameters are passed through a pointer to a apiSessionsRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **resourceId** | **string** | The ID of the resource. | - **userId** | **string** | The ID of the user you wish to query sessions for. | - -### Return type - -[**SessionsList**](SessionsList.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/docs/TagsApi.md b/docs/TagsApi.md deleted file mode 100644 index 1fbf942..0000000 --- a/docs/TagsApi.md +++ /dev/null @@ -1,793 +0,0 @@ -# \TagsAPI - -All URIs are relative to *https://api.opal.dev/v1* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**AddGroupTag**](TagsAPI.md#AddGroupTag) | **Post** /tags/{tag_id}/groups/{group_id} | -[**AddResourceTag**](TagsAPI.md#AddResourceTag) | **Post** /tags/{tag_id}/resources/{resource_id} | -[**AddUserTag**](TagsAPI.md#AddUserTag) | **Post** /tags/{tag_id}/users/{user_id} | -[**CreateTag**](TagsAPI.md#CreateTag) | **Post** /tag | -[**DeleteTagByID**](TagsAPI.md#DeleteTagByID) | **Delete** /tag/{tag_id} | -[**GetTag**](TagsAPI.md#GetTag) | **Get** /tag | -[**GetTagByID**](TagsAPI.md#GetTagByID) | **Get** /tag/{tag_id} | Get tag by ID -[**GetTags**](TagsAPI.md#GetTags) | **Get** /tags | Get tags -[**RemoveGroupTag**](TagsAPI.md#RemoveGroupTag) | **Delete** /tags/{tag_id}/groups/{group_id} | -[**RemoveResourceTag**](TagsAPI.md#RemoveResourceTag) | **Delete** /tags/{tag_id}/resources/{resource_id} | -[**RemoveUserTag**](TagsAPI.md#RemoveUserTag) | **Delete** /tags/{tag_id}/users/{user_id} | - - - -## AddGroupTag - -> AddGroupTag(ctx, tagId, groupId).Execute() - - - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "github.com/opalsecurity/opal-go" -) - -func main() { - tagId := "1b978423-db0a-4037-a4cf-f79c60cb67b3" // string | The ID of the tag to apply. - groupId := "1b978423-db0a-4037-a4cf-f79c60cb67b3" // string | The ID of the group to apply the tag to. - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - r, err := apiClient.TagsAPI.AddGroupTag(context.Background(), tagId, groupId).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `TagsAPI.AddGroupTag``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**tagId** | **string** | The ID of the tag to apply. | -**groupId** | **string** | The ID of the group to apply the tag to. | - -### Other Parameters - -Other parameters are passed through a pointer to a apiAddGroupTagRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - - -### Return type - - (empty response body) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: Not defined - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## AddResourceTag - -> AddResourceTag(ctx, tagId, resourceId).Execute() - - - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "github.com/opalsecurity/opal-go" -) - -func main() { - tagId := "1b978423-db0a-4037-a4cf-f79c60cb67b3" // string | The ID of the tag to apply. - resourceId := "1b978423-db0a-4037-a4cf-f79c60cb67b3" // string | The ID of the resource to apply the tag to. - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - r, err := apiClient.TagsAPI.AddResourceTag(context.Background(), tagId, resourceId).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `TagsAPI.AddResourceTag``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**tagId** | **string** | The ID of the tag to apply. | -**resourceId** | **string** | The ID of the resource to apply the tag to. | - -### Other Parameters - -Other parameters are passed through a pointer to a apiAddResourceTagRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - - -### Return type - - (empty response body) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: Not defined - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## AddUserTag - -> AddUserTag(ctx, tagId, userId).Body(body).Execute() - - - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "github.com/opalsecurity/opal-go" -) - -func main() { - tagId := "1b978423-db0a-4037-a4cf-f79c60cb67b3" // string | The ID of the tag to apply. - userId := "1b978423-db0a-4037-a4cf-f79c60cb67b3" // string | The ID of the user to apply the tag to. - body := map[string]interface{}{ ... } // map[string]interface{} | (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - r, err := apiClient.TagsAPI.AddUserTag(context.Background(), tagId, userId).Body(body).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `TagsAPI.AddUserTag``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**tagId** | **string** | The ID of the tag to apply. | -**userId** | **string** | The ID of the user to apply the tag to. | - -### Other Parameters - -Other parameters are passed through a pointer to a apiAddUserTagRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - - **body** | **map[string]interface{}** | | - -### Return type - - (empty response body) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: Not defined - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## CreateTag - -> Tag CreateTag(ctx).TagKey(tagKey).TagValue(tagValue).AdminOwnerId(adminOwnerId).CreateTagInfo(createTagInfo).Execute() - - - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "github.com/opalsecurity/opal-go" -) - -func main() { - tagKey := "api-scope" // string | The key of the tag to create. (optional) - tagValue := "production" // string | The value of the tag to create. (optional) - adminOwnerId := "f92aa855-cea9-4814-b9d8-f2a60d3e4a06" // string | The ID of the owner that manages the tag. (optional) - createTagInfo := *openapiclient.NewCreateTagInfo("api-scope") // CreateTagInfo | (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.TagsAPI.CreateTag(context.Background()).TagKey(tagKey).TagValue(tagValue).AdminOwnerId(adminOwnerId).CreateTagInfo(createTagInfo).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `TagsAPI.CreateTag``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `CreateTag`: Tag - fmt.Fprintf(os.Stdout, "Response from `TagsAPI.CreateTag`: %v\n", resp) -} -``` - -### Path Parameters - - - -### Other Parameters - -Other parameters are passed through a pointer to a apiCreateTagRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **tagKey** | **string** | The key of the tag to create. | - **tagValue** | **string** | The value of the tag to create. | - **adminOwnerId** | **string** | The ID of the owner that manages the tag. | - **createTagInfo** | [**CreateTagInfo**](CreateTagInfo.md) | | - -### Return type - -[**Tag**](Tag.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## DeleteTagByID - -> DeleteTagByID(ctx, tagId).Execute() - - - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "github.com/opalsecurity/opal-go" -) - -func main() { - tagId := "1b978423-db0a-4037-a4cf-f79c60cb67b3" // string | The tag ID - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - r, err := apiClient.TagsAPI.DeleteTagByID(context.Background(), tagId).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `TagsAPI.DeleteTagByID``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**tagId** | **string** | The tag ID | - -### Other Parameters - -Other parameters are passed through a pointer to a apiDeleteTagByIDRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - -### Return type - - (empty response body) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: Not defined - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## GetTag - -> Tag GetTag(ctx).TagKey(tagKey).TagValue(tagValue).Execute() - - - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "github.com/opalsecurity/opal-go" -) - -func main() { - tagKey := "api-scope" // string | The key of the tag to get. - tagValue := "production" // string | The value of the tag to get. (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.TagsAPI.GetTag(context.Background()).TagKey(tagKey).TagValue(tagValue).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `TagsAPI.GetTag``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetTag`: Tag - fmt.Fprintf(os.Stdout, "Response from `TagsAPI.GetTag`: %v\n", resp) -} -``` - -### Path Parameters - - - -### Other Parameters - -Other parameters are passed through a pointer to a apiGetTagRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **tagKey** | **string** | The key of the tag to get. | - **tagValue** | **string** | The value of the tag to get. | - -### Return type - -[**Tag**](Tag.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## GetTagByID - -> Tag GetTagByID(ctx, tagId).Execute() - -Get tag by ID - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "github.com/opalsecurity/opal-go" -) - -func main() { - tagId := "1b978423-db0a-4037-a4cf-f79c60cb67b3" // string | The tag ID - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.TagsAPI.GetTagByID(context.Background(), tagId).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `TagsAPI.GetTagByID``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetTagByID`: Tag - fmt.Fprintf(os.Stdout, "Response from `TagsAPI.GetTagByID`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**tagId** | **string** | The tag ID | - -### Other Parameters - -Other parameters are passed through a pointer to a apiGetTagByIDRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - -### Return type - -[**Tag**](Tag.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## GetTags - -> PaginatedTagsList GetTags(ctx).Cursor(cursor).PageSize(pageSize).Execute() - -Get tags - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "github.com/opalsecurity/opal-go" -) - -func main() { - cursor := "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" // string | The pagination cursor value. (optional) - pageSize := int32(200) // int32 | Number of results to return per page. Default is 200. (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.TagsAPI.GetTags(context.Background()).Cursor(cursor).PageSize(pageSize).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `TagsAPI.GetTags``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetTags`: PaginatedTagsList - fmt.Fprintf(os.Stdout, "Response from `TagsAPI.GetTags`: %v\n", resp) -} -``` - -### Path Parameters - - - -### Other Parameters - -Other parameters are passed through a pointer to a apiGetTagsRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **cursor** | **string** | The pagination cursor value. | - **pageSize** | **int32** | Number of results to return per page. Default is 200. | - -### Return type - -[**PaginatedTagsList**](PaginatedTagsList.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## RemoveGroupTag - -> RemoveGroupTag(ctx, tagId, groupId).Execute() - - - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "github.com/opalsecurity/opal-go" -) - -func main() { - tagId := "1b978423-db0a-4037-a4cf-f79c60cb67b3" // string | The ID of the tag to remove. - groupId := "1b978423-db0a-4037-a4cf-f79c60cb67b3" // string | The ID of the group to remove the tag from. - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - r, err := apiClient.TagsAPI.RemoveGroupTag(context.Background(), tagId, groupId).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `TagsAPI.RemoveGroupTag``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**tagId** | **string** | The ID of the tag to remove. | -**groupId** | **string** | The ID of the group to remove the tag from. | - -### Other Parameters - -Other parameters are passed through a pointer to a apiRemoveGroupTagRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - - -### Return type - - (empty response body) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: Not defined - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## RemoveResourceTag - -> RemoveResourceTag(ctx, tagId, resourceId).Execute() - - - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "github.com/opalsecurity/opal-go" -) - -func main() { - tagId := "1b978423-db0a-4037-a4cf-f79c60cb67b3" // string | The ID of the tag to remove. - resourceId := "1b978423-db0a-4037-a4cf-f79c60cb67b3" // string | The ID of the resource to remove the tag from. - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - r, err := apiClient.TagsAPI.RemoveResourceTag(context.Background(), tagId, resourceId).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `TagsAPI.RemoveResourceTag``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**tagId** | **string** | The ID of the tag to remove. | -**resourceId** | **string** | The ID of the resource to remove the tag from. | - -### Other Parameters - -Other parameters are passed through a pointer to a apiRemoveResourceTagRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - - -### Return type - - (empty response body) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: Not defined - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## RemoveUserTag - -> RemoveUserTag(ctx, tagId, userId).Execute() - - - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "github.com/opalsecurity/opal-go" -) - -func main() { - tagId := "1b978423-db0a-4037-a4cf-f79c60cb67b3" // string | The ID of the tag to remove. - userId := "1b978423-db0a-4037-a4cf-f79c60cb67b3" // string | The ID of the user to remove the tag from. - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - r, err := apiClient.TagsAPI.RemoveUserTag(context.Background(), tagId, userId).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `TagsAPI.RemoveUserTag``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**tagId** | **string** | The ID of the tag to remove. | -**userId** | **string** | The ID of the user to remove the tag from. | - -### Other Parameters - -Other parameters are passed through a pointer to a apiRemoveUserTagRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - - -### Return type - - (empty response body) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: Not defined - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/docs/UarsApi.md b/docs/UarsApi.md deleted file mode 100644 index 7a107af..0000000 --- a/docs/UarsApi.md +++ /dev/null @@ -1,216 +0,0 @@ -# \UarsAPI - -All URIs are relative to *https://api.opal.dev/v1* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**CreateUar**](UarsAPI.md#CreateUar) | **Post** /uar | -[**GetUARs**](UarsAPI.md#GetUARs) | **Get** /uars | -[**GetUar**](UarsAPI.md#GetUar) | **Get** /uar/{uar_id} | - - - -## CreateUar - -> UAR CreateUar(ctx).CreateUARInfo(createUARInfo).Execute() - - - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - "time" - openapiclient "github.com/opalsecurity/opal-go" -) - -func main() { - createUARInfo := *openapiclient.NewCreateUARInfo("Monthly UAR (July)", openapiclient.UARReviewerAssignmentPolicyEnum("MANUALLY"), false, time.Now(), "America/Los_Angeles", false) // CreateUARInfo | The settings of the UAR. - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.UarsAPI.CreateUar(context.Background()).CreateUARInfo(createUARInfo).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `UarsAPI.CreateUar``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `CreateUar`: UAR - fmt.Fprintf(os.Stdout, "Response from `UarsAPI.CreateUar`: %v\n", resp) -} -``` - -### Path Parameters - - - -### Other Parameters - -Other parameters are passed through a pointer to a apiCreateUarRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **createUARInfo** | [**CreateUARInfo**](CreateUARInfo.md) | The settings of the UAR. | - -### Return type - -[**UAR**](UAR.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## GetUARs - -> PaginatedUARsList GetUARs(ctx).Cursor(cursor).PageSize(pageSize).Execute() - - - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "github.com/opalsecurity/opal-go" -) - -func main() { - cursor := "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" // string | The pagination cursor value. (optional) - pageSize := int32(200) // int32 | Number of results to return per page. Default is 200. (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.UarsAPI.GetUARs(context.Background()).Cursor(cursor).PageSize(pageSize).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `UarsAPI.GetUARs``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetUARs`: PaginatedUARsList - fmt.Fprintf(os.Stdout, "Response from `UarsAPI.GetUARs`: %v\n", resp) -} -``` - -### Path Parameters - - - -### Other Parameters - -Other parameters are passed through a pointer to a apiGetUARsRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **cursor** | **string** | The pagination cursor value. | - **pageSize** | **int32** | Number of results to return per page. Default is 200. | - -### Return type - -[**PaginatedUARsList**](PaginatedUARsList.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## GetUar - -> UAR GetUar(ctx, uarId).Execute() - - - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "github.com/opalsecurity/opal-go" -) - -func main() { - uarId := "4baf8423-db0a-4037-a4cf-f79c60cb67a5" // string | The ID of the UAR. - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.UarsAPI.GetUar(context.Background(), uarId).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `UarsAPI.GetUar``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetUar`: UAR - fmt.Fprintf(os.Stdout, "Response from `UarsAPI.GetUar`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**uarId** | **string** | The ID of the UAR. | - -### Other Parameters - -Other parameters are passed through a pointer to a apiGetUarRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - -### Return type - -[**UAR**](UAR.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/docs/UsersApi.md b/docs/UsersApi.md deleted file mode 100644 index bc1bece..0000000 --- a/docs/UsersApi.md +++ /dev/null @@ -1,292 +0,0 @@ -# \UsersAPI - -All URIs are relative to *https://api.opal.dev/v1* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**GetRemoteUsers**](UsersAPI.md#GetRemoteUsers) | **Get** /users/remote_users | -[**GetUserTags**](UsersAPI.md#GetUserTags) | **Get** /users/{user_id}/tags | -[**GetUsers**](UsersAPI.md#GetUsers) | **Get** /users | -[**User**](UsersAPI.md#User) | **Get** /user | - - - -## GetRemoteUsers - -> PaginatedRemoteUsersList GetRemoteUsers(ctx).ThirdPartyProvider(thirdPartyProvider).UserId(userId).RemoteId(remoteId).Cursor(cursor).PageSize(pageSize).Execute() - - - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "github.com/opalsecurity/opal-go" -) - -func main() { - thirdPartyProvider := []openapiclient.ThirdPartyProviderEnum{openapiclient.ThirdPartyProviderEnum("AUTH0")} // []ThirdPartyProviderEnum | Filter remote users by their third party provider. (optional) - userId := []string{"Inner_example"} // []string | Filter remote users by their user ID. (optional) - remoteId := []string{"Inner_example"} // []string | Filter remote users by their remote ID. (optional) - cursor := "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" // string | The pagination cursor value. (optional) - pageSize := int32(200) // int32 | Number of results to return per page. Default is 200. (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.UsersAPI.GetRemoteUsers(context.Background()).ThirdPartyProvider(thirdPartyProvider).UserId(userId).RemoteId(remoteId).Cursor(cursor).PageSize(pageSize).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `UsersAPI.GetRemoteUsers``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetRemoteUsers`: PaginatedRemoteUsersList - fmt.Fprintf(os.Stdout, "Response from `UsersAPI.GetRemoteUsers`: %v\n", resp) -} -``` - -### Path Parameters - - - -### Other Parameters - -Other parameters are passed through a pointer to a apiGetRemoteUsersRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **thirdPartyProvider** | [**[]ThirdPartyProviderEnum**](ThirdPartyProviderEnum.md) | Filter remote users by their third party provider. | - **userId** | **[]string** | Filter remote users by their user ID. | - **remoteId** | **[]string** | Filter remote users by their remote ID. | - **cursor** | **string** | The pagination cursor value. | - **pageSize** | **int32** | Number of results to return per page. Default is 200. | - -### Return type - -[**PaginatedRemoteUsersList**](PaginatedRemoteUsersList.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## GetUserTags - -> TagsList GetUserTags(ctx, userId).Execute() - - - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "github.com/opalsecurity/opal-go" -) - -func main() { - userId := "1b978423-db0a-4037-a4cf-f79c60cb67b3" // string | The ID of the user whose tags to return. - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.UsersAPI.GetUserTags(context.Background(), userId).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `UsersAPI.GetUserTags``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetUserTags`: TagsList - fmt.Fprintf(os.Stdout, "Response from `UsersAPI.GetUserTags`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**userId** | **string** | The ID of the user whose tags to return. | - -### Other Parameters - -Other parameters are passed through a pointer to a apiGetUserTagsRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - -### Return type - -[**TagsList**](TagsList.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## GetUsers - -> PaginatedUsersList GetUsers(ctx).Cursor(cursor).PageSize(pageSize).Execute() - - - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "github.com/opalsecurity/opal-go" -) - -func main() { - cursor := "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" // string | The pagination cursor value. (optional) - pageSize := int32(200) // int32 | Number of results to return per page. Default is 200. (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.UsersAPI.GetUsers(context.Background()).Cursor(cursor).PageSize(pageSize).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `UsersAPI.GetUsers``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetUsers`: PaginatedUsersList - fmt.Fprintf(os.Stdout, "Response from `UsersAPI.GetUsers`: %v\n", resp) -} -``` - -### Path Parameters - - - -### Other Parameters - -Other parameters are passed through a pointer to a apiGetUsersRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **cursor** | **string** | The pagination cursor value. | - **pageSize** | **int32** | Number of results to return per page. Default is 200. | - -### Return type - -[**PaginatedUsersList**](PaginatedUsersList.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## User - -> User User(ctx).UserId(userId).Email(email).Execute() - - - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "github.com/opalsecurity/opal-go" -) - -func main() { - userId := "32acc112-21ff-4669-91c2-21e27683eaa1" // string | The user ID of the user. (optional) - email := "johndoe@domain.org" // string | The email of the user. If both user ID and email are provided, user ID will take precedence. If neither are provided, an error will occur. (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.UsersAPI.User(context.Background()).UserId(userId).Email(email).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `UsersAPI.User``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `User`: User - fmt.Fprintf(os.Stdout, "Response from `UsersAPI.User`: %v\n", resp) -} -``` - -### Path Parameters - - - -### Other Parameters - -Other parameters are passed through a pointer to a apiUserRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **userId** | **string** | The user ID of the user. | - **email** | **string** | The email of the user. If both user ID and email are provided, user ID will take precedence. If neither are provided, an error will occur. | - -### Return type - -[**User**](User.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/go.mod b/go.mod index 88f3523..40d5d2c 100644 --- a/go.mod +++ b/go.mod @@ -5,3 +5,7 @@ go 1.18 require ( gopkg.in/validator.v2 v2.0.1 ) + +retract ( + v1.1.1 // cannot be installed on macos +)