Log in to devices1、Pre-operations (1)Search for devices Search the device through the search interface and obtain basic information about the device: IP address, SN (product serial number), product name, etc.2、Post-operations In each subsequent request, it is necessary to include the Token sent during login in the request header. The name of the request header is "Authorization", and the value is the Token sent during login.3、Prevent brute force login After three consecutive failed attempts, users must wait 60 seconds before trying again.4、Flowchart
Request
Header Params
Content-Type
string
optional
Example:
application/json
Body Params application/x-msgpack
sn
string
SN
required
SN
username
string
username
required
username
password
string
password
required
password
loginType
integer
type
required
Fixed value: 2
clientId
integer
Unique identifier on the link end
required
Same clientId will share a token, while the tokens of different clientIds will vary. For example: 1 Note: If two clients have the same clientId, it may result in the forced logout of one client upon the login of the other.
Status Codes OK = 0; Success ERROR = 1; Failure ERR_INVALID_PARAM = 3; Parameter error ERR_FORBIDDEN = 17; Too many login attempts ERR_NOT_EXISTED = 19; Login configuration not found on server ERR_VERIFY_FAILED = 24; Incorrect username or password