Skip to content

Latest commit

 

History

History
437 lines (272 loc) · 12.8 KB

UserGroupsApi.md

File metadata and controls

437 lines (272 loc) · 12.8 KB

\UserGroupsApi

All URIs are relative to https://localhost/PasswordVault

Method HTTP request Description
UserGroupsAddMemberToGroup Post /api/UserGroups/{groupId}/Members
UserGroupsCreateUserGroup Post /api/UserGroups
UserGroupsDeleteUserGroup Delete /api/UserGroups/{groupId}
UserGroupsEditUserGroup Put /api/UserGroups/{groupId}
UserGroupsGetUserGroups Get /api/UserGroups
UserGroupsRemoveUserFromGroup Delete /api/UserGroups/{groupId}/Members/{memberName}

UserGroupsAddMemberToGroup

GroupMember UserGroupsAddMemberToGroup(ctx, groupId).MemberToAdd(memberToAdd).Execute()

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "./openapi"
)

func main() {
    groupId := int64(789) // int64 | The unique ID of the Vault group.
    memberToAdd := *openapiclient.NewGroupMember("MemberId_example", "DomainName_example") // GroupMember | The parameters for the member to be added

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.UserGroupsApi.UserGroupsAddMemberToGroup(context.Background(), groupId).MemberToAdd(memberToAdd).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `UserGroupsApi.UserGroupsAddMemberToGroup``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `UserGroupsAddMemberToGroup`: GroupMember
    fmt.Fprintf(os.Stdout, "Response from `UserGroupsApi.UserGroupsAddMemberToGroup`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
groupId int64 The unique ID of the Vault group.

Other Parameters

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

Name Type Description Notes

memberToAdd | GroupMember | The parameters for the member to be added |

Return type

GroupMember

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json, text/json, application/xml, text/xml, multipart/form-data, application/x-www-form-urlencoded
  • Accept: application/json, text/json, application/xml, text/xml, multipart/form-data, application/vnd.cyberark.api+json

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

UserGroupsCreateUserGroup

map[string]interface{} UserGroupsCreateUserGroup(ctx).UserGroup(userGroup).Execute()

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "./openapi"
)

func main() {
    userGroup := *openapiclient.NewBaseUserGroup("GroupName_example") // BaseUserGroup | 

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.UserGroupsApi.UserGroupsCreateUserGroup(context.Background()).UserGroup(userGroup).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `UserGroupsApi.UserGroupsCreateUserGroup``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `UserGroupsCreateUserGroup`: map[string]interface{}
    fmt.Fprintf(os.Stdout, "Response from `UserGroupsApi.UserGroupsCreateUserGroup`: %v\n", resp)
}

Path Parameters

Other Parameters

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

Name Type Description Notes
userGroup BaseUserGroup

Return type

map[string]interface{}

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json, text/json, application/xml, text/xml, multipart/form-data, application/x-www-form-urlencoded
  • Accept: application/json, text/json, application/xml, text/xml, multipart/form-data, application/vnd.cyberark.api+json

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

UserGroupsDeleteUserGroup

map[string]interface{} UserGroupsDeleteUserGroup(ctx, groupId).Execute()

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "./openapi"
)

func main() {
    groupId := int64(789) // int64 | The unique ID of the group.

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.UserGroupsApi.UserGroupsDeleteUserGroup(context.Background(), groupId).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `UserGroupsApi.UserGroupsDeleteUserGroup``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `UserGroupsDeleteUserGroup`: map[string]interface{}
    fmt.Fprintf(os.Stdout, "Response from `UserGroupsApi.UserGroupsDeleteUserGroup`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
groupId int64 The unique ID of the group.

Other Parameters

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

Name Type Description Notes

Return type

map[string]interface{}

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json, text/json, application/xml, text/xml, multipart/form-data, application/vnd.cyberark.api+json

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

UserGroupsEditUserGroup

map[string]interface{} UserGroupsEditUserGroup(ctx, groupId).Group(group).Execute()

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "./openapi"
)

func main() {
    groupId := int64(789) // int64 | The unique ID of the group.
    group := *openapiclient.NewBaseUserGroup("GroupName_example") // BaseUserGroup | 

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.UserGroupsApi.UserGroupsEditUserGroup(context.Background(), groupId).Group(group).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `UserGroupsApi.UserGroupsEditUserGroup``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `UserGroupsEditUserGroup`: map[string]interface{}
    fmt.Fprintf(os.Stdout, "Response from `UserGroupsApi.UserGroupsEditUserGroup`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
groupId int64 The unique ID of the group.

Other Parameters

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

Name Type Description Notes

group | BaseUserGroup | |

Return type

map[string]interface{}

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json, text/json, application/xml, text/xml, multipart/form-data, application/x-www-form-urlencoded
  • Accept: application/json, text/json, application/xml, text/xml, multipart/form-data, application/vnd.cyberark.api+json

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

UserGroupsGetUserGroups

GetUserGroupsResponse UserGroupsGetUserGroups(ctx).Search(search).Sort(sort).Filter(filter).IncludeMembers(includeMembers).Execute()

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "./openapi"
)

func main() {
    search := "search_example" // string |  (optional)
    sort := []string{"Inner_example"} // []string |  (optional)
    filter := "filter_example" // string |  (optional)
    includeMembers := true // bool | Whether or not to return members for each User Group as part of the response. If not sent, the value will be False. (optional)

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.UserGroupsApi.UserGroupsGetUserGroups(context.Background()).Search(search).Sort(sort).Filter(filter).IncludeMembers(includeMembers).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `UserGroupsApi.UserGroupsGetUserGroups``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `UserGroupsGetUserGroups`: GetUserGroupsResponse
    fmt.Fprintf(os.Stdout, "Response from `UserGroupsApi.UserGroupsGetUserGroups`: %v\n", resp)
}

Path Parameters

Other Parameters

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

Name Type Description Notes
search string
sort []string
filter string
includeMembers bool Whether or not to return members for each User Group as part of the response. If not sent, the value will be False.

Return type

GetUserGroupsResponse

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json, text/json, application/xml, text/xml, multipart/form-data, application/vnd.cyberark.api+json

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

UserGroupsRemoveUserFromGroup

UserGroupsRemoveUserFromGroup(ctx, groupId, memberName).Execute()

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "./openapi"
)

func main() {
    groupId := int64(789) // int64 | The unique ID of the group.
    memberName := "memberName_example" // string | The name of the user/group to remove from the group members

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.UserGroupsApi.UserGroupsRemoveUserFromGroup(context.Background(), groupId, memberName).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `UserGroupsApi.UserGroupsRemoveUserFromGroup``: %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 int64 The unique ID of the group.
memberName string The name of the user/group to remove from the group members

Other Parameters

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

Name Type Description Notes

Return type

(empty response body)

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

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