REST Application Overview
This section describes the application from the edgesdk2examplecsharp repository, that can be downloaded and installed from the SDK Example Source. This example code connects with HCC2 core apps using the REST API Interface or REST API Server.
The high-level architecture of the app created with the sample code is presented below. The application structure is based on the building blocks identified by numbers in the figure and text descriptions below:
The application building blocks include:
-
Your application can interface directly with the HCC2 REST API Server. The server is fully interoperable, so your application can be developed using any programming language that supports API calls.
-
Your application, using the appropriate library, may issue REST operations to HCC2, such as GET, POST, PUT, DELETE, PATCH. A complete list of REST commands is available through REST API Swagger.
-
The REST API Server supports webhooks to asynchronously transfer data from the REST API Server to the application.
-
If you do not wish to develop an API client framework for your application and your application can be written in C#, you may use sample classes and models provided in this application source code. It provides a full set of methods, allowing you to interface with REST API Server without implementing a full API Client interface. This application was developed in C#, so it is available only for applications written in C#.
-
Sample applications in Python are provided as an alternative to C#. See Example Python Application and Application Template.
-
The application has access to read/write data from/to the memory storage using API methods.
Functionality
This HCC2 C# application supports the following HCC2 interactions:
- Registration using dynamically added data points
- simple Provisioning
- Message Subscriptions
The Design section provides a structural overview of the application. For more detailed information, including building, testing, and deployment, see the README file in the code repository.
Configuration of the application is achieved by adjusting the environment variable's values detailed in Configuration Settings.
Expected Data Points
This is an example list of the data points and values you should see in the HCC2's Operate/Live Data page: