Application

3 minute readReference

countApplicationEnvironmentInventoryObjects

Retrieves count of inventory items by application.

Arguments

Argument Name Type Description

filters

Filter array

A list of zero or more filter criteria definitions used to define objects to find.

Usage

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

createApplication

Creates a new application for a project.

Arguments

Argument Name Type Description

projectName

String

The name for the project that must be unique among all projects. (Required)

applicationName

String

The name of the application. (Required)

applicationType

String

The type of the application.

description

String

Comment text describing this object that is not interpreted at all by CloudBees CD/RO.

Usage

import com.electriccloud.client.groovy.ElectricFlow import com.electriccloud.client.groovy.models.* ElectricFlow ef = new ElectricFlow() def result = ef.createApplication( projectName: 'test-projectName', applicationName: 'test-applicationName' /* optional arguments */)

deleteApplication

Deletes an application.

Arguments

Argument Name Type Description

projectName

String

The name for the project that must be unique among all projects. (Required)

applicationName

String

The name of the application. (Required)

foreground

Boolean

True to delete the object in the foreground. The default is to delete the object in the background.

retainInventory

Boolean

True if you wish to retain inventory after deleting the application.

Usage

import com.electriccloud.client.groovy.ElectricFlow import com.electriccloud.client.groovy.models.* ElectricFlow ef = new ElectricFlow() def result = ef.deleteApplication( projectName: 'test-projectName', applicationName: 'test-applicationName' /* optional arguments */)

getApplication

Retrieves an application by name.

Arguments

Argument Name Type Description

projectName

String

The name for the project that must be unique among all projects. (Required)

applicationName

String

The name of the application. (Required)

applicationEntityRevisionId

String

The revision ID of the versioned object.

validate

Boolean

If passed 1, then all validations check if the definition is complete and valid.

Usage

import com.electriccloud.client.groovy.ElectricFlow import com.electriccloud.client.groovy.models.* ElectricFlow ef = new ElectricFlow() def result = ef.getApplication( projectName: 'test-projectName', applicationName: 'test-applicationName' /* optional arguments */)

getApplicationDependencies

Retrieves a list of dependencies of an application based on the specified filters in its arguments. For instance, if you use the dependentApplicationName argument, it returns all dependencies between the two applications regardless of their snapshot names.

Arguments

Argument Name Type Description

projectName

String

The name for the project that must be unique among all projects. (Required)

applicationName

String

The name of the application. (Required)

dependentApplicationName

String

The name of application which this application depends on.

dependentProjectName

String

The name the project containing the dependent application.

dependentSnapshotName

String

The name of snapshot of the dependent application.

snapshotName

String

Name of the snapshot; must be unique within the application.

Usage

import com.electriccloud.client.groovy.ElectricFlow import com.electriccloud.client.groovy.models.* ElectricFlow ef = new ElectricFlow() def result = ef.getApplicationDependencies( projectName: 'test-projectName', applicationName: 'test-applicationName' /* optional arguments */)

getApplicationEnvironmentInventory

Retrieves inventory items by application.

Arguments

Argument Name Type Description

filters

Filter array

A list of zero or more filter criteria definitions used to define objects to find.

firstResult

Integer

Result pagination: the first row to return.

numObjects

Integer

The number of objects to return as the first page of results.

Usage

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

getApplications

Retrieves the specified applications in a project.

Arguments

Argument Name Type Description

projectName

String

The name for the project that must be unique among all projects. (Required)

applicationType

String

The type of the application.

includeEntityRevisions

Boolean

Include the revisions of application the search results.

referenceComponentName

String

Name of the master component.

referenceComponentProject

String

Project name of the master component.

Usage

import com.electriccloud.client.groovy.ElectricFlow import com.electriccloud.client.groovy.models.* ElectricFlow ef = new ElectricFlow() def result = ef.getApplications( projectName: 'test-projectName' /* optional arguments */)

getEnvironmentApplications

Retrieves a list of applications installed on the given environment.

Arguments

Argument Name Type Description

projectName

String

The name for the project that must be unique among all projects. (Required)

environmentName

String

The name of the environment. (Required)

Usage

import com.electriccloud.client.groovy.ElectricFlow import com.electriccloud.client.groovy.models.* ElectricFlow ef = new ElectricFlow() def result = ef.getEnvironmentApplications( projectName: 'test-projectName', environmentName: 'test-environmentName')

getPartialApplicationRevision

Retrieves a partial application when a snapshot is created.

Arguments

Argument Name Type Description

projectName

String

The name for the project that must be unique among all projects. (Required)

applicationName

String

The name of the application. (Required)

revisionNumber

Integer

Revision number. (Required)

Usage

import com.electriccloud.client.groovy.ElectricFlow import com.electriccloud.client.groovy.models.* ElectricFlow ef = new ElectricFlow() def result = ef.getPartialApplicationRevision( projectName: 'test-projectName', applicationName: 'test-applicationName', revisionNumber: 'test-revisionNumber')

modifyApplication

Modifies an existing application.

Arguments

Argument Name Type Description

projectName

String

The name for the project that must be unique among all projects. (Required)

applicationName

String

The name of the application. (Required)

applicationType

String

The type of the application.

description

String

Comment text describing this object that is not interpreted at all by CloudBees CD/RO.

newName

String

The new name for an existing object that is being renamed.

Usage

import com.electriccloud.client.groovy.ElectricFlow import com.electriccloud.client.groovy.models.* ElectricFlow ef = new ElectricFlow() def result = ef.modifyApplication( projectName: 'test-projectName', applicationName: 'test-applicationName' /* optional arguments */)