2 command syntax – Campbell Scientific CR800 and CR850 Measurement and Control Systems User Manual
Page 356

Section 8. Operation
356
Four levels of access are available through Basic Access Authentication:
• all access denied (Level 0)
• all access allowed (Level 1)
• set variables allowed (Level 2)
• read-only access (Level 3)
Multiple user accounts and security levels can be defined. .csipasswd is created
and edited in the Device Configuration Utility (DevConfig)
(p. 92)
software Net
Services tab, Edit .csipasswd File button. When in Datalogger .csipasswd File
Editor dialog box, pressing Apply after entering user names and passwords
encrypts .csipasswd and saves it to the CR800 CPU: drive. A check box is
available to set the file as hidden. If hidden when saved, the file cannot be
accessed for editing.
If access to the CR800 web server is attempted without correct security
credentials, the CR800 returns the error 401 Authorization Required. This error
prompts the web browser or client to display a user name and password request
dialog box. If .csipasswd is blank or does not exist, the user name defaults to
anonymous with no password, and the security level defaults to read-only
(default security level can be changed in DevConfig). If an invalid user name or
password is entered in .csipasswd, the CR800 web server will default to the level
of access assigned to anonymous.
The security level associated with the user name anonymous, affects only API
commands. For example, the API command SetValueEx will not function when
the API security level is set to read-only, but the CRBasic parameter
SetValue
in
the WebPageBegin() instruction will function. However, if .csipasswd sets a
user name other than anonymous and sets a password, security will be active on
API and CRBasic commands. For example, if a numeric security pass code is set
in the CR800 Status table (see Security
(p. 70)
section), and .csipasswd does not
exist, then the security code must be entered to use the CRBasic parameter
SetValue
. If .csipasswd does exist, a correct user name and password will
override the security code.
8.6.3.2 Command Syntax
API commands follow the syntax,
ip_adr?command=CommandName¶meters/arguments
where,
ip_adr = the IP address of the CR800.
CommandName = the the API command.
parameters / arguments = the API command parameters and associated
arguments.
& is used when appending parameters and arguments to the command
string.
Some commands have optional parameters wherein omitting a parameter results
in the use of a default argument. Some commands return a response code
indicating the result of the command. The following table lists API parameters