Get Started with Yggio Apps
Creating Your Application
Your application can either have its own backend or use Yggio as its backend. It can be a mobile application or a web service.
Starting with Yggio as your backend is often easier, as it allows you to leverage Yggio’s user management and access rights, greatly simplifying your application's development. In this case, users will log in to your application using their Yggio credentials. With a low-code development framework and Yggio as the backend, you can develop an application in just a few weeks.
Interfacing with Yggio
Your application will interface with two or three components of Yggio: the REST API, the NGSI API, and the Publisher.
- The REST API and NGSI API can be used to get, create, update, and delete entities.
- The REST API also supports login, time series, user management, client applications, reports, rules, and much more.
- The Publisher allows your application to receive real-time push updates when entities change. For this, your application needs to handle HTTP POST requests or subscribe to the Yggio MQTT broker. For more information, see the Publisher page.
Your application can also publish data to Yggio via HTTP POST, HTTP PUT, HTTP PATCH, or MQTT publish.
Applications with Their Own Backend
Using the SDK
Your application can be written in any programming language. However, if you choose Node.js, you can utilize our public SDK, which offers ready-to-use functions for the REST API. For more information, visit the SDK page.
OpenID Connect (OAuth 2.0)
OpenID Connect is used to authorize your application, which requires a backend. Your application must implement OpenID Connect support. For details, see the OpenID Connect page.
Creating an OAuth 2.0 Application in Yggio
In Yggio, an application with its own backend is represented as an OpenID Connect Relying Party (RP). To connect your application to Yggio, you need to create an RP. This enables your application to authorize itself with OpenID Connect to use the APIs and receive updates from the Publisher.
In the APPS menu, you can create an OAuth application. When you create the application, you will receive a client secret that can be used to access Yggio accounts that have granted your application access to their data.
Applications Without Their Own Backend
Logging In
If your application uses Yggio as its backend, you will manage users and their respective access rights through the Yggio Organization Manager. Users will log in to your application using their Yggio credentials, gaining access to the same resources (IoT Nodes, Reports, etc.) available in their Yggio accounts. To log in to Yggio, use the endpoint /auth/local
to obtain a token, then use that token to access other APIs.
Creating a Basic Application in Yggio
In the APPS menu, you can create a basic application. When creating the application, provide a URL to your application. If your application is published on the Google Play Store or Apple App Store, you can provide the web link for users to download and install it. If your application is a web service, simply provide the link to the application.