Back to index
Summary
Retrieve all releases.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. filtersArray<Filter>optionalA 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. projectNameStringoptionalName for the project; must be unique among all projects. releaseFlowRuntimeMappingsArray<ReleaseFlowRuntimeMapping>optionalMap 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
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. |