Get Local Accounts
If vSphere APIs begin with /rest (vs /api), any maps are consumed/returned instead as arrays of objects, each containing a key and a value property field.
Get the local user account information.
Request
URLURL
https://{api_host}/rest/appliance/local-accounts/{username}
Parameters
Parameters
string
username
Required
User login name
The parameter must be an identifier for the resource type: com.vmware.appliance.local_accounts.
Header Parameters
Header Parameters
string
vmware-api-session-id
Required
Required session ID, obtained by first calling Create Session API
Example: b00db39f948d13ea1e59b4d6fce56389
Response
Response
Response BodyResponse Body
200 OK returns
LocalAccountsGetResponseBody
of type application/json
Local user account information
{
"value": {
"email": "string",
"enabled": false,
"fullname": "string",
"has_password": false,
"inactive_at": "string",
"last_password_change": "string",
"max_days_between_password_change": 0,
"min_days_between_password_change": 0,
"password_expires_at": "string",
"roles": [
"string"
],
"warn_days_before_password_expiration": 0
}
}
cURL Command
curl -H "vmware-api-session-id: b00db39f948d13ea1e59b4d6fce56389" https://{api_host}/rest/appliance/local-accounts/{username}
Errors
404
com.vmware.vapi.std.errors.not_found : If the account is not found | com.vmware.vapi.std.errors.error : Generic error
Local Accounts Operations
patch
delete