> ## Documentation Index
> Fetch the complete documentation index at: https://docs.coreflux.org/llms.txt
> Use this file to discover all available pages before exploring further.

# Siemens Insights Hub

> Client-mode REST API connector for a curated Siemens Insights Hub (MindSphere) slice: IoT Time Series PUT/GET, Event Management create/list, and Asset Management list

Technical Preview

## Overview

A client-mode connector for a **curated cloud-IoT** slice of [Siemens Insights Hub](https://developer.siemens.com/insights-hub/docs/apis/index.html) (formerly MindSphere) covering Hugo catalog #115 connector events:

| Catalog connector event | Entity / path | Notes |
| - | - | - |
| PUT iottimeseries/v3/timeseries/\{asset}/\{aspect} | `PUT /iottimeseries/v3/timeseries/{assetId}/{aspectName}` | Ingest near-real-time time series |
| GET time series | `GET /iottimeseries/v3/timeseries/{assetId}/{aspectName}` | Query with `from` / `to` / `limit` |
| POST eventmanagement/v3/events | `POST /eventmanagement/v3/events` | Create standard or custom events |
| GET assetmanagement/v3/assets | `GET /assetmanagement/v3/assets` | List assets (`page` / `size`) |
| (list smoke) | `GET /eventmanagement/v3/events` | Optional paged event list |

Default `BASE_ADDRESS` is `https://gateway.eu1.mindsphere.io/api` (no trailing slash; substitute `{region}`). Topics use `cloud-iot/siemens-insights-hub/<object>/<verb>`.

See the base guide: [REST API Connectors](/latest/lot-language/routes/rest-api-routes).

> [!NOTE]
>
> **Auth header:** Pass the full `Authorization` value via MQTT JSON field `authorization` as `Bearer {access_token}` (OAuth 2.0 technical user client credentials, or application / Token Management credentials). Prefer Hub secrets (`SIEMENS_INSIGHTS_HUB_AUTH`). Never commit real credentials. See [Accessing Industrial IoT APIs from self-hosted applications](https://documentation.mindsphere.io/MindSphere/howto/howto-selfhosted-api-access.html).

> [!NOTE]
>
> This template has not been verified against a live authenticated Insights Hub tenant. Status remains blocked until an authenticated live smoke succeeds (prefer GET assets → 200 and PUT timeseries / POST events → 2xx).

## Basic Syntax

```lot wrap theme={"theme":"css-variables","languages":{"custom":["/languages/lot.json"]}}
# Coreflux REST_API template — Siemens Insights Hub curated slice
# Auth: Authorization via {value.json.authorization} (Bearer …)
# BASE_ADDRESS: https://gateway.eu1.mindsphere.io/api  → substitute {region}

DEFINE ROUTE SiemensInsightsHubRestApi WITH TYPE REST_API
    ADD REST_API_CONFIG
        WITH BASE_ADDRESS "https://gateway.eu1.mindsphere.io/api"
        WITH ENABLE_CLIENT "true"
        WITH USE_SSL "true"
        WITH REQUEST_TIMEOUT '60'
        WITH DEFAULT_CONTENT_TYPE "application/json"
    ADD EVENT PutTimeseries
        WITH SOURCE_TOPIC "cloud-iot/siemens-insights-hub/timeseries/put"
        WITH DESTINATION_TOPIC "cloud-iot/siemens-insights-hub/timeseries/put/response"
        WITH METHOD "PUT"
        WITH ENDPOINT "/iottimeseries/v3/timeseries/{value.json.assetId}/{value.json.aspectName}"
        WITH HEADERS
            ADD "Accept" "application/json"
            ADD "Content-Type" "application/json"
            ADD "Authorization" "{value.json.authorization}"
        WITH BODY "{payload}"
    ADD EVENT GetTimeseries
        WITH SOURCE_TOPIC "cloud-iot/siemens-insights-hub/timeseries/get"
        WITH DESTINATION_TOPIC "cloud-iot/siemens-insights-hub/timeseries/get/response"
        WITH METHOD "GET"
        WITH ENDPOINT "/iottimeseries/v3/timeseries/{value.json.assetId}/{value.json.aspectName}?from={value.json.from}&to={value.json.to}&limit={value.json.limit}"
        WITH HEADERS
            ADD "Accept" "application/json"
            ADD "Authorization" "{value.json.authorization}"
    ADD EVENT CreateEvent
        WITH SOURCE_TOPIC "cloud-iot/siemens-insights-hub/event/create"
        WITH DESTINATION_TOPIC "cloud-iot/siemens-insights-hub/event/create/response"
        WITH METHOD "POST"
        WITH ENDPOINT "/eventmanagement/v3/events"
        WITH HEADERS
            ADD "Accept" "application/json"
            ADD "Content-Type" "application/json"
            ADD "Authorization" "{value.json.authorization}"
        WITH BODY "{payload}"
    ADD EVENT ListAssets
        WITH SOURCE_TOPIC "cloud-iot/siemens-insights-hub/asset/list"
        WITH DESTINATION_TOPIC "cloud-iot/siemens-insights-hub/asset/list/response"
        WITH METHOD "GET"
        WITH ENDPOINT "/assetmanagement/v3/assets?page={value.json.page}&size={value.json.size}"
        WITH HEADERS
            ADD "Accept" "application/json"
            ADD "Authorization" "{value.json.authorization}"
    ADD EVENT ListEvents
        WITH SOURCE_TOPIC "cloud-iot/siemens-insights-hub/event/list"
        WITH DESTINATION_TOPIC "cloud-iot/siemens-insights-hub/event/list/response"
        WITH METHOD "GET"
        WITH ENDPOINT "/eventmanagement/v3/events?page={value.json.page}&size={value.json.size}"
        WITH HEADERS
            ADD "Accept" "application/json"
            ADD "Authorization" "{value.json.authorization}"
```

## MQTT topics

| Event | Source topic | Response topic |
| - | - | - |
| PutTimeseries | `cloud-iot/siemens-insights-hub/timeseries/put` | `…/timeseries/put/response` |
| GetTimeseries | `cloud-iot/siemens-insights-hub/timeseries/get` | `…/timeseries/get/response` |
| CreateEvent | `cloud-iot/siemens-insights-hub/event/create` | `…/event/create/response` |
| ListAssets | `cloud-iot/siemens-insights-hub/asset/list` | `…/asset/list/response` |
| ListEvents | `cloud-iot/siemens-insights-hub/event/list` | `…/event/list/response` |

## References

* [Insights Hub services index](https://developer.siemens.com/insights-hub/docs/apis/index.html)
* [IoT Time Series overview](https://developer.siemens.com/insights-hub/docs/apis/iot-iottimeseries/api-iottimeseries-overview.html)
* [Event Management overview](https://developer.siemens.com/insights-hub/docs/apis/advanced-eventmanagement/api-eventmanagement-overview.html)
* [Self-hosted API access (OAuth)](https://documentation.mindsphere.io/MindSphere/howto/howto-selfhosted-api-access.html)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.