countObjects

Back to index

Summary

Retrieves the count of objects specified by the provided filter.

You must specify the objectType.

This API is not supported by ectool.

objectType
Stringrequired
The type of object to query for.
filter
Arrayoptional
A list of zero or more filter criteria definitions used to define objects to find.
firstResult
Integeroptional
The first result to be retrieved, numbered from 0.
maxIds
Integeroptional
The maximum number of object IDs to return.
viewName
Stringoptional
The name of the view.

Usage

Perl

$cmdr->countObjects( "test-objectType" # objectType # optionals );

ectool

ectool countObjects \ "test-objectType" `# objectType` \ # optionals

Examples

Perl

use ElectricCommander(); my @artifactNameFilters; # Create the filter list for filtering on artifact name push (@artifactNameFilters, {"propertyName"=>"artifactName", "operator"=>"contains", "operand1"=>"groupId:installer-windows", ); my $cmdr = new ElectricCommander(); # Perform the countObjects query my $reference=$cmdr\->countObjects("artifactVersion", { filter=> {operator=>"and", filter=>[ { propertyName=>"modifyTime" , operator=>"greaterOrEqual",# Give me all dates after or equal arbinary date "operand1"=>"2014-03-25T14:48:55.286Z", } , { operator => 'or', # apply 'or' for the filters in the list filter => \@artifactNameFilter } ] } }); my $jobs=$reference->find('\/response\/count'); print $jobs;

ectool

This API is not supported by ectool.