genimage
Generate image and return image identificator (for future use in getimage.php) along with various image properties.
Mandatory Properties
- db_server ? - Data source
- db_name ? - Database name
- db_group ? - Log Group
- frame_width ? - image width
- frame_height ? - image height
Optional Properties
- db_mask? - Item mask
- window? - Data Interval (everything by default)
- aggregator - data aggregation mode
- show_marks - real-data-points reporting mode
- show_gaps - missing-data reporting mode
- interpolate_gaps? - data interpolation mode
- precision - specifies required chart precision
- hide_axes? - generate axes-less graph
Returned Result
The request returns JSON encoded array of properties of generated image. If an error have occurred, the only returned property is error.
- error - should be 0 if image generated successfully, otherwise contains the problem description
- image - it is indeficator of generated image which should be passed to the getimage request in order to obtain the image.
- margins - array describing graph margins [left,top, right, bottom]. It is a space allocated for axis, etc.
- xmin - UNIX timestamp corresponding to the left corner of X-axis
- xmax - UNIX timestamp corresponding to the right corner of X-axis
- ymin - value corresponding to the bottom corner of Y-axis
- ymax - value corresponding to the upper corner of Y-axis
- yzoom - boolean flag indicating if image iz zoomed over Y-axis
- precision - approximate precision of the graph (1 is maximum)