REST API - get

appliance local accounts: get

Get the local user account information. This operation was added in vSphere API 6.7.

Request:

HTTP request

GET https://{server}/rest/appliance/local-accounts/{username}

Path Parameters

Name Type Description
Required
username string User login name.

Response:

HTTP Status Code: 200

Representation:

{
    "value"{
        "warn_days_before_password_expiration"1,
        "min_days_between_password_change"1,
        "roles"[
            "obj-103",
            "obj-103"
        ],
        "password_expires_at""2015-01-01T22:13:05.651Z",
        "fullname""string",
        "inactive_at""2015-01-01T22:13:05.651Z",
        "last_password_change""2015-01-01T22:13:05.651Z",
        "email""string",
        "enabled"true,
        "has_password"true,
        "max_days_between_password_change"1
    }
}

Response Type:

Name Type Description
bold = required
value info Local user account information.
value.fullname string Full name of the user. This attribute was added in vSphere API 6.7.

Optional. If unset, the value was never set.

value.email string Email address of the local account. This attribute was added in vSphere API 6.7.

Optional. If unset, the value was never set.

value.roles string[] User roles. This attribute was added in vSphere API 6.7.

When clients pass a value of this structure as a parameter, the field must contain identifiers for the resource type: com.vmware.appliance.roles. When operations return a value of this structure as a result, the field will contain identifiers for the resource type: com.vmware.appliance.roles.

value.enabled boolean Flag indicating if the account is enabled. This attribute was added in vSphere API 6.7.

value.has_password boolean Is the user password set. This attribute was added in vSphere API 6.7.

value.last_password_change date_time Date and time password was changed. This attribute was added in vSphere API 6.7.

Optional. If unset, the password was never set.

value.password_expires_at date_time Date when the account's password will expire. This attribute was added in vSphere API 6.7.

Optional. If unset, the password never expires.

value.inactive_at date_time Date and time account will be locked after password expiration. This attribute was added in vSphere API 6.7.

Optional. If unset, account will not be locked.

value.min_days_between_password_change long Minimum number of days between password change. This attribute was added in vSphere API 6.7.

Optional. If unset, pasword can be changed any time.

value.max_days_between_password_change long Maximum number of days between password change. This attribute was added in vSphere API 6.7.

Optional. If unset, password never expires.

value.warn_days_before_password_expiration long Number of days of warning before password expires. This attribute was added in vSphere API 6.7.

Optional. If unset, a user is never warned.

Errors:

HTTP Status Code Type Description
404 not_found If the account is not found
500 error Generic error