POST /storedCredentials

Use this method to create a stored credential.

Important: Lenovo XClarity Administrator does not validate the user name and password that you specify for the stored credential. It is your responsibility to ensure that specified information corresponds to an active user account on the local device or LDAP server (if the managed device is configured to use Microsoft Active Directory or OpenLDAP for authentication).

Authentication

Authentication with user name and password is required.

Request URL

POST https://{management_server_IP}/storedCredentials

Query parameters

None

Request body

Attributes Required / Optional Type Description
description Optional String Description of the stored-credential account
Tip: Use this attribute to differentiate between accounts when users and stored credentials have the same name.
password Required String Password for the stored-credential account
userName Required String Name of the stored-credential account

You must specify a user name for management, OS-management, and local user accounts. For other stored credential type, the user name is optional.

The following example creates a stored credential.
{
   "description": "CME44",
   "password: "passwr0d"
   "userName": "USERID"
}

Response codes

Code Description Comments
200 OK The request completed successfully.
400 Bad Request A query parameter or request attribute is missing or not valid, or the operation is not supported. A descriptive error message is returned in the response body.
404 Not found A specified resource cannot be found. A descriptive error message is returned in the response body.
409 Conflict There is a conflict with the current state of the resource. A descriptive error message is returned in the response body.
500 Internal Server Error An internal error occurred. A descriptive error message is returned in the response body.

Response body

Attributes Type Description
id String The stored credential ID.
The following example is returned if the request is successful.
{
   "id":"605"
}