User

3 minute readReference

assignPersonaToUser

Assign persona to users.

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 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

Retrieve all users which have 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

Retrieve a user by name.

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 (e.g. '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

Which order to sort in

Usage

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

modifyUser

Modify an existing 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

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

remove persona from users.

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 */)