GET Agents

The GET /Agents operation retrieves a list of orchestrators and agents registered in Keyfactor Command. Query parameters support filtering using defined criteria, control over pagination by specifying the page number and return limit, and customization of sorting based on specified fields and order. On success, the operation returns HTTP 200 OK with  a list of all orchestratorClosed Keyfactor orchestrators perform a variety of functions, including managing certificate stores and SSH key stores. details.

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

/agents/management/read/

Table 113: GET Agents Input Parameters

Name In Description
QueryString Query

A string containing a query to limit the results (for example, field1 -eq value1 AND field2 -gt value2). The default is to return all records. Fields available for querying through the API for the most part match those that appear in the Keyfactor Command Management Portal search dropdowns for the same feature. For querying guidelines, refer to: Searching Orchestrator Management. The query fields supported for this operation are:

  • AgentId

    Orchestrator ID matches or doesn’t match the entered GUID. This is primarily used for internally generated searches when the user is redirected here from another page. To retrieve agent IDs, run GET Agents.

  • Platform

    Orchestrator Platform matches or doesn’t match the referenced platform. Supported platforms are:

    • 2: Java (Legacy JKS and PEM)

    • 1: .NET (All Universal Orchestrator extensions)

    • 4: Android (Custom development)

    • 5: Native (Custom development)

    • 6: Bash (SSH)

    • 0: Unknown

  • Blueprint

    Complete or partial matches with the specified blueprint name.

  • Capabilities

    Capability matches the specified value and comparison. Supported capabilities include any legacy types still in use in your environment and any custom types you may have created. For example:

    • AWS (built-in, deprecated Amazon Web Services)
    • AWS-ACM-v3 (extension, Amazon Web Services)
    • CitrixAdc (extension, Citrix Netscaler)
    • F5 (built-in, deprecated F5)
    • F5-WS-REST (extension, F5)
    • F5-SL-REST (extension, F5)
    • F5-CA-REST (extension, F5)
    • FTP (built-in, deprecated FTP)
    • IIS (built-in, deprecated IIS roots/personal/revoked)
    • IISU (extension, Windows Certificate Store)
    • JKS (built-in, deprecated Java KeyStore)
    • LOGS (built-in, log retrieval)
    • PEM (built-in, deprecated PEM file)
    • RFDER (extension, Remote File)
    • RFJKS (extension, Remote File)
    • RFKDB (extension, Remote File)
    • RFORA (extension, Remote File)
    • RFPEM (extension, Remote File)
    • RFPkcs12 (extension, Remote File)
    • WinCert (extension, Windows Certificate Store)
    • WinSQL (extension, Windows Certificate Store)
  • ClientMachine

    Complete or partial matches with the orchestrator name as listed in the Client Machine field.

  • ErrorCode

    Complete or partial matches with the last heartbeat or session registration error code.

    Note:  Heartbeat is used by older orchestrators to maintain connectivity with Keyfactor Command. Newer Universal Orchestrator versions instead re-register at regular intervals.
  • ErrorMessage

    Partial matches with the last heartbeat or session registration error message.

    Note:  Heartbeat is used by older orchestrators to maintain connectivity with Keyfactor Command. Newer Universal Orchestrator versions instead re-register at regular intervals.
  • HighAvailability

    Whether the orchestrator supports high availability (True or False).

    Orchestrators that support high availability can be added to user-managed pools with multiple orchestrators. Orchestrators that do not support high availability are assigned to auto-generated, one-to-one pools.

  • LastSeen

    The date and time when the orchestrator last contacted the Keyfactor Command server. For highly available orchestrators, this value is used with the orchestrator pool’s Remove Transient Orchestrators and Last Seen Threshold (minutes) settings. If removal of transient orchestrators is turned on and the orchestrator has not contacted Keyfactor Command within the configured threshold, the orchestrator is removed from the pool. The default threshold is 30 minutes.

  • OrchestratorPoolName

    Complete or partial matches with the orchestrator pool name.

  • Status

    Status matches the selected category:

    • 1: New
    • 2: Approved
    • 3: Disapproved
  • Username

    Complete or partial matches with the user identity with which the orchestrator is connecting to Keyfactor Command.

  • Version

    Orchestrator version matches the specified comparison and value.

Tip:  Use the following query to return only approved orchestrators:
Status -eq "2"

A value of 1 will return orchestrators with a status of New and a value of 3 will return orchestrators with a status of Disapproved.

PageReturned Query An integer that specifies how many multiples of the returnLimit to skip and offset by before returning results, to enable paging. The default is 1.
ReturnLimit Query An integer that specifies how many results to return per page. The default is 50. Very large values can result in long processing time.
SortField Query

A string containing the property by which the results should be sorted. Fields available for sorting through the API include:

  • AgentId

  • AgentPlatform

  • Blueprint

  • ClientMachine

  • LastSeen

  • OrchestratorPoolName

  • Status

  • Username

  • Version

Available sort fields are affected by the query provided in QueryString. The default sort field is AgentId.

SortAscending Query An integer that sets the sort order on the returned results. A value of 0 sorts results in ascending order while a value of 1 sorts results in descending order. The default is ascending.

Table 114: GET Agent Response Data

Name

Description

AgentId A string indicating the GUID of the orchestrator.
AgentPlatform

An integer indicating the platform for the orchestrator. ClosedShow agent platform values.

AuthCertificateReenrollment

An integer indicating the value of the orchestrator certificate re-enrollment request or require status. ClosedShow values.

Blueprint

A string indicating the name of the blueprint associated with the orchestrator.

Capabilities

An array of strings indicating the capabilities reported by the orchestrator. These may be built-in or custom capabilities. ClosedShow built-in capability values for common orchestrators.

ClientMachine A string indicating the client machine on which the orchestrator is installed.
JobTypes

An array of objects indicating the job types correlated with the orchestrator. ClosedShow job type values.

LastErrorCode An integer indicating the last error code, if any, reported from the orchestrator when trying to register a session. This code is cleared on successful session registration.
LastErrorMessage A string indicating the last error message, if any, reported from the orchestrator when trying to register a session. This message is cleared on successful session registration.
LastSeen The time, in UTC, at which the orchestrator last contacted Keyfactor Command.
LastThumbprintUsed A string indicating the thumbprint of the certificate that the orchestrator most recently used for client certificate authentication. This will usually match the Thumbprint.
LegacyThumbprint A string indicating the thumbprint of the certificate previously used by the orchestrator for client certificate authentication before a certificate renewal operation took place (rotating the current thumbprint into the legacy thumbprint). The legacy thumbprint is cleared once the orchestrator successfully registers with the new thumbprint.
OrchestratorPool

An object containing information about the orchestrator pool that the orchestrator is associated with. ClosedShow orchestrator pool values.

Status

An integer indicating the orchestrator status. ClosedShow status values.

Thumbprint A string indicating the thumbprint of the certificate that Keyfactor Command is expecting the orchestrator to use for client certificate authentication.
Username A string indicating the Active Directory user or service account the orchestrator is using to connect to Keyfactor Command.
Version A string indicating the version of the orchestrator.