POST Workflow Definitions

The POST /WorkflowClosed A workflow is a series of steps necessary to complete a process. In the context of Keyfactor Command, it refers to the workflow builder, which allows you automate event-driven tasks when a certificate is requested or revoked./Definitions method is used to create a new workflow definition without any steps. To add steps to the workflow, use the PUT /Workflow/Definitions/{definitionId}/Steps method (see PUT Workflow Definitions Definition ID Steps). This method returns HTTP 200 OK on a success with details about the workflow definition.

Tip:  The following permissions (see Security Overview) are required to use this feature:

WorkflowDefinitions: Modify

Tip:  A given workflow can only apply to one key. If you need to run the same workflow steps for more than one key (e.g. the same enrollmentClosed Certificate enrollment refers to the process by which a user requests a digital certificate. The user must submit the request to a certificate authority (CA). steps for more than one templateClosed A certificate template defines the policies and rules that a CA uses when a request for a certificate is received.), you can either add these steps to the global workflow or, if you want to run the steps for more than one type of enrollment, for example, but not all, you can configure one custom workflow and then export and re-import that workflow to duplicate it (see POST Workflow Definitions) and edit the copy to change the key.

Table 645: POST Workflow Definitions Input Parameters

Name

In

Description
DisplayName Body Required. A string indicating the display name defined for the workflow definition.
Description Body A string indicating the description for the workflow definition.
Key Body

Required. A string indicating the reference key for the workflow definition. The type of information contained in this field will vary depending on the WorkflowType. If the WorkflowType is Enrollment or Revocation, this field will contain the Keyfactor Command reference ID for the certificate template. If the WorkflowType is CertificateLeftCollection or CertificateEnteredCollection, this field will contain the Keyfactor Command reference ID for the certificate collection.

Use the GET /Templates method (see GET Templates) to retrieve a list or your certificate templates to determine the template ID.

Use the GET /CertificateCollections method (see GET Certificate Collections) to retrieve a list or your certificate collections to determine the collection ID.

This field cannot be modified on an edit.

KeyDisplayName Body A string indicating the friendly name defined in Keyfactor Command for the certificate template or display name for the certificate collection.
WorkflowType Body

Required. A string indicating the type of workflow definition. The currently supported types are:

  • CertificateEnteredCollection

    The workflow is initiated by an automated task that runs periodically to identify certificates that now meet the query criteria of the specified certificate collection. For example, when a certificate discovered on an SSL scan becomes part of the Weak Keys collection, an email message can be generated notifying the PKI administrators that a new certificate with a weak key has been discovered.

  • CertificateLeftCollection

    The workflow is initiated by an automated task that runs periodically to identify certificates that no longer meet the query criteria of the specified certificate collection. For example, when a certificate in the Web Server Certificates collection disappears, a REST request can be made to open a support ticket request to investigate the removal of a web server certificate.

  • Enrollment (Including Renewals)

    The workflow is initiated by enrollment for a new or renewed certificate. Steps during the workflow can be used to do things such as require manager approval for the enrollment or manipulate the subject and/or SANs for the certificate request.

  • Revocation

    The workflow is initiated by revoking a certificate. Steps during the workflow can be configured to do things such as modify the revocation comment entered when the certificate is revoked, append an additional comment, and store the resulting extended comment in a metadata field.

This field cannot be modified on an edit.

Table 646: POST Workflow Definitions Response Body

Name Description
Id A string indicating the Keyfactor Command reference GUID of the workflow definition.
DisplayName A string indicating the display name defined for the workflow definition.
Description A string indicating the description for the workflow definition.
Key

A string indicating the reference key for the workflow definition. The type of information contained in this field will vary depending on the WorkflowType. If the WorkflowType is Enrollment or Revocation, this field will contain the Keyfactor Command reference ID for the certificate template. If the WorkflowType is CertificateLeftCollection or CertificateEnteredCollection, this field will contain the Keyfactor Command reference ID for the certificate collection.

KeyDisplayName A string indicating the friendly name defined in Keyfactor Command for the certificate template or display name for the certificate collection.
IsPublished A Boolean indicating whether the workflow definition has been published (true) or not (false). A workflow definition must be published to activate it. For a newly created workflow, this will be false.
WorkflowType

A string indicating the type of workflow definition. The currently supported types are:

  • CertificateEnteredCollection

    The workflow is initiated by an automated task that runs periodically to identify certificates that now meet the query criteria of the specified certificate collection. For example, when a certificate discovered on an SSL scan becomes part of the Weak Keys collection, an email message can be generated notifying the PKI administrators that a new certificate with a weak key has been discovered.

  • CertificateLeftCollection

    The workflow is initiated by an automated task that runs periodically to identify certificates that no longer meet the query criteria of the specified certificate collection. For example, when a certificate in the Web Server Certificates collection disappears, a REST request can be made to open a support ticket request to investigate the removal of a web server certificate.

  • Enrollment (Including Renewals)

    The workflow is initiated by enrollment for a new or renewed certificate. Steps during the workflow can be used to do things such as require manager approval for the enrollment or manipulate the subject and/or SANs for the certificate request.

  • Revocation

    The workflow is initiated by revoking a certificate. Steps during the workflow can be configured to do things such as modify the revocation comment entered when the certificate is revoked, append an additional comment, and store the resulting extended comment in a metadata field.

Steps

An array of objects indicating the steps in the workflow definition. The contents of each step will vary depending on the type of workflow and the type of step. For a newly created workflow, there will be no data in this value. ClosedShow step details.

DraftVersion An integer indicating the version number of the workflow definition. If this version number does not match the PublishedVersion, changes have been made to the workflow definition that have not yet been published.
PublishedVersion An integer indicating the currently published version number of the workflow definition. For a newly created workflow, this value will be null.
Tip:  For code examples, see the Keyfactor API Endpoint Utility. To find the embedded web copy of this utility, click the help icon () at the top of the Keyfactor Command Management Portal page next to the Log Out button.