All URIs are relative to http://keyfactor.example.com
| Method | HTTP request | Description |
|---|---|---|
| CreateExtensionsScripts | POST /Extensions/Scripts | Adds a new script |
| DeleteExtensionsScriptsById | DELETE /Extensions/Scripts/{id} | Deletes a script. Script cannot be configured to an alert or workflow. |
| GetExtensionsScripts | GET /Extensions/Scripts | Returns all scripts according to the provided filter and output parameters |
| GetExtensionsScriptsById | GET /Extensions/Scripts/{id} | Returns a single script that matches the provided Id |
| UpdateExtensionsScripts | PUT /Extensions/Scripts | Updates a script |
ScriptsScriptResponse NewCreateExtensionsScriptsRequest(ctx).XKeyfactorRequestedWith(xKeyfactorRequestedWith).ScriptsScriptCreateRequest(scriptsScriptCreateRequest).XKeyfactorApiVersion(xKeyfactorApiVersion).Execute()
Adds a new script
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
xKeyfactorRequestedWith := "APIClient" // string | Type of the request [XMLHttpRequest, APIClient]
scriptsScriptCreateRequest := *openapiclient.NewScriptsScriptCreateRequest("Name_example", "Contents_example") // ScriptsScriptCreateRequest | Script parameters
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.ExtensionsApi.NewCreateExtensionsScriptsRequest(context.Background()).XKeyfactorRequestedWith(xKeyfactorRequestedWith).ScriptsScriptCreateRequest(scriptsScriptCreateRequest).XKeyfactorApiVersion(xKeyfactorApiVersion).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ExtensionsApi.CreateExtensionsScripts``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `CreateExtensionsScripts`: ScriptsScriptResponse
fmt.Fprintf(os.Stdout, "Response from `ExtensionsApi.CreateExtensionsScripts`: %v\n", resp)
}Other parameters are passed through a pointer to a apiCreateExtensionsScriptsRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|---|---|---|
| xKeyfactorRequestedWith | string | Type of the request [XMLHttpRequest, APIClient] | |
| scriptsScriptCreateRequest | ScriptsScriptCreateRequest | Script parameters | |
| xKeyfactorApiVersion | string | Desired version of the api, if not provided defaults to v1 |
- 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]
NewDeleteExtensionsScriptsByIdRequest(ctx, id).XKeyfactorRequestedWith(xKeyfactorRequestedWith).XKeyfactorApiVersion(xKeyfactorApiVersion).Execute()
Deletes a script. Script cannot be configured to an alert or workflow.
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
id := int32(56) // int32 | Id of the script to delete
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.ExtensionsApi.NewDeleteExtensionsScriptsByIdRequest(context.Background(), id).XKeyfactorRequestedWith(xKeyfactorRequestedWith).XKeyfactorApiVersion(xKeyfactorApiVersion).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ExtensionsApi.DeleteExtensionsScriptsById``: %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 | Id of the script to delete |
Other parameters are passed through a pointer to a apiDeleteExtensionsScriptsByIdRequest 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]
[]ScriptsScriptQueryResponse NewGetExtensionsScriptsRequest(ctx).XKeyfactorRequestedWith(xKeyfactorRequestedWith).QueryString(queryString).PageReturned(pageReturned).ReturnLimit(returnLimit).SortField(sortField).SortAscending(sortAscending).XKeyfactorApiVersion(xKeyfactorApiVersion).Execute()
Returns all scripts according to the provided filter and output parameters
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.ExtensionsApi.NewGetExtensionsScriptsRequest(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 `ExtensionsApi.GetExtensionsScripts``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetExtensionsScripts`: []ScriptsScriptQueryResponse
fmt.Fprintf(os.Stdout, "Response from `ExtensionsApi.GetExtensionsScripts`: %v\n", resp)
}Other parameters are passed through a pointer to a apiGetExtensionsScriptsRequest 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 |
- 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]
ScriptsScriptResponse NewGetExtensionsScriptsByIdRequest(ctx, id).XKeyfactorRequestedWith(xKeyfactorRequestedWith).XKeyfactorApiVersion(xKeyfactorApiVersion).Execute()
Returns a single script that matches the provided Id
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
id := int32(56) // int32 | Id of the script
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.ExtensionsApi.NewGetExtensionsScriptsByIdRequest(context.Background(), id).XKeyfactorRequestedWith(xKeyfactorRequestedWith).XKeyfactorApiVersion(xKeyfactorApiVersion).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ExtensionsApi.GetExtensionsScriptsById``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetExtensionsScriptsById`: ScriptsScriptResponse
fmt.Fprintf(os.Stdout, "Response from `ExtensionsApi.GetExtensionsScriptsById`: %v\n", resp)
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| id | int32 | Id of the script |
Other parameters are passed through a pointer to a apiGetExtensionsScriptsByIdRequest 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 |
- 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]
ScriptsScriptResponse NewUpdateExtensionsScriptsRequest(ctx).XKeyfactorRequestedWith(xKeyfactorRequestedWith).ScriptsScriptsUpdateRequest(scriptsScriptsUpdateRequest).XKeyfactorApiVersion(xKeyfactorApiVersion).Execute()
Updates a script
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
xKeyfactorRequestedWith := "APIClient" // string | Type of the request [XMLHttpRequest, APIClient]
scriptsScriptsUpdateRequest := *openapiclient.NewScriptsScriptsUpdateRequest() // ScriptsScriptsUpdateRequest | Script parameters
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.ExtensionsApi.NewUpdateExtensionsScriptsRequest(context.Background()).XKeyfactorRequestedWith(xKeyfactorRequestedWith).ScriptsScriptsUpdateRequest(scriptsScriptsUpdateRequest).XKeyfactorApiVersion(xKeyfactorApiVersion).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ExtensionsApi.UpdateExtensionsScripts``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `UpdateExtensionsScripts`: ScriptsScriptResponse
fmt.Fprintf(os.Stdout, "Response from `ExtensionsApi.UpdateExtensionsScripts`: %v\n", resp)
}Other parameters are passed through a pointer to a apiUpdateExtensionsScriptsRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|---|---|---|
| xKeyfactorRequestedWith | string | Type of the request [XMLHttpRequest, APIClient] | |
| scriptsScriptsUpdateRequest | ScriptsScriptsUpdateRequest | Script parameters | |
| xKeyfactorApiVersion | string | Desired version of the api, if not provided defaults to v1 |
- 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]