The application environment inventory fetches details for all applications and their inventory across all mapped environments.
It returns a list of environment details based on the application. It starts with the data from the environment inventory items, and then based on the application and artifact information, combines all the environment details for the application. Filtering may be by applicationName
, applicationProjectName
, applicationType
, environmentName
, projectName
from the environment, microserviceName
, and componentName
.
getApplicationEnvironmentInventory
Arguments | Descriptions |
---|---|
filters |
(Optional) A list of zero or more filter criteria definitions used to define objects to find. Each element of the filter list is a hash reference containing one filter criterion. You can specify several filter criteria, in which case an object must meet all filter criteria to be included in the result. Refer to the code example below for instructions on forming the list and passing it to the CloudBees CD/RO Perl API. The two types of filters are:
Each Property filter operators are: between (2 operands) contains (1)equals (1)greaterOrEqual (1)greaterThan (1)in (1)lessOrEqual (1)lessThan (1)like (1)notEqual (1)notLike (1)isNotNull (0)isNull (0) A Boolean filter is a Boolean operator and an array of one or more filters that are operands. Each operand can be either a property filter or a Boolean filter. Boolean operators are: not (1 operand) and (2 or more operands) or (2 or more operands) Argument type: Collection |
firstResult |
(Optional) The first result to be retrieved, starting from 0 (zero). Argument type: Integer |
numObjects |
(Optional) <full object count> Specifies the number of full objects, and not only the IDs, returned from the Argument type: Integer |
Response
Returns a list of applications, its artifacts, and the environments where they are installed.
ec-perl
syntax: $cmdr→getApplicationEnvironmentInventory ({<optionals>});
Example
my @filterList; push (@filterList, {"propertyName" => "applicationName", "operator" => "equals", "operand1" => "Demo Application"}); push (@filterList, {"propertyName" => "projectName", "operator" => "equals", "operand1" => "Default"}); my $result = $cmdr->getApplicationEnvironmentInventory ( {filter => [ { operator => 'and', filter => @filterList, } ]} ); print "result = " . $result->findnodes_as_string("/"). "\n";