deleteObjects

Back to index

Summary

Deletes objects specified by the provided filters.
  • Due to the complexity of specifying filter criteria, this API is not supported by ectool. However, all of its capabilities are supported through the Perl API.

  • You must specify an objectType and at least one filter.

  • This API supports deleting artifact, artifactVersion, job, logEntry, project, repository, and workflow.

objectType
Stringrequired
The type of object to delete.
filter
Arrayoptional
A list of zero or more filter criteria definitions used to define objects to find.
maxIds
Integeroptional
The maximum number of object IDs to return.
sort
Arrayoptional
Sort 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";

ectool

This API is not supported by ectool.