跳到主要内容
版本:v3

OIAnalytics (Rest API)

Retrieve data from the Optimistik OIAnalytics application.

Specific settings

Here are the configuration details:

  • URL: This is the address of the OIAnalytics application.
  • Accept unauthorized certificate: Decide whether to accept certificates even if they are outdated or self-signed.
  • Access key: Provide the access key used for authentication.
  • Secret key: Enter the secret key used for authentication.
  • Use proxy: Choose whether to route the request through a proxy.

Item settings

In the South connector, each item can be configured to be queried according to the chosen scan mode. Multiple queries to the same database can be configured within the same South connector. OIBus will execute the queries one after another, prepare the output file, and then send it to North connectors.

Endpoint

The endpoint where to send the HTTP request, for instance /api/oianalytics/data/values.

Query params

The Query params field can utilize internal variables. These variables serve two primary purposes: ensuring data stream resilience in case of connection failures and breaking down large intervals into smaller chunks, thus reducing the load on both the server and the network (as explained in the big queries section).

Query variables

In OIBus, you can utilize the following internal variables that will be interpreted by the system:

  • @StartTime: Initially, the @StartTime variable is set to the date of the first execution of the query. When results are retrieved from the application, the @StartTime value is updated to the most recent timestamp among those results in the field used as a reference.
  • @EndTime: The @EndTime variable is set to either the current time (now()) or the end of the sub-interval if a query is split.

CSV Serialization

OIBus offers the option to serialize retrieved data into CSV files, and you can customize the serialization process with the following settings:

  • Filename: The name of the file where the result will be stored. You can use several internal variables like @ConnectorName (the name of the connector) and @CurrentDate (the current date in yyyy_MM_dd_HH_mm_ss_SSS format - it is uncorrelated to the datetime format of the serialization, used for datetime fields).
  • Delimiter: The delimiter to use in the CSV.
  • Compression: Choose whether to compress the file with gzip or not.
  • Output datetime format: Specify the format of the datetime in the CSV. The @CurrentDate variable used in the output filename won't be affected.
  • Output timezone: The timezone to use for storing the datetime.

Splitting large queries

In situations where a query may impose a significant load on the server, especially when a large time interval is requested and the @StartTime and @EndTime query variables are utilized, you can split the query into several sub-queries with smaller intervals. This can be achieved by configuring the Max read interval field in the history settings.