2.1.4 Updating Authentication
This API updates the user ID and password contained in the specified authentication information.
Execution permission
Admin
API version
v1
Request format
PUT http[s]://host:port/Analytics/version/objects/Credentials/{id}
Request body
The structure of the request body and the object attributes are as follows:{ "name":"...", "credentialType":"...", "userId":"...", "password":"...", "passwordNotRequired":"...", "portNumber":"...", "rootPassword":"...", "updatePassword":"...", "updateRootPassword":"...", "ssl":"...", "domainname":"...", "namespace":"...", "community":"...", "snmpVersion":"...", "userName":"...", "authenticationEnabled":"...", "authenticationPassphrase":"...", "updateAuthenticationPassphrase":"...", "authenticationProtocol":"...", "privacyEnabled":"...", "privacyPassphrase":"...", "updatePrivacyPassphrase":"...", "privacyProtocol":"..." }
Credential (Type: Credential)
Attribute |
Type |
Description |
---|---|---|
name |
string |
Name of authentication information |
credentialType |
enum |
Protocol used for connections to monitoring targets. (For details about the specifiable values, see the table ProtocolType in List of enumerators.) The specifiable values are as follows:
|
userId |
string |
Use 64 or fewer characters. If you use SNMP v3 for connections to monitoring targets, the value of the username member is set. |
password |
string |
Password used for authentication. Specify a Base64 encoded string of 255 or fewer bytes. To update the password, specify true for updatePassword. |
passwordNotRequired |
boolean |
Whether a password is needed for authentication. If this member is omitted, false is set. This setting takes effect only if WMI is used for connection to the monitoring target. ・true: A password is not needed ・false: A password is needed |
portNumber |
int |
Port number. This member is only set when the protocol used for connections to monitoring targets is SSH, SMI-S WBEM, or SNMP. |
rootPassword |
string |
Root password used for authentication. Specify a Base64 encoded string of 255 or fewer bytes. This member is only enabled when SSH is used for connections to monitoring targets. To update the rootPassword, specify true for updateRootPassword. |
updatePassword |
boolean |
Whether to change the password (password). ・true: Password is changed ・false: Password is not changed If this member is omitted, false is set. |
updateRootPassword |
boolean |
Whether to change the root password (rootPassword). ・true: Root password is changed ・false: Root password is not changed If this member is omitted, false is set. This member is only enabled when SSH is used for connections to monitoring targets. |
ssl |
boolean |
Whether to use SSL (HTTPS) for connections to monitoring targets. ・true: SSL is used ・false: SSL is not used If this member is omitted, false is set. This member is only enabled when SMI-S WBEM is used for connections to monitoring targets. |
domainname |
string |
Domain name. This member is only enabled when WMI is used for connections to monitoring targets. |
namespace |
string |
Name space. This member is only enabled when SMI-S WBEM is used for connections to monitoring targets. |
community |
string |
Community name. This member is only enabled when SNMP is used for connections to monitoring targets. |
snmpVersion |
enum |
SNMP version. This member is only enabled when SNMP is used for connections to monitoring targets. (For details about the specifiable values, see the table SnmpVersion in List of enumerators.) The specifiable values are as follows:
|
userName |
string |
User name used for authentication. Use 64 or fewer characters. Only specify this member when using SNMP v3 for connections to monitoring targets. |
authenticationEnabled |
boolean |
Whether to perform SMTP authentication. ・true: SMTP authentication is enabled ・false: SMTP authentication is disabled If this member is omitted, false is set. Only specify this member when using SNMP v3 for connections to monitoring targets. |
authenticationPassphrase |
string |
Authentication pass phrase. Encode a string of 255 or fewer bytes in Base64. Only specify this member when using SNMP v3 for connections to monitoring targets. To update the authenticationPassphrase, specify true for updateAuthenticationPassphrase. |
updateAuthenticationPassphrase |
boolean |
Whether to change the authentication pass phrase. ・true: Authentication pass phrase is changed ・false: Authentication pass phrase is not changed If this member is omitted, false is set. Only specify this member when using SNMP v3 for connections to monitoring targets. |
authenticationProtocol |
enum |
Protocol for authentication. Only specify this member when using SNMP v3 for connections to monitoring targets. (For details about the specifiable values, see the table AuthenticationProtocol in List of enumerators.) The specifiable values are as follows:
|
privacyEnabled |
boolean |
Whether to enable privacy. ・true: Privacy is enabled ・false: Privacy is disabled If this member is omitted, false is set. Only specify this member when using SNMP v3 for connections to monitoring targets. |
privacyPassphrase |
string |
Pass phrase for privacy. Encode a string of 255 or fewer bytes in Base64. Only specify this member when using SNMP v3 for connections to monitoring targets. To update the privacyPassphrase, specify true for updatePrivacyPassphrase. |
updatePrivacyPassphrase |
boolean |
Whether to change the pass phrase for privacy. ・true: Pass phrase is changed ・false: Pass phrase is not changed If this member is omitted, false is set. Only specify this member when using SNMP v3 for connections to monitoring targets. |
privacyProtocol |
enum |
Protocol for privacy. Only specify this member when using SNMP v3 for connections to monitoring targets. (For details about the specifiable values, see the table PrivacyProtocol in List of enumerators.) The specifiable values are as follows:
|
Response body
The structure of the response body and the object attributes are as follows:{ "instanceID":"...", "name":"...", "credentialType":"...", "userId":"...", "passwordNotRequired":"...", "portNumber":"...", "ssl":"...", "domainname":"...", "namespace":"...", "community":"...", "snmpVersion":"...", "userName":"...", "authenticationEnabled":"...", "authenticationProtocol":"...", "privacyEnabled":"...", "privacyProtocol":"...", "numOfRelatedResources":"..." }
Credential (Type: Credential)
Attribute |
Type |
Description |
---|---|---|
instanceID |
long |
ID for identifying instances. |
name |
string |
Name of authentication information |
credentialType |
enum |
Protocol used for connections to monitoring targets. (For details about the specifiable values, see the table ProtocolType in List of enumerators.) The specifiable values are as follows:
|
userId |
string |
Use 64 or fewer characters. If you use SNMP v3 for connections to monitoring targets, the value of the username member is set. |
passwordNotRequired |
boolean |
Whether a password is needed for authentication. If this member is omitted, false is set. This setting takes effect only if WMI is used for connection to the monitoring target. ・true: A password is not needed ・false: A password is needed |
portNumber |
int |
Port number. This member is only set when the protocol used for connections to monitoring targets is SSH, SMI-S WBEM, or SNMP. |
ssl |
boolean |
Whether to use SSL (HTTPS) for connections to monitoring targets. ・true: SSL is used ・false: SSL is not used If this member is omitted, false is set. This member is only enabled when SMI-S WBEM is used for connections to monitoring targets. |
domainname |
string |
Domain name. This member is only enabled when WMI is used for connections to monitoring targets. |
namespace |
string |
Name space. This member is only enabled when SMI-S WBEM is used for connections to monitoring targets. |
community |
string |
Community name. This member is only enabled when SNMP is used for connections to monitoring targets. |
snmpVersion |
enum |
SNMP version. This member is only enabled when SNMP is used for connections to monitoring targets. (For details about the specifiable values, see the table SnmpVersion in List of enumerators.) The specifiable values are as follows:
|
userName |
string |
User name used for authentication. Use 64 or fewer characters. Only specify this member when using SNMP v3 for connections to monitoring targets. |
authenticationEnabled |
boolean |
Whether to perform SMTP authentication. ・true: SMTP authentication is enabled ・false: SMTP authentication is disabled If this member is omitted, false is set. Only specify this member when using SNMP v3 for connections to monitoring targets. |
authenticationProtocol |
enum |
Protocol for authentication. Only specify this member when using SNMP v3 for connections to monitoring targets. (For details about the specifiable values, see the table AuthenticationProtocol in List of enumerators.) The specifiable values are as follows:
|
privacyEnabled |
boolean |
Whether to enable privacy. ・true: Privacy is enabled ・false: Privacy is disabled If this member is omitted, false is set. Only specify this member when using SNMP v3 for connections to monitoring targets. |
privacyProtocol |
enum |
Protocol for privacy. Only specify this member when using SNMP v3 for connections to monitoring targets. (For details about the specifiable values, see the table PrivacyProtocol in List of enumerators.) The specifiable values are as follows:
|
numOfRelatedResources |
int |
Number of resources found by using authentication information. |
Status codes
Status code |
Reason phrase |
Description |
---|---|---|
200 |
OK |
Success. |
400 |
Bad Request |
A format of request body is invalid. |
401 |
Unauthorized |
No login privilege. |
403 |
Forbidden |
No update privilege. |
404 |
Not Found |
The resource was not found. |
409 |
Conflict |
A resource with the same name exists. |
412 |
Precondition Failed |
The server is not available. |
500 |
Internal Server Error |
Server processing error. |
Example code
[Request Header] PUT /Analytics/v1/objects/Credentials/13 HTTP/1.1 Authorization: Basic c3lzdGVtOm1hbmFnZXI= User-Agent: curl/7.33.0 Host: localhost:22015 Accept: application/json Content-Type: application/json Accept-Language: ja Content-Length: 256 [Request Body] { "name" : "WindowsMonitoring", "credentialType" : "WMI", "userId" : "Administrator", "passwordNotRequired" : false, "updatePassword" : true, "password" : "c3lzdGVtOm1hbmFnZXI=", "domainname" : "domain" } [Response Header] HTTP/1.1 200 OK Date: Fri, 27 Nov 2015 08:42:45 GMT Server: Cosminexus HTTP Server Cache-Control: no-cache WWW-Authenticate: HSSO 4afe674fe8a4e569aa824d8786b0ac5b53e4a_WVlGcHsLfg5ffg0I_V0810 X-Frame-Options: SAMEORIGIN Transfer-Encoding: chunked Content-Type: application/json [Response Body] { "instanceID":13, "name": "WindowsMonitoring", "credentialType": "WMI", "userId": "Administrator", "passwordNotRequired": false, "domainname": "domain", "numOfRelatedResources": 1 }