VMware Cloud Community
ethanmao200123
Contributor
Contributor

How to get locker password phrase from LCM 8.2 via curl command

How to get locker password phrase from LCM 8.2 via curl command.  Because I am testing about to get access token from LCM locker I made a vraRefreshToken and to do request catalog for deployment by API usage.

 

Thanks

 

Ethan 

0 Kudos
1 Reply
jimmyvandermast
Hot Shot
Hot Shot

Let's first be clear, a password is not a token, and LCM is not vRA.
Can you explain what you want to do?

To get an access token from vRA, you need something like:

$api = "/csp/gateway/am/api/login?access_token"
$jsonbody = '
{
"username": "'+$user+'",
"password": "'+$pass+'",
"domain": "System Domain"
}
'

To get a password ID from the LCM locker, there are API's like:

/lcm/locker/api/v2/passwords

and 

/lcm/locker/api/v2/passwords/{vmid}

But to access the Locker, you'll need to create a session to LCM first (log in api):

/lcm/authzn/api/login

0 Kudos