getReleases

Back to index

Summary

Retrieve all releases.
You must specify the projectName argument for backward compatibility with CloudBees CD/RO 6.2 and earlier.
projectName
Stringrequired
Name for the project; must be unique among all projects.
caseSensitiveSearch
Booleanoptional
Applicable only for case-sensitive databases. When set to True (default), searches are case-sensitive. When set to False, searches are case-insensitive.
excludeRuntimeDetails
Booleanoptionaldeprecated
True to exclude runtime details for each release.
filter
Arrayoptional
A list of zero or more filter criteria definitions used to define objects to find.
firstResult
Integeroptional
Result pagination: the first row to return.
includeRuntimeDetails
Booleanoptional
True 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.
includeRuntimes
Booleanoptional
True to include release last run information in response. Default value is false.
maxResults
Integeroptional
Result pagination: the number of rows to return.
releaseFlowRuntimeMapping
Arrayoptional
Map of releaseId and flowRuntimeId.
sortKey
Stringoptional
How to sort the results.
sortOrder
Stringoptional
Specifies the order to sort the results.
Possible values: "ascending", "descending"
viewName
Stringoptionaldeprecated
The 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.

Perl

$cmdr->getReleases("Default", {firstResult => 2, maxResults => 200});

ectool

ectool getReleases "Default" --firstResult 2 --maxResults 200

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.