Back to index
Summary
Deletes objects specified by the provided filters.
|
objectTypeStringrequiredThe type of object to delete. filterArrayoptionalA list of zero or more filter criteria definitions used to define objects to find. maxIdsIntegeroptionalThe maximum number of object IDs to return. sortArrayoptionalSort specifications. |
Usage
Perl
$cmdr->deleteObjects( "test-objectType" # objectType # optionals );
ectool
ectool deleteObjects \ "test-objectType" `# objectType` \ # optionals
Examples
Perl
This code example illustrates using a Boolean filter for the deleteObjects
command to find jobs matching either of two patterns for the job name.
my @filterList; push (@filterList, {"propertyName" => "jobName", "operator" => "like", "operand1" => "%-branch-%"}); push (@filterList, {"propertyName" => "jobName", "operator" => "like", "operand1" => "branch-%"}); my $result = $cmdr->deleteObjects('job', {filter => [ { operator => 'or', filter => \@filterList, } ]} ); print "result = " . $result-> findnodes_as_string("n"). "\n";