Back to index
Summary
Retrieve all releases.
You must specify the projectName argument for backward compatibility with CloudBees CD/RO 6.2 and earlier.
|
projectNameStringrequiredName for the project; must be unique among all projects. caseSensitiveSearchBooleanoptionalApplicable only for case-sensitive databases. When set to True (default), searches are case-sensitive. When set to False , searches are case-insensitive.excludeRuntimeDetailsBooleanoptionaldeprecatedTrue to exclude runtime details for each release. filterArrayoptionalA list of zero or more filter criteria definitions used to define objects to find. firstResultIntegeroptionalResult pagination: the first row to return. includeRuntimeDetailsBooleanoptionalTrue to include detailed information about release last run or a run specified in releaseFlowRuntimeMapping with flowRuntimeId , available only when the response returns a maximum of 10 releases. Default value is false .includeRuntimesBooleanoptionalTrue to include release last run information in response. Default value is false .maxResultsIntegeroptionalResult pagination: the number of rows to return. releaseFlowRuntimeMappingArrayoptionalMap of releaseId and flowRuntimeId. sortKeyStringoptionalHow to sort the results. sortOrderStringoptionalSpecifies the order to sort the results. Possible values: "ascending" , "descending" viewNameStringoptionaldeprecatedThe name of the view. |
Usage
Perl
$cmdr->getReleases( "test-projectName" # projectName # optionals );
ectool
ectool getReleases \ "test-projectName" `# projectName` \ # optionals
Examples
Retrieve a max number of releases from a project
This example retrieves releases from the project named Default
, starting from the second row of results, with a maximum of 200
rows fetched.
Retrieve releases based on project and status
This example retrieves releases from the project named Default
with a release status of either PLANNING
or COMPLETED
.
In the example below, the filter option uses a nested structure with the or operator to combine the releaseStatus criteria (PLANNING or COMPLETED). If the or operator is removed, and each releaseStatus condition is moved directly into the filter list, the top-level operator and applies by default.
|
Perl
$cmdr->getReleases({ filter => [ { propertyName => 'projectName', operator => 'equals', operand1 => 'Default' }, { operator => 'or', filter => [ { propertyName => 'releaseStatus', operator => 'equals', operand1 => 'PLANNING' }, { propertyName => 'releaseStatus', operator => 'equals', operand1 => 'COMPLETED' } ] } ] });
ectool
ectool getReleases --filter "[{propertyName => 'projectName', operator => 'equals', operand1 => 'Default'}, {operator => 'or', filter => [{propertyName => 'releaseStatus', operator => 'equals', operand1 => 'PLANNING'}, {propertyName => 'releaseStatus', operator => 'equals', operand1 => 'COMPLETED'}]}]"
Retrieve releases based on the status of last run
This example retrieves releases whose last run status is failed
and sorts them by releaseName
ascending.
Perl
$cmdr->getReleases({ filter => [ { propertyName => 'lastRunOutcome', operator => 'equals', operand1 => 'error' } ], sortKey => "releaseName", sortOrder => "ascending" });
ectool
ectool getReleases --filters "{ propertyName=>'lastRunOutcome', operator=>'equals', operand1=>'error'}" --sortKey "releaseName" --sortOrder "ascending"
You can find the property names, and their associated datatypes for any entity, using describeObject API. |