Groovy API reference

Session

2 minute readReference

createSession

Creates a session.

This command is deprecated.

Arguments

Argument Name Type Description

expirationDate

String

The date when this session will expire.

serviceAccountName

String

Service account name under for which the webhook session needs to be created for.

timeZone

String

The time zone to use when interpreting expiration date.

Positional arguments

None.

Usage

ec-perl

$cmdr->createSession({<optionals>});

ectool

ectool createSession [optionals]

createUserAccessToken

Generate personal access token for an authorized user.

Arguments

Argument Name Type Description

description

String

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

expirationDays

Integer

Specify the number of days after which the user access token will expire.

userAccessTokenName

String

The name of the user access token.

Positional arguments

None.

Usage

ec-perl

$cmdr->createUserAccessToken({<optionals>});

ectool

ectool createUserAccessToken [optionals]

deleteSession

Deletes a session.

This command is deprecated.

Arguments

Argument Name Type Description

sessionId

String

ID of the session.

Positional arguments

None.

Usage

ec-perl

$cmdr->deleteSession({<optionals>});

ectool

ectool deleteSession [optionals]

getSessions

Retrieves all sessions for a service account.

This command is deprecated.

Arguments

Argument Name Type Description

serviceAccountName

String

Service account name under for which the webhook session needs to be created for.

Positional arguments

None.

Usage

ec-perl

$cmdr->getSessions({<optionals>});

ectool

ectool getSessions [optionals]

loginSso

Sign in to the client with single-sign on (SSO).

Arguments

Argument Name Type Description

code

String

OAuth 2.0 Authorization Code.

samlResponse

String

SAML response.

state

String

OAuth 2.0 state value.

token

String

Token generation.

Positional arguments

None.

Usage

ec-perl

$cmdr->loginSso({<optionals>});

ectool

ectool loginSso [optionals]

modifySession

Modifies a session.

This command is deprecated.

Arguments

Argument Name Type Description

expirationDate

String

The date when this session will expire.

sessionId

String

ID of the session.

timeZone

String

The time zone to use when interpreting expiration date.

Positional arguments

None.

Usage

ec-perl

$cmdr->modifySession({<optionals>});

ectool

ectool modifySession [optionals]

modifyUserAccessToken

Modify user access token details for an authorized user.

Arguments

Argument Name Type Description

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.

userAccessTokenName

String

The name of the user access token.

Positional arguments

None.

Usage

ec-perl

$cmdr->modifyUserAccessToken({<optionals>});

ectool

ectool modifyUserAccessToken [optionals]

revokeUserAccessToken

Revoke access user’s token

Arguments

Argument Name Type Description

userAccessTokenName

String

(Required) User access token name

userName

String

User name

Positional arguments

userAccessTokenName

Usage

ec-perl

$cmdr->revokeUserAccessToken(<userAccessTokenName>, {<optionals>});

ectool

ectool revokeUserAccessToken userAccessTokenName, [optionals]

revokeUserAccessTokens

Revoke access user’s token

Arguments

Argument Name Type Description

userName

String

User name

Positional arguments

None.

Usage

ec-perl

$cmdr->revokeUserAccessTokens({<optionals>});

ectool

ectool revokeUserAccessTokens [optionals]