User Tools

Site Tools


dev:app_store_data_requests

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
dev:app_store_data_requests [2019/06/26 13:49] sudev:app_store_data_requests [2021/06/07 14:51] (current) su
Line 1: Line 1:
-**GET Gestalt/api/data/values/{dsn}?tag={tag_name_1}&tag={tag_name_2}&function={function}&start={start}&end={end}&step={step} +====== Data Requests ======
-**+
  
-Performs a tag data query on a data source.+Data requests are executed via the Data Core API.
  
-//For .NET developers, we recommend that you use the ''IntelligentPlant.AppStore.Client'' NuGet package to query for data, available on the App Store NuGet feed (https://appstore.intelligentplant.com/nuget/nuget/).//+Support actions include...
  
-For the //function// field supported values vary from driver to driver, but it's safe to assume that the following values will be supported:+==== Get Data Sources ==== 
 + 
 +Returns available data sources user. 
 + 
 +Endpoints: 
 + 
 +  * [[https://appstore.intelligentplant.com/ApiHelp/Api/GET-Gestalt-api-data-datasources_filter|GET https://appstore.intelligentplant.com/gestalt/datacore/api/data/datasources]] 
 + 
 +==== Get Tags ==== 
 + 
 +Performs a tag search on a data source for the specified filter. 
 + 
 +Endpoints:  
 + 
 + 
 +== Get Snapshot == 
 + 
 +Performs a snapshot (i.e. "what is the value now?") data query on a data source for a specified tag. 
 + 
 +== Get Processed Data == 
 + 
 +Performs a processed (or aggregated) data query (e.g. Max, Min, Avg) on a data source for a specified tag and date range. 
 + 
 +Aggregation Function:
  
-  * **RAW** - for raw historical data (**not recommended** due to the potential high volume of data returned) 
-  * **NOW** - for the current snapshot value 
   * **INTERP** - for interpolated data   * **INTERP** - for interpolated data
-  * **PLOT** - a display-friendly aggregation for when you want to display a trend on the screen 
   * **MIN** - minimum value calculated at each sample interval over a time range   * **MIN** - minimum value calculated at each sample interval over a time range
   * **MAX** - maximum value calculated at each sample interval over a time range   * **MAX** - maximum value calculated at each sample interval over a time range
   * **AVG** - mean value calculated at each sample interval over a time range.   * **AVG** - mean value calculated at each sample interval over a time range.
  
-For ''start'' and ''end'', you can specify either an absolute value or a relative value.  Absolute values should be specified in ISO 8601 format (i.e. ''yyyy-MM-ddTHH:mm:ss'').  You can also include a suffix of ''Z'' to indicate a UTC time stamp, or you can specify an offset from UTC.  If no time zone information is provided, the date is assumed to be UTC.  For example, if you wanted to specify 3:30:35am on 01 August 2017 in Central US time, you could specify ''2017-08-01T03:30:35-06:00''.  +== Get Plot Data ==
  
-Relative values can be specified using ''*'' to represent the current time.  For example: ''*-1d'' = "1 day before current time", ''*-27.5m'' = "27.5 minutes before current time", and so on Possible time units when specifying relative time stamp are: ''d'', ''h'', ''m'', ''s'', ''ms''.+Performs a plot data query on a single data source for a specified tags and date rangePlot is special type of function that returns the minimum number of data points (for a given set of parameters) required to graphically plot an accurate time-series trend.
  
-For the current value, specify ''NOW'' for the ''function'' parameter.  When you use ''NOW'', you don't need to specify a start or end time.  For example, to get the current snapshot value for tags called //Tag1// and //Tag2//, you would use: +== Get Raw Data ==
  
-''gestalt/api/data/values/{my_dsn}?function=NOW&tag=Tag1&tag=Tag2''+Performs a raw data query (i.e. requests unprocessed data) on a data source for a specified tag and date range. Raw queries are generally not advised as they are likely to return a bulky result-set that may well be cropped by size constraints. If connecting to a Process Data Historian, it is far more efficient to request "Get Processed Data" with an "INTERP" function instead.
  
-To get all raw data in a time period, you use the ''RAW'' function.  When asking for raw data, you don't need to specify a sample interval or a point count:  
  
-''gestalt/api/data/values/{my_dsn}?function=RAW&tag=Tag1&start=*-1d&end=*''+=== Time Ranges ===
  
-''RAW'' queries are **strongly discouraged**, due to the potentially large data set that must be sent over the wire.+Historical data queries will expect a date-range.
  
-For other functions, you need to provide either a ''step'' parameter that specifies the sample interval (e.g. ''1m'', ''5m'', ''8h'', ''3d''), or a ''points'' parameter that specified the number of samples you want to be returned: +For ''start'' and ''end'', you can specify either an absolute value or a relative value.  Absolute values should be specified in ISO 8601 format (i.e. ''yyyy-MM-ddTHH:mm:ss'').  You can also include suffix of ''Z'' to indicate a UTC time stamp, or you can specify an offset from UTC.  If no time zone information is provided, the date is assumed to be UTC.  For example, if you wanted to specify 3:30:35am on 01 August 2017 in Central US time, you could specify ''2017-08-01T03:30:35-06:00''.  
- +
-''gestalt/api/data/values/{my_dsn}?function=INTERP&tag=Tag1&tag=tag2&start=*-1d&end=*&step=1h'' +
-''gestalt/api/data/values/{my_dsn}?function=PLOT&tag=Tag1&tag=tag2&start=*-1d&end=*&points=750''+
  
 +Relative values can be specified using ''*'' to represent the current time.  For example: ''*-1d'' = "1 day before current time", ''*-27.5m'' = "27.5 minutes before current time", and so on.  Possible time units when specifying a relative time stamp are: ''d'', ''h'', ''m'', ''s'', ''ms''.
  
 More info on App Store API can be found [[https://appstore.intelligentplant.com/ApiHelp]] More info on App Store API can be found [[https://appstore.intelligentplant.com/ApiHelp]]
  
  
dev/app_store_data_requests.txt · Last modified: 2021/06/07 14:51 by su