Use this API to edit a network credential.

Resource Information

Method

URL

Required authentication

PUT

/V1/CMDB/NetworkSettings

Yes

Parameters

Name

Description

Token*required
(header)

Place the token received from the API Log in to get an authentication token.

Request*required
(body)

The body contains the following parameters:

privateKey (object): used to add a private key. It contains the following subparameters:

oalias* (string): the alias of the private key.

okeyName (string): the name of the private key.

omd5KeyContent (string): the MD5 content of the key.

okeyContent (string): the content of the key.

opasswordPhrase (string): the passphrase of the key.

jumpBox (object): used to add a jump box setting. It contains the following subparameters:

oalias* (string): the alias of the jump box.

oipAddr (string): the IP address of the jump box.

omode (int, mandatory): the access mode from the Front Server to the Jump box.

0: Telnet

1: SSH

2: SSH Public Key

oport (integer): the port of the access port such as 23 for telnet.

ousername (string): the username to access the jumpbox. This parameter is mandatory only if the mode is 1 or 2.

opassword (string): the password to access the jumpbox. This parameter is mandatory only if the mode is 1.

okeyName (string): the name of the SSH public key. This parameter is mandatory only if the mode is 2.

ologinPrompt (string): the login prompt to connect the jumpbox.

opasswordPrompt (string): the login password to connect the jumpbox.

ocommandPrompt (string): the prompt to enter CLI command, such as >.

oyesNoPrompt (string): the prompt to save the SSH key.

otelnetCommand (string): configure a special command to access via Telnet when necessary. For example, telnet $(IP) $(PORT).

oSSHCommand(string): configure a special command to access via SSH when necessary. For example, ssh -l $(USERNAME) -p $(PORT) $(IP).

ocmd2 (string): the login command for the special command.

ocmd2PasswordPrompt (string): the login prompt to connect the jumpbox for the special command.

ocmd2Password (string): the login password to connect the jumpbox for the special command.

ocmd2ModePrompt (string): the mode prompt for the special command.

oquitCmd (string): the quit command.

telnetInfo (object): used to add telnet/SSH login credentials. It contains the following subparameters:

oalias* (string): the alias of telnet/SSH login credentials.

ousername (string): the username of the non-privileged login.

opassword (string): the password of the non-privileged login.

ocliMode (integer): the authentication method.

0: Telnet/SSH Password

2: SSH public key.

okeyName (string): the name of the SSH public key. This parameter is mandatory only if the cliMode parameter is 2.

privilegeInfo (object): used to add privileged credentials.

oalias* (string): the alias of the privileged credentials.

ousername (string): the username of the privileged login.

opassword (string): the password of the privileged login.

snmpInfo (object): used to add SNMP credentials.

oalias* (string): the alias of the SNMP credentials.

osnmpVersion (integer): the version of the SNMP string.

1: SNMP v1 and v2c

3: SNMP v3.

The other parameters are different based on SNMP versions.

SNMP v1 and v2c: oroString (string) and SNMP read-only community string.

SNMP v3: v3 information will be effective.

oroString (string): SNMP read-only community string.

ov3 (object): Settings if SNMP v3 is applied in snmpInfo.snmpVersion.

authMode (integer): the authentication mode of SNMP V3.

1: no authen no priv

2: auth no priv

3: auth priv

authPro (integer): the authentication method of SNMP V3. Effective when snmpInfo.v3.authMode is 2 or 3.

1: md5

2: SHA

encryptPro (integer): the encryption method. Effective when snmpInfo.v3.authMode is 3.

1: DES

2: AES,

3: AES192,

4: AES256.

username (string): the username to access the network devices.

contextName (string): the context name of authentication privilege.

authPassword (string): the authentication password. This field is effective when the authMode is 2 or 3.

encryptPassword (string): the encryption password. This field is required when the authMode is 3.

Example:

{
  "privateKey": {
    "alias""string",
    "keyName""string",
    "md5KeyContent""string",
    "keyContent""string",
    "passwordPhrase""string"
  },
  "jumpBox": {
    "alias""string",
    "ipAddr""string",
    "mode"0,
    "port"0,
    "username""string",
    "password""string",
    "KeyName""string",
    "loginPrompt""string",
    "passwordPrompt""string",
    "commandPrompt""string",
    "yesNoPrompt""string",
    "telnetCommand""string",
    "SSHCommand""string",
    "cmd2""string",
    "cmd2PasswordPrompt""string",
    "cmd2Password""string",
    "cmd2ModePrompt""string",
    "quitCmd""string"
  },
  "telnetInfo": {
    "alias""string",
    "userName""string",
    "password""string",
    "cliMode"0,
    "keyName""string"
  },
  "privilegeInfo": {
    "alias""string",
    "userName""string",
    "password""string"
  },
  "snmpInfo": {
    "alias""string",
    "snmpVersion"0,
    "roString""string",
    "v3": {
      "authMode"0,
      "authPro"0,
      "encryptPro"0,
      "userName""string",
      "contextName""string",
      "authPassword""string",
      "encryptPassword""string"
    }
  }
}

Response

Parameter

Type

Description

Example

statusCode

integer

The returned status code of executing the API.

{
  "statusCode"790200,
  "statusDescription""success"
}

statusDescription

string

The explanation of the status code.