• Data Management
Collect data
• Control — CRBasic program language logic can allow remote access to
many control functions by means of changing the value of a variable.
Set variables / flags / ports
• Clock Functions — Clock functions allow a web client to monitor and set the
host CR1000 real time clock. Read the Time Syntax section for more
information.
Set CR1000 clock
• File Management — Web API commands allow a web client to manage files
on host CR1000 memory drives. Camera image files are examples of
collections often needing frequent management.
Send programs
Send files
Collect files
API commands are also used with Campbell Scientific’s RTMC web server
datalogger support software
(p. 95). The following documentation focuses on API
use with the CR1000. A full discussion of use of the API commands with RTMC
is available in CRBasic Editor Help, which is one of several programs available
for PC to CR1000 support
(p. 95).
8.6.3.14.1 Authentication
The CR1000 passcode security scheme described in the Security (p. 92) section is
not considered sufficiently robust for API use because of the following:
1. the security code is plainly visible in the URI, so it can be compromised by
eavesdropping or viewing the monitor.
2. the range of valid security codes is 1 to 65534, so the security code can be
compromised by brute force attacks.
Instead, Basic Access Authentication, which is implemented in the API, should be
used with the CR1000. Basic Access Authentication uses an encrypted user
account file, .csipasswd, which is placed on the CPU: drive of the CR1000.
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. A file named
.csipasswd is created on the CR1000 CPU: drive and edited in the Device
Configuration Utility (DevConfig)
(p. 111) 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 CR1000 CPU: drive. A check box is available to set the file as
hidden. If hidden when saved, the file cannot be accessed for editing.
424