OSIsoft Cloud Services (OCS) is a highly flexible cloud-based platform that provides scalable, elastic, centralized environment to aggregate data for reporting, advanced analytics, and third-party applications. OCS is powered by OSIsoft's Sequential Data Store (SDS). In this GitHub repo, we provide samples which will help you get started with the OCS API against your OCS instance.
If you are interested in other OSIsoft samples please see OSIsoft Samples.
There is currently one type of sample in the repo:
-
Getting Started - OCS focused samples for a task, usually implemented as a simple console app or single page application. There are also base libraries that may be used in other apps.
-
This task and code uses services that are currently in preview. If you are interested in this functionality, please contact OCS support.
The official OCS samples are divided in multiple categories depending on the scenario and problem/task, accessible through the following table:
Task | Description | Languages | Test Status |
---|---|---|---|
Authentication - Client Credentials | Click for details on this type of authentication | .NET | |
Authentication - Hybrid Flow | Click for details on this type of authentication | .NET | |
Authentication - Authorization Code + PKCE | Click for details on this type of authentication | .NET JavaScript PowerBI Python |
|
Types, Streams, and retrieving Data -- WaveForm | Covers some typical operations against the SDS, including client credential authentication, creating, updating, and deleting types, streams and events. This uses a non-time Series Type. Some tasks are different from the other "Types, Streams, and retrieving Data" task, so look at the task readme for details. This is a recommended starting example, and a good a base for all other Tasks. Details | .NET Libraries .NET REST API Java Angular NodeJS Python |
|
Types, Streams, and retrieving Data -- Time-Series | Covers some typical operations against the SDS, including client credential authentication, creating, and deleting types and streams. This sample is based on Time-Series data. Some tasks are different from the other "Types, Streams, and retrieving Data" task, so look at the task readme for details. This is a recommended starting example, and a good a base for all other Tasks. Details | Python DotNet |
|
UOM | Covers the basic functionality of the UOM system on OCS | .NET | |
OMF Ingress | Covers the basic functionality of configuring and using the OMF Ingress | .NET | |
CSV to OCS | Shows how to send a basic csv file to OCS using SDS calls | .NET | |
Grafana | Demonstrates how to build a Grafana plugin that retrieves stream data from Sequential Data Store | NodeJS | |
BulkUpload | Demonstrates how to build a Bulk Upload utility that sends SDS objects from json files | DotNet | |
Sample Libraries | These sample libraries are used as the base for the other samples. They are designed to be straightforward implementations of the REST APIs. They are for use in the samples. Details | Java Python |
~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~ |
Data Views | These samples highlight basic operations of Data Views for OCS, including creation, updating, getting data from and deletion of Data Views. Details | Java Python |
|
Data View Jupyter | This sample demonstrates how to utilize OCS Data Views to do some basic data analysis using Python Jupyter Notebook. Details | Jupyter Notebook |
~~ These libraries are tested by being used in other apps.
Note: Tests with automated UI browser components (such as Hybrid Authentication, Authorization Code Flow and Angular samples) fail intermittently due to automatation issues.
For OMF to OCS samples please see the OMF repository: OSI-Samples-OMF
A credential file is used in the samples unless otherwise noted in the sample. The name and location of the credential file should be noted in the sample's readme.
Note: This is not a secure way to store credentials. This is to be used at your own risk.
You will need to modify these files locally when you run the samples.
The style guide describes the organization of the repo and the code samples provided. The test guide goes into detail about the included automated tests. The on prem testing document describes the software installed on our internal OSIsoft build agent.
If you have a need for a new sample; if there is a feature or capability that should be demonstrated; if there is an existing sample that should be in your favorite language; please reach out to us and give us feedback at https://feedback.osisoft.com under the OSIsoft GitHub Channel. Feedback.
If your support question or issue is related to something with an OSIsoft product (an error message, a problem with product configuration, etc...), please open a case with OSIsoft Tech Support through myOSIsoft Customer Portal (https://my.osisoft.com).
If your support question or issue is related to a non-modified sample (or test) or documentation for the sample; please email [email protected].
If you wish to contribute please take a look at the contribution guide.
OSI Samples are licensed under the Apache 2 license.