getFullCredential

Back to index

Summary

Retrieves a credential by name, including a user name or password, from within a running step.
credentialName
Stringrequired
The name of the credential.
jobStepId
UUIDrequired
The ID of the job step to use.

Usage

Perl

$cmdr->getFullCredential( "test-credentialName", # credentialName "test-jobStepId" # jobStepId );

ectool

ectool getFullCredential \ "test-credentialName" `# credentialName` \ "test-jobStepId" `# jobStepId`

Examples

Perl

# Returns an xPath object containing the password. my $xpath = $cmdr->getFullCredential("myCred"); # Parse password from response. my $password = $xpath->find("//password");

ectool

Example 1

ectool getFullCredential "/projects/Default/credentials/testCredential"

Response:

<response requestId="1" nodeId="10.200.1.123"> <credential> <credentialId>a7dad279-ae72-11e7-83c1-0050569dd9a6</credentialId> <credentialName>testCredential</credentialName> <createTime>2017-10-11T10:55:12.371Z</createTime> <description /> <lastModifiedBy>admin</lastModifiedBy> <modifyTime>2017-10-11T10:55:12.371Z</modifyTime> <owner>admin</owner> ~password~ <projectName>Default</projectName> <propertySheetId>a7dad27b-ae72-11e7-83c1-0050569dd9a6</propertySheetId> <tracked>1</tracked> <userName>credentialUserName</userName> </credential> </response>

Example 2

ectool getFullCredential "/projects/Default/credentials/testCredential" --value userName

Response:

ktran

Example 3

ectool getFullCredential "/projects/Default/credentials/testCredential" --value password

Response:

3}CJ@*$D$%4MgJ=D