• Docs
Show / Hide Table of Contents
  • Introduction
  • OneSense.io
    • Agreement Service
    • Login
    • Home page
    • GeoConfiguration
      • Regions
      • Locations
    • Devices
      • Device Profiles
      • Devices
      • Device Config
      • Device Groups
      • Pump Controller
      • Device Anomalies
    • Dashboards
      • Dashboards
      • Dashboard Templates
    • Operations
      • Rules
      • Sliding Window Rules
      • Timer Rules
      • Snowflake Rules
      • Alerts
      • Actions
      • Device Updates
    • Analytics
      • Device Availability
      • Device Alert Dashboard
    • Assets
    • Administration
      • Users
      • Roles
      • Subscription
      • Settings
      • External Applications
  • OneSense BLE Application
    • OneSense BLE App
  • OneSense Monitoring Station
    • Assembly Guide

External Applications


The External Applications section allows you to register and manage third-party integrations that can securely access your device data. Each external application is issued a unique Client ID and Client Secret for authenticated access.


Alt Text


Alt TextThe External Applications page displays all registered applications in a table with the following columns:

  • External Application Name
  • Created At – date and time the application was registered
  • Status – current state (Enabled / Disabled)

Create New Application

Alt TextClick the Create New External Application button on the top-right of the page.


Alt Text


Alt TextIn the creation form, fill in the required fields:

  • Application Name – Enter a unique, descriptive name for the external application.
  • Expiration Date – Select the date on which the application credentials will expire.
  • Include Anomalies
  • Device – Select devices whose data the application can access.
  • Device Groups – Optionally select a device group to include all devices within it

Alt TextClick Save to register the application.

Upon successful creation, a confirmation dialog will appear displaying the application credentials:


Alt Text


Alt TextThe dialog shows the Client ID and Client Secret for your new application.

Alt TextUse the eye icon buttons to reveal/hide the values, then copy them to a secure location.

NOTE: Please copy and securely store the secret key for future use. The Client Secret and Client Id will NOT be shown again after you close this dialog.

Alt TextClick Done to close the dialog. The application will now appear in the list.

Each application in the list has a three-dot menu (⋮) on the right side. Clicking it reveals the following actions:


Alt Text


View

Alt TextSelect View from the actions to open the read-only External Application Details.


Alt Text


This action displays all configured properties of the application including Application Name, Expiration Date, Include Anomalies setting, selected Device, and Device Groups.

Edit

Alt TextSelect Edit from the dropdown to open the Update External Application Details.


Alt Text


Alt Text Modify any of the following fields as needed:

  • Application Name
  • Include Anomalies toggle
  • Device selection
  • Device Groups selection

Alt TextClick Update to save your changes, or Cancel to discard them.

Delete

Alt TextSelect Delete from the actions to remove an external application.

Rotate Secret

Alt Text Select Rotate Secret from the actions to generate a new Client Secret for the application.

Alt Text A confirmation dialog will appear. Confirm the action to proceed with rotation.

Alt TextUpon confirmation, the system will generate a new Client Secret and display a success message:

  • he dialog will show the Client ID (unchanged) and the new Client Secret
  • Use the eye icon to reveal each value, then copy them to a secure location.

Alt Text Click Done to close the dialog.

Disable / Enable

Alt Text Select Disabled from the actions to deactivate an active external application.

Alt Text The application's Status in the list will change from Enabled to Disabled.

API Integration

Once an External Application is created and its credentials are secured, you can use them to authenticate against the OneSense API and stream live device telemetry into any external system — a web page, Grafana dashboard etc.

Generate an Access Token

Before calling any streaming endpoint, you must exchange your Client ID and Client Secret for a short-lived Bearer token.

Alt TextToken Endpoint:

  • Method: POST
  • URL: https://onesenseapi.azurewebsites.net/connect/token
  • Content-Type : x-www-form-urlencoded

Alt TextRequest Body Parameters

  • grant_type: client_credentials (fixed value — always use this)
  • client_id: Your application's Client ID
  • client_secret: Your application's Client Secret

Alt TextA 200 OK response contains a JSON object with an access_token field.

Alt TextNOTE: Access tokens are short-lived (typically 60 minutes). Your application should detect 401 Unauthorized responses and request a fresh token using the same Client Credentials flow.

Streaming

The telemetry streaming endpoint uses Server-Sent Events (SSE). Once connected with a valid Bearer token, the server pushes device data in real time as events arrive

Alt TextStreaming Endpoint:

  • Method: GET
  • URL: https://onesenseapi.azurewebsites.net/v1/stream/telemetry
  • Accept : text/event-stream
  • Auth : Bearer

Alt TextHow It Works

  • The server validates the Bearer token and extracts the permitted device IDs and tenant from the token claims.
  • The connection stays open and the server pushes new telemetry events as they arrive from your devices.
  • Each event is a JSON payload containing device readings
Previous
Settings
Next
OneSense BLE App