User

3 minute readReference

assignPersonaToUser

Assigns a list of valid users to an existing persona.

Arguments

Argument Name Type Description

personaName

String

The persona name. (Required)

userNames

String array

List of users that have personas.

Usage

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

createUser

Create a new user.

Arguments

Argument Name Type Description

userName

String

The user name. (Required)

email

String

Email address of the user.

fullUserName

String

Full name of the user.

groupNames

String array

List of groups that this user is in.

password

String

The users password.

personas

String array

List of personas that this user has.

Usage

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

deleteUser

Deletes a local or registered user.

Arguments

Argument Name Type Description

userName

String

The user name. (Required)

Usage

import com.electriccloud.client.groovy.ElectricFlow import com.electriccloud.client.groovy.models.* ElectricFlow ef = new ElectricFlow() def result = ef.deleteUser( userName: 'test-userName')

getPersonaUsers

Retrieves all users that have a certain persona.

Arguments

Argument Name Type Description

personaName

String

The persona name. (Required)

includeProvider

Boolean

Whether to include disabled PersonaCategories.

Usage

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

getUser

Retrieves information about a user.

Arguments

Argument Name Type Description

userName

String

The user name. (Required)

providerName

String

The name of the provider from which to get the user.

registerLDAPUser

Boolean

Set to 0 or false to show user without register LDAP user in the EF system.

traverseHierarchy

Boolean

Set to 0 or true to include parent groups in the result if this is an LDAP user and recursive traversal of group hierarchy is enabled for the directory provider.

Usage

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

getUsers

Retrieve all users.

Arguments

Argument Name Type Description

filter

String

Apply a glob-style filter (for example, foo*) when looking for users or groups.

includeAll

Boolean

Whether to include all users or groups, or only users or groups that are known to the system.

maximum

Integer

The maximum number of users or groups to return.

searchFields

String array

Filter search fields. Supported FulName or/and Email.

sortKey

String

How to sort the results.

sortOrder

String

Specifies the order to sort the results.

Usage

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

modifyUser

Modifies a non-local (LDAP) user that is registered with CloudBees CD/RO (with certain limitations described below) or a local user.

Arguments

Argument Name Type Description

userName

String

The user name. (Required)

clearPersonas

Boolean

Clear personas for user, if modifying.

email

String

Email address of the user.

fullUserName

String

Full name of the user.

groupNames

String array

List of groups that this user is in.

migrateSettings

String

Migrate the user or group settings to this name.

newName

String

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

password

String

The users password.

personas

String array

List of personas that this user has.

removeFromAllGroups

Boolean

True to remove this user from all groups.

sessionPassword

String

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

Usage

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

unassignPersonaFromUser

Unassigns the specified list of users from the existing persona.

Arguments

Argument Name Type Description

personaName

String

The persona name. (Required)

userNames

String array

List of users that have personas.

Usage

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