Users Operations Reset Password

Users Operations Reset Password
Set a temporary password on another local user (Administrator only)

Requires the ADMIN role, a LOCAL administrator account and an interactive console session. The caller reauthenticates with its own current password (adminPassword). The target gets the temporary password, must change it at its next sign-in, and every one of its sessions is revoked. Refused for the caller's own account (use POST /api/v1/auth/change-password), for the protected default administrator (its password is set with the appliance recovery script /opt/vmhyperarmor/bin/vmhyperarmor-admin-password) and for SSO accounts. Five wrong administrator passwords within 15 minutes block further resets by that administrator until the window ends. Audited as USER_PASSWORD_RESET, on success and on failure, never with a password.

Request
URI
POST
https://{api_host}/api/v1/users/{id}/reset-password
COPY
Path Parameters
integer
id
Required  

Unique user identifier

id example
3

Request Body

The caller's own current password and the temporary password for the target.

ResetUserPasswordRequest of type(s) application/json
Required  

Show optional properties

{
    "adminPassword": "string",
    "temporaryPassword": "string"
}
{
    "adminPassword": "<redacted>",
    "temporaryPassword": "Exampl3-Passw0rd!"
}
string As password As password
adminPassword
Required  

The calling administrator's own current password. A wrong value is answered with 401 ADMIN_REAUTH_FAILED.

string As password As ^(?=.*[0-9])(?=.*[a-z])(?=.*[A-Z])(?=.*[!@#$%^&+=(){}_-])(?=\S+$).{8,20}$
temporaryPassword
Required  
Constraints: minLength: 8 maxLength: 20

8-20 characters with at least one digit, one lowercase letter, one uppercase letter and one special character from !@#$%^&+=(){}_-, and no whitespace. The user must change it at the next sign-in.

Authentication
This operation uses the following authentication methods.
Responses
204

204 No Content; the temporary password is set and every session of the target is revoked

Operation doesn't return any data structure

400

400 Bad Request: INVALID_PASSWORD_FORMAT when temporaryPassword fails the password policy, MALFORMED_REQUEST, or INVALID_ARGUMENT when the id path variable is not a number

Returns ApiErrorResponse of type(s) application/json
{
    "errorCode": "string",
    "message": "string",
    "path": "string",
    "timestamp": "string",
    "reason": "string"
}
errorCode
Required  

Stable machine-readable error code. The known values are listed in ApiErrorCode; the set is not closed, so a client must tolerate an unlisted value.

string
message
Required  

Human-readable error description

string
path
Required  

Request URI path that produced the error

string As date-time As date-time
timestamp
Required  

Timestamp when the error occurred as an ISO 8601 date-time with offset

string
reason
Optional

A finer code, present only where an endpoint documents it. The Rule Pack endpoints' PACK_ENTRY_INVALID carries the import core's code here.


401

401 Unauthorized: UNAUTHENTICATED without a session, or ADMIN_REAUTH_FAILED when adminPassword is wrong or the caller is not a local administrator

Returns ApiErrorResponse of type(s) application/json
{
    "errorCode": "string",
    "message": "string",
    "path": "string",
    "timestamp": "string",
    "reason": "string"
}
errorCode
Required  

Stable machine-readable error code. The known values are listed in ApiErrorCode; the set is not closed, so a client must tolerate an unlisted value.

string
message
Required  

Human-readable error description

string
path
Required  

Request URI path that produced the error

string As date-time As date-time
timestamp
Required  

Timestamp when the error occurred as an ISO 8601 date-time with offset

string
reason
Optional

A finer code, present only where an endpoint documents it. The Rule Pack endpoints' PACK_ENTRY_INVALID carries the import core's code here.


403

403 Forbidden: FORBIDDEN when the signed-in role is not allowed to call this operation; CSRF_ERROR when the X-XSRF-TOKEN header is missing or wrong on a POST, PUT, PATCH or DELETE (only POST /api/v1/auth/login is exempt, and a request without a valid session gets 401 UNAUTHENTICATED instead); PASSWORD_CHANGE_REQUIRED when the account must change its password first (only GET /api/v1/auth/session, POST /api/v1/auth/logout and POST /api/v1/auth/change-password are exempt); LICENSE_REQUIRED or LICENSE_EXPIRED while the license pool is restricted (no license, or expired past grace) (exempt: every route under /api/v1/auth, GET /api/v1/user/preferences, GET /api/v1/licensing/summary and POST /api/v1/licensing/licenses)

Returns ForbiddenWrite of type(s) application/json
{
    "errorCode": "string",
    "message": "string",
    "path": "string",
    "timestamp": "string",
    "reason": "string"
}
errorCode
Required  

Stable machine-readable error code. The known values are listed in ApiErrorCode; the set is not closed, so a client must tolerate an unlisted value.

string
message
Required  

Human-readable error description

string
path
Required  

Request URI path that produced the error

string As date-time As date-time
timestamp
Required  

Timestamp when the error occurred as an ISO 8601 date-time with offset

string
reason
Optional

A finer code, present only where an endpoint documents it. The Rule Pack endpoints' PACK_ENTRY_INVALID carries the import core's code here.


404

404 Not Found error response (USER_NOT_FOUND)

Returns ApiErrorResponse of type(s) application/json
"ApiErrorResponse Object"
errorCode
Required  

Stable machine-readable error code. The known values are listed in ApiErrorCode; the set is not closed, so a client must tolerate an unlisted value.

string
message
Required  

Human-readable error description

string
path
Required  

Request URI path that produced the error

string As date-time As date-time
timestamp
Required  

Timestamp when the error occurred as an ISO 8601 date-time with offset

string
reason
Optional

A finer code, present only where an endpoint documents it. The Rule Pack endpoints' PACK_ENTRY_INVALID carries the import core's code here.


409

409 Conflict: SELF_RESET_NOT_ALLOWED for the caller's own account, PROTECTED_USER_PASSWORD_LOCKED for the default administrator, PASSWORD_MANAGED_EXTERNALLY for an SSO account

Returns ApiErrorResponse of type(s) application/json
"ApiErrorResponse Object"
errorCode
Required  

Stable machine-readable error code. The known values are listed in ApiErrorCode; the set is not closed, so a client must tolerate an unlisted value.

string
message
Required  

Human-readable error description

string
path
Required  

Request URI path that produced the error

string As date-time As date-time
timestamp
Required  

Timestamp when the error occurred as an ISO 8601 date-time with offset

string
reason
Optional

A finer code, present only where an endpoint documents it. The Rule Pack endpoints' PACK_ENTRY_INVALID carries the import core's code here.


429

429 Too Many Requests: TOO_MANY_PASSWORD_ATTEMPTS with a Retry-After header in seconds after repeated wrong administrator passwords, or the gateway rate limit (a plain response with no JSON body)

Returns ApiErrorResponse of type(s) application/json
"ApiErrorResponse Object"
errorCode
Required  

Stable machine-readable error code. The known values are listed in ApiErrorCode; the set is not closed, so a client must tolerate an unlisted value.

string
message
Required  

Human-readable error description

string
path
Required  

Request URI path that produced the error

string As date-time As date-time
timestamp
Required  

Timestamp when the error occurred as an ISO 8601 date-time with offset

string
reason
Optional

A finer code, present only where an endpoint documents it. The Rule Pack endpoints' PACK_ENTRY_INVALID carries the import core's code here.

Response Headers

integer
Retry-After

Seconds until the administrator may try again (absent on the gateway response)


Code Samples
COPY
                    curl -X POST -H 'Authorization: <value>' -H 'Content-Type: application/json' -d '{"adminPassword":"string","temporaryPassword":"string"}' https://{api_host}/api/v1/users/{id}/reset-password