All URIs are relative to http://keyfactor.example.com
| Method | HTTP request | Description |
|---|---|---|
| CreateTemplatesImport | POST /Templates/Import | Imports templates from the provided configuration tenant |
| GetTemplates | GET /Templates | Returns all certificate templates according to the provided filter and output parameters |
| GetTemplatesById | GET /Templates/{id} | Returns the certificate template associated with the provided id |
| GetTemplatesSettings | GET /Templates/Settings | Gets the global template settings. |
| GetTemplatesSubjectParts | GET /Templates/SubjectParts | Returns the valid subject parts possible for regular expressions. |
| UpdateTemplates | PUT /Templates | Updates a certificate template according to the provided properties |
| UpdateTemplatesSettings | PUT /Templates/Settings | Replaces the existing global template settings. |
NewCreateTemplatesImportRequest(ctx).XKeyfactorRequestedWith(xKeyfactorRequestedWith).XKeyfactorApiVersion(xKeyfactorApiVersion).ConfigurationTenantConfigurationTenantRequest(configurationTenantConfigurationTenantRequest).Execute()
Imports templates from the provided configuration tenant
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)
configurationTenantConfigurationTenantRequest := *openapiclient.NewConfigurationTenantConfigurationTenantRequest() // ConfigurationTenantConfigurationTenantRequest | Configuration tenant to import from (optional)
configuration := openapiclient.NewConfiguration(make(map[string]string))
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.TemplateApi.NewCreateTemplatesImportRequest(context.Background()).XKeyfactorRequestedWith(xKeyfactorRequestedWith).XKeyfactorApiVersion(xKeyfactorApiVersion).ConfigurationTenantConfigurationTenantRequest(configurationTenantConfigurationTenantRequest).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `TemplateApi.CreateTemplatesImport``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}Other parameters are passed through a pointer to a apiCreateTemplatesImportRequest 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 | |
| configurationTenantConfigurationTenantRequest | ConfigurationTenantConfigurationTenantRequest | Configuration tenant to import from |
(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]
[]TemplatesTemplateCollectionRetrievalResponse NewGetTemplatesRequest(ctx).XKeyfactorRequestedWith(xKeyfactorRequestedWith).QueryString(queryString).PageReturned(pageReturned).ReturnLimit(returnLimit).SortField(sortField).SortAscending(sortAscending).XKeyfactorApiVersion(xKeyfactorApiVersion).Execute()
Returns all certificate templates 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.TemplateApi.NewGetTemplatesRequest(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 `TemplateApi.GetTemplates``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetTemplates`: []TemplatesTemplateCollectionRetrievalResponse
fmt.Fprintf(os.Stdout, "Response from `TemplateApi.GetTemplates`: %v\n", resp)
}Other parameters are passed through a pointer to a apiGetTemplatesRequest 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 |
[]TemplatesTemplateCollectionRetrievalResponse
- 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]
TemplatesTemplateRetrievalResponse NewGetTemplatesByIdRequest(ctx, id).XKeyfactorRequestedWith(xKeyfactorRequestedWith).XKeyfactorApiVersion(xKeyfactorApiVersion).Execute()
Returns the certificate template associated with the provided id
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
id := int32(56) // int32 | Keyfactor identifier of the certificate template
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.TemplateApi.NewGetTemplatesByIdRequest(context.Background(), id).XKeyfactorRequestedWith(xKeyfactorRequestedWith).XKeyfactorApiVersion(xKeyfactorApiVersion).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `TemplateApi.GetTemplatesById``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetTemplatesById`: TemplatesTemplateRetrievalResponse
fmt.Fprintf(os.Stdout, "Response from `TemplateApi.GetTemplatesById`: %v\n", resp)
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| id | int32 | Keyfactor identifier of the certificate template |
Other parameters are passed through a pointer to a apiGetTemplatesByIdRequest 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 |
TemplatesTemplateRetrievalResponse
- 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]
TemplatesGlobalGlobalTemplateSettingsResponse NewGetTemplatesSettingsRequest(ctx).XKeyfactorRequestedWith(xKeyfactorRequestedWith).XKeyfactorApiVersion(xKeyfactorApiVersion).Execute()
Gets the global template settings.
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)
configuration := openapiclient.NewConfiguration(make(map[string]string))
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.TemplateApi.NewGetTemplatesSettingsRequest(context.Background()).XKeyfactorRequestedWith(xKeyfactorRequestedWith).XKeyfactorApiVersion(xKeyfactorApiVersion).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `TemplateApi.GetTemplatesSettings``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetTemplatesSettings`: TemplatesGlobalGlobalTemplateSettingsResponse
fmt.Fprintf(os.Stdout, "Response from `TemplateApi.GetTemplatesSettings`: %v\n", resp)
}Other parameters are passed through a pointer to a apiGetTemplatesSettingsRequest 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 |
TemplatesGlobalGlobalTemplateSettingsResponse
- 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]
[]EnrollmentPatternsValidSubjectPartResponse NewGetTemplatesSubjectPartsRequest(ctx).XKeyfactorRequestedWith(xKeyfactorRequestedWith).XKeyfactorApiVersion(xKeyfactorApiVersion).Execute()
Returns the valid subject parts possible for regular expressions.
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)
configuration := openapiclient.NewConfiguration(make(map[string]string))
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.TemplateApi.NewGetTemplatesSubjectPartsRequest(context.Background()).XKeyfactorRequestedWith(xKeyfactorRequestedWith).XKeyfactorApiVersion(xKeyfactorApiVersion).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `TemplateApi.GetTemplatesSubjectParts``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetTemplatesSubjectParts`: []EnrollmentPatternsValidSubjectPartResponse
fmt.Fprintf(os.Stdout, "Response from `TemplateApi.GetTemplatesSubjectParts`: %v\n", resp)
}Other parameters are passed through a pointer to a apiGetTemplatesSubjectPartsRequest 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 |
[]EnrollmentPatternsValidSubjectPartResponse
- 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]
TemplatesTemplateRetrievalResponse NewUpdateTemplatesRequest(ctx).XKeyfactorRequestedWith(xKeyfactorRequestedWith).XKeyfactorApiVersion(xKeyfactorApiVersion).TemplatesTemplateUpdateRequest(templatesTemplateUpdateRequest).Execute()
Updates a certificate template according to the provided properties
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)
templatesTemplateUpdateRequest := *openapiclient.NewTemplatesTemplateUpdateRequest() // TemplatesTemplateUpdateRequest | Properties of the certificate template to be updated (optional)
configuration := openapiclient.NewConfiguration(make(map[string]string))
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.TemplateApi.NewUpdateTemplatesRequest(context.Background()).XKeyfactorRequestedWith(xKeyfactorRequestedWith).XKeyfactorApiVersion(xKeyfactorApiVersion).TemplatesTemplateUpdateRequest(templatesTemplateUpdateRequest).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `TemplateApi.UpdateTemplates``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `UpdateTemplates`: TemplatesTemplateRetrievalResponse
fmt.Fprintf(os.Stdout, "Response from `TemplateApi.UpdateTemplates`: %v\n", resp)
}Other parameters are passed through a pointer to a apiUpdateTemplatesRequest 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 | |
| templatesTemplateUpdateRequest | TemplatesTemplateUpdateRequest | Properties of the certificate template to be updated |
TemplatesTemplateRetrievalResponse
- 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]
TemplatesGlobalGlobalTemplateSettingsResponse NewUpdateTemplatesSettingsRequest(ctx).XKeyfactorRequestedWith(xKeyfactorRequestedWith).XKeyfactorApiVersion(xKeyfactorApiVersion).TemplatesGlobalGlobalTemplateSettingsRequest(templatesGlobalGlobalTemplateSettingsRequest).Execute()
Replaces the existing global template settings.
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)
templatesGlobalGlobalTemplateSettingsRequest := *openapiclient.NewTemplatesGlobalGlobalTemplateSettingsRequest([]openapiclient.TemplatesGlobalGlobalTemplateRegexRequest{*openapiclient.NewTemplatesGlobalGlobalTemplateRegexRequest("SubjectPart_example")}, []openapiclient.TemplatesGlobalGlobalTemplateDefaultRequest{*openapiclient.NewTemplatesGlobalGlobalTemplateDefaultRequest("SubjectPart_example")}, *openapiclient.NewTemplatesGlobalGlobalTemplatePolicyRequest(false, false, false, openapiclient.CSS.CMS.Core.Enums.TemplateCertificateOwnerRole(0), *openapiclient.NewCSSCMSDataModelModelsTemplatesAlgorithmsKeyInfo())) // TemplatesGlobalGlobalTemplateSettingsRequest | The new global template settings. (optional)
configuration := openapiclient.NewConfiguration(make(map[string]string))
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.TemplateApi.NewUpdateTemplatesSettingsRequest(context.Background()).XKeyfactorRequestedWith(xKeyfactorRequestedWith).XKeyfactorApiVersion(xKeyfactorApiVersion).TemplatesGlobalGlobalTemplateSettingsRequest(templatesGlobalGlobalTemplateSettingsRequest).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `TemplateApi.UpdateTemplatesSettings``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `UpdateTemplatesSettings`: TemplatesGlobalGlobalTemplateSettingsResponse
fmt.Fprintf(os.Stdout, "Response from `TemplateApi.UpdateTemplatesSettings`: %v\n", resp)
}Other parameters are passed through a pointer to a apiUpdateTemplatesSettingsRequest 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 | |
| templatesGlobalGlobalTemplateSettingsRequest | TemplatesGlobalGlobalTemplateSettingsRequest | The new global template settings. |
TemplatesGlobalGlobalTemplateSettingsResponse
- 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]