Version 7 (modified by csa, 16 years ago) |
---|
ADEI provides set of interfaces to facilitate access to the configuration and collected data. All interfaces are accessible by means of standard HTTP GET requests. The request parameters are supplied using GET parameters. The response is normally returned using XML or JSON encoding. The getdata and getimage requests return the data or image in the specified format.
Supported Services
Accessing current configuration
- server.php - Returns list of configured data sources
- database.php - Returns list of available databases within data source
- loggroup.php - Returns list of available loggroups within specified database
- mask.php - Returns list of configured masks withing specified loggroup
- item.php - Returns list of available data items (channels) within specified loggroup
- experiment.php - Returns list of experiments
- timewindow.php - Returns list standard window sizes
Access to the export related configuration
- format.php - Returns list of supported export formats
- export_sampling.php - Returns list of supported sampling rates (optional, for data export)
- export_window.php - Returns list of supported export modes (interval)
- Selection
- Currently opened data window
- Whole experiment
- export_mask.php - Returns list of supported export modes (item mask)
- Current group only
- All groups having the mask with specified name
- Complete data source
- Everything
Access to the data aggregation related configuration (image generation)
- aggregation.php - Returns list of supported data aggregation modes (MEAN, MMAX, ...)
- interpolate.php - Returns list of current interpolation modes
- show_gaps.php - Returns list of available modes for reporting missing data
- show_marks.php - Returns list of available modes for reporting positions of real data points
Data requests
- getdata.php - Returns the requested data in the specified format (only real data is returned, no aggregation is performed)
- genimage.php - Generate image and return image identificator (for future use in getimage.php) along with various image properties.
- getimage.php - Returns the specified image (which previously generated with genimage request)
Supported Parameters
Data Source Specification
- db_server - Data source (Server Identificator)
- db_name - Database name (within data source)
- db_group - Log Group (Identificator)
- db_mask - Item mask, possible values are:
- mask name
- comma separated list of items (numeric, counted from zero)
- omit this parameter to select all log group items
Data Interval Specification
- experiment - The current experiment duration
- 0 - specifies experiment covering all available data
- from-to - specifies experiment start and end timestamps (unix timestamp, seconds since January 1, 1970)
- window - data window within current experiment
- 0 - use maximal width (window is covering complete experiment duration)
- <number> - specifies window width in seconds, the window is positioned in the end of experiment
- <from>-<to> - specifies the window start and the end (as unix timestamps). The real numbers should be used to get subsecond precision.
Export Specification
- format - desired data format
- resample - desired sampling rate (optional)
- filename - desired file name (optional)
- mask_mode - should be specified if multiple groups are requested
Data aggregation parameters
- aggregator - data aggregation mode
- show_marks - real-data-points reporting mode
- show_gaps - missing-data reporting mode
- interpolate_gaps - data interpolation mode
Various
- id - image id in getimage request
Examples
- To get list of available log groups (data source: toskanadb, databse: prespektrometer_rep)
http://adei_server.net/adei/services/database.php?db_server=toskanadb&db_name=prespektrometer_rep
- To get in CSV format all data channels from first loggroup for a period starting at May 19, 2008 and finishing at May 20, 2008
http://adei_server.net/adei/services/database.php?db_server=toskanadb&db_name=prespektrometer_rep&db_group=0&experiment=0&window=1211159859-1211241600&format=csv