getReleases

Back to index

Summary

Retrieve all releases.
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.
filters
Array<Filter>optional
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.
projectName
Stringoptional
Name for the project; must be unique among all projects.
releaseFlowRuntimeMappings
Array<ReleaseFlowRuntimeMapping>optional
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

Groovy

import com.electriccloud.client.groovy.ElectricFlow import com.electriccloud.client.groovy.models.* ElectricFlow ef = new ElectricFlow() def result = ef.getReleases( /* optional arguments */ )

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.

import com.electriccloud.client.groovy.ElectricFlow import com.electriccloud.client.groovy.models.* ElectricFlow ef = new ElectricFlow() def result = ef.getReleases(projectName: "Default", firstResult: 2, maxResults: 200)

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.

import com.electriccloud.client.groovy.ElectricFlow import com.electriccloud.client.groovy.models.Filter ElectricFlow ef = new ElectricFlow() // Define filters for the query Filter releaseLastRunFilter = new Filter('lastRunOutcome', 'equals', 'error') // Execute the query with filters def result = ef.getReleases(filters: [releaseLastRunFilter], sortKey: 'releaseName', sortOrder: 'ascending')

Retrieve releases based on project and status

This example uses filters to retrieve releases from the project named Default that have a release status of either PLANNING or COMPLETED.

import com.electriccloud.client.groovy.ElectricFlow import com.electriccloud.client.groovy.models.Filter ElectricFlow ef = new ElectricFlow() def filters = [] // Define filter for the project name Filter projectNameFilter = new Filter( propertyName: 'projectName', operator: 'equals', operand1: 'Default' ) filters.add(projectNameFilter) // Define filters for release status Filter completedStatusFilter = new Filter( propertyName: 'releaseStatus', operator: 'equals', operand1: 'COMPLETED' ) Filter planningStatusFilter = new Filter( propertyName: 'releaseStatus', operator: 'equals', operand1: 'PLANNING' ) // Combine release status filters using 'or' operator Filter releaseStatusFilter = new Filter( operator: 'or', filter: [completedStatusFilter, planningStatusFilter] ) filters.add(releaseStatusFilter) // Execute the query with the filters def results = ef.getReleases(filters: filters)
You can find the property names, and their associated datatypes for any entity, using describeObject API.