Password and Login

Changing the SSH Password

Overview

Function: This API is used to change the SSH password.

Application scenario: used to set the SSH password.

Applicable version: This API is initially provided in SDC 8.1.0. and is not supported in versions later than 11.1.0.

Applicable model: all cameras

URL

PUT /SDCAPI/V1.0/MiscIaas/SshPassword

Request Message

The following table describes parameters in a request message.

Parameter

Data Type

Mandatory or Not (Y/N)

Description

CommandType

Int

Y

0: changes the password. (Currently, only this command is supported.)

UserName

String

Y

Account name to be modified.

OldPassword

String

Y

Original password.

NewPassword

String

Y

New password.

Response Message

This API returns responses according to the general response code. For details, see Response Codes.

Examples

Request Example

PUT /SDCAPI/V1.0/MiscIaas/SshPassword

{
    "CommandType": 0,
    "UserName": "admin",
    "OldPassword": "abc123",
    "NewPassword": "cdef1234",
}

Changing the Northbound Access Password

Overview

Function: This API is used to change the password of the account used for northbound access.

Application scenario: You can use this API to set the initial password and periodically update the password.

Applicable version: This API is initially provided in SDC 8.1.0.

Applicable model: all cameras

URL

PUT /SDCAPI/V1.0/AuthIaas/Users

Request Message

The following table describes parameters in a request message.

Parameter

Data Type

Mandatory or Not (Y/N)

Description

ManipulateName

String

Y

Operator user name. You can enter the RESTful/HW SDK account ApiAdmin or web account admin. If you want to synchronously change the passwords of all northbound interconnection accounts, the web account admin must be entered.

ManipulatePwd

String

Y

Password of the operator.

ManipulateModule

Int

Y

Module of the operator. Note: The value of this parameter must correspond to the operator.

The options include 0 (web) and 3 (RESTful/SDK).

ManipulateInfo

Object

Y

User object to be modified.

SyncModAllAccount

Int

N

Indicates whether to synchronously change the passwords of all northbound accounts. The northbound accounts include the web administrator account, RESTful API account, HW SDK account, and ONVIF account. In this case, the operator must be the web administrator account and password. That is, the ManipulateName field must be admin, the ManipulatePwd field must be the password of the web administrator account admin, and the ManipulateModule field can be set to 3. This parameter is added in the SDC 9.0.0 patch version.

The options include 0 (change the password of a specified account) and 1 (change the passwords of all northbound accounts).

The following table describes fields contained in a user object.

Parameter

Data Type

Mandatory or Not (Y/N)

Description

UserName

String

Y

Account name to be modified.

This parameter is invalid when SyncModAllAcount is set to 1.

UserPwd

String

Y

Account password to be changed.

Response Message

This API returns responses according to the general response code. For details, see Response Codes.

Examples

Request Example

PUT /SDCAPI/V1.0/AuthIaas/Users

{
    "ManipulateName": "ApiAdmin",
    "ManipulatePwd": "abc123",
    "ManipulateModule": 3,
    "ManipulateInfo": {
        "UserName": "ApiAdmin",
        "UserPwd": "defg1234"
    }
}

Obtaining the Token for Web SSO

Overview

Function: This API is used to obtain a one-off ticket for web SSO. Information transmitted through this API contains sensitive information, which can be transmitted only through HTTPS.

Application scenario: You can use this API to log in to the web system of the camera connected through the northbound interface without entering a password.

Applicable version: This API is initially provided in SDC 10.0.0.

URL

GET /SDCAPI/V1.0/AuthIaas/WebToken

Request Message

None

Response Message

Table 3-10 Parameters in a response message

Parameter

Data Type

Description

WebToken

String

One-off ticket for web SSO.

Examples

Request Example

GET /SDCAPI/V1.0/AuthIaas/WebToken

Response Example

{

"WebToken" : "Wj3mEs80PEWMYdjML+Plzv"

}