Customizing Operator Advisor > Logging Historical Data > Querying the Historical Data Database Table
Querying the Historical Data Database Table
Use the GetHistoricalData service provided on the historical data management Thing Shape (PTC.SCA.SCO.HistoricalDataManagementThingShape) to query the historical data database table. This service is intended to be tied into mashups for use through a user interface, rather than being used directly from ThingWorx Composer.
The default production order manager Thing (PTC.SCA.SCO.DefaultProductionOrderManager) implements the job order manager Thing Template (PTC.SCA.SCO.JobOrderManagerThingTemplate), which in turn implements the historical data management Thing Shape. As a result, the service on the historical data management Thing Shape can be found and executed on the default production order manager Thing.
The GetHistoricalData service has three optional parameters:
filter—A JSON filter can be used to filter the historical data database table to a fine degree.
offset—Specifies the number of rows to skip before returning results.
limit—Limits the number of results returned.
Users are not expected to use this service directly from within ThingWorx Composer. Instead, include this service in mashups with user interface elements that allow the service to process and display the data appropriately. This means that end users do not need to construct their own JSON filter to make use of the GetHistoricalData service. For more information, see Using JSON Filters in Query Services.
Was this helpful?