If access to the CR1000 web server is attempted without correct security
credentials, the CR1000 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 CR1000 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 pass code is set in the
CR1000 Status table (see Security
(p. 92) section), and .csipasswd does not exist,
then the pass code must be entered to use the CRBasic parameter SetValue. If
.csipasswd does exist, a correct user name and password will override the pass
code.
8.6.3.14.2 Command Syntax
API commands follow the syntax,
ip_adr?command=CommandName¶meters/arguments
where,
ip_adr = the IP address of the CR1000.
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
and arguments and the commands wherein they are used. Parameters and
arguments for specific commands are listed in the following sections.
Table 109. API Commands, Parameters, and Arguments
Parameter
Commands in which the
parameter is used Function of parameter Argument(s)
uri
• BrowseSymbols
• DataQuery
• ClockSet
• ClockCheck
• ListFiles
Specifies the data source.
• source: dl
(datalogger is data
source): default,
applies to all
commands listed in
column 2.
• tablename.fieldnam
e: applies only to
BrowseSymbols,
and DataQuery
425