Skip to main content

15.1.4 Core Concepts

SDK objects map one-to-one with IDMP product concepts. Understanding these mappings helps you quickly locate the API you need.

15.1.4.1 Object Mapping

SDK Class / ModuleIDMP ConceptDescription
ApiClientSDK entry point; manages connection, authentication, and request dispatch
ElementResourceApiElementNodes in the asset tree: equipment, systems, areas
AttributeResourceApiAttributeNamed properties of an element; can be bound to time-series data or static values
MetricsResourceApiObservability metricsQueries real-time observability metrics for the IDMP service
EventResourceApiEventAlarm or state-change records triggered by RT analysis rules
PanelResourceApiPanelVisualization chart associated with an element
UserResourceApiUserUser management and authentication
UomResourceApiUOMUnit of measurement classes and conversions

15.1.4.2 Data Access Hierarchy

IDMP SDK data access follows this hierarchy:

Element
└─ Attribute
└─ Time-Series Data (Metric)

Typical data read flow:

  1. Use ElementResourceApi to find the target element (by name, path, or ID).
  2. Use the element ID to query its attribute list (AttributeResourceApi).
  3. Use IDMP data source or attribute APIs to continue accessing business time-series data; MetricsResourceApi does not query attribute history.

15.1.4.3 Pagination

All list endpoints support pagination. The response format is:

{
"current": 1, // current page number (1-based)
"size": 20, // records per page
"total": 100, // total record count
"rows": [...] // records on the current page
}

List endpoints that use the standard pagination DTO accept the current and size query parameters:

# Python example
result = element_api.api_v1_elements_get(current=1, size=50)

15.1.4.4 Request and Response Structure

All API responses follow a consistent format:

{
"code": 0, // 0 = success; non-zero = error
"message": "success", // status description
"data": { ... } // actual response payload
}

When code is non-zero, the SDK raises an ApiException. See Error Handling for details.

15.1.4.5 Time Format

All time parameters and return values use Unix timestamps in milliseconds (UTC).

import time

# Query the last 1 hour of data
now_ms = int(time.time() * 1000)
one_hour_ago_ms = now_ms - 3600 * 1000