Api commands, 1 command syntax, 2 data access commands – Campbell Scientific CSI Web Server User Manual

Page 19: Command syntax, Data access commands

Advertising
background image

CSI Web Server

and access levels you want to be available and press the OK button. Press the
Publish Website button to publish the website and send the new password file.

When you press the OK button on the Website .csipasswd File Editor dialog
box in Web Publisher, this file is stored to your computer. When you press the
Publish Website button, this file will be sent to the datalogger and will
overwrite the current .csipasswd file. Note that when you press the Edit
Password File
button, you are editing the file stored on your computer, not the
one stored on the datalogger. This file does not contain any changes made
using DevConfig. Therefore, if you have made changes to the .csipasswd file
from DevConfig, they will be overwritten when you press the Publish Website
button.

4. API Commands

The CSI Web Server supports an HTTP API interface for accessing data from
data sources defined in the RTMC projects running on the web server. These
commands can also be used to access data from CR800, CR1000, and CR3000
dataloggers directly. The CGI-style request syntax is designed to be flexible
and easy to use.

4.1 Command Syntax

Syntax for the commands sent to the web server generally follows the form of:

URL?command=CommandName&uri=DataSource&arguments

The DataSource = source_name:station_name.table_name.field_name

For example, Server:CR1000:onemin.TempF

The station_name applies only to LoggerNet Server data sources. If the
field_name is not specified, all of the fields in the table will be output. If the
field_name refers to an array without a subscript, all of the values associated
with that array will be output.

Arguments are appended to the command string using an ampersand (&). Some
commands have optional arguments, where omitting the argument results in a
default being used. When applicable, optional arguments and their defaults are
noted in the descriptions below.

Some commands return a response code indicating the result of the command.
These are described below where applicable.

4.2 Data Access Commands

DataQuery

DataQuery allows a web client to poll a data source or datalogger for data. The
command returns one or more fields, or one or more records, from a table in
the data source or datalogger. DataQuery has the following parts:

URI

The URI specifies the data source for the query.

13

Advertising