Skip to content

Latest commit

 

History

History
826 lines (524 loc) · 26.2 KB

SafesApi.md

File metadata and controls

826 lines (524 loc) · 26.2 KB

\SafesApi

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

Method HTTP request Description
SafesAddSafe Post /api/Safes
SafesAddSafeMember Post /api/Safes/{safeUrlId}/members
SafesDeleteSafe Delete /api/Safes/{safeUrlId}
SafesDeleteSafeMember Delete /api/Safes/{safeUrlId}/members/{memberName}
SafesGetGroups Get /api/Safes/{safeName}/accountgroups
SafesGetSafeDetails Get /api/Safes/{safeUrlId}
SafesGetSafeMember Get /api/Safes/{safeUrlId}/members/{memberName}
SafesGetSafeMembers Get /api/Safes/{safeUrlId}/members
SafesGetSafes Get /api/Safes
SafesUpdateSafe Put /api/Safes/{safeUrlId}
SafesUpdateSafeMember Put /api/Safes/{safeUrlId}/members/{memberName}

SafesAddSafe

AddSafeResponse SafesAddSafe(ctx).AddSafeRequest(addSafeRequest).Execute()

Example

package main

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

func main() {
    addSafeRequest := *openapiclient.NewAddSafeRequest() // AddSafeRequest | 

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.SafesApi.SafesAddSafe(context.Background()).AddSafeRequest(addSafeRequest).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `SafesApi.SafesAddSafe``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `SafesAddSafe`: AddSafeResponse
    fmt.Fprintf(os.Stdout, "Response from `SafesApi.SafesAddSafe`: %v\n", resp)
}

Path Parameters

Other Parameters

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

Name Type Description Notes
addSafeRequest AddSafeRequest

Return type

AddSafeResponse

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]

SafesAddSafeMember

AddSafeMemberResponse SafesAddSafeMember(ctx, safeUrlId).AddSafeMemberRequestBody(addSafeMemberRequestBody).Execute()

Example

package main

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

func main() {
    safeUrlId := "safeUrlId_example" // string | The name of the Safe used when calling Safe APIs.
    addSafeMemberRequestBody := *openapiclient.NewAddSafeMemberRequestBody("MemberName_example", map[string]bool{"key": false}) // AddSafeMemberRequestBody | 

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.SafesApi.SafesAddSafeMember(context.Background(), safeUrlId).AddSafeMemberRequestBody(addSafeMemberRequestBody).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `SafesApi.SafesAddSafeMember``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `SafesAddSafeMember`: AddSafeMemberResponse
    fmt.Fprintf(os.Stdout, "Response from `SafesApi.SafesAddSafeMember`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
safeUrlId string The name of the Safe used when calling Safe APIs.

Other Parameters

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

Name Type Description Notes

addSafeMemberRequestBody | AddSafeMemberRequestBody | |

Return type

AddSafeMemberResponse

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]

SafesDeleteSafe

map[string]interface{} SafesDeleteSafe(ctx, safeUrlId).Execute()

Example

package main

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

func main() {
    safeUrlId := "safeUrlId_example" // string | The name of the Safe.

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

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
safeUrlId string The name of the Safe.

Other Parameters

Other parameters are passed through a pointer to a apiSafesDeleteSafeRequest 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]

SafesDeleteSafeMember

map[string]interface{} SafesDeleteSafeMember(ctx, safeUrlId, memberName).Execute()

Example

package main

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

func main() {
    safeUrlId := "safeUrlId_example" // string | The name of the Safe from which to delete the member.
    memberName := "memberName_example" // string | The name of the Safe member to delete from the list of Safe members.

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

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
safeUrlId string The name of the Safe from which to delete the member.
memberName string The name of the Safe member to delete from the list of Safe members.

Other Parameters

Other parameters are passed through a pointer to a apiSafesDeleteSafeMemberRequest 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]

SafesGetGroups

AccountGroup SafesGetGroups(ctx, safeName).Execute()

Example

package main

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

func main() {
    safeName := "safeName_example" // string | The name of the Safe where the account groups are.

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

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
safeName string The name of the Safe where the account groups are.

Other Parameters

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

Name Type Description Notes

Return type

AccountGroup

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]

SafesGetSafeDetails

GetSafeDetailsResponse SafesGetSafeDetails(ctx, safeUrlId).IncludeAccounts(includeAccounts).UseCache(useCache).Execute()

Example

package main

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

func main() {
    safeUrlId := "safeUrlId_example" // string | The name of the Safe.
    includeAccounts := true // bool | Whether or not to return accounts for each Safe as part of the response. If not sent, the value will be False. (optional)
    useCache := true // bool | Whether to retrieve from session or not. (optional)

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.SafesApi.SafesGetSafeDetails(context.Background(), safeUrlId).IncludeAccounts(includeAccounts).UseCache(useCache).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `SafesApi.SafesGetSafeDetails``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `SafesGetSafeDetails`: GetSafeDetailsResponse
    fmt.Fprintf(os.Stdout, "Response from `SafesApi.SafesGetSafeDetails`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
safeUrlId string The name of the Safe.

Other Parameters

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

Name Type Description Notes

includeAccounts | bool | Whether or not to return accounts for each Safe as part of the response. If not sent, the value will be False. | useCache | bool | Whether to retrieve from session or not. |

Return type

GetSafeDetailsResponse

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]

SafesGetSafeMember

GetSafeMemberResponse SafesGetSafeMember(ctx, safeUrlId, memberName).UseCache(useCache).Execute()

Example

package main

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

func main() {
    safeUrlId := "safeUrlId_example" // string | The name of the Safe used when calling Safe APIs.
    memberName := "memberName_example" // string | The Vault user name, Domain user name or group name of the Safe member.
    useCache := true // bool | Whether to retrieve from session or not. (optional)

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.SafesApi.SafesGetSafeMember(context.Background(), safeUrlId, memberName).UseCache(useCache).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `SafesApi.SafesGetSafeMember``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `SafesGetSafeMember`: GetSafeMemberResponse
    fmt.Fprintf(os.Stdout, "Response from `SafesApi.SafesGetSafeMember`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
safeUrlId string The name of the Safe used when calling Safe APIs.
memberName string The Vault user name, Domain user name or group name of the Safe member.

Other Parameters

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

Name Type Description Notes

useCache | bool | Whether to retrieve from session or not. |

Return type

GetSafeMemberResponse

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]

SafesGetSafeMembers

SafeMemberResponse SafesGetSafeMembers(ctx, safeUrlId).Limit(limit).Offset(offset).UseCache(useCache).Sort(sort).Search(search).Filter(filter).Execute()

Example

package main

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

func main() {
    safeUrlId := "safeUrlId_example" // string | The name of the safe to return all its members
    limit := int64(789) // int64 |  (optional)
    offset := int64(789) // int64 |  (optional)
    useCache := true // bool |  (optional)
    sort := []string{"Inner_example"} // []string |  (optional)
    search := "search_example" // string |  (optional)
    filter := "filter_example" // string | <para>Filtering according to REST standard. </para>  <para>memberType - Return only members of single type (user or group)</para>  <para>membershipExpired - Return only members that have or don't have an expired membership</para>  <para>includePredefinedUsers - Include predefined users in the returned list.</para> (optional)

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.SafesApi.SafesGetSafeMembers(context.Background(), safeUrlId).Limit(limit).Offset(offset).UseCache(useCache).Sort(sort).Search(search).Filter(filter).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `SafesApi.SafesGetSafeMembers``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `SafesGetSafeMembers`: SafeMemberResponse
    fmt.Fprintf(os.Stdout, "Response from `SafesApi.SafesGetSafeMembers`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
safeUrlId string The name of the safe to return all its members

Other Parameters

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

Name Type Description Notes

limit | int64 | | offset | int64 | | useCache | bool | | sort | []string | | search | string | | filter | string | <para>Filtering according to REST standard. </para> <para>memberType - Return only members of single type (user or group)</para> <para>membershipExpired - Return only members that have or don't have an expired membership</para> <para>includePredefinedUsers - Include predefined users in the returned list.</para> |

Return type

SafeMemberResponse

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]

SafesGetSafes

[]SafeListItem SafesGetSafes(ctx).Limit(limit).Offset(offset).UseCache(useCache).Sort(sort).Search(search).IncludeAccounts(includeAccounts).ExtendedDetails(extendedDetails).Execute()

Example

package main

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

func main() {
    limit := int64(789) // int64 |  (optional)
    offset := int64(789) // int64 |  (optional)
    useCache := true // bool |  (optional)
    sort := []string{"Inner_example"} // []string |  (optional)
    search := "search_example" // string |  (optional)
    includeAccounts := true // bool | Whether or not to return accounts for each Safe as part of the response. If not sent, the value will be false. (optional)
    extendedDetails := true // bool | Whether or not to return all Safe data or only SafeName as part of the response. If not sent, the value will be true. (optional)

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.SafesApi.SafesGetSafes(context.Background()).Limit(limit).Offset(offset).UseCache(useCache).Sort(sort).Search(search).IncludeAccounts(includeAccounts).ExtendedDetails(extendedDetails).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `SafesApi.SafesGetSafes``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `SafesGetSafes`: []SafeListItem
    fmt.Fprintf(os.Stdout, "Response from `SafesApi.SafesGetSafes`: %v\n", resp)
}

Path Parameters

Other Parameters

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

Name Type Description Notes
limit int64
offset int64
useCache bool
sort []string
search string
includeAccounts bool Whether or not to return accounts for each Safe as part of the response. If not sent, the value will be false.
extendedDetails bool Whether or not to return all Safe data or only SafeName as part of the response. If not sent, the value will be true.

Return type

[]SafeListItem

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]

SafesUpdateSafe

UpdateSafeResponse SafesUpdateSafe(ctx, safeUrlId).UpdateSafeRequestBody(updateSafeRequestBody).Execute()

Example

package main

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

func main() {
    safeUrlId := "safeUrlId_example" // string | The name of the Safe used when calling Safe APIs.
    updateSafeRequestBody := *openapiclient.NewUpdateSafeRequestBody() // UpdateSafeRequestBody | 

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.SafesApi.SafesUpdateSafe(context.Background(), safeUrlId).UpdateSafeRequestBody(updateSafeRequestBody).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `SafesApi.SafesUpdateSafe``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `SafesUpdateSafe`: UpdateSafeResponse
    fmt.Fprintf(os.Stdout, "Response from `SafesApi.SafesUpdateSafe`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
safeUrlId string The name of the Safe used when calling Safe APIs.

Other Parameters

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

Name Type Description Notes

updateSafeRequestBody | UpdateSafeRequestBody | |

Return type

UpdateSafeResponse

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]

SafesUpdateSafeMember

UpdateSafeMemberResponse SafesUpdateSafeMember(ctx, safeUrlId, memberName).UpdateSafeMemberRequestBody(updateSafeMemberRequestBody).Execute()

Example

package main

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

func main() {
    safeUrlId := "safeUrlId_example" // string | The name of the Safe used when calling Safe APIs.
    memberName := "memberName_example" // string | The Vault user name, Domain user name or group name of the Safe member.
    updateSafeMemberRequestBody := *openapiclient.NewUpdateSafeMemberRequestBody(map[string]bool{"key": false}) // UpdateSafeMemberRequestBody | 

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.SafesApi.SafesUpdateSafeMember(context.Background(), safeUrlId, memberName).UpdateSafeMemberRequestBody(updateSafeMemberRequestBody).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `SafesApi.SafesUpdateSafeMember``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `SafesUpdateSafeMember`: UpdateSafeMemberResponse
    fmt.Fprintf(os.Stdout, "Response from `SafesApi.SafesUpdateSafeMember`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
safeUrlId string The name of the Safe used when calling Safe APIs.
memberName string The Vault user name, Domain user name or group name of the Safe member.

Other Parameters

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

Name Type Description Notes

updateSafeMemberRequestBody | UpdateSafeMemberRequestBody | |

Return type

UpdateSafeMemberResponse

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]