All URIs are relative to http://keyfactor.example.com
| Method | HTTP request | Description |
|---|---|---|
| CreateSSHKeysMyKey | POST /SSH/Keys/MyKey | Generates an SSH Key Pair for the requesting user. |
| DeleteSSHKeysUnmanaged | DELETE /SSH/Keys/Unmanaged | Deletes Unmanaged Keys associated with the provided identifiers |
| DeleteSSHKeysUnmanagedById | DELETE /SSH/Keys/Unmanaged/{id} | Deletes Unmanaged Key associated with the provided identifier |
| GetSSHKeysMyKey | GET /SSH/Keys/MyKey | Returns the current key of the requesting user |
| GetSSHKeysUnmanaged | GET /SSH/Keys/Unmanaged | Returns Unmanaged SSH keys |
| GetSSHKeysUnmanagedById | GET /SSH/Keys/Unmanaged/{id} | Returns an unmanaged SSH key with provided id. |
| UpdateSSHKeysMyKey | PUT /SSH/Keys/MyKey | Updates the requesting user's SSH key |
CSSCMSDataModelModelsSSHKeysKeyResponse NewCreateSSHKeysMyKeyRequest(ctx).XKeyfactorRequestedWith(xKeyfactorRequestedWith).XKeyfactorApiVersion(xKeyfactorApiVersion).CSSCMSDataModelModelsSSHKeysKeyGenerationRequest(cSSCMSDataModelModelsSSHKeysKeyGenerationRequest).Execute()
Generates an SSH Key Pair for the requesting user.
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
xKeyfactorRequestedWith := "APIClient" // string | Type of the request [XMLHttpRequest, APIClient]
xKeyfactorApiVersion := "1.0" // string | Desired version of the api, if not provided defaults to v1 (optional)
cSSCMSDataModelModelsSSHKeysKeyGenerationRequest := *openapiclient.NewCSSCMSDataModelModelsSSHKeysKeyGenerationRequest("KeyType_example", "PrivateKeyFormat_example", int32(123), "Email_example", "Password_example") // CSSCMSDataModelModelsSSHKeysKeyGenerationRequest | Object containing information about the key to be generated (optional)
configuration := openapiclient.NewConfiguration(make(map[string]string))
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.KeyApi.NewCreateSSHKeysMyKeyRequest(context.Background()).XKeyfactorRequestedWith(xKeyfactorRequestedWith).XKeyfactorApiVersion(xKeyfactorApiVersion).CSSCMSDataModelModelsSSHKeysKeyGenerationRequest(cSSCMSDataModelModelsSSHKeysKeyGenerationRequest).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `KeyApi.CreateSSHKeysMyKey``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `CreateSSHKeysMyKey`: CSSCMSDataModelModelsSSHKeysKeyResponse
fmt.Fprintf(os.Stdout, "Response from `KeyApi.CreateSSHKeysMyKey`: %v\n", resp)
}Other parameters are passed through a pointer to a apiCreateSSHKeysMyKeyRequest 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 | |
| cSSCMSDataModelModelsSSHKeysKeyGenerationRequest | CSSCMSDataModelModelsSSHKeysKeyGenerationRequest | Object containing information about the key to be generated |
CSSCMSDataModelModelsSSHKeysKeyResponse
- Content-Type: application/json-patch+json, application/json, text/json, application/*+json
- Accept: text/plain, application/json, text/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
NewDeleteSSHKeysUnmanagedRequest(ctx).XKeyfactorRequestedWith(xKeyfactorRequestedWith).XKeyfactorApiVersion(xKeyfactorApiVersion).RequestBody(requestBody).Execute()
Deletes Unmanaged Keys associated with the provided identifiers
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
xKeyfactorRequestedWith := "APIClient" // string | Type of the request [XMLHttpRequest, APIClient]
xKeyfactorApiVersion := "1.0" // string | Desired version of the api, if not provided defaults to v1 (optional)
requestBody := []int32{int32(123)} // []int32 | Keyfactor identifers of the Keys to be deleted (optional)
configuration := openapiclient.NewConfiguration(make(map[string]string))
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.KeyApi.NewDeleteSSHKeysUnmanagedRequest(context.Background()).XKeyfactorRequestedWith(xKeyfactorRequestedWith).XKeyfactorApiVersion(xKeyfactorApiVersion).RequestBody(requestBody).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `KeyApi.DeleteSSHKeysUnmanaged``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}Other parameters are passed through a pointer to a apiDeleteSSHKeysUnmanagedRequest 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 | |
| requestBody | []int32 | Keyfactor identifers of the Keys to be deleted |
(empty response body)
- Content-Type: application/json-patch+json, application/json, text/json, application/*+json
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
NewDeleteSSHKeysUnmanagedByIdRequest(ctx, id).XKeyfactorRequestedWith(xKeyfactorRequestedWith).XKeyfactorApiVersion(xKeyfactorApiVersion).Execute()
Deletes Unmanaged Key associated with the provided identifier
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
id := int32(56) // int32 | Keyfactor identifer of the Key to be deleted
xKeyfactorRequestedWith := "APIClient" // string | Type of the request [XMLHttpRequest, APIClient]
xKeyfactorApiVersion := "1.0" // 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.KeyApi.NewDeleteSSHKeysUnmanagedByIdRequest(context.Background(), id).XKeyfactorRequestedWith(xKeyfactorRequestedWith).XKeyfactorApiVersion(xKeyfactorApiVersion).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `KeyApi.DeleteSSHKeysUnmanagedById``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| id | int32 | Keyfactor identifer of the Key to be deleted |
Other parameters are passed through a pointer to a apiDeleteSSHKeysUnmanagedByIdRequest 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 |
(empty response body)
- Content-Type: Not defined
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
CSSCMSDataModelModelsSSHKeysKeyResponse NewGetSSHKeysMyKeyRequest(ctx).XKeyfactorRequestedWith(xKeyfactorRequestedWith).IncludePrivateKey(includePrivateKey).XKeyfactorApiVersion(xKeyfactorApiVersion).Execute()
Returns the current key of the requesting user
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
xKeyfactorRequestedWith := "APIClient" // string | Type of the request [XMLHttpRequest, APIClient]
includePrivateKey := true // bool | Whether or not to include the private key. If true, you must supply the X-Keyfactor-Key-Passphrase header (optional) (default to false)
xKeyfactorApiVersion := "1.0" // 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.KeyApi.NewGetSSHKeysMyKeyRequest(context.Background()).XKeyfactorRequestedWith(xKeyfactorRequestedWith).IncludePrivateKey(includePrivateKey).XKeyfactorApiVersion(xKeyfactorApiVersion).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `KeyApi.GetSSHKeysMyKey``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetSSHKeysMyKey`: CSSCMSDataModelModelsSSHKeysKeyResponse
fmt.Fprintf(os.Stdout, "Response from `KeyApi.GetSSHKeysMyKey`: %v\n", resp)
}Other parameters are passed through a pointer to a apiGetSSHKeysMyKeyRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|---|---|---|
| xKeyfactorRequestedWith | string | Type of the request [XMLHttpRequest, APIClient] | |
| includePrivateKey | bool | Whether or not to include the private key. If true, you must supply the X-Keyfactor-Key-Passphrase header | [default to false] |
| xKeyfactorApiVersion | string | Desired version of the api, if not provided defaults to v1 |
CSSCMSDataModelModelsSSHKeysKeyResponse
- 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]
[]CSSCMSDataModelModelsSSHKeysUnmanagedKeyResponse NewGetSSHKeysUnmanagedRequest(ctx).XKeyfactorRequestedWith(xKeyfactorRequestedWith).QueryString(queryString).PageReturned(pageReturned).ReturnLimit(returnLimit).SortField(sortField).SortAscending(sortAscending).XKeyfactorApiVersion(xKeyfactorApiVersion).Execute()
Returns Unmanaged SSH keys
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)
xKeyfactorApiVersion := "1.0" // 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.KeyApi.NewGetSSHKeysUnmanagedRequest(context.Background()).XKeyfactorRequestedWith(xKeyfactorRequestedWith).QueryString(queryString).PageReturned(pageReturned).ReturnLimit(returnLimit).SortField(sortField).SortAscending(sortAscending).XKeyfactorApiVersion(xKeyfactorApiVersion).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `KeyApi.GetSSHKeysUnmanaged``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetSSHKeysUnmanaged`: []CSSCMSDataModelModelsSSHKeysUnmanagedKeyResponse
fmt.Fprintf(os.Stdout, "Response from `KeyApi.GetSSHKeysUnmanaged`: %v\n", resp)
}Other parameters are passed through a pointer to a apiGetSSHKeysUnmanagedRequest 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 | ||
| xKeyfactorApiVersion | string | Desired version of the api, if not provided defaults to v1 |
[]CSSCMSDataModelModelsSSHKeysUnmanagedKeyResponse
- 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]
CSSCMSDataModelModelsSSHKeysUnmanagedKeyResponse NewGetSSHKeysUnmanagedByIdRequest(ctx, id).XKeyfactorRequestedWith(xKeyfactorRequestedWith).XKeyfactorApiVersion(xKeyfactorApiVersion).Execute()
Returns an unmanaged SSH key with provided id.
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
id := int32(56) // int32 | The id of the key to get
xKeyfactorRequestedWith := "APIClient" // string | Type of the request [XMLHttpRequest, APIClient]
xKeyfactorApiVersion := "1.0" // 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.KeyApi.NewGetSSHKeysUnmanagedByIdRequest(context.Background(), id).XKeyfactorRequestedWith(xKeyfactorRequestedWith).XKeyfactorApiVersion(xKeyfactorApiVersion).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `KeyApi.GetSSHKeysUnmanagedById``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetSSHKeysUnmanagedById`: CSSCMSDataModelModelsSSHKeysUnmanagedKeyResponse
fmt.Fprintf(os.Stdout, "Response from `KeyApi.GetSSHKeysUnmanagedById`: %v\n", resp)
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| id | int32 | The id of the key to get |
Other parameters are passed through a pointer to a apiGetSSHKeysUnmanagedByIdRequest 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 |
CSSCMSDataModelModelsSSHKeysUnmanagedKeyResponse
- 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]
CSSCMSDataModelModelsSSHKeysKeyResponse NewUpdateSSHKeysMyKeyRequest(ctx).XKeyfactorRequestedWith(xKeyfactorRequestedWith).XKeyfactorApiVersion(xKeyfactorApiVersion).CSSCMSDataModelModelsSSHKeysKeyUpdateRequest(cSSCMSDataModelModelsSSHKeysKeyUpdateRequest).Execute()
Updates the requesting user's SSH key
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
xKeyfactorRequestedWith := "APIClient" // string | Type of the request [XMLHttpRequest, APIClient]
xKeyfactorApiVersion := "1.0" // string | Desired version of the api, if not provided defaults to v1 (optional)
cSSCMSDataModelModelsSSHKeysKeyUpdateRequest := *openapiclient.NewCSSCMSDataModelModelsSSHKeysKeyUpdateRequest(int32(123), "Email_example") // CSSCMSDataModelModelsSSHKeysKeyUpdateRequest | Updated state of the SSH key (optional)
configuration := openapiclient.NewConfiguration(make(map[string]string))
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.KeyApi.NewUpdateSSHKeysMyKeyRequest(context.Background()).XKeyfactorRequestedWith(xKeyfactorRequestedWith).XKeyfactorApiVersion(xKeyfactorApiVersion).CSSCMSDataModelModelsSSHKeysKeyUpdateRequest(cSSCMSDataModelModelsSSHKeysKeyUpdateRequest).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `KeyApi.UpdateSSHKeysMyKey``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `UpdateSSHKeysMyKey`: CSSCMSDataModelModelsSSHKeysKeyResponse
fmt.Fprintf(os.Stdout, "Response from `KeyApi.UpdateSSHKeysMyKey`: %v\n", resp)
}Other parameters are passed through a pointer to a apiUpdateSSHKeysMyKeyRequest 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 | |
| cSSCMSDataModelModelsSSHKeysKeyUpdateRequest | CSSCMSDataModelModelsSSHKeysKeyUpdateRequest | Updated state of the SSH key |
CSSCMSDataModelModelsSSHKeysKeyResponse
- Content-Type: application/json-patch+json, application/json, text/json, application/*+json
- Accept: text/plain, application/json, text/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]