Server

22 minute readReference

createApplicationFromDeploymentPackage

Runs a procedure that creates an application from a deployment package.

Arguments

Argument Name Type Description

artifactFileName

String

The artifact file name.(Required)

artifactGroup

String

The artifact group.(Required)

artifactKey

String

The artifact key.(Required)

artifactVersion

String

The artifact version.(Required)

dslString

String

The DSL to pass to invoking procedure.

retrieveToFolder

String

The folder where the artifact is retrieved. The default value is a dot (.).

Usage

import com.electriccloud.client.groovy.ElectricFlow
import com.electriccloud.client.groovy.models.*


ElectricFlow ef = new ElectricFlow()

def result = ef.createApplicationFromDeploymentPackage(
                artifactFileName: 'test-artifactFileName',
                artifactGroup: 'test-artifactGroup',
                artifactKey: 'test-artifactKey',
                artifactVersion: 'test-artifactVersion'
                /* optional arguments */)

evalDsl

Evaluates and runs a CloudBees CD/RO domain-specific language (DSL) script.

When invoked in the context of a job step, COMMANDER_JOBSTEPID will be automatically set as the jobStepId argument value unless jobStepId is already specified.

Arguments

Argument Name Type Description

dsl

String

The DSL text.(Required)

applicationName

String

The name of the application container of the property sheet that owns the property.

applicationTierName

String

The name of the application tier container of the property sheet that owns the property.

archiveConnectorName

String

The name of the archive connector of the property sheet that owns the property.

artifactName

String

The name of the artifact container of the property sheet that owns the property.

artifactVersionName

String

The name of the artifactVersion container of the property sheet that owns the property.

catalogItemRunId

String

The primary key of the CatalogItemRun container of the property sheet that owns the property.

catalogName

String

The name of the catalog of the property sheet that owns the property.

ciBuildDetailName

String

The name of the CI build detail of the property sheet that owns the property.

clusterName

String

The name of the cluster which owns property sheet.

componentName

String

The name of the component container of the property sheet that owns the property.

configName

String

The name of the emailConfig container that owns the property.

credentialName

String

The name of the credential container of the property sheet that owns the property.

dashboardName

String

The name of the dashboard of the property sheet that owns the property.

dataRetentionPolicyName

String

The name of the data retention policy of the property sheet that owns the property.

debug

Boolean

True to include debug output.

describe

Boolean

True to return help description for the DSL text.

environmentName

String

The name of the environment container of the property sheet that owns the property.

environmentTemplateName

String

The name of the environment template container of the property sheet that owns the property.

environmentTemplateTierName

String

The name of the environment template tier container of the property sheet that owns the property.

environmentTierName

String

The name of the environment tier container of the property sheet that owns the property.

flowName

String

The name of the flow container of the property sheet that owns the property.

flowRuntimeId

String

The primary key or name of the flowRuntime container of the property sheet that owns the property.

flowRuntimeName

String

The name of the flow runtime container of the property sheet that owns the property.

flowRuntimeStateId

String

The primary key or name of the flowRuntimeState container of the property sheet that owns the property.

flowRuntimeStateName

String

The name of the flow state container of the property sheet that owns the property.

flowStateName

String

The name of the flow state container of the property sheet that owns the property.

flowTransitionName

String

The name of the flow transition container of the property sheet that owns the property.

format

String

Format to use for the DSL. Defaults to groovy format.

gateType

String

The type of the gate which owns property sheet.

gatewayName

String

The name of the gateway container of the property sheet.

groupName

String

The name of the group container of the property sheet that owns the property.

helpFormat

String

Format to use for the DSL help content.

jobId

String

The primary key or name of the job container of the property sheet that owns the property.

jobStepId

String

The primary key of the job-step container of the property sheet that owns the property.

microserviceName

String

The name of the microservice container of the property sheet.

notifierName

String

The name of the notifier container of the property sheet that owns the property.

objectId

String

The object ID as returned by FindObjects.

overwrite

Boolean

True to use overwrite mode. If the object exists, all existing attributes of the object will be overwritten by the values in the DSL.

parameters

String

JSON text which is parsed and passed to the DSL as a map.

path

String

Property path string.

pipelineName

String

The name of the pipeline container of the property sheet that owns the property.

pluginConfigurationName

String

The name of the plugin configuration container of the property sheet that owns the property.

pluginName

String

The name of the plugin container of the property sheet that owns the property.

procedureName

String

The name of the procedure container of the property sheet that owns the property.

processName

String

The name of the process, if the container is a process or process step.

processStepName

String

The name of the process step, if the container is a process step.

projectName

String

The name of the project container of the property sheet that owns the property.

propertySheetId

String

The primary key of the property sheet that owns the property.

releaseName

String

The name of the release container of the property sheet that owns the property.

reportName

String

The name of the report of the property sheet that owns the property.

reportObjectTypeName

String

The name of the report object type of the property sheet that owns the property.

repositoryName

String

The name of the repository container of the property sheet that owns the property.

resourceName

String

The name of the resource container of the property sheet that owns the property.

resourcePoolName

String

The name of the resource pool container of the property sheet that owns the property.

resourceTemplateName

String

The name of the resource template container of the property sheet that owns the property.

scheduleName

String

The name of the schedule container of the property sheet.

scmSyncName

String

The name of the SCM Sync container of the property sheet that owns the property.

searchFilterName

String

The name of the search filter container of the property sheet.

serverLibraryPath

String

Path to the server directory that contains jar files and classes to be added to the classpath when evaluating the DSL text.

serviceAccountName

String

Retrieves the name of the service account container of the property sheet.

sessionPassword

String

Session user’s password. Used to re-verify identity before changing user passwords in the system.

snapshotName

String

The name of the snapshot container of the property sheet that owns the property.

stageName

String

The name of the stage container of the property sheet that owns the property.

stateDefinitionName

String

The name of the state definition container of the property sheet that owns the property.

stateName

String

The name of the state container of the property sheet that owns the property.

stepName

String

The name of the step container of the property sheet that owns the property.

systemObjectName

String

The system object.

taskName

String

The name of the task which owns property sheet.

timeout

Integer

Maximum duration of execution for the given DSL, in seconds. Defaults to maxDslDuration server setting.

transitionDefinitionName

String

The name of the transition definition container of the property sheet that owns the property.

transitionName

String

The name of the transition container of the property sheet that owns the property.

triggerName

String

The name of the trigger which owns property sheet.

userName

String

The name of the user container of the property sheet that owns the property.

widgetName

String

The name of the widget of the property sheet that owns the property.

workflowDefinitionName

String

The name of the workflow definition container of the property sheet that owns the property.

workflowName

String

The name of the workflow container of the property sheet that owns the property.

workspaceName

String

The name of the workspace container of the property sheet.

zoneName

String

The name of the zone container of the property sheet.

Usage

import com.electriccloud.client.groovy.ElectricFlow
import com.electriccloud.client.groovy.models.*


ElectricFlow ef = new ElectricFlow()

def result = ef.evalDsl(
                dsl: 'test-dsl'
                /* optional arguments */)

evalScript

Evaluates a script in the specified context. This API is similar to expandString except it evaluates the value argument as a Javascript block, without performing any property substitution on either the script or the result. The string value of the final expression in the script is returned as the value element of the response.

When invoked in the context of a job step, COMMANDER_JOBSTEPID will be automatically set as the jobStepId argument value unless jobStepId is already specified.

Arguments

Argument Name Type Description

value

String

The string to expand in the specified context.(Required)

applicationName

String

The name of the application container of the property sheet that owns the property.

applicationTierName

String

The name of the application tier container of the property sheet that owns the property.

archiveConnectorName

String

The name of the archive connector of the property sheet that owns the property.

artifactName

String

The name of the artifact container of the property sheet that owns the property.

artifactVersionName

String

The name of the artifactVersion container of the property sheet that owns the property.

catalogItemRunId

String

The primary key of the CatalogItemRun container of the property sheet that owns the property.

catalogName

String

The name of the catalog of the property sheet that owns the property.

ciBuildDetailName

String

The name of the CI build detail of the property sheet that owns the property.

clusterName

String

The name of the cluster which owns property sheet.

componentName

String

The name of the component container of the property sheet that owns the property.

configName

String

The name of the emailConfig container that owns the property.

credentialName

String

The name of the credential container of the property sheet that owns the property.

dashboardName

String

The name of the dashboard of the property sheet that owns the property.

dataRetentionPolicyName

String

The name of the data retention policy of the property sheet that owns the property.

environmentName

String

The name of the environment container of the property sheet that owns the property.

environmentTemplateName

String

The name of the environment template container of the property sheet that owns the property.

environmentTemplateTierName

String

The name of the environment template tier container of the property sheet that owns the property.

environmentTierName

String

The name of the environment tier container of the property sheet that owns the property.

flowName

String

The name of the flow container of the property sheet that owns the property.

flowRuntimeId

String

The primary key or name of the flowRuntime container of the property sheet that owns the property.

flowRuntimeName

String

The name of the flow runtime container of the property sheet that owns the property.

flowRuntimeStateId

String

The primary key or name of the flowRuntimeState container of the property sheet that owns the property.

flowRuntimeStateName

String

The name of the flow state container of the property sheet that owns the property.

flowStateName

String

The name of the flow state container of the property sheet that owns the property.

flowTransitionName

String

The name of the flow transition container of the property sheet that owns the property.

gateType

String

The type of the gate which owns property sheet.

gatewayName

String

The name of the gateway container of the property sheet.

groupName

String

The name of the group container of the property sheet that owns the property.

jobId

String

The primary key or name of the job container of the property sheet that owns the property.

jobStepId

String

The primary key of the job-step container of the property sheet that owns the property.

microserviceName

String

The name of the microservice container of the property sheet.

notifierName

String

The name of the notifier container of the property sheet that owns the property.

objectId

String

The object ID as returned by FindObjects.

path

String

Property path string.

pipelineName

String

The name of the pipeline container of the property sheet that owns the property.

pluginConfigurationName

String

The name of the plugin configuration container of the property sheet that owns the property.

pluginName

String

The name of the plugin container of the property sheet that owns the property.

procedureName

String

The name of the procedure container of the property sheet that owns the property.

processName

String

The name of the process, if the container is a process or process step.

processStepName

String

The name of the process step, if the container is a process step.

projectName

String

The name of the project container of the property sheet that owns the property.

propertySheetId

String

The primary key of the property sheet that owns the property.

releaseName

String

The name of the release container of the property sheet that owns the property.

reportName

String

The name of the report of the property sheet that owns the property.

reportObjectTypeName

String

The name of the report object type of the property sheet that owns the property.

repositoryName

String

The name of the repository container of the property sheet that owns the property.

resourceName

String

The name of the resource container of the property sheet that owns the property.

resourcePoolName

String

The name of the resource pool container of the property sheet that owns the property.

resourceTemplateName

String

The name of the resource template container of the property sheet that owns the property.

scheduleName

String

The name of the schedule container of the property sheet.

scmSyncName

String

The name of the SCM Sync container of the property sheet that owns the property.

searchFilterName

String

The name of the search filter container of the property sheet.

serviceAccountName

String

Retrieves the name of the service account container of the property sheet.

snapshotName

String

The name of the snapshot container of the property sheet that owns the property.

stageName

String

The name of the stage container of the property sheet that owns the property.

stateDefinitionName

String

The name of the state definition container of the property sheet that owns the property.

stateName

String

The name of the state container of the property sheet that owns the property.

stepName

String

The name of the step container of the property sheet that owns the property.

systemObjectName

String

The system object.

taskName

String

The name of the task which owns property sheet.

transitionDefinitionName

String

The name of the transition definition container of the property sheet that owns the property.

transitionName

String

The name of the transition container of the property sheet that owns the property.

triggerName

String

The name of the trigger which owns property sheet.

userName

String

The name of the user container of the property sheet that owns the property.

widgetName

String

The name of the widget of the property sheet that owns the property.

workflowDefinitionName

String

The name of the workflow definition container of the property sheet that owns the property.

workflowName

String

The name of the workflow container of the property sheet that owns the property.

workspaceName

String

The name of the workspace container of the property sheet.

zoneName

String

The name of the zone container of the property sheet.

Usage

import com.electriccloud.client.groovy.ElectricFlow
import com.electriccloud.client.groovy.models.*


ElectricFlow ef = new ElectricFlow()

def result = ef.evalScript(
                value: 'test-value'
                /* optional arguments */)

expandString

Expand property references in a string in the given context.

When invoked in the context of a job step, COMMANDER_JOBSTEPID will be automatically set as the jobStepId argument value unless jobStepId is already specified.

Arguments

Argument Name Type Description

value

String

The string to expand in the specified context.(Required)

applicationName

String

The name of the application container of the property sheet that owns the property.

applicationTierName

String

The name of the application tier container of the property sheet that owns the property.

archiveConnectorName

String

The name of the archive connector of the property sheet that owns the property.

artifactName

String

The name of the artifact container of the property sheet that owns the property.

artifactVersionName

String

The name of the artifactVersion container of the property sheet that owns the property.

catalogItemRunId

String

The primary key of the CatalogItemRun container of the property sheet that owns the property.

catalogName

String

The name of the catalog of the property sheet that owns the property.

ciBuildDetailName

String

The name of the CI build detail of the property sheet that owns the property.

clusterName

String

The name of the cluster which owns property sheet.

componentName

String

The name of the component container of the property sheet that owns the property.

configName

String

The name of the emailConfig container that owns the property.

credentialName

String

The name of the credential container of the property sheet that owns the property.

dashboardName

String

The name of the dashboard of the property sheet that owns the property.

dataRetentionPolicyName

String

The name of the data retention policy of the property sheet that owns the property.

environmentName

String

The name of the environment container of the property sheet that owns the property.

environmentTemplateName

String

The name of the environment template container of the property sheet that owns the property.

environmentTemplateTierName

String

The name of the environment template tier container of the property sheet that owns the property.

environmentTierName

String

The name of the environment tier container of the property sheet that owns the property.

flowName

String

The name of the flow container of the property sheet that owns the property.

flowRuntimeId

String

The primary key or name of the flowRuntime container of the property sheet that owns the property.

flowRuntimeName

String

The name of the flow runtime container of the property sheet that owns the property.

flowRuntimeStateId

String

The primary key or name of the flowRuntimeState container of the property sheet that owns the property.

flowRuntimeStateName

String

The name of the flow state container of the property sheet that owns the property.

flowStateName

String

The name of the flow state container of the property sheet that owns the property.

flowTransitionName

String

The name of the flow transition container of the property sheet that owns the property.

gateType

String

The type of the gate which owns property sheet.

gatewayName

String

The name of the gateway container of the property sheet.

groupName

String

The name of the group container of the property sheet that owns the property.

jobId

String

The primary key or name of the job container of the property sheet that owns the property.

jobStepId

String

The primary key of the job-step container of the property sheet that owns the property.

microserviceName

String

The name of the microservice container of the property sheet.

notifierName

String

The name of the notifier container of the property sheet that owns the property.

objectId

String

The object ID as returned by FindObjects.

path

String

Property path string.

pipelineName

String

The name of the pipeline container of the property sheet that owns the property.

pluginConfigurationName

String

The name of the plugin configuration container of the property sheet that owns the property.

pluginName

String

The name of the plugin container of the property sheet that owns the property.

procedureName

String

The name of the procedure container of the property sheet that owns the property.

processName

String

The name of the process, if the container is a process or process step.

processStepName

String

The name of the process step, if the container is a process step.

projectName

String

The name of the project container of the property sheet that owns the property.

propertySheetId

String

The primary key of the property sheet that owns the property.

releaseName

String

The name of the release container of the property sheet that owns the property.

reportName

String

The name of the report of the property sheet that owns the property.

reportObjectTypeName

String

The name of the report object type of the property sheet that owns the property.

repositoryName

String

The name of the repository container of the property sheet that owns the property.

resourceName

String

The name of the resource container of the property sheet that owns the property.

resourcePoolName

String

The name of the resource pool container of the property sheet that owns the property.

resourceTemplateName

String

The name of the resource template container of the property sheet that owns the property.

scheduleName

String

The name of the schedule container of the property sheet.

scmSyncName

String

The name of the SCM Sync container of the property sheet that owns the property.

searchFilterName

String

The name of the search filter container of the property sheet.

serviceAccountName

String

Retrieves the name of the service account container of the property sheet.

snapshotName

String

The name of the snapshot container of the property sheet that owns the property.

stageName

String

The name of the stage container of the property sheet that owns the property.

stateDefinitionName

String

The name of the state definition container of the property sheet that owns the property.

stateName

String

The name of the state container of the property sheet that owns the property.

stepName

String

The name of the step container of the property sheet that owns the property.

systemObjectName

String

The system object.

taskName

String

The name of the task which owns property sheet.

transitionDefinitionName

String

The name of the transition definition container of the property sheet that owns the property.

transitionName

String

The name of the transition container of the property sheet that owns the property.

triggerName

String

The name of the trigger which owns property sheet.

userName

String

The name of the user container of the property sheet that owns the property.

widgetName

String

The name of the widget of the property sheet that owns the property.

workflowDefinitionName

String

The name of the workflow definition container of the property sheet that owns the property.

workflowName

String

The name of the workflow container of the property sheet that owns the property.

workspaceName

String

The name of the workspace container of the property sheet.

zoneName

String

The name of the zone container of the property sheet.

Usage

import com.electriccloud.client.groovy.ElectricFlow
import com.electriccloud.client.groovy.models.*


ElectricFlow ef = new ElectricFlow()

def result = ef.expandString(
                value: 'test-value'
                /* optional arguments */)

export

Export part or all of the server data to an XML file. --compress can be used to compress the XML output. --excludeJobs can be used to exclude jobs from the export data. --path exports the single object specified by the path. The default is to export all data in the system.

Arguments

Argument Name Type Description

fileName

String

The filename from/to which the import/export is done.(Required)

compress

Boolean

If true, the output will be compressed.

disableProjectTracking

Boolean

If set to true when importing or exporting a project, even if the original project had change tracking enabled, make change tracking of the newly imported or exported project be disabled from its creation. If you don’t need to track changes to the new project, this avoids the change tracking overhead that would otherwise slow down the import operation, and also saves having to subsequently disable change tracking of the reimported project.

download

Boolean

Export file will be available to download.

excludeJobs

Boolean

True to exclude jobs from the export.

objectId

String

Object ID.

objectType

String

Object type.

path

String

A property path indicating a single object to be exported (for export) or the location at which to import (for import).

reducedDetailChangeHistory

Boolean

Set to 0 or false to prevent importing a large project that has change tracking enabled from automatically reducing the level of detail that it tracks for the change history of the import — this will make the import operation take longer and put more load on the database, but will allow the Change History feature to still show the full detail of entities owned by the imported project that were created by the import operation.

relocatable

Boolean

True to emit relocatable content (no IDs, ACLs, or times).

revisionNumber

Integer

Revision number.

safeMode

String

Determines the mode to use during a full export. If set to none, the default behavior applies. If set to restart, then the server will be stopped during the full export and restarted on completion. If set to shutdown, then the server will be stopped during the full export and shutdown on completion.

withAcls

Boolean

True to emit ACLs in relocatable exports.

withNotifiers

Boolean

True to emit emailNotifiers in relocatable exports.

withVersionNumbers

Boolean

True to emit version numbers (ignored on import).

Usage

import com.electriccloud.client.groovy.ElectricFlow
import com.electriccloud.client.groovy.models.*


ElectricFlow ef = new ElectricFlow()

def result = ef.export(
                fileName: 'test-fileName'
                /* optional arguments */)

getCIJob

Retrieves the specified CI job.

Arguments

Argument Name Type Description

ciConfigurationName

String

The CI configuration name.(Required)

ciJobName

String

The CI job name.

ciControllerDomain

String

The domain name of the CI controller.

ciEndpoint

String

Endpoint of the CI Controller.

folder

String

The path to the folder on the CI server referenced by the CI configuration that contains the CI jobs. The folder path must be in format of: folder1/folder2/folder3/…​

Usage

import com.electriccloud.client.groovy.ElectricFlow
import com.electriccloud.client.groovy.models.*


ElectricFlow ef = new ElectricFlow()

def result = ef.getCIJob(
                ciConfigurationName: 'test-ciConfigurationName'
                /* optional arguments */)

getCIJobParameters

Retrieves parameters for the given CI job.

Arguments

Argument Name Type Description

ciJobName

String

Name of the CI job.(Required)

ciConfigurationName

String

The CI configuration name.(Required)

ciControllerDomain

String

The domain name of the CI controller.

ciEndpoint

String

Endpoint of the CI Controller.

ciJobBranchName

String

Name of the CI Job Branch.

folder

String

The path to the folder on the CI server referenced by the CI configuration that contains the CI jobs. The folder path must be in format of: folder1/folder2/folder3/…​

Usage

import com.electriccloud.client.groovy.ElectricFlow
import com.electriccloud.client.groovy.models.*


ElectricFlow ef = new ElectricFlow()

def result = ef.getCIJobParameters(
                ciJobName: 'test-ciJobName',
                ciConfigurationName: 'test-ciConfigurationName'
                /* optional arguments */)

getCIJobs

Retrieves CI jobs for the specified CI configuration.

Arguments

Argument Name Type Description

ciConfigurationName

String

The CI configuration name.(Required)

ciControllerDomain

String

The domain name of the CI controller.

ciEndpoint

String

Endpoint of the CI Controller.

folder

String

The path to the folder on the CI server referenced by the CI configuration that contains the CI jobs. The folder path must be in format of: folder1/folder2/folder3/…​

jobSearchType

String

Specify job search type: FOLDER to return all folders and ciControllers, JOB (default) to return all other job types, or ALL to return both jobs and folders.

Usage

import com.electriccloud.client.groovy.ElectricFlow
import com.electriccloud.client.groovy.models.*


ElectricFlow ef = new ElectricFlow()

def result = ef.getCIJobs(
                ciConfigurationName: 'test-ciConfigurationName'
                /* optional arguments */)

getComplianceConfiguration

Retrieves the current Compliance configuration.

Arguments

Usage

import com.electriccloud.client.groovy.ElectricFlow
import com.electriccloud.client.groovy.models.*


ElectricFlow ef = new ElectricFlow()

def result = ef.getComplianceConfiguration()

getDashboardVisualizations

Retrieves all dashboard visualizations.

Arguments

Usage

import com.electriccloud.client.groovy.ElectricFlow
import com.electriccloud.client.groovy.models.*


ElectricFlow ef = new ElectricFlow()

def result = ef.getDashboardVisualizations()

getDatabaseConfiguration

Retrieves the current database configuration.

Arguments

Usage

import com.electriccloud.client.groovy.ElectricFlow
import com.electriccloud.client.groovy.models.*


ElectricFlow ef = new ElectricFlow()

def result = ef.getDatabaseConfiguration()

getDevOpsInsightServerConfiguration

Retrieves the current DevOps Insight Server configuration.

Arguments

Usage

import com.electriccloud.client.groovy.ElectricFlow
import com.electriccloud.client.groovy.models.*


ElectricFlow ef = new ElectricFlow()

def result = ef.getDevOpsInsightServerConfiguration()

getServerConfiguration

Retrieves a system property by name.

Arguments

Argument Name Type Description

configName

String

Name for the system property.

Usage

import com.electriccloud.client.groovy.ElectricFlow
import com.electriccloud.client.groovy.models.*


ElectricFlow ef = new ElectricFlow()

def result = ef.getServerConfiguration(
                /* optional arguments */)

getServerInfo

Retrieves information about server ports and message delivery.

Arguments

Usage

import com.electriccloud.client.groovy.ElectricFlow
import com.electriccloud.client.groovy.models.*


ElectricFlow ef = new ElectricFlow()

def result = ef.getServerInfo()

getServerPublicKey

Retrieves the public key of the CloudBees CD/RO server.

Arguments

Usage

import com.electriccloud.client.groovy.ElectricFlow
import com.electriccloud.client.groovy.models.*


ElectricFlow ef = new ElectricFlow()

def result = ef.getServerPublicKey()

getServerStatus

Retrieves the current status of the CloudBees CD/RO server, including log messages generated during the startup sequence.

Arguments

Argument Name Type Description

block

Boolean

True means wait until the server reaches a new state.

diagnostics

Boolean

True to include server diagnostics.

serverStateOnly

Boolean

The response includes only the serverState element.

timeout

Integer

How many seconds before the blocking command times out.

Usage

import com.electriccloud.client.groovy.ElectricFlow
import com.electriccloud.client.groovy.models.*


ElectricFlow ef = new ElectricFlow()

def result = ef.getServerStatus(
                /* optional arguments */)

getSsoConfiguration

Retrieves the SSO server configuration.

Arguments

Usage

import com.electriccloud.client.groovy.ElectricFlow
import com.electriccloud.client.groovy.models.*


ElectricFlow ef = new ElectricFlow()

def result = ef.getSsoConfiguration()

getStatsdConfiguration

Retrieves the statsd configuration.

Arguments

Usage

import com.electriccloud.client.groovy.ElectricFlow
import com.electriccloud.client.groovy.models.*


ElectricFlow ef = new ElectricFlow()

def result = ef.getStatsdConfiguration()

getVersions

Retrieves server version information.

Arguments

Usage

import com.electriccloud.client.groovy.ElectricFlow
import com.electriccloud.client.groovy.models.*


ElectricFlow ef = new ElectricFlow()

def result = ef.getVersions()

import

Import data from an XML export file. If --disableSchedules is 1, any imported schedules will be disabled. --path can be used to import a single object to a different location from where it was exported. --force can be provided to replace a single object at the provided path.

Use 'callImport' as the method name for invoking the 'import' API. 'import' is a groovy keyword therefore it cannot be used as a method name.

Arguments

Argument Name Type Description

fileName

String

The filename from/to which the import/export is done.(Required)

batchSize

Integer

The number of objects that are imported before they’re committed to the database.

disableProjectTracking

Boolean

If set to true when importing or exporting a project, even if the original project had change tracking enabled, make change tracking of the newly imported or exported project be disabled from its creation. If you don’t need to track changes to the new project, this avoids the change tracking overhead that would otherwise slow down the import operation, and also saves having to subsequently disable change tracking of the reimported project.

disableSchedules

Boolean

If true, imported schedules will be disabled.

force

Boolean

True to replace existing object when doing a single-object import.

path

String

A property path indicating a single object to be exported (for export) or the location at which to import (for import).

preserveId

Boolean

If true, import will attempt to preserve the object ID during a single-object import.

preserveNames

Boolean

If true, will attempt to preserve names during a single-object import.

reducedDetailChangeHistory

Boolean

Set to 0 or false to prevent importing a large project that has change tracking enabled from automatically reducing the level of detail that it tracks for the change history of the import — this will make the import operation take longer and put more load on the database, but will allow the Change History feature to still show the full detail of entities owned by the imported project that were created by the import operation.

Usage

import com.electriccloud.client.groovy.ElectricFlow
import com.electriccloud.client.groovy.models.*


ElectricFlow ef = new ElectricFlow()

def result = ef.callImport(
                fileName: 'test-fileName'
                /* optional arguments */)

logStatistic

Prints (emits) a statistics value to StatsD.

Arguments

Argument Name Type Description

type

String

The type of statistic to emit.(Required)

name

String

The name of the statistic to emit.(Required)

value

Integer

The value of the statistic to emit.(Required)

Usage

import com.electriccloud.client.groovy.ElectricFlow
import com.electriccloud.client.groovy.models.*


ElectricFlow ef = new ElectricFlow()

def result = ef.logStatistic(
                type: 'test-type',
                name: 'test-name',
                value: 'test-value')

pruneChangeHistory

Prunes obsolete-for-days data from the Change History tables.

Arguments

Argument Name Type Description

daysToKeep

Integer

Number of days' of change history data to keep (minimum seven).(Required)

batchedDelete

Boolean

Allows to split records deletion queries by chunks to minimize usage of transaction undo log.

forcePruneAll

Boolean

Override the supplied value of daysToKeep and prune the entire change history, keeping nothing discardable (normally not a good idea — this is mostly intended for testing).

pruneUpgradeObsolete

Boolean

Ignore the supplied value of daysToKeep and instead prune all change data that is obsolete in this version of CloudBees CD/RO. If you make extensive use of Stage entities, and have change history dating from to releases before CloudBees CD/RO 9.0, then running this once after the upgrade to 9.0 should reclaim some database space and might improve change history performance.

Usage

import com.electriccloud.client.groovy.ElectricFlow
import com.electriccloud.client.groovy.models.*


ElectricFlow ef = new ElectricFlow()

def result = ef.pruneChangeHistory(
                daysToKeep: 'test-daysToKeep'
                /* optional arguments */)

setCIEventsSchemaConfiguration

Change the CI events schema configuration.

Arguments

Argument Name Type Description

eventName

String

Name of the event.(Required)

version

Integer

Version of the event schema.(Required)

destination

String

Destination of the event.

destinationMappings

Mapping destination types to JSON text with the mapping fields.

eventSchema

String

JSON text for the event schema. Required if the event does not already have a schema registered.

Usage

import com.electriccloud.client.groovy.ElectricFlow
import com.electriccloud.client.groovy.models.*


ElectricFlow ef = new ElectricFlow()

def result = ef.setCIEventsSchemaConfiguration(
                eventName: 'test-eventName',
                version: 'test-version'
                /* optional arguments */)

setComplianceConfiguration

[PREVIEW] This API is in preview mode, and therefore subject to change. Sets the Compliance configuration.

Arguments

Argument Name Type Description

authenticationToken

String

Authentication token used to authenticate the requests sent to CloudBees Compliance. The authentication token must be set if integration with Compliance is enabled.

complianceUrl

String

CloudBees CD/RO communicates with CloudBees Compliance using this URL. This URL must be set if integration with Compliance is enabled.

enabled

Boolean

If true, enables communication with CloudBees Compliance.

testConnection

Boolean

Whether the connection to CloudBees Compliance should be tested before saving the configuration. Defaults to true.

Usage

import com.electriccloud.client.groovy.ElectricFlow
import com.electriccloud.client.groovy.models.*


ElectricFlow ef = new ElectricFlow()

def result = ef.setComplianceConfiguration(
                /* optional arguments */)

setDatabaseConfiguration

Sets the database configuration in the server. If the server is in bootstrap mode, these changes take effect immediately, and the server will attempt to start. If the server is already running, these changes have no effect until the server is restarted.

Arguments

Argument Name Type Description

customDatabaseDialect

String

Class name of the Hibernate dialect (advanced use only — the server will choose an appropriate dialect base on databaseType).

customDatabaseDriver

String

Class name of the JDBC driver (advanced use only — the server will choose an appropriate driver based on databaseType).

customDatabaseUrl

String

The JDBC URL to use (advanced use only — the server will compose an appropriate URL).

databaseName

String

The database instance name. Defaults to commander if left out.

databaseType

String

The database type. Defaults to builtin.

hostName

String

The domain name or IP address of the server machine corresponding to this resource.

ignorePasskeyMismatch

Boolean

If true, ignore a passkey fingerprint mismatch between the current passkey file and the database configuration, discarding stored credentials.

ignoreServerMismatch

Boolean

If true, ignore a host name mismatch between the current server and the database configuration.

password

String

The password used to connect to the database.

port

Integer

Port number to use when connecting to the agent for this resource; defaults to server default.

preserveSessions

Boolean

If true, preserve sessions when ignoring server host name mismatches.

userName

String

The user name used to connect to the database.

Usage

import com.electriccloud.client.groovy.ElectricFlow
import com.electriccloud.client.groovy.models.*


ElectricFlow ef = new ElectricFlow()

def result = ef.setDatabaseConfiguration(
                /* optional arguments */)

setDevOpsInsightServerConfiguration

Sets the DevOps Insight Server configuration.

Arguments

Argument Name Type Description

elasticSearchUrl

String

CloudBees CD/RO server retrieves data from ElasticSearch using this URL. This URL must be set if DevOps Insight is enabled.

enabled

Boolean

If true, enables DevOps Insight.

logStashUrl

String

This is the URL where LogStash receives data from CloudBees CD/RO server. This URL must be set if DevOps Insight is enabled.

password

String

The password for authenticating with the DevOps Insight Server.

testConnection

Boolean

Whether the connection to the DevOps Insight Server should be tested before saving the configuration. Defaults to false.

userName

String

The user name for authenticating with the DevOps Insight Server.

Usage

import com.electriccloud.client.groovy.ElectricFlow
import com.electriccloud.client.groovy.models.*


ElectricFlow ef = new ElectricFlow()

def result = ef.setDevOpsInsightServerConfiguration(
                /* optional arguments */)

setSsoConfiguration

Sets the SSO server configuration.

Arguments

Argument Name Type Description

enableSsoKerberos

Boolean

Enable or disable SSO Kerberos.

enableSsoOpenIDConnect

Boolean

Whether OpenID Connect based SSO is enabled.

enableSsoSaml

Boolean

Enable or disable SSO SAML.

Usage

import com.electriccloud.client.groovy.ElectricFlow
import com.electriccloud.client.groovy.models.*


ElectricFlow ef = new ElectricFlow()

def result = ef.setSsoConfiguration(
                /* optional arguments */)

setStatsdConfiguration

Change the statsd configuration.

Arguments

Argument Name Type Description

enabled

Boolean

True if metrics should be sent to the configured statsd server.

flushRate

String

Sets the rate at which the client will flush the pending metric values to the network. E.g. if the rate is 0.1, 1 in 10 writes will flush the pending metrics. Must be between 0 and 1. The default is 0.01, flushing 1 in 100 writes.

hostName

String

The host name of the statsd server to which metrics are sent.

includeHostName

Boolean

True to include the CD server hostname in the name of statsd metrics.

port

Integer

The port on the statsd server to which metrics are sent; defaults to port 8125.

prefix

String

Prefix added to all statsd metric names; defaults to CloudBeesCD.

sampleRate

String

Sets the sample rate of elements that will be actually sent. E.g. if rate is 0.75, more or less 75% of items will be sent (and the @0.75 suffix will be added to the metrics). Must be between 0 and 1. The default is 1, sending all samples.

Usage

import com.electriccloud.client.groovy.ElectricFlow
import com.electriccloud.client.groovy.models.*


ElectricFlow ef = new ElectricFlow()

def result = ef.setStatsdConfiguration(
                /* optional arguments */)

shutdownServer

Shut down the CloudBees CD/RO server.

Arguments

Argument Name Type Description

force

Boolean

If true, shutdown is forced — the server exits without any cleanup.

restart

Boolean

If true, the server is restarted after shutdown.

Usage

import com.electriccloud.client.groovy.ElectricFlow
import com.electriccloud.client.groovy.models.*


ElectricFlow ef = new ElectricFlow()

def result = ef.shutdownServer(
                /* optional arguments */)