POST /storedCredentials

Use the POST 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).
Note: This API requires Lenovo XClarity Administrator v1.4.0 or later.

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.

Request example

{
   "description": "CME44",
   "password: "passwr0d"
   "userName": "USERID"
}

Response codes

Code Description
200 OK. The stored-credential account was created successfully.
400 Bad request. An argument is missing or not valid. a descriptive error message will be returned in the body.
404 Not found. The user was not found. A descriptive error message will be returned in the body.
409 Conflict. One or more of the following conflicts has occurred:
  • An account with the specified user name exists already.

  • A violation of the security policy occurred.

500 Internal server error

Response body

Attributes Type Description
id String The stored credential ID.

Response example

{
   "id":"605"
}