Skip to content

Latest commit

 

History

History
1563 lines (1056 loc) · 70 KB

CertificateApi.md

File metadata and controls

1563 lines (1056 loc) · 70 KB

\CertificateApi

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

Method HTTP request Description
CertificateAnalyzeCert Post /Certificates/Analyze Returns the public information of the certificate
CertificateCertificateHistory Get /Certificates/{id}/History Gets the history of operations on a certificate
CertificateCompareMetadata Get /Certificates/Metadata/Compare Compares the metadata value provided with the metadata value associated with the specified certificate
CertificateDeleteByQuery Delete /Certificates/Query Deletes multiple persisted certificate entities selected by a given query
CertificateDeleteCertificate Delete /Certificates/{id} Deletes a persisted certificate by its unique id as well as the stored private key (if present) associated with it
CertificateDeleteCertificates Delete /Certificates Deletes multiple persisted certificates by their unique ids
CertificateDeletePrivateKeys0 Delete /Certificates/PrivateKey Deletes the persisted private keys of multiple certificates by the unique ids of the Certificates
CertificateDeletePrivateKeys1 Delete /Certificates/PrivateKey/{id} Deletes the persisted private key of the certificate associated with the provided identifier
CertificateDownloadCertificateAsync Post /Certificates/Download Downloads the persisted certificate associated with the provided query
CertificateGetCertificate Get /Certificates/{id} Returns a single certificate that matches the id
CertificateGetCertificateLocations Get /Certificates/Locations/{id} Returns a list of locations the certificate is in
CertificateGetCertificateSecurity Get /Certificates/{id}/Security Gets the list of Security Identities and which permissions they have on the given certificate.
CertificateIdentityAudit Get /Certificates/IdentityAudit/{id} Audit identity permissions for certificate
CertificatePostImportCertificate Post /Certificates/Import Imports the provided certificate into the Keyfactor instance, including any provided associated data
CertificateQueryCertificates Get /Certificates Returns all certificates according to the provided filter and output parameters
CertificateRecoverCertificateAsync Post /Certificates/Recover Recovers the persisted certificate associated with the provided query
CertificateRevoke Post /Certificates/Revoke Revokes the certificates associated with the provided identifiers and associates the provided data with the revocation
CertificateRevokeAll Post /Certificates/RevokeAll Revokes the certificates associated with the provided query and Collection Id and associates the provided data with the revocation
CertificateUpdateAllMetadata Put /Certificates/Metadata/All Updates the metadata for certificates associated with the certificate identifiers or query provided
CertificateUpdateMetadata Put /Certificates/Metadata Updates the metadata for the certificate associated with the identifier provided
CertificateValidateCertificate Get /Certificates/{id}/Validate Validates the certificate chain can be built.

CertificateAnalyzeCert

[]ModelsCertificateDetails CertificateAnalyzeCert(ctx).XKeyfactorRequestedWith(xKeyfactorRequestedWith).Request(request).XKeyfactorApiVersion(xKeyfactorApiVersion).Execute()

Returns the public information of the certificate

Example

package main

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

func main() {
    xKeyfactorRequestedWith := "xKeyfactorRequestedWith_example" // string | Type of the request [XMLHttpRequest, APIClient] (default to "APIClient")
    request := *openapiclient.NewKeyfactorApiModelsCertificatesAnalyzeCertificateRequest() // KeyfactorApiModelsCertificatesAnalyzeCertificateRequest | The certificate to analyze
    xKeyfactorApiVersion := "xKeyfactorApiVersion_example" // string | Desired version of the api, if not provided defaults to v1 (optional) (default to "1")

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

Path Parameters

Other Parameters

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

Name Type Description Notes
xKeyfactorRequestedWith string Type of the request [XMLHttpRequest, APIClient] [default to "APIClient"]
request KeyfactorApiModelsCertificatesAnalyzeCertificateRequest The certificate to analyze
xKeyfactorApiVersion string Desired version of the api, if not provided defaults to v1 [default to "1"]

Return type

[]ModelsCertificateDetails

Authorization

basicAuth

HTTP request headers

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

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

CertificateCertificateHistory

[]ModelsPKICertificateOperation CertificateCertificateHistory(ctx, id).XKeyfactorRequestedWith(xKeyfactorRequestedWith).CollectionId(collectionId).XKeyfactorApiVersion(xKeyfactorApiVersion).QueryPageReturned(queryPageReturned).QueryReturnLimit(queryReturnLimit).QuerySortField(querySortField).QuerySortAscending(querySortAscending).Execute()

Gets the history of operations on a certificate

Example

package main

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

func main() {
    id := int32(56) // int32 | The Id of the certificate
    xKeyfactorRequestedWith := "xKeyfactorRequestedWith_example" // string | Type of the request [XMLHttpRequest, APIClient] (default to "APIClient")
    collectionId := int32(56) // int32 | The collection the certificate could be in.  Defaults to no collection. (optional)
    xKeyfactorApiVersion := "xKeyfactorApiVersion_example" // string | Desired version of the api, if not provided defaults to v1 (optional) (default to "1")
    queryPageReturned := int32(56) // int32 | The current page within the result set to be returned (optional)
    queryReturnLimit := int32(56) // int32 | Maximum number of records to be returned in a single call (optional)
    querySortField := "querySortField_example" // string | Field by which the results should be sorted (OperationStart, OperationEnd, UserName) (optional)
    querySortAscending := int32(56) // int32 | Field sort direction [0=ascending, 1=descending] (optional)

    configuration := openapiclient.NewConfiguration(make(map[string]string))
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.CertificateApi.CertificateCertificateHistory(context.Background(), id).XKeyfactorRequestedWith(xKeyfactorRequestedWith).CollectionId(collectionId).XKeyfactorApiVersion(xKeyfactorApiVersion).QueryPageReturned(queryPageReturned).QueryReturnLimit(queryReturnLimit).QuerySortField(querySortField).QuerySortAscending(querySortAscending).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `CertificateApi.CertificateCertificateHistory``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `CertificateCertificateHistory`: []ModelsPKICertificateOperation
    fmt.Fprintf(os.Stdout, "Response from `CertificateApi.CertificateCertificateHistory`: %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 certificate

Other Parameters

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

Name Type Description Notes

xKeyfactorRequestedWith | string | Type of the request [XMLHttpRequest, APIClient] | [default to "APIClient"] collectionId | int32 | The collection the certificate could be in. Defaults to no collection. | xKeyfactorApiVersion | string | Desired version of the api, if not provided defaults to v1 | [default to "1"] queryPageReturned | int32 | The current page within the result set to be returned | queryReturnLimit | int32 | Maximum number of records to be returned in a single call | querySortField | string | Field by which the results should be sorted (OperationStart, OperationEnd, UserName) | querySortAscending | int32 | Field sort direction [0=ascending, 1=descending] |

Return type

[]ModelsPKICertificateOperation

Authorization

basicAuth

HTTP request headers

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

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

CertificateCompareMetadata

bool CertificateCompareMetadata(ctx).CertificateId(certificateId).MetadataFieldName(metadataFieldName).Value(value).XKeyfactorRequestedWith(xKeyfactorRequestedWith).CollectionId(collectionId).XKeyfactorApiVersion(xKeyfactorApiVersion).Execute()

Compares the metadata value provided with the metadata value associated with the specified certificate

Example

package main

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

func main() {
    certificateId := int32(56) // int32 | Certificate identifier
    metadataFieldName := "metadataFieldName_example" // string | Metadata field being compared
    value := "value_example" // string | Value to compare against
    xKeyfactorRequestedWith := "xKeyfactorRequestedWith_example" // string | Type of the request [XMLHttpRequest, APIClient] (default to "APIClient")
    collectionId := int32(56) // int32 | Optional certificate collection identifier used to ensure user access to the certificate (optional)
    xKeyfactorApiVersion := "xKeyfactorApiVersion_example" // string | Desired version of the api, if not provided defaults to v1 (optional) (default to "1")

    configuration := openapiclient.NewConfiguration(make(map[string]string))
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.CertificateApi.CertificateCompareMetadata(context.Background()).CertificateId(certificateId).MetadataFieldName(metadataFieldName).Value(value).XKeyfactorRequestedWith(xKeyfactorRequestedWith).CollectionId(collectionId).XKeyfactorApiVersion(xKeyfactorApiVersion).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `CertificateApi.CertificateCompareMetadata``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `CertificateCompareMetadata`: bool
    fmt.Fprintf(os.Stdout, "Response from `CertificateApi.CertificateCompareMetadata`: %v\n", resp)
}

Path Parameters

Other Parameters

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

Name Type Description Notes
certificateId int32 Certificate identifier
metadataFieldName string Metadata field being compared
value string Value to compare against
xKeyfactorRequestedWith string Type of the request [XMLHttpRequest, APIClient] [default to "APIClient"]
collectionId int32 Optional certificate collection identifier used to ensure user access to the certificate
xKeyfactorApiVersion string Desired version of the api, if not provided defaults to v1 [default to "1"]

Return type

bool

Authorization

basicAuth

HTTP request headers

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

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

CertificateDeleteByQuery

CertificateDeleteByQuery(ctx).XKeyfactorRequestedWith(xKeyfactorRequestedWith).Sq(sq).CollectionId(collectionId).XKeyfactorApiVersion(xKeyfactorApiVersion).Execute()

Deletes multiple persisted certificate entities selected by a given query

Example

package main

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

func main() {
    xKeyfactorRequestedWith := "xKeyfactorRequestedWith_example" // string | Type of the request [XMLHttpRequest, APIClient] (default to "APIClient")
    sq := "sq_example" // string | Query by which certificates should be filtered for deletion
    collectionId := int32(56) // int32 | Optional certificate collection identifier used to ensure user access to the certificate (optional)
    xKeyfactorApiVersion := "xKeyfactorApiVersion_example" // string | Desired version of the api, if not provided defaults to v1 (optional) (default to "1")

    configuration := openapiclient.NewConfiguration(make(map[string]string))
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.CertificateApi.CertificateDeleteByQuery(context.Background()).XKeyfactorRequestedWith(xKeyfactorRequestedWith).Sq(sq).CollectionId(collectionId).XKeyfactorApiVersion(xKeyfactorApiVersion).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `CertificateApi.CertificateDeleteByQuery``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
}

Path Parameters

Other Parameters

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

Name Type Description Notes
xKeyfactorRequestedWith string Type of the request [XMLHttpRequest, APIClient] [default to "APIClient"]
sq string Query by which certificates should be filtered for deletion
collectionId int32 Optional certificate collection identifier used to ensure user access to the certificate
xKeyfactorApiVersion string Desired version of the api, if not provided defaults to v1 [default to "1"]

Return type

(empty response body)

Authorization

basicAuth

HTTP request headers

  • Content-Type: application/json, text/json, application/xml, text/xml, application/x-www-form-urlencoded
  • Accept: Not defined

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

CertificateDeleteCertificate

CertificateDeleteCertificate(ctx, id).XKeyfactorRequestedWith(xKeyfactorRequestedWith).CollectionId(collectionId).XKeyfactorApiVersion(xKeyfactorApiVersion).Execute()

Deletes a persisted certificate by its unique id as well as the stored private key (if present) associated with it

Example

package main

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

func main() {
    id := int32(56) // int32 | Keyfactor identifier of the certificate record
    xKeyfactorRequestedWith := "xKeyfactorRequestedWith_example" // string | Type of the request [XMLHttpRequest, APIClient] (default to "APIClient")
    collectionId := int32(56) // int32 | Optional certificate collection identifier used to ensure user access to the certificate (optional)
    xKeyfactorApiVersion := "xKeyfactorApiVersion_example" // string | Desired version of the api, if not provided defaults to v1 (optional) (default to "1")

    configuration := openapiclient.NewConfiguration(make(map[string]string))
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.CertificateApi.CertificateDeleteCertificate(context.Background(), id).XKeyfactorRequestedWith(xKeyfactorRequestedWith).CollectionId(collectionId).XKeyfactorApiVersion(xKeyfactorApiVersion).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `CertificateApi.CertificateDeleteCertificate``: %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.
id int32 Keyfactor identifier of the certificate record

Other Parameters

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

Name Type Description Notes

xKeyfactorRequestedWith | string | Type of the request [XMLHttpRequest, APIClient] | [default to "APIClient"] collectionId | int32 | Optional certificate collection identifier used to ensure user access to the certificate | xKeyfactorApiVersion | string | Desired version of the api, if not provided defaults to v1 | [default to "1"]

Return type

(empty response body)

Authorization

basicAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

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

CertificateDeleteCertificates

CertificateDeleteCertificates(ctx).XKeyfactorRequestedWith(xKeyfactorRequestedWith).Ids(ids).CollectionId(collectionId).XKeyfactorApiVersion(xKeyfactorApiVersion).Execute()

Deletes multiple persisted certificates by their unique ids

Example

package main

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

func main() {
    xKeyfactorRequestedWith := "xKeyfactorRequestedWith_example" // string | Type of the request [XMLHttpRequest, APIClient] (default to "APIClient")
    ids := []int32{int32(123)} // []int32 | The array of ids for certificate that are to be deleted
    collectionId := int32(56) // int32 | Optional certificate collection identifier used to ensure user access to the certificate (optional)
    xKeyfactorApiVersion := "xKeyfactorApiVersion_example" // string | Desired version of the api, if not provided defaults to v1 (optional) (default to "1")

    configuration := openapiclient.NewConfiguration(make(map[string]string))
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.CertificateApi.CertificateDeleteCertificates(context.Background()).XKeyfactorRequestedWith(xKeyfactorRequestedWith).Ids(ids).CollectionId(collectionId).XKeyfactorApiVersion(xKeyfactorApiVersion).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `CertificateApi.CertificateDeleteCertificates``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
}

Path Parameters

Other Parameters

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

Name Type Description Notes
xKeyfactorRequestedWith string Type of the request [XMLHttpRequest, APIClient] [default to "APIClient"]
ids []int32 The array of ids for certificate that are to be deleted
collectionId int32 Optional certificate collection identifier used to ensure user access to the certificate
xKeyfactorApiVersion string Desired version of the api, if not provided defaults to v1 [default to "1"]

Return type

(empty response body)

Authorization

basicAuth

HTTP request headers

  • Content-Type: application/json, text/json, application/xml, text/xml, application/x-www-form-urlencoded
  • Accept: Not defined

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

CertificateDeletePrivateKeys0

CertificateDeletePrivateKeys0(ctx).XKeyfactorRequestedWith(xKeyfactorRequestedWith).Ids(ids).CollectionId(collectionId).XKeyfactorApiVersion(xKeyfactorApiVersion).Execute()

Deletes the persisted private keys of multiple certificates by the unique ids of the Certificates

Example

package main

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

func main() {
    xKeyfactorRequestedWith := "xKeyfactorRequestedWith_example" // string | Type of the request [XMLHttpRequest, APIClient] (default to "APIClient")
    ids := []int32{int32(123)} // []int32 | Keyfactor identifiers of the cetficiates for which the associated private keys should be deleted
    collectionId := int32(56) // int32 | Optional certificate collection identifier used to ensure user access to the certificate (optional)
    xKeyfactorApiVersion := "xKeyfactorApiVersion_example" // string | Desired version of the api, if not provided defaults to v1 (optional) (default to "1")

    configuration := openapiclient.NewConfiguration(make(map[string]string))
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.CertificateApi.CertificateDeletePrivateKeys0(context.Background()).XKeyfactorRequestedWith(xKeyfactorRequestedWith).Ids(ids).CollectionId(collectionId).XKeyfactorApiVersion(xKeyfactorApiVersion).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `CertificateApi.CertificateDeletePrivateKeys0``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
}

Path Parameters

Other Parameters

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

Name Type Description Notes
xKeyfactorRequestedWith string Type of the request [XMLHttpRequest, APIClient] [default to "APIClient"]
ids []int32 Keyfactor identifiers of the cetficiates for which the associated private keys should be deleted
collectionId int32 Optional certificate collection identifier used to ensure user access to the certificate
xKeyfactorApiVersion string Desired version of the api, if not provided defaults to v1 [default to "1"]

Return type

(empty response body)

Authorization

basicAuth

HTTP request headers

  • Content-Type: application/json, text/json, application/xml, text/xml, application/x-www-form-urlencoded
  • Accept: Not defined

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

CertificateDeletePrivateKeys1

CertificateDeletePrivateKeys1(ctx, id).XKeyfactorRequestedWith(xKeyfactorRequestedWith).CollectionId(collectionId).XKeyfactorApiVersion(xKeyfactorApiVersion).Execute()

Deletes the persisted private key of the certificate associated with the provided identifier

Example

package main

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

func main() {
    id := int32(56) // int32 | Keyfactor identifier of the certificate for which the associated private key should be deleted
    xKeyfactorRequestedWith := "xKeyfactorRequestedWith_example" // string | Type of the request [XMLHttpRequest, APIClient] (default to "APIClient")
    collectionId := int32(56) // int32 | Optional certificate collection identifier used to ensure user access to the certificate (optional)
    xKeyfactorApiVersion := "xKeyfactorApiVersion_example" // string | Desired version of the api, if not provided defaults to v1 (optional) (default to "1")

    configuration := openapiclient.NewConfiguration(make(map[string]string))
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.CertificateApi.CertificateDeletePrivateKeys1(context.Background(), id).XKeyfactorRequestedWith(xKeyfactorRequestedWith).CollectionId(collectionId).XKeyfactorApiVersion(xKeyfactorApiVersion).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `CertificateApi.CertificateDeletePrivateKeys1``: %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.
id int32 Keyfactor identifier of the certificate for which the associated private key should be deleted

Other Parameters

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

Name Type Description Notes

xKeyfactorRequestedWith | string | Type of the request [XMLHttpRequest, APIClient] | [default to "APIClient"] collectionId | int32 | Optional certificate collection identifier used to ensure user access to the certificate | xKeyfactorApiVersion | string | Desired version of the api, if not provided defaults to v1 | [default to "1"]

Return type

(empty response body)

Authorization

basicAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

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

CertificateDownloadCertificateAsync

ModelsCertificateDownloadResponse CertificateDownloadCertificateAsync(ctx).XKeyfactorRequestedWith(xKeyfactorRequestedWith).Rq(rq).CollectionId(collectionId).XKeyfactorApiVersion(xKeyfactorApiVersion).Execute()

Downloads the persisted certificate associated with the provided query

Example

package main

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

func main() {
    xKeyfactorRequestedWith := "xKeyfactorRequestedWith_example" // string | Type of the request [XMLHttpRequest, APIClient] (default to "APIClient")
    rq := *openapiclient.NewModelsCertificateDownloadRequest() // ModelsCertificateDownloadRequest | Query to filter the certificate to be recovered
    collectionId := int32(56) // int32 | Optional certificate collection identifier used to ensure user access to the certificate (optional)
    xKeyfactorApiVersion := "xKeyfactorApiVersion_example" // string | Desired version of the api, if not provided defaults to v1 (optional) (default to "1")

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

Path Parameters

Other Parameters

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

Name Type Description Notes
xKeyfactorRequestedWith string Type of the request [XMLHttpRequest, APIClient] [default to "APIClient"]
rq ModelsCertificateDownloadRequest Query to filter the certificate to be recovered
collectionId int32 Optional certificate collection identifier used to ensure user access to the certificate
xKeyfactorApiVersion string Desired version of the api, if not provided defaults to v1 [default to "1"]

Return type

ModelsCertificateDownloadResponse

Authorization

basicAuth

HTTP request headers

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

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

CertificateGetCertificate

ModelsCertificateRetrievalResponse CertificateGetCertificate(ctx, id).XKeyfactorRequestedWith(xKeyfactorRequestedWith).IncludeLocations(includeLocations).IncludeMetadata(includeMetadata).CollectionId(collectionId).Verbose(verbose).XKeyfactorApiVersion(xKeyfactorApiVersion).Execute()

Returns a single certificate that matches the id

Example

package main

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

func main() {
    id := int32(56) // int32 | Keyfactor certificate identifier
    xKeyfactorRequestedWith := "xKeyfactorRequestedWith_example" // string | Type of the request [XMLHttpRequest, APIClient] (default to "APIClient")
    includeLocations := true // bool | Include locations data for the certificate to be returned (optional)
    includeMetadata := true // bool | Include metadata for the certificate to be returned (optional)
    collectionId := int32(56) // int32 | Optional certificate collection identifier used to ensure user access to the certificate (optional)
    verbose := int32(56) // int32 |  (optional)
    xKeyfactorApiVersion := "xKeyfactorApiVersion_example" // string | Desired version of the api, if not provided defaults to v1 (optional) (default to "1")

    configuration := openapiclient.NewConfiguration(make(map[string]string))
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.CertificateApi.CertificateGetCertificate(context.Background(), id).XKeyfactorRequestedWith(xKeyfactorRequestedWith).IncludeLocations(includeLocations).IncludeMetadata(includeMetadata).CollectionId(collectionId).Verbose(verbose).XKeyfactorApiVersion(xKeyfactorApiVersion).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `CertificateApi.CertificateGetCertificate``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `CertificateGetCertificate`: ModelsCertificateRetrievalResponse
    fmt.Fprintf(os.Stdout, "Response from `CertificateApi.CertificateGetCertificate`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
id int32 Keyfactor certificate identifier

Other Parameters

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

Name Type Description Notes

xKeyfactorRequestedWith | string | Type of the request [XMLHttpRequest, APIClient] | [default to "APIClient"] includeLocations | bool | Include locations data for the certificate to be returned | includeMetadata | bool | Include metadata for the certificate to be returned | collectionId | int32 | Optional certificate collection identifier used to ensure user access to the certificate | verbose | int32 | | xKeyfactorApiVersion | string | Desired version of the api, if not provided defaults to v1 | [default to "1"]

Return type

ModelsCertificateRetrievalResponse

Authorization

basicAuth

HTTP request headers

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

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

CertificateGetCertificateLocations

KeyfactorApiModelsCertificatesCertificateLocationsResponse CertificateGetCertificateLocations(ctx, id).XKeyfactorRequestedWith(xKeyfactorRequestedWith).CollectionId(collectionId).XKeyfactorApiVersion(xKeyfactorApiVersion).Execute()

Returns a list of locations the certificate is in

Example

package main

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

func main() {
    id := int32(56) // int32 | Keyfactor certificate identifier
    xKeyfactorRequestedWith := "xKeyfactorRequestedWith_example" // string | Type of the request [XMLHttpRequest, APIClient] (default to "APIClient")
    collectionId := int32(56) // int32 | Optional certificate collection identifier used to ensure user access to the certificate (optional)
    xKeyfactorApiVersion := "xKeyfactorApiVersion_example" // string | Desired version of the api, if not provided defaults to v1 (optional) (default to "1")

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

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
id int32 Keyfactor certificate identifier

Other Parameters

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

Name Type Description Notes

xKeyfactorRequestedWith | string | Type of the request [XMLHttpRequest, APIClient] | [default to "APIClient"] collectionId | int32 | Optional certificate collection identifier used to ensure user access to the certificate | xKeyfactorApiVersion | string | Desired version of the api, if not provided defaults to v1 | [default to "1"]

Return type

KeyfactorApiModelsCertificatesCertificateLocationsResponse

Authorization

basicAuth

HTTP request headers

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

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

CertificateGetCertificateSecurity

ModelsSecurityCertificatePermissions CertificateGetCertificateSecurity(ctx, id).XKeyfactorRequestedWith(xKeyfactorRequestedWith).CollectionId(collectionId).XKeyfactorApiVersion(xKeyfactorApiVersion).Execute()

Gets the list of Security Identities and which permissions they have on the given certificate.

Example

package main

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

func main() {
    id := int32(56) // int32 | The Id of the certificate permissions are being checked on
    xKeyfactorRequestedWith := "xKeyfactorRequestedWith_example" // string | Type of the request [XMLHttpRequest, APIClient] (default to "APIClient")
    collectionId := int32(56) // int32 | The Id of the collection the certificate belongs in. Defaults to no collection (optional)
    xKeyfactorApiVersion := "xKeyfactorApiVersion_example" // string | Desired version of the api, if not provided defaults to v1 (optional) (default to "1")

    configuration := openapiclient.NewConfiguration(make(map[string]string))
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.CertificateApi.CertificateGetCertificateSecurity(context.Background(), id).XKeyfactorRequestedWith(xKeyfactorRequestedWith).CollectionId(collectionId).XKeyfactorApiVersion(xKeyfactorApiVersion).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `CertificateApi.CertificateGetCertificateSecurity``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `CertificateGetCertificateSecurity`: ModelsSecurityCertificatePermissions
    fmt.Fprintf(os.Stdout, "Response from `CertificateApi.CertificateGetCertificateSecurity`: %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 certificate permissions are being checked on

Other Parameters

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

Name Type Description Notes

xKeyfactorRequestedWith | string | Type of the request [XMLHttpRequest, APIClient] | [default to "APIClient"] collectionId | int32 | The Id of the collection the certificate belongs in. Defaults to no collection | xKeyfactorApiVersion | string | Desired version of the api, if not provided defaults to v1 | [default to "1"]

Return type

ModelsSecurityCertificatePermissions

Authorization

basicAuth

HTTP request headers

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

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

CertificateIdentityAudit

[]KeyfactorApiModelsCertificatesCertificateIdentityAuditResponse CertificateIdentityAudit(ctx, id).XKeyfactorRequestedWith(xKeyfactorRequestedWith).CollectionId(collectionId).XKeyfactorApiVersion(xKeyfactorApiVersion).Execute()

Audit identity permissions for certificate

Example

package main

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

func main() {
    id := int32(56) // int32 | The Id of the certificate being checked
    xKeyfactorRequestedWith := "xKeyfactorRequestedWith_example" // string | Type of the request [XMLHttpRequest, APIClient] (default to "APIClient")
    collectionId := int32(56) // int32 | An optional parameter for the collectin Id the certificate is in.  Defaults to no collection (optional)
    xKeyfactorApiVersion := "xKeyfactorApiVersion_example" // string | Desired version of the api, if not provided defaults to v1 (optional) (default to "1")

    configuration := openapiclient.NewConfiguration(make(map[string]string))
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.CertificateApi.CertificateIdentityAudit(context.Background(), id).XKeyfactorRequestedWith(xKeyfactorRequestedWith).CollectionId(collectionId).XKeyfactorApiVersion(xKeyfactorApiVersion).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `CertificateApi.CertificateIdentityAudit``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `CertificateIdentityAudit`: []KeyfactorApiModelsCertificatesCertificateIdentityAuditResponse
    fmt.Fprintf(os.Stdout, "Response from `CertificateApi.CertificateIdentityAudit`: %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 certificate being checked

Other Parameters

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

Name Type Description Notes

xKeyfactorRequestedWith | string | Type of the request [XMLHttpRequest, APIClient] | [default to "APIClient"] collectionId | int32 | An optional parameter for the collectin Id the certificate is in. Defaults to no collection | xKeyfactorApiVersion | string | Desired version of the api, if not provided defaults to v1 | [default to "1"]

Return type

[]KeyfactorApiModelsCertificatesCertificateIdentityAuditResponse

Authorization

basicAuth

HTTP request headers

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

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

CertificatePostImportCertificate

ModelsCertificateImportResponseModel CertificatePostImportCertificate(ctx).XKeyfactorRequestedWith(xKeyfactorRequestedWith).Req(req).XKeyfactorApiVersion(xKeyfactorApiVersion).Execute()

Imports the provided certificate into the Keyfactor instance, including any provided associated data

Example

package main

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

func main() {
    xKeyfactorRequestedWith := "xKeyfactorRequestedWith_example" // string | Type of the request [XMLHttpRequest, APIClient] (default to "APIClient")
    req := *openapiclient.NewModelsCertificateImportRequestModel("Certificate_example") // ModelsCertificateImportRequestModel | Request containing the base 64 encoded string and related certificate information, such as certificate stores, metadata, and password
    xKeyfactorApiVersion := "xKeyfactorApiVersion_example" // string | Desired version of the api, if not provided defaults to v1 (optional) (default to "1")

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

Path Parameters

Other Parameters

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

Name Type Description Notes
xKeyfactorRequestedWith string Type of the request [XMLHttpRequest, APIClient] [default to "APIClient"]
req ModelsCertificateImportRequestModel Request containing the base 64 encoded string and related certificate information, such as certificate stores, metadata, and password
xKeyfactorApiVersion string Desired version of the api, if not provided defaults to v1 [default to "1"]

Return type

ModelsCertificateImportResponseModel

Authorization

basicAuth

HTTP request headers

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

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

CertificateQueryCertificates

[]ModelsCertificateRetrievalResponse CertificateQueryCertificates(ctx).XKeyfactorRequestedWith(xKeyfactorRequestedWith).CollectionId(collectionId).IncludeLocations(includeLocations).IncludeMetadata(includeMetadata).IncludeHasPrivateKey(includeHasPrivateKey).Verbose(verbose).XKeyfactorApiVersion(xKeyfactorApiVersion).PqQueryString(pqQueryString).PqPageReturned(pqPageReturned).PqReturnLimit(pqReturnLimit).PqSortField(pqSortField).PqSortAscending(pqSortAscending).PqIncludeRevoked(pqIncludeRevoked).PqIncludeExpired(pqIncludeExpired).Execute()

Returns all certificates according to the provided filter and output parameters

Example

package main

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

func main() {
    xKeyfactorRequestedWith := "xKeyfactorRequestedWith_example" // string | Type of the request [XMLHttpRequest, APIClient] (default to "APIClient")
    collectionId := int32(56) // int32 | Optional certificate collection identifier used to ensure user access to the certificate (optional)
    includeLocations := true // bool | Include locations data for the certificates to be returned (optional)
    includeMetadata := true // bool | Include metadata for the certificates to be returned (optional)
    includeHasPrivateKey := true // bool | Include whether the certificates to be returned have private keys stored in the Keyfactor database (optional)
    verbose := int32(56) // int32 |  (optional)
    xKeyfactorApiVersion := "xKeyfactorApiVersion_example" // string | Desired version of the api, if not provided defaults to v1 (optional) (default to "1")
    pqQueryString := "pqQueryString_example" // string | Contents of the query (ex: field1 -eq value1 AND field2 -gt value2) (optional)
    pqPageReturned := int32(56) // int32 | The current page within the result set to be returned (optional)
    pqReturnLimit := int32(56) // int32 | Maximum number of records to be returned in a single call (optional)
    pqSortField := "pqSortField_example" // string | Field by which the results should be sorted (view results via Management Portal for sortable columns) (optional)
    pqSortAscending := int32(56) // int32 | Field sort direction [0=ascending, 1=descending] (optional)
    pqIncludeRevoked := true // bool | Select 'true' to include revoked certificates in the results (optional)
    pqIncludeExpired := true // bool | Select 'true' to include expired certificates in the results (optional)

    configuration := openapiclient.NewConfiguration(make(map[string]string))
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.CertificateApi.CertificateQueryCertificates(context.Background()).XKeyfactorRequestedWith(xKeyfactorRequestedWith).CollectionId(collectionId).IncludeLocations(includeLocations).IncludeMetadata(includeMetadata).IncludeHasPrivateKey(includeHasPrivateKey).Verbose(verbose).XKeyfactorApiVersion(xKeyfactorApiVersion).PqQueryString(pqQueryString).PqPageReturned(pqPageReturned).PqReturnLimit(pqReturnLimit).PqSortField(pqSortField).PqSortAscending(pqSortAscending).PqIncludeRevoked(pqIncludeRevoked).PqIncludeExpired(pqIncludeExpired).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `CertificateApi.CertificateQueryCertificates``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `CertificateQueryCertificates`: []ModelsCertificateRetrievalResponse
    fmt.Fprintf(os.Stdout, "Response from `CertificateApi.CertificateQueryCertificates`: %v\n", resp)
}

Path Parameters

Other Parameters

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

Name Type Description Notes
xKeyfactorRequestedWith string Type of the request [XMLHttpRequest, APIClient] [default to "APIClient"]
collectionId int32 Optional certificate collection identifier used to ensure user access to the certificate
includeLocations bool Include locations data for the certificates to be returned
includeMetadata bool Include metadata for the certificates to be returned
includeHasPrivateKey bool Include whether the certificates to be returned have private keys stored in the Keyfactor database
verbose int32
xKeyfactorApiVersion string Desired version of the api, if not provided defaults to v1 [default to "1"]
pqQueryString string Contents of the query (ex: field1 -eq value1 AND field2 -gt value2)
pqPageReturned int32 The current page within the result set to be returned
pqReturnLimit int32 Maximum number of records to be returned in a single call
pqSortField string Field by which the results should be sorted (view results via Management Portal for sortable columns)
pqSortAscending int32 Field sort direction [0=ascending, 1=descending]
pqIncludeRevoked bool Select 'true' to include revoked certificates in the results
pqIncludeExpired bool Select 'true' to include expired certificates in the results

Return type

[]ModelsCertificateRetrievalResponse

Authorization

basicAuth

HTTP request headers

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

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

CertificateRecoverCertificateAsync

ModelsRecoveryResponse CertificateRecoverCertificateAsync(ctx).XCertificateformat(xCertificateformat).XKeyfactorRequestedWith(xKeyfactorRequestedWith).Rq(rq).CollectionId(collectionId).XKeyfactorApiVersion(xKeyfactorApiVersion).Execute()

Recovers the persisted certificate associated with the provided query

Example

package main

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

func main() {
    xCertificateformat := "xCertificateformat_example" // string | Desired format [PFX, PEM] (default to "PEM")
    xKeyfactorRequestedWith := "xKeyfactorRequestedWith_example" // string | Type of the request [XMLHttpRequest, APIClient] (default to "APIClient")
    rq := *openapiclient.NewModelsCertificateRecoveryRequest("Password_example") // ModelsCertificateRecoveryRequest | Query to filter the certificate to be recovered
    collectionId := int32(56) // int32 | Optional certificate collection identifier used to ensure user access to the certificate (optional)
    xKeyfactorApiVersion := "xKeyfactorApiVersion_example" // string | Desired version of the api, if not provided defaults to v1 (optional) (default to "1")

    configuration := openapiclient.NewConfiguration(make(map[string]string))
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.CertificateApi.CertificateRecoverCertificateAsync(context.Background()).XCertificateformat(xCertificateformat).XKeyfactorRequestedWith(xKeyfactorRequestedWith).Rq(rq).CollectionId(collectionId).XKeyfactorApiVersion(xKeyfactorApiVersion).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `CertificateApi.CertificateRecoverCertificateAsync``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `CertificateRecoverCertificateAsync`: ModelsRecoveryResponse
    fmt.Fprintf(os.Stdout, "Response from `CertificateApi.CertificateRecoverCertificateAsync`: %v\n", resp)
}

Path Parameters

Other Parameters

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

Name Type Description Notes
xCertificateformat string Desired format [PFX, PEM] [default to "PEM"]
xKeyfactorRequestedWith string Type of the request [XMLHttpRequest, APIClient] [default to "APIClient"]
rq ModelsCertificateRecoveryRequest Query to filter the certificate to be recovered
collectionId int32 Optional certificate collection identifier used to ensure user access to the certificate
xKeyfactorApiVersion string Desired version of the api, if not provided defaults to v1 [default to "1"]

Return type

ModelsRecoveryResponse

Authorization

basicAuth

HTTP request headers

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

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

CertificateRevoke

ModelsRevocationRevocationResponse CertificateRevoke(ctx).XKeyfactorRequestedWith(xKeyfactorRequestedWith).Request(request).XKeyfactorApiVersion(xKeyfactorApiVersion).Execute()

Revokes the certificates associated with the provided identifiers and associates the provided data with the revocation

Example

package main

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

func main() {
    xKeyfactorRequestedWith := "xKeyfactorRequestedWith_example" // string | Type of the request [XMLHttpRequest, APIClient] (default to "APIClient")
    request := *openapiclient.NewModelsRevokeCertificateRequest() // ModelsRevokeCertificateRequest | Contains the Keyfactor certificate identifiers and revocation data
    xKeyfactorApiVersion := "xKeyfactorApiVersion_example" // string | Desired version of the api, if not provided defaults to v1 (optional) (default to "1")

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

Path Parameters

Other Parameters

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

Name Type Description Notes
xKeyfactorRequestedWith string Type of the request [XMLHttpRequest, APIClient] [default to "APIClient"]
request ModelsRevokeCertificateRequest Contains the Keyfactor certificate identifiers and revocation data
xKeyfactorApiVersion string Desired version of the api, if not provided defaults to v1 [default to "1"]

Return type

ModelsRevocationRevocationResponse

Authorization

basicAuth

HTTP request headers

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

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

CertificateRevokeAll

ModelsRevocationRevocationResponse CertificateRevokeAll(ctx).XKeyfactorRequestedWith(xKeyfactorRequestedWith).Request(request).CollectionId(collectionId).XKeyfactorApiVersion(xKeyfactorApiVersion).Execute()

Revokes the certificates associated with the provided query and Collection Id and associates the provided data with the revocation

Example

package main

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

func main() {
    xKeyfactorRequestedWith := "xKeyfactorRequestedWith_example" // string | Type of the request [XMLHttpRequest, APIClient] (default to "APIClient")
    request := *openapiclient.NewModelsRevokeAllCertificatesRequest(int32(123), "Comment_example") // ModelsRevokeAllCertificatesRequest | Contains the Keyfactor Query and revocation data
    collectionId := int32(56) // int32 | A collection Id to be used for permissions and part of the query to revoke certificates (optional)
    xKeyfactorApiVersion := "xKeyfactorApiVersion_example" // string | Desired version of the api, if not provided defaults to v1 (optional) (default to "1")

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

Path Parameters

Other Parameters

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

Name Type Description Notes
xKeyfactorRequestedWith string Type of the request [XMLHttpRequest, APIClient] [default to "APIClient"]
request ModelsRevokeAllCertificatesRequest Contains the Keyfactor Query and revocation data
collectionId int32 A collection Id to be used for permissions and part of the query to revoke certificates
xKeyfactorApiVersion string Desired version of the api, if not provided defaults to v1 [default to "1"]

Return type

ModelsRevocationRevocationResponse

Authorization

basicAuth

HTTP request headers

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

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

CertificateUpdateAllMetadata

CertificateUpdateAllMetadata(ctx).XKeyfactorRequestedWith(xKeyfactorRequestedWith).MetadataUpdate(metadataUpdate).CollectionId(collectionId).XKeyfactorApiVersion(xKeyfactorApiVersion).Execute()

Updates the metadata for certificates associated with the certificate identifiers or query provided

Example

package main

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

func main() {
    xKeyfactorRequestedWith := "xKeyfactorRequestedWith_example" // string | Type of the request [XMLHttpRequest, APIClient] (default to "APIClient")
    metadataUpdate := *openapiclient.NewModelsMetadataAllUpdateRequest([]openapiclient.ModelsMetadataSingleUpdateRequest{*openapiclient.NewModelsMetadataSingleUpdateRequest()}) // ModelsMetadataAllUpdateRequest | Contains the Keyfactor certificate identifier and the metadata to be updated
    collectionId := int32(56) // int32 | Optional certificate collection identifier used to ensure user access to the certificate (optional)
    xKeyfactorApiVersion := "xKeyfactorApiVersion_example" // string | Desired version of the api, if not provided defaults to v1 (optional) (default to "1")

    configuration := openapiclient.NewConfiguration(make(map[string]string))
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.CertificateApi.CertificateUpdateAllMetadata(context.Background()).XKeyfactorRequestedWith(xKeyfactorRequestedWith).MetadataUpdate(metadataUpdate).CollectionId(collectionId).XKeyfactorApiVersion(xKeyfactorApiVersion).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `CertificateApi.CertificateUpdateAllMetadata``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
}

Path Parameters

Other Parameters

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

Name Type Description Notes
xKeyfactorRequestedWith string Type of the request [XMLHttpRequest, APIClient] [default to "APIClient"]
metadataUpdate ModelsMetadataAllUpdateRequest Contains the Keyfactor certificate identifier and the metadata to be updated
collectionId int32 Optional certificate collection identifier used to ensure user access to the certificate
xKeyfactorApiVersion string Desired version of the api, if not provided defaults to v1 [default to "1"]

Return type

(empty response body)

Authorization

basicAuth

HTTP request headers

  • Content-Type: application/json, text/json, application/xml, text/xml, application/x-www-form-urlencoded
  • Accept: Not defined

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

CertificateUpdateMetadata

CertificateUpdateMetadata(ctx).XKeyfactorRequestedWith(xKeyfactorRequestedWith).MetadataUpdate(metadataUpdate).CollectionId(collectionId).XKeyfactorApiVersion(xKeyfactorApiVersion).Execute()

Updates the metadata for the certificate associated with the identifier provided

Example

package main

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

func main() {
    xKeyfactorRequestedWith := "xKeyfactorRequestedWith_example" // string | Type of the request [XMLHttpRequest, APIClient] (default to "APIClient")
    metadataUpdate := *openapiclient.NewModelsMetadataUpdateRequest(map[string]string{"key": "Inner_example"}) // ModelsMetadataUpdateRequest | Contains the Keyfactor certificate identifier and the metadata to be updated
    collectionId := int32(56) // int32 | Optional certificate collection identifier used to ensure user access to the certificate (optional)
    xKeyfactorApiVersion := "xKeyfactorApiVersion_example" // string | Desired version of the api, if not provided defaults to v1 (optional) (default to "1")

    configuration := openapiclient.NewConfiguration(make(map[string]string))
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.CertificateApi.CertificateUpdateMetadata(context.Background()).XKeyfactorRequestedWith(xKeyfactorRequestedWith).MetadataUpdate(metadataUpdate).CollectionId(collectionId).XKeyfactorApiVersion(xKeyfactorApiVersion).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `CertificateApi.CertificateUpdateMetadata``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
}

Path Parameters

Other Parameters

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

Name Type Description Notes
xKeyfactorRequestedWith string Type of the request [XMLHttpRequest, APIClient] [default to "APIClient"]
metadataUpdate ModelsMetadataUpdateRequest Contains the Keyfactor certificate identifier and the metadata to be updated
collectionId int32 Optional certificate collection identifier used to ensure user access to the certificate
xKeyfactorApiVersion string Desired version of the api, if not provided defaults to v1 [default to "1"]

Return type

(empty response body)

Authorization

basicAuth

HTTP request headers

  • Content-Type: application/json, text/json, application/xml, text/xml, application/x-www-form-urlencoded
  • Accept: Not defined

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

CertificateValidateCertificate

ModelsCertificateValidationResponse CertificateValidateCertificate(ctx, id).XKeyfactorRequestedWith(xKeyfactorRequestedWith).CollectionId(collectionId).XKeyfactorApiVersion(xKeyfactorApiVersion).Execute()

Validates the certificate chain can be built.

Example

package main

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

func main() {
    id := int32(56) // int32 | The Id of the certificate being checked
    xKeyfactorRequestedWith := "xKeyfactorRequestedWith_example" // string | Type of the request [XMLHttpRequest, APIClient] (default to "APIClient")
    collectionId := int32(56) // int32 | An optional parameter for the collectin Id the certificate is in.  Defaults to no collection (optional)
    xKeyfactorApiVersion := "xKeyfactorApiVersion_example" // string | Desired version of the api, if not provided defaults to v1 (optional) (default to "1")

    configuration := openapiclient.NewConfiguration(make(map[string]string))
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.CertificateApi.CertificateValidateCertificate(context.Background(), id).XKeyfactorRequestedWith(xKeyfactorRequestedWith).CollectionId(collectionId).XKeyfactorApiVersion(xKeyfactorApiVersion).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `CertificateApi.CertificateValidateCertificate``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `CertificateValidateCertificate`: ModelsCertificateValidationResponse
    fmt.Fprintf(os.Stdout, "Response from `CertificateApi.CertificateValidateCertificate`: %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 certificate being checked

Other Parameters

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

Name Type Description Notes

xKeyfactorRequestedWith | string | Type of the request [XMLHttpRequest, APIClient] | [default to "APIClient"] collectionId | int32 | An optional parameter for the collectin Id the certificate is in. Defaults to no collection | xKeyfactorApiVersion | string | Desired version of the api, if not provided defaults to v1 | [default to "1"]

Return type

ModelsCertificateValidationResponse

Authorization

basicAuth

HTTP request headers

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

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