POST Orchestrator Jobs Custom

The POST /OrchestratorJobs/Custom method is used to schedule a job with a custom job type on an orchestratorClosed Keyfactor orchestrators perform a variety of functions, including managing certificate stores and SSH key stores.. This method returns HTTP 200 OK on a success with the GUID for the scheduled job.

Tip:  The following permissions (see Security Roles and Claims) are required to use this feature:

/agents/management/modify/

Tip:  Data returned from a custom job once the job completes (e.g. a FetchLogs job) is stored in the Keyfactor Command database. To retrieve the data, use the GET /OrchestratorJobs/JobHistory method (see GET Orchestrator Jobs Job History) to determine the JobHistoryId of the completed job and then use the GET /OrchestratorJobs/JobStatus/Data method (see GET Orchestrator Jobs Job Status Data) to retrieve the data.

Table 574: POST Orchestrator Jobs Custom Input Parameters

Name In Description
AgentId Body

Required. A string indicating the Keyfactor Command reference GUID of the orchestrator that will execute this job.

To schedule a Fetch Logs job, use the GET /Agents method (see GET Agents) with a query of Status -eq 2 and Capabilities -contains “LOGS” to retrieve a list of your approved orchestrators with the LOGS capability to determine the ID of the orchestrator for which you want to retrieve logs.

To schedule a job using your custom job type, use the GET /Agents method (see GET Agents) with a query of Status -eq 2 to retrieve a list of your approved orchestrators to determine the ID of the orchestrator for which you want to schedule a custom job with your custom job type.

JobTypeName Body

Required. A string indicating the reference name for the custom job type for the job.

Use the GET /JobTypes/Custom method (see GET Custom Job Types) to retrieve a list of your defined custom job types to determine the job type name to use.

Schedule Body

An object containing the schedule for the custom job. ClosedShow schedule details.

The default is Immediate.

JobFields Body

An object that set the values for any optional job fields configured for the custom job type. The key is the field name and the value is the value for the field.

For example:

Copy
"JobFields": {
   "Favorite Type of Pet": "Rat",
   "Mother's Birthday": "1952-05-21"
}
Note:  If a job field has been configured with a default value and you wish to accept the default value, the field does not need to be submitted along with the POST /OrchestratorJobs/Custom request. The default value will be set automatically by Keyfactor Command. Submitting a value overrides the default value.

Use the GET /JobTypes/Custom method (see GET Custom Job Types) to retrieve a list of your defined custom job types to determine the job fields defined for the job type.

Tip:  The built-in Fetch Logs job does not have any optional job fields.

Table 575: POST Orchestrator Jobs Custom Response Data

Name Description
JobId A string indicating the Keyfactor Command reference GUID for the job.
OrchestratorId

A string indicating the Keyfactor Command reference GUID of the orchestrator that will execute this job.

JobTypeName

A string indicating the reference name for the custom job type for the job.

Schedule

An object containing the schedule for the custom job.

JobFields

An array of objects that set the values for any optional job fields configured for the custom job type.

RequestTimestmap A string containing the date, in UTC, when the custom job was submitted.
Tip:  See the Keyfactor API Reference and Utility which provides a utility through which the Keyfactor APIClosed An API is a set of functions to allow creation of applications. Keyfactor offers the Keyfactor API, which allows third-party software to integrate with the advanced certificate enrollment and management features of Keyfactor Command. endpoints can be called and results returned. It is intended to be used primarily for validation, testing and workflowClosed A workflow is a series of steps necessary to complete a process. In Keyfactor Command, it refers to the workflow builder, which allows you to automate event-driven tasks such as when a certificate is requested, revoked or found in a certificate store. development. It also serves secondarily as documentation for the API. The link to the Keyfactor API Reference and Utility is in the dropdown from the help icon () at the top of the Management Portal page next to the Log Out button.