The System Menu :: User


param.cgi?cmd=getuserattr

Get your Camera´s Network Configuration

  • at_username[0]: Username for User 1
  • at_password[0]: Password for User 1
  • at_authlevel[0]: User Authorisation: admin/user/guest [15, 3, 1]
  • at_enable[0]: De/Activate [0, 1]
  • at_username1: Username for User 2
  • at_password[1]: Password for User 2
  • at_authlevel[1]: User Authorisation: admin/user/guest [15, 3, 1]
  • at_enable[1]: De/Activate [0, 1]
  • at_username[2]: Username for User 3
  • at_password[2]: Password for User 3
  • at_authlevel[2]: User Authorisation: admin/user/guest [15, 3, 1]
  • at_enable[2]: De/Activate [0, 1]

Example

GET: http://admin:instar@192.168.2.168/param.cgi?cmd=getuserattr

cmd="getuserattr";
at_username[1]="admin";
at_enable[1]="1";
at_authlevel[1]="15";
at_username[2]="operator";
at_enable[2]="0";
at_authlevel[2]="3";
at_username[3]="guest";
at_enable[3]="0";
at_authlevel[3]="1";
response="200";
GET: http://192.168.2.168/param.cgi?cmd=getuserattr&at_userid=1&user=admin&pwd=instar

cmd="getuserattr";
at_authlevel="15";
at_enable="1";
at_username="admin";
response="200";

To change a user login you need to authenticate with your currently active user login by adding at_authname and at_authpass to the end of the command.

SET: http://admin:instar@192.168.2.168/param.cgi?cmd=setuserattr&at_userid=1&at_username=admin&at_password=newpassword&at_authlevel=15&at_enable=1&at_authname=admin&at_authpass=instar
cmd="setuserattr";
response="200";
SET: http://admin:instar@192.168.2.168/param.cgi?cmd=setuserattr&at_userid=3&at_username=guest&at_password=guest&at_authlevel=1&at_enable=0&at_authname=admin&at_authpass=instar
cmd="setuserattr";
response="200";

param.cgi?cmd=getauthexpire

Get Authentication Token Expiration

  • admin, operator, guest:
    • 0 = 1 day
    • 1 = 3 days
    • 2 = 5 days
    • 3 = 1 week
    • 4 = 1 month
    • 5 = 1 year

Once logged in - e.g. to the camera webUI - with an admin, operator or guest the generated authentication token will expire in the here set amount of days. Forcing the user to log in again using their username and password. Be aware that session tokens might be deleted e.g. when closing your web browser.

Example

GET: http://admin:instar@192.168.2.168/param.cgi?cmd=getauthexpire

cmd="getauthexpire";
admin="0";
operator="0";
guest="0";
response="200";
GET: http://192.168.2.168/param.cgi?cmd=getauthexpire&at_userid=1&user=admin&pwd=instar

cmd="getauthexpire";
admin="0";
operator="0";
guest="0";
response="200";
SET: http://admin:instar@192.168.2.168/param.cgi?cmd=setauthexpire&admin=5
cmd="setauthexpire";
response="200";

login.cgi

Get active user attributes

  • at_username: Username for Active User
  • at_authlevel: 15: admin, 3: user, 1: visitor
  • at_enable: De/Activate [0, 1]

Example

Aquire ipc_token for User Session

  • /param.cgi: CGI command to get/set parameters and execute certain features (requires Basic-Auth)
  • /webui.cgi: Alternative to /param.cgi used in the webUI to prevent Basic Auth prompt from the web browser (requires ipc_token that is aquired from login.cgi)
curl -u admin:instar 'http://192.168.2.115/login.cgi' -v
*   Trying 192.168.2.115:80...
* Connected to 192.168.2.115 (192.168.2.115) port 80 (#0)
* Server auth using Basic with user 'admin'
> GET /login.cgi HTTP/1.1
> Host: 192.168.2.115
> Authorization: Basic YWRtaW46aW5zdGFy
> User-Agent: curl/7.78.0
> Accept: */*
> 
* Mark bundle as not supporting multiuse
< HTTP/1.1 200 OK
< Content-Type: text/plain; charset=utf-8
< Set-Cookie: ipc_token=zRKSrHvFU5gVGaHsEBu8wvSnLcX9JchKpB; path=/; expires=Sat, 23-Apr-2022 11:41:39 CEST
< Accept-Ranges: bytes
< Content-Length: 75
< Date: Fri, 22 Apr 2022 09:41:39 GMT
< Server: lighttpd/1.4.60
< 
at_username="admin";
at_authlevel="15";
at_enable="1";
response="200";
* Connection #0 to host 192.168.2.115 left intact

Get active User

GET: http://admin:instar@192.168.2.168/login.cgi

at_username="admin";
at_authlevel="15";
at_enable="1";
response="200";
GET: http://192.168.2.168/login.cgi&user=admin&pwd=instar

at_username="admin";
at_authlevel="15";
at_enable="1";
response="200";

param.cgi?cmd=gettoken

Get a Access Token for Application Logins

  • token: Access token
  • validity: Token validity

Example

GET: http://admin:instar@192.168.2.168/param.cgi?cmd=gettoken

cmd="gettoken";
token="m82D0CW7BvTsCSeLQgr63PlMLS0P7xfRbq";
validity="1651564834";
response="200";
GET: http://192.168.2.168/param.cgi?cmd=gettoken&user=admin&pwd=instar

cmd="gettoken";
token="m82D0CW7BvTsCSeLQgr63PlMLS0P7xfRbq";
validity="1651564834";
response="200";

param.cgi?cmd=getsession

Get active Session

(for guest user level)

  • token: Access token
  • validity: Token validity

Example

(needs guest login!)

GET: http://admin:instar@192.168.2.168/param.cgi?cmd=getsession

cmd="getsession";
token="9JAPJ6swdYlJfDG409LXQQe6OcetKtjGYT";
validity="1651566086";
response="200";
GET: http://192.168.2.168/param.cgi?cmd=getsession&user=admin&pwd=instar

cmd="getsession";
token="9JAPJ6swdYlJfDG409LXQQe6OcetKtjGYT";
validity="1651566086";
response="200";

param.cgi?cmd=gettokeninfo

Get all active Access Token

  • validity: Token validity
  • name: Token name
  • note: Token note
  • []: Token ID [0 - ∞]

Example

GET: http://admin:instar@192.168.2.168/param.cgi?cmd=gettokeninfo

cmd="gettokeninfo";
validity[1]="1651557518";
name[1]="session token";
note[1]="";
validity[2]="1651564834";
name[2]="default";
note[2]="";
response="200";
GET: http://192.168.2.168/param.cgi?cmd=gettokeninfo&user=admin&pwd=instar

cmd="gettokeninfo";
validity[1]="2147483647";
name[1]="instar-mqtt";
note[1]="Mqtt access token";
validity[2]="1651564834";
name[2]="default";
note[2]="";
response="200";

param.cgi?cmd=deltoken

Delete User Access Token

  • id: Deletes token with specified ID

Example

GET: http://admin:instar@192.168.2.168/param.cgi?cmd=deltoken&id=4

cmd="deltoken";
response="200";
GET: http://192.168.2.168/param.cgi?cmd=deltoken&id=2&user=admin&pwd=instar

cmd="deltoken";
response="200";

param.cgi?cmd=getsessioninfo

Get Session Info

  • validity: Shows expire time (Unix) of current session token

Example

GET: http://admin:instar@192.168.2.168/param.cgi?cmd=getsessioninfo

cmd="getsessioninfo";
validity="1651564834";
response="200";
GET: http://192.168.2.168/param.cgi?cmd=getsessioninfo&user=admin&pwd=instar

cmd="getsessioninfo";
validity="1651564834";
response="200";

param.cgi?cmd=getuserinfo

Get User Info

Example

GET: http://admin:instar@192.168.2.168/param.cgi?cmd=getuserinfo

cmd="getuserinfo";
at_username="admin";
at_authlevel="15";
at_enable="1";
response="200";
GET: http://192.168.2.168/param.cgi?cmd=getuserinfo&user=admin&pwd=instar

cmd="getuserinfo";
at_username="admin";
at_authlevel="15";
at_enable="1";
response="200";