Skip to content

Latest commit

 

History

History
675 lines (443 loc) · 18.5 KB

UserManagementApi.md

File metadata and controls

675 lines (443 loc) · 18.5 KB

\UserManagementApi

All URIs are relative to http://localhost

Method HTTP request Description
ChangePassword Put /api/v1/customers/{cUUID}/users/{uUUID}/change_password Change password - deprecated
CreateUser Post /api/v1/customers/{cUUID}/users Create a user
DeleteUser Delete /api/v1/customers/{cUUID}/users/{uUUID} Delete a user
GetUserDetails Get /api/v1/customers/{cUUID}/users/{uUUID} Get a user's details
ListUsers Get /api/v1/customers/{cUUID}/users List all users
ResetUserPassword Put /api/v1/customers/{cUUID}/reset_password Reset the user's password
RetrieveOIDCAuthToken Get /api/v1/customers/{cUUID}/users/{uUUID}/oidc_auth_token Retrieve OIDC auth token
UpdateUserProfile Put /api/v1/customers/{cUUID}/users/{uUUID}/update_profile Update a user's profile
UpdateUserRole Put /api/v1/customers/{cUUID}/users/{uUUID} Change a user's role

ChangePassword

ChangePassword(ctx, cUUID, uUUID).Users(users).Request(request).Execute()

Change password - deprecated

Example

package main

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

func main() {
    cUUID := TODO // string | 
    uUUID := TODO // string | 
    users := *openapiclient.NewUserRegistrationData("[email protected]") // UserRegistrationData | User data containing the new password
    request := TODO // interface{} |  (optional)

    configuration := openapiclient.NewConfiguration()
    api_client := openapiclient.NewAPIClient(configuration)
    resp, r, err := api_client.UserManagementApi.ChangePassword(context.Background(), cUUID, uUUID).Users(users).Request(request).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `UserManagementApi.ChangePassword``: %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.
cUUID string
uUUID string

Other Parameters

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

Name Type Description Notes

users | UserRegistrationData | User data containing the new password | request | interface{} | |

Return type

(empty response body)

Authorization

apiKeyAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: Not defined

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

CreateUser

UserWithFeatures CreateUser(ctx, cUUID).User(user).Request(request).Execute()

Create a user

Example

package main

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

func main() {
    cUUID := TODO // string | 
    user := *openapiclient.NewUserRegistrationData("[email protected]") // UserRegistrationData | Details of the new user
    request := TODO // interface{} |  (optional)

    configuration := openapiclient.NewConfiguration()
    api_client := openapiclient.NewAPIClient(configuration)
    resp, r, err := api_client.UserManagementApi.CreateUser(context.Background(), cUUID).User(user).Request(request).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `UserManagementApi.CreateUser``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `CreateUser`: UserWithFeatures
    fmt.Fprintf(os.Stdout, "Response from `UserManagementApi.CreateUser`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
cUUID string

Other Parameters

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

Name Type Description Notes

user | UserRegistrationData | Details of the new user | request | interface{} | |

Return type

UserWithFeatures

Authorization

apiKeyAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

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

DeleteUser

YBPSuccess DeleteUser(ctx, cUUID, uUUID).Request(request).Execute()

Delete a user

Example

package main

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

func main() {
    cUUID := TODO // string | 
    uUUID := TODO // string | 
    request := TODO // interface{} |  (optional)

    configuration := openapiclient.NewConfiguration()
    api_client := openapiclient.NewAPIClient(configuration)
    resp, r, err := api_client.UserManagementApi.DeleteUser(context.Background(), cUUID, uUUID).Request(request).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `UserManagementApi.DeleteUser``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `DeleteUser`: YBPSuccess
    fmt.Fprintf(os.Stdout, "Response from `UserManagementApi.DeleteUser`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
cUUID string
uUUID string

Other Parameters

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

Name Type Description Notes

request | interface{} | |

Return type

YBPSuccess

Authorization

apiKeyAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

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

GetUserDetails

UserWithFeatures GetUserDetails(ctx, cUUID, uUUID).Execute()

Get a user's details

Example

package main

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

func main() {
    cUUID := TODO // string | 
    uUUID := TODO // string | 

    configuration := openapiclient.NewConfiguration()
    api_client := openapiclient.NewAPIClient(configuration)
    resp, r, err := api_client.UserManagementApi.GetUserDetails(context.Background(), cUUID, uUUID).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `UserManagementApi.GetUserDetails``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `GetUserDetails`: UserWithFeatures
    fmt.Fprintf(os.Stdout, "Response from `UserManagementApi.GetUserDetails`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
cUUID string
uUUID string

Other Parameters

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

Name Type Description Notes

Return type

UserWithFeatures

Authorization

apiKeyAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

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

ListUsers

[]UserWithFeatures ListUsers(ctx, cUUID).Execute()

List all users

Example

package main

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

func main() {
    cUUID := TODO // string | 

    configuration := openapiclient.NewConfiguration()
    api_client := openapiclient.NewAPIClient(configuration)
    resp, r, err := api_client.UserManagementApi.ListUsers(context.Background(), cUUID).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `UserManagementApi.ListUsers``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `ListUsers`: []UserWithFeatures
    fmt.Fprintf(os.Stdout, "Response from `UserManagementApi.ListUsers`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
cUUID string

Other Parameters

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

Name Type Description Notes

Return type

[]UserWithFeatures

Authorization

apiKeyAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

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

ResetUserPassword

YBPSuccess ResetUserPassword(ctx, cUUID).Users(users).Request(request).Execute()

Reset the user's password

Example

package main

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

func main() {
    cUUID := TODO // string | 
    users := *openapiclient.NewUserPasswordChangeFormData() // UserPasswordChangeFormData | User data containing the current, new password
    request := TODO // interface{} |  (optional)

    configuration := openapiclient.NewConfiguration()
    api_client := openapiclient.NewAPIClient(configuration)
    resp, r, err := api_client.UserManagementApi.ResetUserPassword(context.Background(), cUUID).Users(users).Request(request).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `UserManagementApi.ResetUserPassword``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `ResetUserPassword`: YBPSuccess
    fmt.Fprintf(os.Stdout, "Response from `UserManagementApi.ResetUserPassword`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
cUUID string

Other Parameters

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

Name Type Description Notes

users | UserPasswordChangeFormData | User data containing the current, new password | request | interface{} | |

Return type

YBPSuccess

Authorization

apiKeyAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

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

RetrieveOIDCAuthToken

UserOIDCAuthToken RetrieveOIDCAuthToken(ctx, cUUID, uUUID).Request(request).Execute()

Retrieve OIDC auth token

Example

package main

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

func main() {
    cUUID := TODO // string | 
    uUUID := TODO // string | 
    request := TODO // interface{} |  (optional)

    configuration := openapiclient.NewConfiguration()
    api_client := openapiclient.NewAPIClient(configuration)
    resp, r, err := api_client.UserManagementApi.RetrieveOIDCAuthToken(context.Background(), cUUID, uUUID).Request(request).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `UserManagementApi.RetrieveOIDCAuthToken``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `RetrieveOIDCAuthToken`: UserOIDCAuthToken
    fmt.Fprintf(os.Stdout, "Response from `UserManagementApi.RetrieveOIDCAuthToken`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
cUUID string
uUUID string

Other Parameters

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

Name Type Description Notes

request | interface{} | |

Return type

UserOIDCAuthToken

Authorization

apiKeyAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

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

UpdateUserProfile

Users UpdateUserProfile(ctx, cUUID, uUUID).Users(users).Request(request).Execute()

Update a user's profile

Example

package main

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

func main() {
    cUUID := TODO // string | 
    uUUID := TODO // string | 
    users := *openapiclient.NewUserProfileData("Admin") // UserProfileData | User data in profile to be updated
    request := TODO // interface{} |  (optional)

    configuration := openapiclient.NewConfiguration()
    api_client := openapiclient.NewAPIClient(configuration)
    resp, r, err := api_client.UserManagementApi.UpdateUserProfile(context.Background(), cUUID, uUUID).Users(users).Request(request).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `UserManagementApi.UpdateUserProfile``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `UpdateUserProfile`: Users
    fmt.Fprintf(os.Stdout, "Response from `UserManagementApi.UpdateUserProfile`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
cUUID string
uUUID string

Other Parameters

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

Name Type Description Notes

users | UserProfileData | User data in profile to be updated | request | interface{} | |

Return type

Users

Authorization

apiKeyAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

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

UpdateUserRole

YBPSuccess UpdateUserRole(ctx, cUUID, uUUID).Role(role).Request(request).Execute()

Change a user's role

Example

package main

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

func main() {
    cUUID := TODO // string | 
    uUUID := TODO // string | 
    role := "role_example" // string |  (optional)
    request := TODO // interface{} |  (optional)

    configuration := openapiclient.NewConfiguration()
    api_client := openapiclient.NewAPIClient(configuration)
    resp, r, err := api_client.UserManagementApi.UpdateUserRole(context.Background(), cUUID, uUUID).Role(role).Request(request).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `UserManagementApi.UpdateUserRole``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `UpdateUserRole`: YBPSuccess
    fmt.Fprintf(os.Stdout, "Response from `UserManagementApi.UpdateUserRole`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
cUUID string
uUUID string

Other Parameters

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

Name Type Description Notes

role | string | | request | interface{} | |

Return type

YBPSuccess

Authorization

apiKeyAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

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