Campbell Scientific CR1000KD CR1000 Measurement and Control System - Page 380
Table 94., DataQuery API Command Parameters
View all Campbell Scientific CR1000KD manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 380 highlights
Section 8. Operation Table 94. DataQuery API Command Parameters Optional. Specifies the URI (p. 470) for data to be queried. Syntax: dl:tablename.fieldname. Field name is optional. Field name is always specified in association with a table name. If field name uri is not specified, all fields are collected. If fieldname refers to an array without a subscript, all values associated with that array will be output. Table name is optional. If table name is not used, the entire URI syntax is not needed as dl (CR1000) is the default data source. mode Required. Modes for temporal-range of collected-data: most-recent returns data from the most recent number of records. p1 specifies maximum number of records. since-time returns most recent data since a certain time. p1 specifies the beginning time stamp (see Time Syntax (p. 375) section). since-record returns records (p. 463) since a certain record number. The record number is specified by p1. If the record number is not present in the table, the CR1000 will return all data starting with the oldest record. date-range returns data in a certain date range. The date range is specified using p1 and p2. Data returned include data from date specified by p1 but not by p2 (half-open interval). backfill returns data stored since a certain time interval (for instance, all the data since 1 hour ago). The interval, in seconds, is specified using p1. p1 p2 format Optional. Specifies: • maximum number of records (most-recent) • beginning date and/or time (since-time, date-range). See Time Syntax (p. 375) for format. • beginning record number (since-record) • interval in seconds (backfill) Optional. Specifies: • ending date and/or time (date-range). See Time Syntax (p. 375) for format. Optional. Specifies the format of the output. If this parameter is omitted, or if the value is html, empty, or invalid, the output is HTML. format Option Data Output Format Content-Type Field of HTTP Response Header html HTML text/html xml CSIXML text/xml json CSIJSON application/json toa5 TOA5 text/csv tob1 TOB1 binary/octet-stream Note: When json is used, and the web server has a large data set to send, the web server may choose to break the data into multiple requests by specifying a value of true for the more flag in the CSIJSON output. The more flag is not shown if a complete data set is first returned. Examples: http://192.168.24.106/?command=DataQuery&uri=dl:MainData&mode=da te-range&p1=2012-09-14T8:00:00&p2=2012-09-14T9:00:00 Response: collect all data from table MainData within the range of p1 to p2* 380