Unsupported content


This version of the documentation is no longer supported. However, the documentation is available for your convenience. You will not be able to leave comments.

Job - getTargets

Job - getTargets

Description :

This command returns a list of target names (separated by commas) that are targets of a specific Job. blcli Job getTargets $JOB_KEY targetTypes

The argument targetTypes can be one of the following. Separate multiple types by commas:

  • Servers
  • Components

The argument JOB_KEY is a handle to the job being queried. To find the jobKey for a specific job type, use the getDBKeyByGroupAndName for that particular job type. Below example is for AuditJob. AuditJob getDBKeyByGroupAndName command. A list of target names separated by commas.

Return type : java.util.List

Command Input :

Variable Name

Variable Type




Handle to the job.



The desired target type(s).


The following example shows how to use this blcli to get the targets of a job.

Note: This blcli does not distinguish between Enrolled, Non-Enrolled, decomissioned servers when you query by using option "Servers". Use getTargetServers blcli for the same.


JOB_KEY=`blcli AuditJob getDBKeyByGroupAndName /group1 auditJob1` 

blcli Job getTargets $JOB_KEY Components 

blcli Job getTargets $JOB_KEY Servers,Components 

Was this page helpful? Yes No Submitting... Thank you