Skip to content

Latest commit

 

History

History
160 lines (109 loc) · 6.31 KB

File metadata and controls

160 lines (109 loc) · 6.31 KB

\UserApi

All URIs are relative to http://keyfactor.example.com

Method HTTP request Description
GetSSHUsers GET /SSH/Users Returns users matching the criteria from the provided query parameters
GetSSHUsersById GET /SSH/Users/{id} Looks up information about an existing SSH user.

GetSSHUsers

[]CSSCMSDataModelModelsSSHUsersSshUserAccessResponse NewGetSSHUsersRequest(ctx).XKeyfactorRequestedWith(xKeyfactorRequestedWith).QueryString(queryString).PageReturned(pageReturned).ReturnLimit(returnLimit).SortField(sortField).SortAscending(sortAscending).ShowOwnedAccess(showOwnedAccess).XKeyfactorApiVersion(xKeyfactorApiVersion).Execute()

Returns users matching the criteria from the provided query parameters

Example

package main

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

func main() {
    xKeyfactorRequestedWith := "APIClient" // string | Type of the request [XMLHttpRequest, APIClient]
    queryString := "queryString_example" // string |  (optional)
    pageReturned := int32(56) // int32 |  (optional)
    returnLimit := int32(56) // int32 |  (optional)
    sortField := "sortField_example" // string |  (optional)
    sortAscending := openapiclient.Keyfactor.Common.QueryableExtensions.SortOrder(0) // KeyfactorCommonQueryableExtensionsSortOrder |  (optional)
    showOwnedAccess := true // bool | Whether or not to return only logons that have access to servers the requesting user owns (optional) (default to false)
    xKeyfactorApiVersion := "2" // string | Desired version of the api, if not provided defaults to v1 (optional)

    configuration := openapiclient.NewConfiguration(make(map[string]string))
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.UserApi.NewGetSSHUsersRequest(context.Background()).XKeyfactorRequestedWith(xKeyfactorRequestedWith).QueryString(queryString).PageReturned(pageReturned).ReturnLimit(returnLimit).SortField(sortField).SortAscending(sortAscending).ShowOwnedAccess(showOwnedAccess).XKeyfactorApiVersion(xKeyfactorApiVersion).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `UserApi.GetSSHUsers``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `GetSSHUsers`: []CSSCMSDataModelModelsSSHUsersSshUserAccessResponse
    fmt.Fprintf(os.Stdout, "Response from `UserApi.GetSSHUsers`: %v\n", resp)
}

Path Parameters

Other Parameters

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

Name Type Description Notes
xKeyfactorRequestedWith string Type of the request [XMLHttpRequest, APIClient]
queryString string
pageReturned int32
returnLimit int32
sortField string
sortAscending KeyfactorCommonQueryableExtensionsSortOrder
showOwnedAccess bool Whether or not to return only logons that have access to servers the requesting user owns [default to false]
xKeyfactorApiVersion string Desired version of the api, if not provided defaults to v1

Return type

[]CSSCMSDataModelModelsSSHUsersSshUserAccessResponse

Authorization

basicAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: text/plain, application/json, text/json

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

GetSSHUsersById

CSSCMSDataModelModelsSSHUsersSshUserAccessResponse NewGetSSHUsersByIdRequest(ctx, id).XKeyfactorRequestedWith(xKeyfactorRequestedWith).XKeyfactorApiVersion(xKeyfactorApiVersion).Execute()

Looks up information about an existing SSH user.

Example

package main

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

func main() {
    id := int32(56) // int32 | The Id of the SSH user to retrieve.
    xKeyfactorRequestedWith := "APIClient" // string | Type of the request [XMLHttpRequest, APIClient]
    xKeyfactorApiVersion := "2" // string | Desired version of the api, if not provided defaults to v1 (optional)

    configuration := openapiclient.NewConfiguration(make(map[string]string))
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.UserApi.NewGetSSHUsersByIdRequest(context.Background(), id).XKeyfactorRequestedWith(xKeyfactorRequestedWith).XKeyfactorApiVersion(xKeyfactorApiVersion).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `UserApi.GetSSHUsersById``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `GetSSHUsersById`: CSSCMSDataModelModelsSSHUsersSshUserAccessResponse
    fmt.Fprintf(os.Stdout, "Response from `UserApi.GetSSHUsersById`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
id int32 The Id of the SSH user to retrieve.

Other Parameters

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

Name Type Description Notes

xKeyfactorRequestedWith | string | Type of the request [XMLHttpRequest, APIClient] | xKeyfactorApiVersion | string | Desired version of the api, if not provided defaults to v1 |

Return type

CSSCMSDataModelModelsSSHUsersSshUserAccessResponse

Authorization

basicAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: text/plain, application/json, text/json

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