OpenGate Documentation

OpenGate IoT platform Overview

20.5.1-SNAPSHOT

OpenGate is a comprehensive IoT platform designed to enhance the integration and management of your Internet of Things (IoT) infrastructure. IoT infrastructures can include many components, such as sensors, assets, devices, mobile (SIM cards), and non-mobile (LoRa, LoRA WAN) communication subscriptions. OpenGate lets you control your IoT ecosystem by streamlining data delivery to your business processes.

Development Philosophy

The development team behind OpenGate strongly emphasizes providing loosely coupled services with high interoperability. To achieve these objectives, the team has embraced the REST architectural style, complemented by standardized MIME types. This strategic choice ensures that OpenGate’s programming interfaces can easily interact with various programming languages and tools. A prime example of such a tool is the versatile curl, which offers simplicity and power on the command line interface, making it an excellent choice as a playground for interacting with RESTful services.

OpenGate API

At the core of its offering, the OpenGate API is an HTTPS-based service that follows the REST principles. This API facilitates the seamless integration of external applications with the diverse services provided by the OpenGate platform. Doing so extends the platform’s capabilities and enables users to customize and enhance their IoT solutions effectively.

RESTful services are instrumental in this context, providing a flexible and efficient means for systems to communicate, irrespective of the specific programming languages or technologies they utilize. Through this approach, OpenGate ensures that its platform is accessible, versatile, and primed for future expansions and integrations.

Learn more about RESTful services.

OpenGate UX Web Console

Discover the powerful and user-friendly OpenGate UX Web Console, a critical aspect of the OpenGate IoT Platform developed by amplía))) soluciones. Our UX team designed this web console to offer seamless interaction with the OpenGate API and provide an extensive range of features and tools to enhance your IoT experience. The console covers every aspect of IoT management and analysis, from the initial Login to complex Analytics and Device Emulation.

Explore diverse Workspaces with customizable Dashboards featuring a variety of Widgets, from advanced BIM/IFC Widgets to insightful Charts and Maps. Delve into detailed Entity Details, manage multiple entities through comprehensive Listings, and harness the power of Wizards for simplified administration and operations. The console also includes a robust Administration section for efficiently managing entities, organizations, and user settings. Users can simulate real-world scenarios with the device’s emulator and perform analytics for advanced data analysis and predictive modeling. Lastly, ensure optimal system functionality with Operation System Support, keeping track of entities, notices, and incidents.

The OpenGate UX Web Console is your gateway to mastering IoT operations, offering an intuitive and comprehensive environment for managing the full spectrum of IoT tasks and challenges.


Table of documentation site content

Subsections of OpenGate Documentation

Presenting OpenGate

OpenGate unifies the entire IoT stack—device management, connectivity, edge processing, automation, security, and analytics—into a single, extensible platform. This means faster deployments, less overhead, and safer operations, especially for heterogeneous, large-scale, or industrial setups.

og


🟠 Introduction to OpenGate


🟠 OpenGate Architecture


🟠 Main features


Subsections of Presenting OpenGate

Introduction to OpenGate

🧩 What is OpenGate?

OpenGate is a comprehensive IoT and IIoT platform developed by amplía))), designed to enable intelligent, secure, and scalable management of connected devices and other entities. Its modular and multiprotocol design allows it to integrate with any type of sensors or entities regardless of the manufacturer and adapt to industries like smart grid, utilities, renewable energy, telecom, manufacturing automation, agriculture, logistics, or smart cities.


🚀 Key Highlights

og OpenGate stands out for several cutting-edge features that make it a next-level IoT platform. Here are some highlights:

  • Multi‑protocol, multi‑vendor architecture: Supports a wide range of technologies (Sigfox, NB‑IoT, LoRa, MQTT, CoAP, Modbus, SCADA) without vendor lock-in
  • Low-code rules engine: Allows creation of custom workflows and business rules via intuitive GUI, ideal for fast adaptation
  • Custom dashboards & visual wizards: Users can design interfaces and execute tasks through guided tools
  • Mass & remote device management: Centralized firmware updates, diagnostics, and bulk operations
  • Full enterprise integration: RESTful APIs for seamless connection to BI tools, ERPs, CRMs, and core systems
  • Edge Computing with integrated AI: Enables data processing at the network edge, reducing latency and improving responsiveness, with AI modules for predictive analytics and automation

🌐 Position in the IoT Value Chain

og OpenGate covers the complete IoT lifecycle:

  1. At the edge, it ingests data from sensors and gateways and offers its OpenGate Device Agent (ODA)
  2. In connectivity or comms, it manages SIMs and support for LPWAN protocols like NB‑IoT, LoRa, Sigfox and others
  3. In the core Opengate IoT Platform, it handles device lifecycles, rule-based automation, multi-tenant isolation, offers data analysis using AI and is based on robust security
  4. In the business processes, it exposes bidirectional data integration via RESTful APIs for interaction with BI, ERP, CRM, and other systems—enabling intelligent, scalable IoT ecosystems or business processes

🆚 Compared to Other IoT Platforms

Compared to other IoT platforms, OpenGate offers:

  • A hybrid edge–cloud architecture in one platform for high critical solutions and infrastructures, including advanced analytics capabilities at the edge
  • Broader protocol support, including LPWAN and industrial protocols that other platforms don’t include by default
  • A low-code GUI rules engine, versus script-based or function-based. This feature is integrated in the product
  • Native custom workspaces and dashboards and visual wizards, without needing external tools and allowing to use low-code to fully personalize them
  • Built-in bulk device management, versus separate modules on other platforms
  • Multi-tenant microservices, flexible deployment, and strong security—all provided out of the box
  • Private instance option, it is possible to deploy your own OpenGate cloud instance or even install it on premises on your own infrastructure

Other platforms from high positioned vendors (like AWS or Azure) excel in cloud-native breadth and analytics but generally require more complex assembly (e.g., Lambda, Greengrass, Power BI). OpenGate, by contrast, is optimized for heterogeneous industrial environments with hybrid deployment needs


✅ Why Choose OpenGate?

  • Modular & future-proof: Vendor-agnostic, edge-ready, adaptable to any industry
  • Enterprise-grade: Multi-tenancy, security, and lifecycle management ready to deploy tens or millions of devices
  • Operational efficiency: Bulk provisioning and automated workflows using API connectors reduce manual load
  • Developer & integrator friendly: REST APIs and JS extensibility, ideal for full-stack integration and customizations
  • Out-of-the box solution: Predefined sections, widgets, and catalog rules and operations to work with your data and devices from the first login
  • Low-code friendly: GUI wizards deliver fast configurations for technical and non-technical users

OpenGate architecture

OpenGate Architecture Overview

OpenGate’s architecture is designed to be modular, scalable, and highly interoperable, making it ideal for managing complex IoT and IIoT ecosystems. Here’s a technical breakdown of its core components and how they interact:

og

From the OpenGate architecture perspective we like to talk about a journey from south to north, where south are devices or monitored entities and where north is the OpenGate IoT Platform and its capabilities. The following sections go deeper in each component


1. Core SBI (Southbound Interface)

This layer comprises sensors, actuators, and gateways in the field or the Edge. Devices communicate via various protocols like: Sigfox, LoRa, NB‑IoT, Modbus, SCADA, or MQTT—feeding data into the platform through the connector factory. On-site, it is possible to deploy the OpenGate Device Agent (ODA) which runs lightweight edge processing: data collection, normalization, command execution, and optional AI capabilities. This local computation reduces latency and supports autonomy for critical IIoT solutions and also allows communication with non-IP-based protocols like Zigbee, RS-232, RS-485, and other, to OpenGate.

OG Core SBI Layer

🏗️ Smart Metering devices

As part of the amplía))) commercial strategy, for the last years our tech team works harder to integrate different Smart Metering Manufacturers protocols and devices. The following table summarizes the currently integrated manufacturers:

⚡Electricity 💧Water 🔥Gas
ELPRO Amper WM‑Bus Concentrator Pietro Fiorentini [cf(x)]
ITRON Hidroconta SagemCom [cf(x)]
ACTARIS ContaZara Watertech [cf(x)]
BAER Spark [cf(x)] Spark [cf(x)]
ELSTER
UT‑NOXIUM
SIEMENS
SagemCom
LANDIS‑SIEM_METERING
ORBIS
Xiamen Four‑Faith
SACI
ZIV
USYSCOM
STG Prime

NOTE: cf(x) means that this manufacturer is integrated using OpenGate Connector Functions

IMPORTANT : The devices on the table are the most used devices by our customers and new devices can be integrated using the standard ConnectorFunctions capabilities or through our professional services. You just need to ask us.


2. Connector Factory & Network Connectivity Layer

From the Network connectivity, secure transport of data from edge to cloud is managed here. OpenGate supports multiple network and communication channels including SIM-based networks for NB‑IoT and LTE-M, LPWAN (Sigfox, LoRa), and IP protocols (HTTP, MQTT, CoAP). This layer ensures encrypted, bi-directional connectivity, with VPNs (as special request), firewalling, load balancing, and SIM/LPWAN lifecycle management. This SIM lifecycle management is integrated as part of the OpenGate IoT Platform capabilities thanks to our mobile communications providers connectors like Kite.

OG Connector Factory Layer

🔌 Integration Without Limits

OpenGate’s Connector Factory is a cornerstone feature designed to simplify and accelerate integrations in complex IoT ecosystems. It empowers organizations to seamlessly connect external systems, ML/AI pipelines, device fleets, communications services, and more—without needing extensive coding efforts. This layer offers a Plug and play with pre-built connectors for critical systems and services:

  • SIM / LPWAN management as mention before, via our mobile communication providers connectors, fully integrated with mobile provider networks—simplifying device provisioning and subscription monitoring
  • Industrial gateways & protocols, including HTTP, MQTT, CoAP, Modbus, and other protocols, facilitating smooth data ingestion from field hardware
  • Enterprise visibility through BI, ERP, CRM, and cloud applications, thanks to robust HTTP connectors that break down data siloes instantly and allows you to centralize and enrich data gathered in OpenGate or send to another of your business core services

These connectors guarantee secure, two-way communication and are configured visually via the OpenGate UX layer, GUI Web Console

🛠️ Connector Functions

When out-of-the-box doesn’t cut it, Connector Functions - cf(x) let you tailor data flows in minutes using simple JavaScript:

  1. Define criteria—select which messages should trigger your function.
  2. Write logic—parse, enrich, transform, filter, or redirect data to external systems or devices.
  3. Test & deploy—switch effortlessly between Disabled, Test, or Production modes.
  4. Reuse and evolve—import/export configurations or access centrally managed catalog APIs to clone and maintain across environments

📈 Why this Makes the Difference

  • Speed-to-market: Achieve real-time integrations in hours, not weeks, using pre-built connectors
  • Custom-savvy: Craft advanced data workflows and transformations with minimal development effort and directly from web console
  • Centralized integration management: Visualize and control every connector (both standard integrations and Connector Functions) in a unified admin interface
  • Reusability & deployment consistency: Enable, disable, clone, or update your connector functions with a few clicks, reducing manual errors and enforcement friction. Ideal for CI/CD pipelines and ensuring replicable, version-controlled deployments

3. Core Platform

The OpenGate Core is the brain of the OpenGate IoT platform, and it’s designed to handle the full lifecycle of connected assets for your solution. In short, OpenGate Core is particularly well-suited for organizations that need end-to-end control, real-time bidirectional response and broad device compatibility without being locked into a single vendor or cloud provider. Its main capabilities are organized in different areas as the next diagram shows:

OG Core Layer

📦 Data Modeling & Storage

Your entities, your data and your own way. OpenGate offers the possibility to adjust the data collected to your needs and desirable data structure:

  • Data Modeling: Design flexible schemas for your devices and assets, defining entity types and specific types, data streams, and metadata ensuring structured, consistent data throughout the lifecycle. Use our predefined catalog or create your own
  • Collection Data Lake: Ingest high-volume data in real time into a robust Data Lake organized using your data models and work with this raw real-time information to explore your entities data
  • Time Series and Data Sets: Use built-in tools to filter, aggregate, and construct time bucket based “Time Series” for your entities, and Create “Data Sets” for your entities based on the data collected for a custom data view of your entities status information. Use this data structures to build custom dashboards using the OpenGate widgets catalog

This capabilities enable efficient storage and retrieval of historical data with minimal effort, reducing overhead and enhancing analytics readiness.

⚙️ Provisioning & Entity Identification

Tools to help you to populate your devices and digital assets:

  • Provision tools & Provision Functions: Quickly onboard devices—individually using guided UI flows or custom JavaScript functions to automate validation, multi-entity creation, and configuration steps using low-code javascript powered capabilities.
  • Entity Identification Service: Automatically generate and assign unique IDs to each device or entity, ensuring reliable tracking and simplified maintenance and detect differences between provisioned and collected data automatically.
  • Entity types out-of-the-box: Build relationships and define detailed digital twins of your entities by using our devices and assets, and collect the communication modules information using our subscription and subscriber entity types.

Thanks to these tools, you can reduce manual errors, accelerate deployment, and maintain clean inventories even at industrial scale.

⚙️ Operations Engine

OpenGate’s Operations Engine empowers you to automate essential device and asset unitary or massive operations with full control and visibility:

  • Schedule remote tasks like firmware updates, diagnostics, and routine checks
  • Trigger operations on-demand (e.g., reboot a device, collect logs) or schedule them
  • Coordinate custom multi-step workflows tied to asset lifecycles
  • Create your own operations wizards directly from the OpenGate web console using JSON schema forms

The Operations Engine enables safe, repeatable actions across fleets without manual intervention, supported by execution logs and retry mechanisms for unitary or masive operations.

🧩 Rules Engine

Craft intelligent, real-time automation using the powerfull OpenGate Rules Engine:

  • Easy Mode GUI: Build rules using our conditional logic visually (“if-this-then-that”) without coding expertise
  • Advances Low-code GUI: Write advanced rules with custom processing, filters, and business logic using our predefined functions catalog or crafting your own. Start from scratch or use a basic catalog rule as template to build your own
  • Instant triggers and alerts: Respond to anomalies, thresholds, or patterns as they happen and trigger alerts, notifications or operations from the Operations Engine as response

These capabilities offers adaptive, responsive IoT automation, combining ease of use with full developer control for customizations.

🔁 Forwarders

Ensure data, events, and alerts flow seamlessly into your enterprise systems or enrich your OpenGate Data:

  • Bidirectional communication with third-parties and services
  • Route information from data streams or rule outputs to external systems (ERP, BI, CRM, custom APIs)
  • Choose sync or async delivery, including JSON, XML, or custom formats
  • Configure via GUI or code for flexible integration needs

We want OpenGate to be Your MultiTool but sometimes you need something else, so the forwarders offers you end-to-end operational workflows, eliminating the need for separate middleware and keeping business data in sync.


4. OpenGate UX Web Console

OpenGate’s web console is meticulously crafted to balance simplicity for end-users with depth for technical teams, offering a unified interface to manage devices, data, rules, analytics, and integrations, all without deep technical training and ensuring your User Experience.

OG GUI Web Console Layer

Use the powerful tools from the OpenGate’s web console to build your own IIoT solution using a predefined catalog with more than 50 customizable widgets to create the specific views for your users or your needs and take advantage of the following capabilities:

🎛️ Customizable Workspaces & Dashboards

  • Select from different look and feels, upload your logos and customize the OpenGate appearance to meet your brand requirements
  • Create your own workspaces tailored for specific needs or roles such as operators, analysts, or admins
  • Use +50 customizable widgets to build your dashboards like charts, maps, tables, and entity lists to help you visualize the IoT ecosystem
  • Personalize your dashboards with filters, layouts, refresh intervals, and interactive controls
  • Use low-code snippets to make visual adjustments and visualization conditional rules depending on data values
  • Share your workspaces and dashboards within your organization with user groups o specific users
  • Integrate new features from external resources thanks to the custom menu areas using our secure iFrame functionality

🧭 Guided Wizards & Low-Code Tools

  • Step-by-step wizards guide users through complex tasks like creating dashboards, provisioning devices, and defining rules—no coding needed
  • Low-code tools let technical staff to configure advanced tasks, rules and customizations using javascript

🔒 Role-Based Access

  • Centralized GUI for user & role management, enforcing permissions across the platform
  • Define access policies for each workspace, feature, or dataset—ensuring data confidentiality and auditability
  • Create your own roles to define specifically who do what
  • Create your own multi-tenant organization to manage different levels or verticals from the same OpenGate organization

⚙️ Operational & Provisioning Interfaces

  • Real-time device inventory with status indicators, clickable controls, and firmware/update scheduling from a unified screen
  • Bulk operations managed through intuitive panels: filter, select, and apply actions to vast fleets effortlessly

↔️ Integration & Forwarding Configuration

  • Built-in UI elements to configure Connector Functions, Forwarders, and API endpoints—fully managed via intuitive dialogs
  • View logs and status of data forwarding and rule executions directly in the console

🧩 Developer-Friendly Debugging & Visualization

  • Live logs and data previews within each widget and rule/connector configuration
  • Test and debug Connector Functions or Rules directly in the interface before going to production

🎮 OpenGate Device Emulator

The Device Emulator is an essential tool within the OpenGate UX, enabling you to emulate device behavior instantly. This is a perfect tool for testing integrations, connector functions and rules, or debugging setups, or showcasing the platform without physical hardware and without additional tools. This gives you:

  • Simulate data flows without connecting real devices which is ideal for development teams, QA, or demos
  • Validate device provisioning and collection, rule triggers, forwarding logic, and dashboard visualizations
  • Validate complex workflows and simulate device operation responses
  • Accelerate your development by eliminating hardware procurement delays and issues by simulating device behavior in the cloud

5. Artificial Intelligence

OpenGate’s AI layer brings advanced analytics and machine learning directly into the platform core, enabling seamless data-driven insights and automated decision-making. It’s designed for both data scientists and developers as well as operations teams. Key components include:

OG AI Layer

🐍 OpenGate Data Py

Our opengate-data is OpenGate’s official Python client library that simplifies data interaction across the platform:

  • 📦 Data extraction & injection: Pull collections, timeseries data, DataSets, and entities directly into Python workflows and reinyect the result data again in OpenGate
  • 💡 Perfect for notebooks: Integrates with Jupyter (Data Lab) for data exploration, visualization, and other tasks
  • ⚙️ API-first approach: Easy full support for REST-based authentication, querying, and batch operations in Python

📓 OpenGate Data Lab

OpenGate Data Lab embeds Jupyter Notebooks into the platform with features like:

  • Notebook execution: Run notebooks manually or on a schedule as part of your data pipelines or workflows
  • Full Python ecosystem: Support for scientific libraries like NumPy or Pandas
  • Operational workflows: Combine data processing and analytics in a single interface that live within OpenGate using Opengate Data Py library

🏭 AI Model Factory (roadmap)

Our “AI Model Factory” is the next-gen module for end-to-end AI lifecycle within OpenGate featuring:

  • Pipeline orchestration: Design sequences involving data extraction, transformation, training and inference
  • Multi-format model support: Deploy and serve models for real-time predictions
  • Training & retraining: Include model training pipelines to continuously update models with fresh data
  • Inference services: Deploy models as services callable from the OpenGate Rules Engine for real-time decision-making

This fully integrated setup lets you build, train, serve, and manage AI models (traditional or ML models) directly within your IIoT environment


🔄 Cross-Cutting Concerns

Across all layers, OpenGate enforces:

  • Security: Encryption at rest/in transit, device integrity checks, tenant isolation, authentication, and auditing.
  • Scalability & Resilience: Containerized microservices, load balancing, auto-scaling, and fault tolerance.
  • Monitoring & Logging: Central observability stack with metrics, tracing, alerting, and logs.
  • Hybrid Deployment: Suitable for fully cloud, fully on-premise, or hybrid edge‑cloud orchestration including AI capabilities.

Main features

🔍 OpenGate Core features

The OpenGate Core is the central engine of the OpenGate IoT platform, and it’s designed to handle the full lifecycle of connected assets. Its key capabilities include:

og

OpenGate Core stands out in the crowded IoT platform landscape by focusing on flexibility, edge intelligence, and seamless integration, especially for industrial and large-scale deployments.

In short, OpenGate Core is particularly well-suited for organizations that need end-to-end control, real-time responsiveness, and broad device compatibility—without being locked into a single vendor or cloud provider. In essence, OpenGate Core acts as the brain of the platform—modular, scalable, and built to adapt to complex industrial environments.

🌟 OpenGate Features

OpenGate offers a rich toolbox of capabilities to help you to manage complex IoT ecosystems with security, scalability, and operational intelligence.


🔧 Device & Asset Management

  • Device inventory & digital assets
    Maintain full control over your connected infrastructure, whether it’s a few devices or millions. Manage inventory, configurations, firmware, and real-time status—all from a centralized, secure console.
  • Mass operations & bulk provisioning
    Scale operations effortlessly: onboard devices in bulk via intuitive wizards or Provision Functions, and execute mass firmware updates, diagnostics, or configurations across your fleet.

⚙️ Connectivity & Protocol Support

  • Vendor-agnostic connectivity
    Seamlessly integrate LPWAN technologies like Sigfox, NB‑IoT, LoRa, SIM-based communication, plus IP protocols such as MQTT, CoAP, Modbus, SCADA—without vendor lock-in.
  • Secure bi-directional communication
    Maintain robust, two-way communication between the platform and devices, ensuring status, commands, and updates flow efficiently and securely.

🤖 Edge Computing & Intelligence

  • Integrated agent (ODA)
    Use the lightweight OpenGate Device Agent (ODA) on gateways and edge devices to collect, normalize, and transmit data—and to execute operations locally.
  • Edge processing & AI readiness(alpha) Leverage edge computing to reduce cloud dependency and latency. Integrate AI-driven analytics and predictive processing directly at the edge—simplifying real-time decision-making.

📊 Custom Dashboards & Visual Wizards

  • Tailored workspaces & dashboards
    Build visual workspaces with charts, maps, entity views, and more. The drag-and-drop dashboard layout allows non-technical users to craft custom displays easily.
  • Guided wizards & low-code configuration
    Use visual wizards to execute complex tasks, operations, and configurations. The platform’s low-code rules engine enables fast business rule deployment without programming.

🔗 Rules Engine & Operations

  • Real-time rules & automation
    Automate triggers—from simple alerts to complex multi-step operations—based on live data, with full GUI and JavaScript support.
  • Operations Scheduler
    Schedule remote tasks, firmware upgrades, and diagnostics efficiently, using a built-in scheduling engine.

🔐 Security & Multi‑Tenant Support

  • End-to-end security
    Security controls are built across all layers: device, connectivity, and data‑center. Includes encryption, access control, auditing, and secure firmware validation.
  • Multi‑tenant architecture
    Manage multiple organizations, workgroups, and sub-tenants with complete isolation—supporting flexible governance and role-based access control.

🔁 Integration & API Access

  • Northbound RESTful APIs
    Connect with BI tools, ERP/CRM systems, external applications or custom integrations using comprehensive REST APIs for management, data retrieval, analytics, and operations.
  • Connector module support
    Enhance integrations with connector functions that bridge data from external systems or third-party services into OpenGate.

📈 Data Lake & Analytics

  • Time-series ingestion & visualization
    Ingest high‑volume sensor data into a data lake. Use built-in modules to filter, aggregate, and visualize data for insights and trend analysis.

✅ Why These Features Matter

OpenGate unifies the entire IoT stack—device management, connectivity, edge processing, automation, security, and analytics—into a single, extensible platform. This means faster deployments, less overhead, and safer operations, especially for heterogeneous, large-scale, or industrial setups.

How to

📘 How-Tos: Step-by-Step Tutorials for OpenGate

Welcome to the How-Tos section—your hands-on guide to using OpenGate effectively. Whether you’re starting from scratch or building advanced workflows, these tutorials walk you through every step with clear instructions, screenshots, and best practices.

🏗️ Learning by Doing: A Real-World Scenario

To make this tutorial series more approachable and hands-on, we’ll follow a practical story that evolves across the different chapters. Instead of isolated examples, each tutorial will contribute to building a complete and functional solution using OpenGate. Our story follows an IT team tasked with monitoring a warehouse facility with an adjoining parking area. Their mission is to deploy sensors, collect data, and generate visualizations and alerts to ensure operational efficiency.

Throughout the series, we’ll walk step-by-step through their journey using the OpenGate IoT Platform to implement:

  • 🅿️ Presence sensors for parking slots These will help detect occupancy status in real time for internal logistics or client access.
  • 🌡️💧 Temperature and humidity sensors for the indoor areas Useful for monitoring environmental conditions in storage zones, employee workspaces, or sensitive equipment rooms.

Each one of the next chapters will build on the previous one — creating users, modeling data, provisioning entities, and building dashboards that reflect the real-world scenario of this IT team. By the end, we’ll have a fully functioning digital twin of their facility.

Let’s get started!


🔐 Pre-requisites

To follow these guides, make sure you have:

  • An active OpenGate account with access to a sandbox or production instance
  • Reviewed the Introduction, so you’re familiar with key concepts like Entities, DataStreams, Rules, Operations, and the platform architecture
  • Basic familiarity with REST APIs, JavaScript (for advanced tutorials), and Python (for Data Py integrations)

📚 How-Tos Overview

Each How-To guide is designed as a standalone tutorial but builds on the previous ones. You’ll find clear objectives, prerequisites, step-by-step instructions, and links to deeper documentation.

  1. Accessing OpenGate & Navigating the Console:
    Learn how to log in, explore the Web Console, and understand key sections.

  2. Users and Roles:
    Set up users, define roles, and assign permissions for secure and organized access control.

  3. Data Modelling:
    Create Entities and DataStreams to structure your IoT data model.

  4. Entity Provisioning:
    Onboard devices one by one or in bulk using wizards or Provision Functions.

  5. Data Collection:
    Send entities registered data via the Device Emulator and view data in entity panels.

  6. Connector Functions:
    Learn how to transform, enrich, and forward data to external systems.

  7. Workspaces & Dashboards:
    Build custom dashboards using widgets like LastValue, Entity Details, DataStream History, and Maps.

  8. Operations:
    Execute predefined tasks and operations on your entities from the catalog.

  9. Easy Mode Rules:
    Set up alerting and automation rules using the low-code GUI.

  10. Analytics and Datalab:
    Explore and work with your data using the OpenGate Data Lab superpowers with Jupyter Notebooks and python.

  11. Advanced tutorials
    Extend your OpenGate skills with Dashboard templates, Advanced rules configuration, and more.

    🚧 This “Advanced tutorials” section is currently under development 🚧


🤿 Deep diving

Here are a few key links to deepen your understanding:

  • REST APIs – Southbound & Northbound: Explore endpoints for device/data management and external system integration.
  • OpenGate Data Py: Pull data into Python notebooks—perfect for analytics and experimentation.
  • Analytics & AI Module: Learn how to leverage model training, inference pipelines, and integrated Jupyter notebooks.

✅ Next Step

Choose the first tutorial to begin your journey:

  • New to OpenGate? Start with “1. Accessing OpenGate & Navigating the Console”
  • Want to start building dashboards or automations? Jump to section 7 or 8

Let’s turn your IoT vision into reality—step by step with OpenGate!

Subsections of How to

1. Accessing OpenGate

🔐 OpenGate login page

To begin using OpenGate IoT Platform, the first essential step is accessing its Web Console. This interface serves as the GUI control center where users manage devices, define rules, monitor telemetry, and configure their IoT ecosystem.

Users must begin by navigating to the OpenGate Console URL. Upon reaching the login page, access is granted via credentials and TOTP (serving as Two Factor authentication method), depending on the authentication method configured for your organization.

OpenGate login Page

🛡️ TOTP Login

TOTP (Time-based One-Time Password) is a security protocol used in two-factor authentication (2FA) systems. It generates a temporary, one-time code that changes every 30 or 60 seconds, based on the current time and a secret key shared between the user and the service. This ensures that each code is unique and valid only for a short duration, adding an extra layer of protection to user accounts.

OpenGate 2FA page

⚠️ Lost Password?

It is possible to regain access to an account when standard authentication fails, such as forgetting your password or losing access to a two-factor authentication app (TOTP). Just click on the link below the login form and then you can retrieve your password

OpenGate lost password wizard

🏰 OpenGate home page

Once authenticated, users arrive at the Home page. This landing view presents the workspaces and dashboards that you have configured or the ones your administrator or some partner share with you.

OpenGate home page

The primary navigation menu is positioned on the left side of the screen. From here, users can enter dedicated sections such as Entities, DataStreams, Provisioning, Functions, Rules, Catalog, and Dashboards. Each section is structured to guide users through specific configuration workflows, offering both summary views and in-depth drilldowns.

The top bar of the console includes access to user settings, notifications, language preferences, and a global search tool. This enables quick access to specific entities, rules, or logs without needing to navigate the interface manually.

📚 OpenGate Sections

Once logged into the OpenGate IoT Platform, you can choose between some different tools among the following:

1. Workspaces and Dashboards

An intuitive, visual interface that centralizes OpenGate operations. Workspaces allow you to organize custom views tailored to their roles or operational needs, while Dashboards provide dynamic panels with charts, key metrics, and real-time KPIs. Perfect for quick monitoring and status analysis of devices and services.

We will cover this in detail in the step 7.Workspaces and Dashboards section.

2. OpenGate Web Administration

The core administrative console of OpenGate. Through this web interface, you can manage all the functionalities of your OpenGate IoT Platform account like provisioning and managing entities and digital assets, creating users and configure different access roles, build connector functions, data models, rules, operations, and so on.

It’s the main hub for fine-grained platform customization and we will use it several times during this tutorials.

3. Operations Support System

You can configure your own dashboards in the Workspaces and Dashboards OpenGate area, but we think that this area facilitates the management of the OpenGate IoT Platform Operations, directly out of the box. It allows you to monitor all the scheduled operations, its executions and details, so it’s a powerful tool for large-scale, real-time operations control.

This tool also offers you the possibility to launch and configure new Operations from wizards that allow you to configure operations for one, tens or millions of devices based on filters.

4. OpenGate Device Emulator

A test environment designed for developers and integrators. It simulates complete device behavior without requiring physical hardware, making it ideal for validating configurations.

You can use the Device Emulator to collect specific data as the same way that the device does, testing through all the workflow of the OpenGate IoT Platform and so, ensure that connector functions, rules and operations perform as expected before deployment.

5. Analytics (OpenGate Data Lab)

The analytical layer of OpenGate IoT Platform. It offers the possibility to work with your datalake, time series and data sets, by using our OpenGate Data Lab. This tool gives you all the powers of Jupyter Notebooks and python to work with your data: create analytics tasks to find patterns, build KPIs, build automated custom reports or periodic custom calculations over your data.

In the near future, we will expand this tool by adding an AI module to work with, directly from OpenGate.

2. Users and Roles

OpenGate Users and roles

OpenGate offers a flexible system for user and role management. The platform primarily distinguishes between administrators and regular users.

  • 🛠️ Administrators: Users with the highest level of access and permissions. They can manage key account settings, such as organization structure, user provisioning, datamodel and datastream configuration, and the creation of time series and datasets. Administrators are typically responsible for modeling the collected data, defining a structured environment through workspaces and dashboards, and sharing them with other users.

  • 👥 Platform Users: Users with more limited roles, focusing on solution operations. They interact with entities and digital assets, oversee values, manage rules, alarms, tickets, and more. Administrators may create specific dashboards and workspaces for these users, or they can build their own based on their access level.

Additionally, all roles are fully customizable, allowing fine-grained control over access and actions across the platform. While the deeper logic and configuration of roles is explored in the complete OpenGate API documentation, this guide focuses on user creation and role assignment via the built-in wizard.

👤 Creating a new user

Administrators can onboard users using a step-by-step wizard located in the “Users” section of the “Opengate Management” web console. Click on “+ Create user” within the users table to begin.

OpenGate user management page

Once selected, the wizard guides you through the essential onboarding fields:

  • User’s full name and email address: The email address will serve as the username and is required for password recovery.
  • Organization: Indicates where the user belongs. This could be a suborganization if multiple levels exist within your OpenGate account.
  • Role selection: Choose from predefined or custom roles.
  • Password setup: You can define an initial password, enforce a password change on first login, and configure TOTP (Time-Based One-Time Password).

⚠️ IMPORTANT: Passwords must contain at least 12 characters, including uppercase letters, lowercase letters, numbers, and symbols.

OpenGate user creation wizard

After completing the form, the user is registered immediately and can log in with the provided credentials. Permissions are granted based on the assigned role, determining their access scope and allowed actions.

🎭 Creating a custom role

Let’s take a quick view of this functionality. It is possible to create custom roles if you login as an Administrator user and go to “Opengate Management > Permissions”, then click on “+ Create web profile”.

OpenGate role administration page

This opens a wizard to help you define a new role with tailored permissions:

OpenGate role creation wizard

📌 IMPORTANT: Custom roles apply only to the OpenGate GUI. If your users need API access, remember that only the predefined OpenGate roles are supported at the API level.

3. Data Modeling

📦 Data Modelling in OpenGate

OpenGate provides you powerful tools to create and manage data models that define how information flows through the platform. This includes setting up entities, digital assets, and the structure used to monitor, analyze, and act upon collected data.

A well-defined data model allows you to:

  • Represent real-world objects (devices, vehicles, installations, etc.) as entities or digital assets
  • Define its properties, attributes or collected data as datastreams to capture metrics, behaviors, and status information
  • Enable visualizations creating dashboards and templates for your entities
  • Create rules that respond to data values or changes over time
  • Manage the entities creating operations

Data models, are organized into groups or Categories and, each category contains one or more datastreams, that are the representation of each entity data or property. The platform enables administrators to build these structures manually using the OpenGate web interface (or programmatically via the API). For a hands-on guide to building your data model and so, your data structure, let’s continue with the Datamodel configuration.

🏗️ Create your first Datamodel

We are going to create our first Datamodel in our OpenGate IoT Platform account (We assume that you have an OpenGate user with “admin” role). Following our story regarding the warehouse facility, we are going to create this structure where the intention is to represent parking slots and its status (the parking slot occupation) and facility rooms and its status (temperature, humidity and presence):

Data Model

  • ID: warehouse

  • Name: Warehouse

  • Description: Warehouse datamodel for parking and facilities

    Category 1

    • ID: parking
    • Name: Parking Data Stream 1
      • Data Stream ID: occupation
      • Data Stream Name: Parking Space Occupation
      • Data Stream Description: Parking space occupation detected
      • JSON schema: boolean

    Category 2

    • ID: facility

    • Name: Facility

      Data Stream 1

      • Data Stream ID: temperature
      • Data Stream Name: Temperature
      • Data Stream Description: Ambient temperature registered
      • JSON schema: number

      Data Stream 2

      • Data Stream ID: humidity
      • Data Stream Name: Humidity
      • Data Stream Description: Humidity registered
      • JSON schema: number

      Data Stream 3

      • Data Stream ID: presence
      • Data Stream Name: Presence
      • Data Stream Description: Presence detected
      • JSON schema: boolean

1. Open the Data model wizard

To do that, go to “OpenGate Management > Data Models” and click on “+ Create Datamodel”. This opens the wizard to create your new datamodel.

OpenGate OpenGate

2. Create the new Data Model

It is possible to import a JSON file to fill the form (this will be provided bellow), or to follow the wizard to fill the data model information. Because is your first datamodel, we recommend you to fill it manually to fully understand each step, so let’s create the data model “warehouse”:

OpenGate OpenGate

Allowed Resource Types: This field indicates to what type of entities this datamodel applies. For this demo, we will choose device and asset (We detailed the different entity types in the next section: 4-Entity Provisioning). For this tutorial, we will create later the assets to represent parking slots and facility rooms and some devices for the different sensors that each asset has.

3. Create the first category

So, next step, we are going to create the category “parking”:

OpenGate OpenGate

4. Create the first data stream

And then, create the datastreams from “+ ADD DATASTREAMS” button

OpenGate OpenGate

Lets start with the first datastream “occupation”:

OpenGate OpenGate

For this demo, just fill the first step and click on “EXECUTE”. Then our new datastream occupation is added to the parking category:

OpenGate OpenGate

5. Finish your work:

Continue at your own and add the other category and its datastreams. At the end, you should have the following:

OpenGate OpenGate

If all the information is correct, click on “EXECUTE” to create the datamodel, you will receive the following message:

OpenGate OpenGate

🎉 Congratulations you create your first datamodel successfully.


🗒️ Advanced tips

Here you can download the JSON to be imported in the wizard using the top option “Import/Export configurationOpenGate user management page

Copy the following JSON and paste into the code box:

Click here to see the JSON code!!
{
	"organization": "workshop",
	"identifier": "warehouse",
	"name": "Warehouse",
	"version": "1",
	"description": "Warehouse datamodel for parking and facilities",
	"allowedResourceTypes": [
		"entity.asset",
		"entity.device"
	],
	"categories": [
		{
			"identifier": "parking",
			"name": "Parking",
			"datastreams": [
				{
					"identifier": "occupation",
					"name": "Parking Space Occupation",
					"description": "Parking space occupation detected",
					"period": "PULSE",
					"access": "READ",
					"schema": {
						"type": "boolean"
					},
					"storage": {
						"period": "NEVER"
					},
					"unit": {
						"label": "",
						"symbol": "",
						"type": ""
					},
					"icon": {},
					"modifiable": true,
					"calculated": false,
					"required": false,
					"indexed": false
				}
			]
		},
		{
			"identifier": "facility",
			"name": "Facility",
			"datastreams": [
				{
					"identifier": "temperature",
					"name": "Temperature",
					"description": "Ambient temperature registered",
					"period": "PULSE",
					"access": "READ",
					"schema": {
						"type": "number"
					},
					"storage": {
						"period": "NEVER"
					},
					"unit": {
						"label": "",
						"symbol": "",
						"type": ""
					},
					"icon": {},
					"modifiable": true,
					"calculated": false,
					"required": false,
					"indexed": false
				},
				{
					"identifier": "humidity",
					"name": "Humidity",
					"description": "Humidity registered",
					"period": "PULSE",
					"access": "READ",
					"schema": {
						"type": "number"
					},
					"storage": {
						"period": "NEVER"
					},
					"unit": {
						"label": "",
						"symbol": "",
						"type": ""
					},
					"icon": {},
					"modifiable": true,
					"calculated": false,
					"required": false,
					"indexed": false
				},
				{
					"identifier": "presence",
					"name": "Presence",
					"description": "Presence detected",
					"period": "PULSE",
					"access": "READ",
					"schema": {
						"type": "boolean"
					},
					"storage": {
						"period": "NEVER"
					},
					"unit": {
						"label": "",
						"symbol": "",
						"type": ""
					},
					"icon": {},
					"modifiable": true,
					"calculated": false,
					"required": false,
					"indexed": false
				}
			]
		}
	]
}

then click on apply in form: OpenGate OpenGate

This apply the JSON in the wizard that can be used if desired, directly using the API.

4. Entity Provisioning

🌐 The OpenGate Entity Types

OpenGate models several types of entities to structure and manage your IoT ecosystem. These entities are:

  • Asset: A digital representation of something that may have one or more related devices. For example: a parking slot, a warehouse room, a patient, a wind turbine, or a solar plant.
  • Device: Typically a physical component such as a sensor or machine. Examples include temperature or motion sensors, industrial PLCs, water/gas meters, or generators.
  • Subscription: The communication contract associated with a device. This could be a 5G or NB-IoT mobile data plan.
  • Subscriber: The identifier that enables communication, usually a SIM or eSIM number.
  • Ticket: A special entity used to log work within the platform, such as on-site deployments or repair processes.
  • Organization: Represents a company or its sub-organizations.
  • Channel: A logical grouping of devices, often organized by location, function, or asset group.

⚙️ Provision new Entities

To begin collecting data from your ecosystem, you’ll need to provision entities in OpenGate. There are three ways to do this:

🎯 IMPORTANT CONCERN ABOUT ENTITY IDs

IMPORTANT: In case you are using OpenGate Cloud, take into account that the IDs for the entities are unique for all the OpenGate instance. OpenGate cloud is an unique instance for all our public cloud customers, and because of the behaviour of some manufacturers and protocols, the device ID must be as is without modifications (MAC address, UUID for people, and so on). We need this ID to identify the device correlation to your OpenGate account so it may occur that if you use custom identifiers, those identifiers already exist on OpenGate Cloud.

We always recommend that you should define a prefix to create virtual or simulated entities.

For this tutorial, define a [YourPrefix] to replace later the JSON provided with the examples.

🧙‍♂️ Using the Wizard

OpenGate includes a guided wizard to help you create new entities easily, step by step. Although the wizard is customizable, for this tutorial we’ll use the default version.

1. Open the wizard from the UI.

Go to “Opengate Management > Devices”, then click on “+ Create Device” and the wizard start OpenGate OpenGate

2. Fill the first step: Enter administrative information (name, type, organization, etc.).

As this tutorial’s purpose, we will fill the most commonly used fields, that are:

  • Unique Identifier: This is the unique ID of the device on the platform, use [YourPrefix]-ps-001
  • Organization: To what organization this entity belongs. We have not more in this tutorial, use workshop
  • Channel: Group of devices, in this tutorial we just have default_channel (workshop)
  • Plan and Service Group: We don’t go deeper in this tutorial for these fields but Plan indicates the traffic and data policy for this devices, and ServiceGroup, indicates the operations group of the entity. Use defaults
  • Specific Type: As the name indicates, this allows you to set the specific type of device. This works like a label, and later we will see how to create filters based on this field. The options here are predefined but an Administrator user can customize them. Use SENSOR
  • Administrative Status: This is the Administrative Status of the entity, use ACTIVE
  • Operational Status: This is the operational Status of this entity, use NORMAL

OpenGate OpenGate

🎯NOTE: The next steps are optional, but for this tutorial we will show you the most relevant standard fields

3. Step 2: Inventory

This step allows you to define other device info, lets fill the following:

  • Name: This is the name of the entity, ussually this is a commonly used name in your solution. Use: Parking Sensor 001
  • Serial Number: This is the serial number, usually a device serial number is an unique number for the hardware itself. Use: PS.AABBCCDDEE00001

This group of fields are not mandatory and we will not fill in this tutorial, but just for clarification the others fields are:

  • Description: Obvious, a free text description for the entity just in case we need some notes.
  • Topology Path: Some times there are devices that have not communication capabilities by themselves or that require another entity to play as gateway to send the information depending on the architecture requirements. This field allows you to provision the device that play this role for this entity. It is possible to choose one or create a new one from this same screen.
  • Hardware and Software/Firmware: Are used to indicate the inventory information for the hardware and software/firmware version of the device. This information is provisioned by a user, and may differ from the information collected from the device.

After fill the fields that we need, you should see this:

OpenGate OpenGate

4. Step 3: Location

It is possible to define the location of the devices. For that this wizard step allows you to use directly the map to click on the entity location. Additionally, you can fill the information manually.

For this demo purposes use the location that you want. Try to click in the map, you use the map left bar to show it in full screen

OpenGate OpenGate

5. Step 4: Security

This step allows you to provision the standard OpenGate security options. We will not use it in this demo to easy accomplish the tutorial but you can provide here:

  • Trusted Boot: If configured a device must present this value on each collection event
  • Certificates: An administrator can add and manage certificates for your OpenGate organization
  • DLMS security params: DLMS devices are supported by OpenGate for different protocols and so, you should provide its security information to use them.

OpenGate OpenGate

6. Step 5: Interfaces

As we mention before in this HowTo’s serie, OpenGate can work with several parts of the IoT Value Chain and so, our platform allows you to manage and monitor even the communications layer, assotiated with your entities. This includes its communication modules, so from here you can provision the communications modules that the device has

OpenGate OpenGate

For this demo, we will add one communication module (a device can have many) and we will add a Mobile communications module.

OpenGate OpenGate

Click on “ADD” button and the platform will fill default values for the Subscription and the Subscriber. In case you have a real device with this capabilities, and so your own communications layer, you can fill this step form with your real values. In any case, you should see something like this:

OpenGate OpenGate

7. Step 6: Custom

This field allows you to fill any other “provision datastream” from the OpenGate standard catalog, or another one that you create in your own datamodel by searching it from the input field

OpenGate OpenGate

8. Confirm your settings

Click on “Execute” and check the confirmation message OpenGate OpenGate

🎉 Your new Entity is created!

Finish your work

Now, to continue this tutorial, you can go to the bottom of this chapter and create all the needed entities contained in the excel files using the wizard, or give a try to the provision functions on the section bellow “Bulk Provisioning”

🚀 When to use this method:

Best for onboarding a small number of entities manually or quick add unitary devices. It is especially useful during prototyping, demos, or for users unfamiliar with API or scripting tools.


📦 Bulk Provisioning

Bulk provisioning enables you to register multiple entities at once via uploaded templates and custom logic. This method uses Provision Functions, which allow you to apply JavaScript logic to Excel files to create, modify, or remove entities in bulk. The configured JavaScript logic will be applied to each row and the result will be noted in an additional column. A great feature is that, after the provision function execution, you can download the result file to check what happened with every row, so you can fix the rows with problems if exists and execute again the provision function with this file so only the pending rows will be executed (what a powerful tool! right?)

Let’s use this method to provision some sample entities

1. Open the wizard

Go to “Opengate Management > Provision functions”, then click on “+ Create Provision Function” and the wizard start OpenGate OpenGate

2. Step 1: Administration info

Fill the Name of the Provision Function. For this tutorial, we are going to configure our provision function to create rooms as assets for our warehouse from an excel file, so we call it CreateRooms. This will create as many assets as rows contained in the Excel file during the provision function execution.

OpenGate OpenGate

3. Step 2: configure your provision function

Now we are going to create our provision function to create assets… The OpenGate Provision Functions allows you to use javascript to manipulate the excel file and to do whatever you need during the provision function execution.

The parameters you need to indicate are:

  • Source file settings: “Sheet Name” of the file, and “Header row” number fo find the data to be used during the provision proccess. Use: Sheet1 and 1
  • Result file configuration: This is the name of the column where the result of each row will be shown.
  • Provision function definition: The javascript code to execute within the provision funtion.

To this tutorial, we prepare the code for this provision function that creates rooms as assets, so you can download it and test this functionality:

Copy the following JavaScript and paste into the code box:

Click here to see the JavaScript code!!
/* MANDATORY FUNCTIONS */

function normalizeRawObject(rawObject) {
   try {
      var normalizedObject = {
         organization: readMapValue(rawObject, 'ORGANIZACION', '', 'A'),
         identifier: readMapValue(rawObject, 'IDENTIFICADOR ESTANCIA', '', 'B'),
         name: readMapValue(rawObject, 'NOMBRE', '', 'C'),
         adminstatus: readMapValue(rawObject, 'ESTADO ADMINISTRATIVO', '', 'D'),
         serviceGroup: 'emptyServiceGroup',
         specificType: 'ZONE',
         channel: 'default_channel'
      };
      return normalizedObject;
   } catch (e) {
      printLog('>> normalizeRawObject(): exception: ' + e);
      throw e;
   }
}

function actionsPlanning(normalizedObject) {
   var actions = [];

   printLog('Row data - identifier: ' + normalizedObject.identifier);

   var assetExists = checkAsset(normalizedObject.identifier);
   var assetEntity = generateAssetEntity(normalizedObject);

   if (assetExists){ /* PUT */
      actions.push(PATCH_ASSET_ACTION(assetEntity, 'Patch asset entity'));
   } else { /* POST */
      actions.push(CREATE_ASSET_ACTION(assetEntity, 'Create asset entity'));
   }

   return actions;
}

function customErrorTransformer(errorManager) {
   return errorManager.getFirstErrorAsString();
}


/* EXTRA FUNCTIONS */
function generateAssetEntity(normalizedObject) {
    try {
        var assetEntity = new Entity()
            .addDatastream('resourceType', 'entity.asset')
            .addDatastream('provision.administration.organization', normalizedObject.organization)
            .addDatastream('provision.administration.channel', normalizedObject.channel)
            .addDatastream('provision.administration.serviceGroup', normalizedObject.serviceGroup)
            .addDatastream('provision.administration.identifier', normalizedObject.identifier)
            .addDatastream('provision.asset.identifier', normalizedObject.identifier)
            .addDatastream('provision.asset.name', normalizedObject.name)
            .addDatastream('provision.asset.administrativeState', normalizedObject.adminstatus)
            .addDatastream('provision.asset.specificType', normalizedObject.specificType)
            ;
        printLog("entity asset generated");
        /*printLog(JSON.stringify(assetEntity.entityJson,null,'\t'));*/
        return assetEntity.entityJson;
    } catch (e) {
        printLog('>> generateAssetEntity: Exception: ' + e);
        throw e;
    }
}

You should obtain this:

OpenGate OpenGate

4. Step 3: Summary and execute

As with the other OpenGate wizards, the final step always shows you the summary of what you configured to confirm and the “EXECUTE” option.

OpenGate OpenGate

👏 You created your first provision function!

5. Using the provision function:

Now that we have our provision function, let’s use it to create our assets that represents the rooms of our warehouse:

5.1 Go to “OpenGate Management > Bulk provisions (Advanced)” and click on “Upload Bulk File (Advanced)” This opens the wizard to execute a provision function process OpenGate OpenGate

5.2 Step 1: Choose our Provision Function Choose our new provision function “CreateRoomsOpenGate OpenGate

5.3 Step 2: Upload your file Use the file 🗒️provision_rooms.xlsx. This file contains some rooms to be populated into our OpenGate.

⚠️IMPORTANT: Please edit them and change [YourPrefix] and [YourOrganization] with your values

After upload the file, you will see the first rows as preview OpenGate OpenGate

5.4 Step 3: Preview results Because this is a critical functionality, this step allows you to check as preview what the provision function selected will do with the first rows. OpenGate OpenGate

5.5 Step 4: confirmation We want to repeat this… Because this is a critical functionality, you must check the doble confirmation before click on “EXECUTEOpenGate OpenGate

6. Check the process result

The execution of a Provision function may take some minutes depending on the actions, rows and so on. For that, the process will execute in background and the execution is shown on the screen, Check that the status is “IN_PROGRESS

OpenGate OpenGate

Click on refresh to check if the process is “FINISHED” and check the results on columns “Processed”, “Successfull” and “Error”. Remember, you can download the result file to check the process row by row. You will se something like this:

OpenGate OpenGate

🚀 When to use this method:

Perfect for mass onboarding, data migrations, or applying business logic during entity creation and modification, o even to delete groups of entities.


🏗️ Continue the tutorial

To finish the tutorial properly, use the method you prefer, wizard or bulk creating another provision function, to create the entities containted in this files:

  • 🗒️prov_function_sensors.js: This contains the javascript code of the provision function to populate sensors and link them (as related entity) to the assets created previously.
  • 🗒️provision_rooms.xlsx: This file contains some rooms for our warehouse that will represent our facilities for the tutorial.
  • 🗒️provision_sensors.xlsx : Here you can find the devices that will be assigned to the different rooms

Check our new entities

When you finish this chapter, you should see the following entities:

Devices:

Go to “OpenGate Management > Devices” and you should see your devices OpenGate OpenGate

Assets:

Go to “OpenGate Management > Assets” and you should see your assets OpenGate OpenGate


🚨 Important notes

🆚 Provision vs Collection

The data or information that we entered during this chapter is recorded in OpenGate as Provision Information in Provision Data Streams (OpenGate standard or custom data streams from your datamodels). This means that this information is entered by someone and is not collected from the device.

The data collected directly from the device through the south API, passing through all the workflow that we discussed in the OpenGate Introduction (Connector functions, Rules, and so on) is recorded in the platform as Collection data streams datapoints.

IMPORTANT: This functionality allows you to distinc the information provided vs the information collected, and is a powerful tool, because cometimes the inventory information differs from the collected information and you may detect missmatchs between the information of your entities what you think you have and the information that the entities realy have.


⚠️ Using bulk for delete

Is posible to use the provision functions to delete entities but remember… some actions that you perform on OpenGate sometimes can not be undone…

We provide you this two examples for provision functions to delete entities to clean your workshop entities if needed. You can download the javascript files and create new provision functions with the code provided:


🔌 Using the OpenGate API REST

Remember that OpenGate’s REST API offers all the functionality managed from the GUI so, for more control and automation, OpenGate’s REST API lets you create entities programmatically that is so powerful in serveral ways.

1. Prepare your provisioning JSON object according to the OpenGate schema.

You need to build a valid JSON following the specification of the OpenGate Provision API. Go to https://documentation.opengate.es/api/management/organizations/channels/entities/devices/index.html#api-specification

2. Retrieve your API key from the platform.

For security concers, each OpenGate user, has its own API KEY. Your can obtain your API KEY directly from the OpenGate GUI. Just go to the OpenGate web console and click on the top right user icon button, then click on copy next to APY KEY

OpenGate OpenGate

Annotate this API KEY and… of course, do not share it with anyone

3. Send the request to OpenGate.

Send the request to the provision endpoint: https://api.opengate.es/north/v80/provision/organizations/[YourOrganization]/devices/[YourEntityID]?flattened=true

4. 🎉 Entity created!

If you receive a 200 as response, all is fine, if not, fix the errors and repeat the process

🚀 When to use this method:

Ideal for backend integrations, automated deployments, or provisioning at scale when combined with external systems.

5. Data Collection

📡 Data Collection in OpenGate

Once entities and devices are provisioned, the next step is to start collecting data. OpenGate offers the OpenGate Device Emulator to simulate, ingest, and so check your OpenGate workflows in real time. This chapter focuses on how to send data to the platform, monitor its flow, and validate that everything is working as expected.

In our ongoing scenario, the IT team has already provisioned ambient and presence sensors across the warehouse and parking area. Now, they want to verify that these sensors are sending data correctly and that the platform is capturing it.

IMPORTANT: All the data collected using the OpenGate Device Emulator will be recorded as collection datapoints for the data streams that you use.


🧪 Simulating with the Device Emulator

OpenGate includes a built-in Device Emulator that allows users to simulate telemetry from virtual devices. This is especially useful during testing phases or when physical devices are not yet deployed.

For this tutorial we are going to:

  1. Navigate to the Device Emulator section in the console.
  2. Select one of our warehouse sensors.
  3. Send test data for that sensor.
  4. Repeat the process with a second device to simulate multiple inputs.

1. Navigate to the Device Emulator section in the console.

Go to the OpenGate web console and click on the left menu on “OpenGate Device Emulator”. We recommend you to choose a new tab using the nested button “NEW WINDOW”

OpenGate OpenGate

2. Collect data

Choose the entitiy to emulate. We will use [YourPrefix]-ws-stemp02 from our tutorial. In this tutorial, this device represents a device with has temperature and humidity sensors OpenGate Device Emulator page

As you can see, there are some tabs to gives you access to powerful tools to emulate the device:

  • SYSTEM: This allows you to collect the OpenGate standard inventory data streams emulating the device
  • RECOLECTION: From here you can emulate the data streams collection that you want. We will use this in the tutorial.
  • OPERATIONS: Here you can emulate the Operation Response from the device to check operations workflows.
  • MAP: This allows you to collect a location event directly from a map.

OpenGate OpenGate

For this tutorial, we will use the “RECOLECTION” tab to send some basic data collection for our data streams. click on “RECOLECTION” tab, then enter temperature and humidity in the “Datastream id” box. This add to the collection data form, the datastreams selected so you can enter some value OpenGate OpenGate

click on “SEND DATA and choose “Once Now” to send one collection event. You may use the emulator as periodic event generator using “Once Every” option, but for this tutorial, we just need to send one value.

OpenGate OpenGate

Click on “SEND DATA” and a confirmation message appears:

OpenGate OpenGate

3. Send more data!

Now choose the entitiy [YourPrefix]-ws-spres02 from our tutorial, this represents a presence sensor. Just choose presence datastream and check the box to record a “true” value for presence detected.

Click on “SEND”, and “SEND ONCE” as the last time.

OpenGate OpenGate


📊 Viewing Data in Entity Panels

Once data is received, it can be visualized directly in the Entity Details Panel. Let’s view the data and relationship between entities and assets

1. Checking data is received in devices

Go to “OpenGate Managemenet > Devices” and click on the menu for “[YourPrefix]-ws-stemp02”, then choose “Entity Details Panel”

OpenGate OpenGate

Here you can see the last value for the data streams that we use for the test: temperature and humidity:

OpenGate OpenGate

Now repeat the process for [YourPrefix]-ws-spres02 and check that the “presence” value is collected in the data stream. You will see something like this: OpenGate OpenGate

2. Checking data is populated to the asset

As you may notice, both devices [YourPrefix]-ws-stemp02 and [YourPrefix]-ws-spres02 are related with the [YourPrefix]-ws-room02 asset. That means that both devices are present in the same room of our warehouse and then both devices provide data about the status of that room, so the data of bothe devices will be populated to the asset

To check this, just go to “OpenGate Management > Assets” and click on the menu for the [YourPrefix]-ws-room02 OpenGate OpenGate

As you can see there are some relevant information here… On one hand, you can see that the related devices for that asset are [YourPrefix]-ws-stemp02 and [YourPrefix]-ws-spres02 and, additionaly you can check that the data collected for that devices, is recorded also for the asset so you we have values for temperature, humidity and presence.

OpenGate OpenGate


🧠 Pro Tips

  1. Using the emulator to simulate devices helps you to test dashboards, connector functions, rules, operations and so, the entire OpenGate workflow that you are configuring. You can also combine emulated data with real devices to validate hybrid scenarios.

  2. On the “RECOLECTION” tab, you can IMPORT/EXPORT a JSON file with the datastreams and values to use so you may prepare different sets of data to work in a more efficient way.

  3. The exported JSON from the “RECOLECTION” tab, works directly using OpenGate South API collection endpoint. Just paste the JSON on the POST request body to test it!

6. Connector Functions

⚡ The Superpower of Connector Functions

What if your devices don’t follow the OpenGate standard message schema?… Use Connector Functions. Connector Functions are one of OpenGate’s most powerful features. They allow you to transform, enrich, and adapt incoming data so it can be properly collected and processed by the platform.

Whether your devices send custom payloads, use different field names, or require preprocessing, Connector Functions give you the flexibility to make it work.


🧪 Connector Function Example

Let’s walk through a practical example. We’ll create a Connector Function to receive a JSON payload using the OpenGate Standard HTTP connector and adjust it to collect the values correctly.

🔧 Step 1: Create the Connector Function

1. Open the wizard Go to OpenGate Management > Connector Functions and click on New Connector Function.
OpenGate Connector Functions page

2. Fill administrative data Let’s configure our Connector Function administrative data:

  • New Connector function?: In case we have others we could clone another as template, but this is our first one, so click on New Connector function
  • Name: for this tutorial, use testCF
  • Operational Status: You can choose if you want to enable or disable this CF, choose Production
  • Type: We said that is a superpower because not only we can use the Connector Functions to collect data. We can use it to manipulate operations request or responses. For this tutorial, choose COLLECTION

OpenGate Connector Functions Wizard step1

3. Configure criteria This allows you to decide what of the available protocols will activate this Connector Function and the URI to use as target by the devices collection process. For this demo, we will use https:// and for the URI enter: testCF. As you can see, our endpoint will be https://api.opengate.es/south/v80/devices/{deviceId}/testCF where {deviceID} must be replaced by the device identifier.

OpenGate Connector Functions Wizard step2

4. Definition, Let’s Coding! All the power of JavaScript and a lot of predefined functions and connectors are available for you to build your connector function. For this tutorial, the idea is to show you the power of this functionality, so let’s code a basic connector function that take the values of the payload (we will see later the payload and collect them to the device datastreams).

Check the code below, read the code comments to better understanding:

// Connector function start
// We have vailable the "entity" information which triggers the Connector Function so we can extract some data from it
const orgID = entity._value('provision.administration.organization');
const entityID = entity._value('provision.device.identifier');
var date = new Date();
const time = date.getTime().toFixed(0);

//The OpenGate "logger" is available for you to use with some levels like DEBUG or TRACE
logger.debug('Executing Connector Function...');
logger.debug('Payload received in ORG: ', orgID, 'for entityID: ', entityID, ' - payload:  ', JSON.stringify(payload, null, 2));

// Datapoint collection using payload data
collection.addDatapoint('temperature', payload.temp, time);
collection.addDatapoint('humidity', payload.hum, time);
collection.addDatapoint('presence', payload.pres, time);
logger.debug("CF will collect the following: ", collection);

//Send the collection object with the datastreams information
collection.send()

Use this code, copy and paste into the code box and click on “VALIDATE CODE” ⚠️ IMPORTANT: Choose JSON as Payload type in the top part of the screen and click on validate code. Then, go to the next step.

OpenGate Connector Functions Wizard step3

5. Review the summary and EXECUTE! You can check what we will do with this connector function from the summary. Click on “EXECUTE” to save it.

OpenGate Connector Functions Wizard step4

🐞 Step 2: Prepare for Debugging

Now that we have created our Connector Function, we want to ensure that it works so, for that OpenGate offers the possibility to debug it directly on the platform. We need a couple of things…

1. Use a Test Device

Remember our first device: [YourPrefix]-ps-001?
We’ll use it to test the connector function.

  • Go to OpenGate Management > Devices
  • Click EDIT from the entity menu
  • In the wizard:
    • Set Administrative Status to TESTING
    • Set Operational Status to TESTING
    • Click EXECUTE

Edit device status

2. Open Connector Function Logs

Go to OpenGate Management > Connector Functions
Click on OPEN LOG for your connector function (testCF)
In the log viewer, set the log level to DEBUG to see detailed execution traces that we configured previously.

Connector Function logs


🔌 Testing with the OpenGate REST API

OpenGate’s REST API provides full access to platform functionality, including data collection. The endpoint used by the Device Emulator is the same one your physical devices will use via the HTTP connector.

1. Prepare Your JSON Payload

For this tutorial, use the following example payload:

{
  "temp": 23.5,
  "hum": 48,
  "pres": true
}

2. Retrieve Your API Key

Each OpenGate user has a unique API key for authentication.

  • Go to the OpenGate Web Console
  • Click on your user icon (top right)
  • Copy your API key from the dropdown

API Key retrieval

⚠️ Important: Keep your API key secure and never share it.

3. Send the Request

Send a POST request to the collection endpoint replacing {{Device-ID}} with [YourPrefix]-ps-001:

https://api.opengate.es/south/v80/devices/{{Device-ID}}/testCF

Use a tool like Postman and include your API key in the headers:

X-ApiKey: [YourAPIKey]
Content-Type: application/json

If the response status is 201 Created, your data was successfully received.

Postman example


📋 Check Connector Function Logs

Return to the Connector Function log viewer and inspect the execution trace.
If the function ran successfully, you’ll see the transformed payload and confirmation of data collection.

Connector logs


📊 Validate in Entity Details

Finally, go to OpenGate Management > Devices
Open the Entity Details Panel for the device "[YourPrefix]-ps-001"
You should see the collected values displayed in the corresponding datastreams.

Entity Details panel


🚀 Why Connector Functions Matter

Connector Functions are more than just a technical feature — they’re a gateway to flexibility, interoperability, and control.

In real-world IoT deployments, data rarely arrives in a perfect format or the firmware devices cannot be manipulated. Devices from different vendors, legacy systems, or custom firmware often send payloads that don’t match the expected schema. Without Connector Functions, this would mean costly integrations, manual preprocessing, or limited compatibility, as well as generate and deploy new software versions when devices or firmwares change…

With OpenGate’s Connector Functions, users can:

  • 🧠 Transform incoming data to match their datamodels, regardless of origin for different supported protocols (HTTPs, COAPs, DLMs, etc.).
  • 🧩 Enrich telemetry with metadata, calculated fields, or contextual information and fill other datastreams with values calculated in processing time.
  • 🔄 Normalize formats across heterogeneous devices and protocols.
  • 🛠️ Adapt to change — update logic as devices evolve or business rules shift directly from the OpenGate Web Console.
  • 📈 Accelerate onboarding by removing friction between device and platform, or additional services.

Whether you’re integrating industrial PLCs, smart meters, or custom-built sensors, Connector Functions empower you to make OpenGate work for your data — not the other way around.

💡 Pro Tip: Use Connector Functions to build reusable logic across multiple devices or projects. They’re not just a patch — they’re a strategic tool for scalable IoT architecture.

7. Workspaces & Dashboards

🧭 Workspaces & Dashboards in OpenGate

In the previous steps, we’ve covered everything needed to collect data in OpenGate and make information from devices and assets available on the platform. We’ve provisioned entities, configured datastreams, and started receiving real-time data even adjusting the data using Connector Functions.

Now it’s time to shape that data so we can work with it effectively and build our IoT solution on top of OpenGate. To do this, we’ll use Workspaces, which allow you to visualize, organize and build your solution areas, and Dashboards, where you usually work to monitor, explore, and interact with entities data in real time.

  • A Workspace is a container that organizes dashboards around a specific context — such as a location, a functionality, a project, or a team.
  • A Dashboard is a visual canvas within a workspace, composed of customizable Widgets that display data from entities, datastreams, or assets and allows you to interact with your entities.
  • Widgets are the building blocks of dashboards. OpenGate has a huge catalog that includes customizable tables, maps, charts, gauges, HMIs, and more — each designed to present data in a specific format.

📌 Note: Workspaces can be shared with other users in your organization. This allows administrators to create curated views and make them available to operators, analysts, or any users group.


🏗️ Creating a Workspace and Dashboard

Let’s continue with our ongoing warehouse scenario. We’ve already provisioned sensors and collected data. Now, we’ll create a workspace and dashboard to visualize that information.

🗃️ Step 1: Create a Workspace

  1. Go to OpenGate Management > Workspaces, you can open in new window
  2. Click on New Workspace

OpenGate Workspace creation

  1. Now fill the information required and click on “OK”:
    • Name: Use Warehouse Monitoring
    • Description: Enter something if you like, for example: Our awesome IoT solution
    • Choose an icon: OpenGate has a huge predefined library, use ogicon-industrial
    • Visualization: Check “Show at home” to be able to see this workspace on the home screen.
    • Banner: It is possible to redefine the banner or background image, keep it blank for this tutorial

OpenGate Workspace creation

👏 Done! OpenGate redirects you directly to the new workspace view


📊 Step 2: Create a Dashboard

Let’s continue. Inside the workspace, you just need to click on “+ NEW DASHBOARDOpenGate Workspace creation

Now, we need to configure our dashboard. For this tutorial we fill the following data.

  • Name: use Warehouse Overview
  • Icon: choose one, for example ogicon-WD
  • Image: Use default or something like this: 🖼️warehouse.jpg

OpenGate Dashboard creation

Click on “OK” and your new dashboard is created

OpenGate Dashboard creation


🧩 Adding Widgets

Empty right? Let’s add two basic widgets to visualize our data. click on “Add Widget” and check the catalog OpenGate Widgets Catalog

📋 Entities list widget

This widget is a table which shows entities in table format we will use this to show all our entities and its more relevant data.

  1. Click Add Widget and look for Entities List OpenGate Widgets Catalog

  2. Click on “Add” and the widget configuration appears. Let’s configure our new widget. OpenGate Widgets

  3. For this tutorial, we will focus in the warehouse rooms, so fill the following:

    • SELECT COLUMNS TO ADD: This allows you to indicate what columns you want to see. The information is selected from datastreams list, OpenGate standard and custom, for provision, and collection datastreams. Fill this with: temperature, humidity, presence from our datamodel “warehouse” and provision.device.specificType, provision.device.identifier, provision.asset.identifier from the OpenGate standard data models. You can choose what datastream property show in the table. Check on “Current Value” and click on “+ ADD
    • PAGINATION: The standard value is 10, change it to 20.

OpenGate Widgets

  1. Then you will see the columns that the widget will show. Keep it as is, but you can change some things such order, name or apply formaters, we will see this later OpenGate Widgets

  2. Save the widget and the widget will be added to the dashboard automatically.

OpenGate Dashboard creation

Use the bottom-right arrow icon on the widget to adjust the widget size, and click on “SAVE” icon in the Dashboard toolbar.

OpenGate Dashboard creation

🎉 Congratulations you have your first dashboard with one widget!!!

🗺️ Map Widget

Let’s continue by adding a map widget.

  1. Like you performed before, click Add Widget and choose Maps The “Maps” widget is another powerful tool that can be configured to show a lot of customizable information of your entities, directly over a geolocated map. For this tutorial, we keep the widget as default. But lets review what the widget will show:
  • “provision.device.location”: This marker represents the provision location of a device
  • “entity.location”: This marker represents the location collected for a device

OpenGate Widgets

  1. Save the widget and move it to the right part. Try to achieve this

OpenGate Dashboard creation

✅ Finish your work

I know, I know… we did not enter the location for all devices, but you can do it with what you have learned in this tutorial. I give you a clue, you can do it in two ways depending on the information that you want to represent:

  1. Use OpenGate Device Emulator, to collect the location of the entities
  2. Use EDIT device option, from the menu of each entity in the widget table, to provision the location of the entities

Use both if you wish and refresh the dashboard, now you see the map position. Enjoy the Maps widget, move around, CNTRL+SCROLL to zoom in/out, and click on some device to see its information. Look this: OpenGate Dashboard creation


🔍 Applying Filters

We have configured a great dashboard, but we can adjust it to refine the dashboard view. Because we want to use this dashboard as “Warehouse Overview”, we’ll create a basic filter to only see our warehouse rooms information.

🧮 Filter the “Entities list” widget

Remember, these entities are assets. The entity type is recorded in OpenGate standard datamodel using ‘resourceType’ datastream. So that, lets reconfigure our widget to apply a filter:

  1. Open the widget configuration from the widget menu: OpenGate Dashboard creation

  2. Go to the “ADVANCED” tab and click on “Private filterOpenGate Dashboard creation

  3. Choose resourceType and click on “ADD CONDITION
    OpenGate Dashboard creation

  4. Choose “eq” (that means equals) for the condition operator, and fill entity.asset in the value. Click on “APPLY FILTEROpenGate Dashboard creation

  5. Let’s do a couple of things more.

  • Add a new column using asset.identifier datastream and choose at. This will create a new column that shows each time some asset information is updated by one of its related devices. Edit it and change its name to Last coms.
  • Remove columns provision.device.specificType and provision.device.identifier, note that these datastreams are relevant for devices, not for assets, so we can safely remove them from this view!

You should have something like this: OpenGate Dashboard creation

  1. Click on “SAVE” to apply the changes. The widget will now display only assets, with the updated column layout OpenGate Dashboard creation

This will ensure that only assets (not devices or other entities) are shown in the dashboard.

🗺️ Do the same with the “Map” widget

Repeat the job with the map widget. All OpenGate widgets have similar configuration options so you know what you need. You should accomplish something like this. Only the information from your assets is visible: OpenGate Dashboard creation

➕ Want more?

Repeat all the process and create another entities List widget filtered to show only devices and change the widget names to achieve this dashboard: OpenGate Dashboard creation


🎨 Applying Formatters

Although this may not be part of this basic tutorial, we think that will be relevant for you to know about this feature… Let’s improve our dashboard to another level of customization using “formatters”. This allows you to customize with all the power of web development and its native technologies HTML, CSS and javascript.

Here you have infinite possibilities so for this tutorial we will do the following to our “WAREHOUSE ROOMS” widget:

  1. Format dates: The ISO format is not for everybody. Let’s convert a raw ISO timestamp like 2026-01-01T12:00:00Z into a readable date.
  2. Temperature colors: Apply a code color for temperature datastream values
  3. Presence indicator: Remark the presence detected

NOTE: We assume that you have knowledge in web development, HTML, CSS and javascript.

📅 1. Format dates

Formatters are both simple to use and incredibly powerful. Let’s start with a formatter code to change date appearance.

  1. Open the widget configuration and click on “formatter” on the column ‘Last coms.’ OpenGate Dashboard creation

  2. Paste the code below, click on “EVALUATE” to check code errors, and “OK” to save your changes OpenGate Dashboard creation

//check if we have a value for the datastream
if (value) { 
	var date = new Date(value);
    if (date=="Invalid Date"){
      //the value is not valid
      cellFormatter.customValue = "---";
    }
    else
    {
      //format dat to the locale string
      cellFormatter.customValue = date.toLocaleString();
    }
}

🌡️ 2. Temperature colors

Repeat the process with the column Temperature and the code below

if (value) { //If value exists
  if (value < 18){
    // Cold
    cellFormatter.style = 'color:lightblue;'; 
  }else if (value >= 18 && value < 22 ){
    // ideal temperature... using custom green color
    cellFormatter.style='color:#20BB38FF;';
  }else if (value >= 22){ 
    //more than 22 ºC is hot...
    cellFormatter.style='color:red;';
  }else{
    //grey
    cellFormatter.style='color:#808080;';
  }
}

👁️ 3. Presence indicator

One more time. Edit column Presence

if (value === true) {
    //You can change the cell value for a custom one and even use emojis 🎉🎉!!
    cellFormatter.style = 'color:green;';
    cellFormatter.customValue = "<strong title='TRUE'>TRUE 🟢</strong>";
}  else {cellFormatter.customValue = "<span title='FALSE'>FALSE 🔳</span>";cellFormatter.style = 'color:grey;';}

🎉 4. Check the result

Click on “SAVE” on the widget configuration and check the result… Pretty powerful, right?

OpenGate Dashboard creation

8. Operations

⚙️ Operations in OpenGate

Once your dashboard is set up and filtered, it’s time to take action. OpenGate allows you to send operations to your devices directly from the dashboard using the Operations feature. But first, we need to configure a few operations to make them available.


📚 Understanding the Operations

Before sending any operation, it’s important to understand how operations are defined and managed in OpenGate:

  • Operations are predefined actions that can be executed on entities (devices, assets, etc.).
  • Each operation includes:
    • A name and description and target entity types
    • GUI Form definition and STEPS
    • Optional parameters
  • OpenGate offers a predefined Operations catalog out-of-the-box for: Reboot equipments, power on/off devices, refresh_info, refresh_presence, firmware update through bundles, and more.
  • You can create your own custom operations, but we do not deeper in this basic tutorial.

🛠️ Configuring a Sample Operation: REBOOT

Let’s create a simple operation to reboot a device. This Operation already exists on the OpenGate Operations catalog and it is a good approach to learn how operations work.

1. Create the REBOOT Operation

  1. Go to OpenGate Management > Operations and click on “+ Create Operation”. OpenGate Operation creation

  2. Click Clone from catalog and choose REBOOT_EQUIPMENT. Keep data as default and click on next

    • Name: REBOOT_EQUIPMENT
    • Title: Reboot Equipment OpenGate Operation creation
  3. Check Operation configuration.

    • JSON Schema, Another powerful tool: OpenGate allows you to define custom Operation Wizards using JSON Schema forms.
    • Additionally, the “Operations” allows you to define STEPS. Because some actions may require a complex workflow in your devices, we design this method so you can notify the platform from the device when each step is completed or failed and then register the full operation traceability on the platfom. For this tutorial, because we used the “clone the operation” before, this operation has only one step and you cannot modify it. OpenGate Operation creation
  4. Preview your JSON Schema Operations form:

    • You can click on “PREVIEW” tab to check how your form will be displayed and even test it. Just to let you know, this operation has only an input field component, to choose between “hardware” or “software” reboot type to be send to the device. OpenGate Operation creation
  5. Create your operation and check the confirmation message on the summary OpenGate Operation creation

Perfect! you have created your first Operation successfully. Let’s launch it, right?

2. Testing with the OpenGate Device Emulator:

Do you remember our OpenGate Device Emulator?? We can use it to emulate also operations responses from devices and test our operations workflow.

  1. Open the OpenGate Device Emulator in a new window
  2. Select one of our devices, for example the device [YourPrefix]-ps-001. and go to the “OPERATIONS” tab

OpenGate Operation creation

  1. Configure the responses. Fill the following information and click on “SAVE”:

    • Choose Operation: REBOOT_EQUIPMENT
    • Check the “ENABLE RESPONSE” option. This indicates if Device Emulator must respond or not
    • Copy/paste the code below to respond the operation request:
    operaResponse = {
    "operation": {
       "response": {
          "name": "REBOOT_EQUIPMENT",
          "timestamp": Date.now(),
          "resultDescription": "Success",
          "steps": [
          {
             "timestamp": Date.now(),
             "description": "The system will be rebooted",
             "name": "REBOOT_EQUIPMENT",
             "result": "SUCCESSFUL"
          }
          ],
          "resultCode": "SUCCESSFUL",
          "id": operaRequest.operation.request.id
       }
    },
    "version": "1.0"
    };

OpenGate Operation creation

  1. Now keep open the OpenGate Device Emulator log and return to our dashboard “Warehouse Overview” OpenGate Operation creation

🚀 Sending an Operation from the Dashboard

Now let’s send the operation from your dashboard and validate the result.

  1. click on “EXECUTE OPERATION” in the device [yourPrefix]-ps-001 menu. This opens the Operation wizard OpenGate Operation creation

  2. Choose our operation Reboot Equipment and click on “Next” (You can execute it directly, but then the predefined “HARDWARE” reset is send) OpenGate Operation creation

  3. Choose SOFTWARE just to play with the component. There are more additional and powerful options in the wizard (you can review them with “next” button):

  • SCHEDULED: This allows you to decide when to execute the operation, Now, Later after some minutes or periodically. This last option converts this operation in a “Task” we will not cover this in this tutorial.
  • ADVANCED OPTIONS: Here you can configure Operation and Execution timeouts for this operation and even adjust optional parameters if the operation accept more.

But for this tutorial, we just keep them as default and click on the “EXECUTEOpenGate Operation creation

  1. The summary indicates that the operation has been launched OpenGate Operation creation

🧪 Monitoring Operation Results

After sending an operation, you can view its execution status and result.

1. Check Opengate Device Emulator log

Here you can see how the operation has been attended and processed by our emulator and the response is sent successfully to OpenGate OpenGate Operation creation

This confirms that our operation has been launched from the dashboard and then the device (our Device Emulator) respond to OpenGate.

2. Review in OSS - Operations Support System:

The final step is to check that the response is properly collected in OpenGate, but how?

Well, there is another more tool for you, “Operations Support System”, that allows you to check all your Operation executions. Of course, you can build your own dashboard using operations widgets that you will find on the catalog, but we want to offer you an out-of-the-box solution for operations management.

  1. Go to the Operations Support System section of OpenGate, open in new window. OpenGate Operation creation

  2. Click on “Operations List” and locate our operation (so easy, you should just have one…). Because the operation is finished, Click on the menu and Device Execution List - Show history. OpenGate Operation creation

  3. Click on Execution Details to inspect the execution traceability and result OpenGate Operation creation

  4. Let’s review the Execution Details panel

    • From this panel you can check the summary result of the execution. Look the description “Success” that we coding in our OpenGate Device Emulator
    • Additionally, You can review the Steps tab, to check the times and result (remember that this operation only has one step)
    • Parameters tab shows what the user send to the device, we selected “software” during the wizard.
    • The last tab, Timing, shows a timeline with the execution times

OpenGate Operation creation


💡 What’s Next?

This was a basic operation and response flow, but OpenGate supports much more. You can:

  • Send configuration updates to your devices
  • Trigger actuators (e.g., open/close valves)
  • Perform FOTA (Firmware Over-The-Air) upgrades
  • Or any other action your devices support!

Operations are a powerful way to turn your dashboards into control centers. Ready to build your next one?

9. Easy mode rules

🚦 Easy Mode Rules in OpenGate

Welcome to one of the most powerful features in OpenGate: the Rules Engine. This system allows you to automate responses based on incoming data, enabling smarter and more efficient workflows across your IoT ecosystem.

There are two rule-building modes available:

  • Easy Mode: A simplified, intuitive interface for quick rule creation. This allows you to create rules using an assisted interface.
  • Advanced Mode: A flexible editor for complex logic and custom flows. Use the power of JavaScript to configure your rule.

In this tutorial, we’ll focus on Easy Mode, using a practical example from our warehouse environment.


🛠️ Creating an Easy Rule

for this tutorial, we will consider that we want to monitor the temperature levels of our warehouse. We’ll create a rule that triggers an alarm when the temperature reaches 25°C or more. The alarm message will be:
“It’s hot!”

Go to OpenGate Management > Rules and click Create new rule OpenGate rules

STEP 1: Rule Administration data

This is the first step of the Rules wizard. As the other wizards that we’ve achieve together, the first step allows you to set the basic info of the rule

  • New Rule: We will choose “NEW RULE” but as with the Operations, OpenGate offers you the possibility to clone an existing rule or use one from the product catalog. Because is our first rule, lets configure a new one together. Choose New Rule
  • Name: Use TemperatureRule
  • Description: It is optional but use Check temperature threshold
  • Rule mode: for this tutorial, we will use Easy Mode
  • Rule Type: We could configure rules to check “Operation Result” when are collected into de platform after perform any OpenGate Operation. For this tutorial, we are configuring a “Datastream Colection” rule. We want to check the received events. Choose DATASTREAM COLLECTION

OpenGate rules

STEP 2: Rule Definition

Here we are goint to define some things: 1. DATASTREAMS: We need to define the datastreams that we use in the rule. Do you see the two buttons on the top part of the wizard? We will use them to configure our rule basis OpenGate rules

Choose temperature from our “warehose” datamodel and check the Prefilter option. This rule only triggers when this datastream is received in any entity collection envent. This increase performance. OpenGate rules

2. PARAMETERS: This allows you to parametrize de values o the rule. If your rule is so complex, it is usefull to have all parameters together to check or edit them. This is not mandatory, but recommended. OpenGate rules

3. RULE CONDITIONS: Let’s configure our easy rule. As you can see you have some conditional tools available to configure the logic for the trigger of the rule. This is the configuration of the condition to the rule results true, and so, execute the actions that we will configure later. For this demo, we want to triger an alarm when any room facility register a temperature greater or equals 25ºC. To accomplish this, we need to do the following:

  • Add a condition for resourceType with the operator eq to asset. This means that we only generate an alarm when the asset receive the value.
  • Add another condition with our datastream temperature from “warehouse” datamodel, and choose the opreator gte and then, choose our parameter.
  • Ensure that the GROUP condition is AND OpenGate rules

4. DO ACTIONS: Now we will decide what the rule must do when the condition occurs. So let’s indicate tha we want to OPEN ALARM by clicking on “NEW ACTION”. Then configure the following:

  • Alarm name: It’s hot!
  • Alarm Description: temperature excedes the configured param
  • Severity: INFORMATIVE
  • Priority: MEDIUM
  • Ensures that the check is activated, if not, this action will never execute. OpenGate rules

5. Save your changes Click on “EXECUTE” to activate the rule 👏 Congratulations, you create your first rule!! OpenGate rules


🧪 Testing the Rule

So easy right? Let’s verify that the rule behaves as expected.

  1. Go to the “alarms list” As always, you have a predefined solution to check your triggered alarms, but you can create your own dasboards. Let’s try the predefined “Alarms List”. Just go to “Operations Support System > Alarms”, and open it in a new window OpenGate rules

  2. Send a normal value Use the OpenGate Device Emulator to send a 21 value for temperature datastream, for the device [YourPrefix]-ws-stemp02, you know how. Return to the Alarms List. Nothing happens, why? because we are under our threshold

  3. Now enter a value above our threshold Use again the “Opengate Device Emulator” to collect, this time, a 27 value Return to the Alarms List and check what happens now OpenGate rules

🚨 As you can see a new alarm appears. This alarm is triggered because when you collected the 27 value for temperature, this value is populated to the asset and is above the alarm configured threshold.


🚨 Managing Alarms

Trigger alarms to aumomatically detect what is happening on your solution is great but if something is detected is for you to do something, right? Now we understand how alarms works and how are generated, let’s explore the available options using the alarm we just triggered.

From the alarms list page, each alarm has its own menu to operate with the alarm: OpenGate rules

Review the alarm details

Click on the alarm menu, then “Alarm detail”, to check all the alarm information

Here you can see all the history related with the alarm. The most relevant information is:

  • Openning time: The timestampt when the alarm is triggered by the rules engine
  • Status: The current status of the Alarm (OPEN or CLOSED)
  • Clossure time: Timestampt if the status is CLOSED
  • EntityID: The entityID that triggers the alarm
  • Rule Name: The name of the rule that triggers the alarm
  • Rule Description: The description of the rule. this ussually helps for better understanding
  • Severity: INFORMATIVE, as configured for this rule’s action
  • Alarm timeline: This view show different actions (available also from the alarm menu if you look the previous image in detail)

OpenGate rules

Attend the alarm

It is possible to attend the alarm to register some work by the users. By clicking on “Attend Alarm” option, you will be able to introduce some notes and so it keeps registered with the alarm information.

Close the alarm

You can close directly the alarm without attend it before. In any case, you can add some notes related with the alarm closure proccess.

10. Analytics and Datalab

🧪 Analytics and Datalab

🚀 What is Jupyter Lab and Why Is It Useful?

OpenGate comes with Jupyter Lab pre-installed and ready to use — no setup required.
You can access it directly from the Analytics section in the Web Console.

OpenGate Data Lab

Jupyter Lab is an interactive development environment that lets you:

  • Create and run jupyter notebooks with Python code
  • Visualize data in real time
  • Document your analysis step by step
  • Combine text, code, and graphics in a single workspace

It’s perfect for exploratory data analysis, rapid prototyping, and technical documentation.

Once it’s open, you will access to the OpenGate Jupyter Lab interface to work with your notebooks:

OpenGate Data Lab


🛠️ OpenGate Data: Your Python Superpower

The data generated or the results of your experiments with python can be reinjected in OpenGate!! but how? Easy… Using the opengate-data library…

The opengate-data library is a Python package designed to integrate OpenGate into your Python projects which is available by default on your OpenGate Data Lab instance.
It provides tools to interact with OpenGate’s APIs efficiently and intuitively.

Key features include:

  • 🔍 Reading data from OpenGate
  • ✍️ Writing data back to OpenGate
  • 🧬 Automatic conversion to pandas.DataFrame

This means you can leverage the full power of pandas for advanced data manipulation, filtering, and visualization within your notebooks.

🖥️ Install it locally

Do you want to play locally? Installation is simple:

pip install opengate-data

📊 Why Is pandas So Powerful?

pandas is the go-to library for data analysis in Python.
The fact that opengate-data works seamlessly with DataFrame objects unlocks a wide range of possibilities:

  • Filter data by time, entity, or value
  • Group and summarize information
  • Create visualizations using matplotlib, seaborn, or other tools
  • Export to CSV, Excel, or databases

💡 This transforms OpenGate from a data collection platform into a full-fledged analytics engine.


✅ What You’ve Learned

With this final tutorial, you’ve completed the full journey through OpenGate:

  • From accessing the platform and navigating the console
  • To modeling, provisioning, and visualizing data
  • Through rules, operations, and connectors
  • And finally, to advanced analytics using notebooks and Python

🎓 You now have everything you need to build end-to-end IoT solutions — from device to insight.

OpenGate API

Introduction to OpenGate API

Welcome to the OpenGate API, an integral part of the OpenGate IoT Platform by amplía))) soluciones. We are a recognised company at the forefront of Industrial Internet of Things (IoT) solutions. This API is the backbone for connecting, managing and optimising a wide range of IoT devices and systems, providing unparalleled flexibility and control in industrial environments. Whether you are new to IoT or a seasoned professional, our documentation will guide you through the capabilities and features of the OpenGate API, enabling you to harness the full potential of IoT in your industrial applications.

Index

Subsections of OpenGate API

Management

Introduction to Management in OpenGate REST API

The Management section of the OpenGate REST API, an essential part of Amplía Soluciones’ OpenGate IoT platform, is designed to facilitate comprehensive and efficient management of IoT resources and configurations. It encompasses a broad array of functionalities that cater to various aspects of IoT management:

  • Organizations: This is the core where you can manage Channels and Entities, including entity types, statuses, devices, subscriptions, and more. It provides tools for Bulk Provisioning, both classic and using provision functions with a JavaScript API, along with Rules management including a default rules catalog.

  • Work Groups: Critical for team collaboration, it includes managing work group relations, geo-clusters, bundles, and users, along with user login and profile settings.

  • Geo-Areas, Data Models, and Tags: These features allow for geo-spatial organization, data structuring, and categorization of IoT elements.

  • Tickets: Handle customer service and operational issues efficiently.

  • Manufacturers & Models: Manage and catalog various manufacturers and their respective models.

  • Usage Plans and Certificates: Essential for securing and governing the use of IoT devices.

  • Mobile Operators: This includes management of APNs and GGSNs, crucial for cellular network-based IoT devices.

This section of the API is geared towards providing administrators and developers with the tools needed for detailed and organized management of IoT infrastructure and services, ensuring smooth operation and effective utilization of IoT resources.

Index of OpenGate management APIs


Subsections of Management

Organizations

Introduction

This document presents a comprehensive overview of the OpenGate Organization API, a pivotal component of the OpenGate IoT platform. As defined in the OpenAPI 3.0.0 specification, this API plays a crucial role in the holistic management of OpenGate organizations, which represent the highest-level and most crucial entities within the OpenGate platform.

The Role of Organizations in OpenGate

  • Foundation of the IoT Ecosystem: In the OpenGate system, an organisation is the fundamental unit from which all other entities are derived. The aforementioned entities comprise users, devices, assets, channels (i.e., device groups), work groups, and sub-organizations.
  • Central Control and Coordination Point: The utilisation of this API enables the effective control and coordination of the entire spectrum of an organisation’s IoT infrastructure within the OpenGate ecosystem.

Organizations

Key Functionalities

  • Comprehensive API Endpoints
    • /north/v80/search/organizations: Facilitates organization searches with customizable formats and filters.
    • /north/v80/search/organizations/summary: Offers summarised data about organisations for quick overviews.
    • /north/v80/provision/organizations: Enables the creation of new organisations with detailed JSON requests.
    • /north/v80/provision/organizations/{organizationId}: Manages specific organisation details, including retrieval, updates, and deletion.

Security and Access

  • Secured Access: Employs the use of “ApiKeyAmplia” and “BearerAuthJWT” for the purpose of ensuring secure interactions with the API, thereby guaranteeing the integrity and confidentiality of the data.
  • Consistent Endpoint: The API services are accessible at https://api.opengate.es, providing a stable and efficient gateway for organizational management.

This application programming interface (API) serves as the central nervous system of the OpenGate platform, offering sophisticated tools and interfaces for the administration of organisations. By mastering this API, users can effectively orchestrate the diverse components of their Internet of Things (IoT) solutions, ensuring seamless integration and optimal performance of their IoT ecosystem.

Plan feature

The Plan feature is a fundamental component of OpenGate, the function of which is to define the organisational usage limits. Each organization will have a specific plan setting, which may take the following forms:

  • The maximum number of devices, gateways or assets the organization can have.
  • The maximum time the collected data will be stored until it is evicted.
  • The maximum number of events collected by the platform in a period.

Comprehensive API actions

Updating an organization

It should be noted that the domain is not an updatable field; therefore, its inclusion in the put will result in an error.

Searching organizations summary

In its default state, the summary displays the total counter, the counter for the organisational grouping, and the counter for the channel grouping.

API specification

Subsections of Organizations

Channels - Device Groups

Introduction

The OpenGate API provides a solution for the management and organisation of Internet of Things (IoT) devices and assets. At the core of this organisational structure are the channels, which are a vital component of an efficient device and asset management system, enabling streamlined operations and enhanced oversight.

Understanding OpenGate Channels

The Channels feature of the OpenGate group unifies the categorisation of devices and assets, thereby simplifying the management of complex systems and providing a powerful tool for the application of policies, the execution of commands and the analysis of data across a fleet of devices. The use of Channels allows for the straightforward management and interaction with devices that share common characteristics or are part of a specific project or geographic location.

Key Benefits of Using Channels

  • Simplified Management: Organise devices and assets into manageable groups.
  • Targeted Operations: Execute commands and policies on a specific group of devices efficiently.
  • Enhanced Analytics: Analysing data at the group level allows you to gain insights that may otherwise be overlooked when looking at the data individually.

Importance of User and Work Group Assignments

In order to gain access to and assume control of channels, it is necessary for the user account associated with OpenGate to be incorporated into a workgroup. This method of access control, which is based on a multi-layered structure, guarantees that only those individuals who have been duly authorised will be able to interact with the devices and assets within a given channel. This approach ensures that the environment is secure and under the control of the relevant authorities.

How to Assign Work Groups to Channels

  1. Access the OpenGate User Management interface.
  2. Select the workgroup to be assigned to a Channel.
  3. Specify the Channels to which the workgroup is to be granted access.
  4. Save the changes to implement the new access permissions.

By meticulously assigning work groups to channels, it is possible to maintain a high level of security and ensure that users only have access to the devices and assets that are relevant to their role or of interest to them.

Comprehensive API actions

Updating a channel

The channel name field can’t be updated

API specification

Subsections of Channels - Device Groups

Entities

Entities provisioning

Entity object structure

In the context of the Internet of Things (IoT), an entity represents any monitoring element.

OpenGate offers four types of entities: asset, device, subscription, and subscriber. The resourceType field is used to set the entity type. The following table illustrates the process for setting each entity type:

Entity ResourceType attribute Description Provision
Asset entity.asset The software enables users to create new entities that are distinct from the device environment. see provision of assets
Device entity.device This is a hardware unit. see provision of devices
Subscription entity.subscription This section stores information regarding the contracts with your communication operators. see provision of subscriptions
Subscriber entity.subscriber It is used to store information regarding a specific communication channel. see provision of subscribers

Common objects and attributes

All the entities have several attributes, objects, and arrays in common. The following sections provide further details on these shared objects.

{
  "provision": {
    "administration": {
      "channel": {
        "_current": {
          "value": "wind_farm_channel"
        }
      },
      "organization": {
        "_current": {
          "value": "wind_farm_organization"
        }
      },
      "serviceGroup": {
        "_current": {
          "value": "emptyServiceGroup"
        }
      }
    },
    "device": {
      "identifier": {
        "_current": {
          "value": "wind_mill_id"
        }
      }
    }
  }
}

Identifier attributes

OpenGate supports a variety of entities, each of which is identified by a unique identifier.

Administrative data attributes

  • id: Each Internet of Things (IoT) entity on the platform is assigned a unique identifier automatically by the platform.
  • provision.device.identifier: The customer-generated ID is a string that identifies a device in a specific organisation. HTTP/1.1 201 Created Location: http://api.opengate.es/north/v80/provision/organizations/{organizationName}/devices/device_1 It is imperative that you use this identifier as a URL suffix when you wish to retrieve, update or delete your device.
  • provision.device.communicationModules[].identifier: The customer-generated ID is a string that identifies a communication module.
  • provision.device.communicationModules[].subscription.identifier: It is a customer-generated identifier comprising a string that identifies a subscription.
  • provision.device.communicationModules[].subscriber.identifier: It is a customer-generated identifier comprising a string that identifies a subscriber.

Administration object attributes

It is a requirement for all OpenGate entities to operate within an administrative context.

Attributes

  • organization: the organization that owns the entity.
    • Forbidden in entity update operation
    • Required in entity insert operation
    • Constraints: [a-zA-Z0-9] max 50 chars
  • channel: an administrative grouping method for your entities.
    • Required in entity insert operation.
    • Constraints: [a-zA-Z0-9] max 50 chars
  • administrativeState: see administrativeState values
Organization ID as URL parameter

In entity POST and PUT operations, OpenGate ignores the organisation field because its value is mandatory in the URL.

  • serviceGroup: Service configuration: configuration of services, operations available, etc.
    • Constraints: [a-zA-Z0-9] max 50 chars
    • Forbidden in bundle operations.
  • workgroup: the workgroup is the way to establish the relationships between devices and users. It’s used, for example, when you want to create software bundles.
    • Constraints: [a-zA-Z0-9] max 50 chars
    • This field only applies to OpenGate users.
  • plan (optional): an administrative concept that allows limiting the number of events sent by the device. This concept only applies to devices.
    • Constraints: [a-zA-Z0-9] max 50 chars
    • Forbidden in bundle operations.
    • Optional in entity insert and update operation.
Click to show administrative data as JSON document into a device entity…
{
  "provision": {
    "administration": {
      "channel": {
        "_current": {
          "value": "YOUR_CHANNEL_NAME"
        }
      },
      "organization": {
        "_current": {
          "value": "YOUR_ORGANIZATION_NAME"
        }
      },
      "serviceGroup": {
        "_current": {
          "value": "SERVICE_GROUP_FOR_THE_ENTITY"
        }
      },
      "plan": {
        "_current": {
          "value": "FLOW_RATE_100"
        }
      }
    }
  }
}

Service group

It is of the utmost importance to select the correct entity service group. The service group you choose will determine how OpenGate behaves when managing your devices in the following ways:

  • Permitted operations.
  • This document outlines the process by which the platform transmits scheduled operations to devices.
    • Always: This type is designed for devices that are continuously connected. In this scenario, OpenGate will initiate operations on the devices in accordance with the pre-defined schedule. In the event that the target device is not connected, the operation will be cancelled and an error message will be generated.
    • On-session-connection: In this instance, the platform saves operations for subsequent use. Upon establishing a connection with the platform, the device will be notified of any pending operations and these will be sent to the device. This mode is applicable to devices utilising web sockets or MQTT connectors.
    • On-demand: In this instance, the device will request any outstanding operations. This approach enables devices to conserve battery power and retrieve pending operations when active.
Details

Should you wish for your devices to request all pending operations, you may utilise MQTT connections with the on-demand configuration.

  • Trusted boot: It is a requirement that all messages received by the platform include a field with the trusted boot value. In the absence of this field, OpenGate will reject the message.
  • Device security mode: This option allows you to select the desired security level for communications between the device and platform. The available options are:
    • None: communications are not encrypted.
    • Level 1: One-way authentication (or platform authentication). The platform is the sole entity responsible for authenticating itself to the client. It issues the client a certificate to confirm the platform’s authenticity.
    • At Level 2, both the client and the server authenticate themselves to each other, ensuring the veracity of the certificate presented by the platform.
    • At Level 3, both the client and the server authenticate themselves to each other, confirming the availability of the platform’s device certificate.

Service groups available on OpenGate cloud instance

Name Entity Type Operation Group Operation on Demand Security Mode Trusted Boot
emptyServiceGroup Asset, Gateway, Communications Module, Subscriber, Subscription emptyServiceGroup Send Always None disabled
emptyServiceGroup onDemand Asset, Gateway emptyServiceGroup Send On Demand None disabled
emptyServiceGroup onSession Asset, Gateway emptyServiceGroup Send On Session Connection None disabled
level1SecurityServiceGroup Asset, Gateway emptyServiceGroup Send Always Level1 disabled
level2SecurityServiceGroup Asset, Gateway emptyServiceGroup Send Always Level2 disabled
level3SecurityServiceGroup Asset, Gateway emptyServiceGroup Send Always Level3 disabled
noUpdate Asset, Gateway, Communications Module noUpdate Send Always None disabled
trustedLevel1SecurityServiceGroup Asset, Gateway emptyServiceGroup Send Always Level1 enabled
trustedLevel2SecurityServiceGroup Asset, Gateway emptyServiceGroup Send Always Level2 enabled
trustedLevel3SecurityServiceGroup Asset, Gateway emptyServiceGroup Send Always Level3 enabled
trustedNoneSecurityServiceGroup Asset, Gateway emptyServiceGroup Send Always None enabled
trustedNoneSecurityServiceGroup_onDemand Asset, Gateway emptyServiceGroup Send On Demand None enabled

Plan feature

As outlined in the organization’s plan, usage limits are to be established for the OpenGate platform. In the case of entities, if your organization has not defined a collection event limit, it must be set at the time of entity creation.

Flattened format

It is possible to create and search for data stream values (see default data models) using the flat format. This format is the same as that used on the South API. To indicate if data streams are in a flattened form, use the Boolean parameter ‘flattened’ in the URL.

The format is:

{
  "parameter1_id": {
    "_value": {
      "_current": {
        "value": "value1"
      }
    }
  },
  "parameter2_id": {
    "_value": {
      "_current": {
        "value": "value2"
      }
    }
  },
  ...
  "parameterN_id": {
    "_value": {
      "_current": {
        "value": "valueN"
      }
    }
  }
}

The following examples demonstrate the process of transforming a hierarchical JSON format into a flattened JSON format. There are two types of values: simple and complex.

Simple values

The hierarchical JSON format is:

{
  "provision": {
    "administration": {
      "identifier": {
        "_current": {
          "value": "device_battery"
        }
      }
    }
  }
}

The flattened JSON format is:

{
  "provision.administration.identifier": {
    "_value": {
      "_current": {
        "value": "device_battery"
      }
    }
  }
}

Complex values

To illustrate this concept, we will examine two contrasting examples.

The hierarchical JSON format is:

{
  "provision": {
    "device": {
      "location": {
        "_current": {
          "value": {
            "position": {
              "type": "Point",
              "coordinates": [-3.7028, 40.41675]
            },
            "postal": "28013"
          }
        }
      }
    }
  }
}

The flattened JSON format is:

{
  "provision.device.location": {
    "_value": {
      "_current": {
        "value": {
          "position": {
            "type": "Point",
            "coordinates": [-3.7028, 40.41675]
          },
          "postal": "28013"
        }
      }
    }
  }
}

Another example:

The hierarchical JSON format is:

{
  "provision": {
    "device": {
      "communicationModules": [
        {
          "identifier": {
            "_current": {
              "value": "commsMod_battery_id"
            }
          },
          "name": {
            "_current": {
              "value": "commsMod_battery_name"
            }
          }
        }
      ]
    }
  }
}

In the context of creative operations, the flattened JSON format is as follows:

{
  "provision.device.communicationModules[].identifier": [
    {
      "_index": {
        "value": "commsMod_battery_id"
      },
      "_value": {
        "_current": {
          "value": "commsMod_battery_id"
        }
      }
    }
  ],
  "provision.device.communicationModules[].name": [
    {
      "_index": {
        "value": "commsMod_battery_id"
      },
      "_value": {
        "_current": {
          "value": "commsMod_battery_name"
        }
      }
    }
  ]
}

In the case of a reading operation, the flattened JSON format is as follows:

{
  "provision.device.communicationModules[].identifier": [
    {
      "_index": {
        "path": "provision.device.communicationModules[].identifier",
        "value": {
          "_current": {
            "value": "commsMod_battery_id",
            "provType": "MONITORING",
            "date": "2017-09-25T09:34:32.119Z"
          }
        }
      },
      "_value": {
        "_current": {
          "value": "commsMod_battery_id",
          "provType": "MONITORING",
          "date": "2017-09-25T09:34:32.119Z"
        }
      }
    }
  ],
  "provision.device.communicationModules[].name": [
    {
      "_index": {
        "path": "provision.device.communicationModules[].identifier",
        "value": {
          "_current": {
            "value": "commsMod_battery_id",
            "provType": "MONITORING",
            "date": "2017-09-25T09:34:32.119Z"
          }
        }
      },
      "_value": {
        "_current": {
          "value": "commsMod_battery_name",
          "provType": "MONITORING",
          "date": "2017-09-25T09:34:32.169Z"
        }
      }
    }
  ]
}

We will also demonstrate how to transform the existing normalised/flattened JSON examples into CSV format. The above examples will be joined together in a single CSV file comprising three lines, one for each example (a straightforward example and two complex examples).

Transforming the flattened format into CSV format is a relatively straightforward process, as the CSV file’s content adheres to the same guidelines as the flattened format. The first line (header) contains the name of the data stream, separated by “;”, and the following lines represent the different entities, with the field value of the data stream separated by “;” in the same order as the first line.

The following lines illustrate the format of a CSV file.

provision.administration.identifier;provision.device.location;provision.device.communicationModules[].identifier;provision.device.communicationModules[].name
device_battery;;;
;"{"position":{"type":"Point","coordinates":[-3.7028,40.41675]},"postal":"28013"}";;
;;commsMod_battery_id;commsMod_battery_name

In the event that an entity contains a unique communication module, it is possible to indicate the name without the use of square brackets and without the inclusion of an identifier. In light of this, it can be seen that the two strings in question, namely [commsMod_battery_name(commsMod_battery_id)] and commsMod_battery_name, are identical.

Comprehensive API actions

Searching entities

This API enables the retrieval of a comprehensive list of entities, offering a multitude of options for:

  • Filtering (see Specific Filter Fields)
  • Sorting (see Sorting)
  • Selecting Required Fields (see Selecting)
  • Summarising (see Summary)

The results can be obtained in two distinct formats:

  • JSON Format (Default)
  • CSV Format

Additionally, the results can be obtained in a flattened format through the use of flattened parameters.

API specification

Subsections of Entities

Entity types & statuses

Entity type list

  • GATEWAY: M2M device like a concentrator or smart router, modem or gateway, etc.
  • ASSET: Business entity, usually have one or more devices connected.
  • COMMUNICATIONS_MODULE: Internal modem or interface for communications.
  • SUBSCRIPTION: Logical identifier for a communication channel as a GMS line.
  • SUBSCRIBER: Physical device associated with a Logical subscription.

Default device administrative statuses

  • REQUESTED: Entity requested to the supplier
  • READY: Entity ready for installation
  • REPAIR: Entity under repair
  • TESTING: Entity in tests
  • ACTIVE: Entity deployed on field
  • SUSPEND: Suspended its operation
  • DELETED: Entity removed from available stock
  • RETIRED: Entity retired from field
  • BANNED: Entity banned, no data is going to be collected for devices with this status

Alarms for BANNED entities

The default rules catalog has an automation rule to elevate an alarm when a BANNED device shows activity. Besides that, you can run a job or schedule a task over entities with a BANNED administrative state.

Device operational statuses

  • UNKNOWN: Not known
  • NORMAL: Normal Operation
  • ALARM: The device has active alarms
  • TESTING: The device is under test. Could be running but it is not performing its normal operation.
  • DOWN: The device is not operative. Could be running but it is not performing its operation.
  • SAFE_MODE: The device is in Safe Mode (Sleeping, etc.)
  • TAMPER: The device was tampered
  • TEST: The device is working in test mode

Communication modules operational status

  • UNKNOWN: The module status is not known
  • STOPPED: The module is not working
  • STARTING: The module is booting
  • RUNNING: The module is working
  • STOPPING: The module is shutting down
  • ERROR: The module has an error

Devices

Introduction

A device represents the physical element (communications devices, concentrators, machines, sensors, etc.) through which data is collected.

Relation between devices and assets

A device can be linked to an asset through the provision.device.related data stream, which must contain the identifier of the asset in question.

When these entities are related, the asset is able to collect data from the related device. In order to do this, it is necessary to define an available data model for the Devices and Assets resources, and then define all the data streams that you want to copy from the device. Once this has been done, the asset will then automatically start collecting these values from the device.

Comprehensive API actions

Creating a device

New devices can be created by sending a POST request that includes a correctly formatted JSON document in the body.

A device may contain or not contain subscriptions and subscribers. Furthermore, these can exist independently (please refer to create subscriptions or create subscribers for more information).

It is essential that the subscription or subscriber is located within the communication modules on the device. Consequently, there are various use cases for managing device relations, depending on whether there are existing subscriptions or subscribers.

The following options are available for creating a device:

  1. Create a device without subscriptions or subscribers.
  2. Create a device with subscriptions or subscribers that do not exist in the platform.
  3. Create a device with subscriptions or subscribers that exist in the platform. In this instance, the following steps must be completed:
  • A device must be created (please refer to the ‘Create a device without subscriptions or subscribers’ section below for further details).
  • The device must then be updated with the relevant subscriptions or subscribers that are already present on the platform (please refer to the ‘Associate a subscription or subscriber to the device’ section below for further details).

Furthermore, a device can be linked to an asset. Please refer to the section entitled Relation between devices and assets for additional details.

Updating a device

Updates can be made to the following:

  • Device data
  • Device subscription or subscriber associations
  • Device subscription or subscriber disassociations

The JSON object passed will vary depending on the desired update.

Patching a device

It is possible to patch the following:

  • Only the device data
  • Associate a subscription or subscriber to the device The JSON object passed will be different depending on the desired patch. Furthermore, a device can be related to an asset. Please refer to the section entitled ‘Relation between devices and assets’ for more information.

Deleting a device

To delete a complete device with all associated subscriptions, send a DELETE request using the provided URL. The request should include a Boolean parameter, “full,” to indicate that you wish to delete the entire device.

Note

The default value of the field ‘full’ is set to ‘false’. In this case, if a device with a subscription or subscriber is deleted, only the device will be removed. Neither the subscription nor the subscriber will be deleted. After this, they will exist on the platform independently, without being associated with a device.

Searching device

This API enables the retrieval of a comprehensive list of devices, offering a multitude of options for:

  • Filter (See Specific Filter Fields)
  • Order (see Sorting)
  • Select Required Fields (see Selecting)
  • Summary (see Summary)

The results can be obtained in two different formats, as detailed in the HTTP Header Options.

  • JSON Format (Default)
  • CSV Format

As an alternative, the result can be obtained in a flattened format thanks to the flattened parameter (see device parameters).

API specification

Subscriptions

Introduction

A subscription stores information regarding the contracts with your communication operators. It can exist as a standalone entity or integrated within the device.

Comprehensive API actions

Patching a subscription

  • Please note that the administration channel value is mandatory for securitisation purposes in patch operation.
  • In the event of patching complex objects, any non-passed object attributes will be patched as non-existent. Therefore, it is advisable to include previous unchanged values to avoid any loss of data.

Searching subscriptions

The results can be obtained in two different formats, as detailed in the HTTP Header Options:

  • JSON Format (the default)
  • CSV Format

Searching subscriptions summary

The summary will always display the total counter, the organisation grouping counter and the channel grouping counter by default.

API specification

Subscribers

Introduction

The Subscriber Entity Store contains information regarding a specific communication channel. It can exist independently or within the device.

Comprehensive API actions

Patching a subscriber

  • Please note that the administration channel value is mandatory for securitisation purposes in patch operation.
  • In the event of patching complex objects, any non-passed object attributes will be patched as non-existent. Therefore, it is advisable to include previous unchanged values to avoid any loss of data.

Searching subscribers

The results can be obtained in two different formats, as detailed in the HTTP Header Options:

  • JSON Format (the default)
  • CSV Format

Searching subscribers summary

The summary will always display the total counter, the organisation grouping counter and the channel grouping counter by default.

API specification

Assets

Introduction

The software enables the creation of entities that are not devices, allowing users to emulate any type of entity they require, such as a worker or a spool.

Concurrently, a device may be associated with an asset. To illustrate, a worker may utilise a device that monitors a range of parameters.

These devices can take the form of a bracelet that monitors battery levels, pulse rate, temperature and position, or a vest that measures a range of other parameters.

An asset is able to identify its associated devices through the provision.asset.related data stream. This data contains an array of identifiers for the associated devices.

Should you wish to receive all information pertaining to the device in the asset, you must add a data model with dual data streams. Once both are related in this way, the assets will be able to receive all common data streams from the device. This ensures that all datastreams and data points collected will be in the cycle of life for both.

The platform is set up by default to offer the Entity data model, which contains two dual data streams: ’entity.location’ and ’entity.areas’. Please refer to the Default Datamodels section for more information.

Asset object structure

An asset is a repository of information about the new entity created by the user.

In regard to provisioned data, the following attributes are applicable:

  • Minimum attributes:
    • provision.administration.
    • provision.asset.identifier.
    • resourceType.
  • Recommended attributes by OpenGate:
    • provision.asset.administrativeState.
    • provision.asset.specificType.
    • provision.asset.name.
    • provision.asset.description.
  • Extended attributes:
    • provision.asset.location.
    • Defined attributes in human datamodel.
    • Defined by the user in his new datamodels. For example photo, position
Note

The specificType field is used to differentiate new entities. For instance, a worker is classified as an entity.asset with the specificType WORKER.

Comprehensive API actions

Creating an asset

New assets can be created by sending a POST request, including a correctly formatted JSON document in the POST body using the generic URL for entities

  • Please be advised that there is no requirement to include an organisation field in the JSON, as this information is already available in the URL.

It is not possible to create a list of devices associated with an asset. These must be added from the Devices section.

Updating an asset

Please be advised that an asset can be modified by sending a PATCH request using the generic URL for entities.

It is necessary to replace {identifier} with the identifier of the asset you wish to modify. Additionally, a boolean parameter, flattened, must be included to enable the sending of a flattened JSON format.

Warning
  • Please be advised that it is not possible to patch the list of devices associated with the asset. The devices must be patched from the list.
  • When patching complex object values, non-passed object attributes will be patched as non-existent. Therefore, it is advisable to include previous unchanged values to avoid any loss of data.
  • Please note that the Resource Type and Administration Channel values are mandatory in asset patch operations for securitisation purposes.

Deleting an asset

Note that it is not possible to delete the list of devices associated with an asset. Instead, you will need to delete them from the devices list.

Please be advised that an asset can be deleted by sending a DELETE request using the generic URL for entities.

API specification

Subsections of Bulk provisioning

Classic bulk provisioning

Introduction

The bulk function enables the provisioning of a list of entities or tickets in a single operation, in either synchronous or asynchronous mode.

Bulk Object Structure

Bulk requests and responses can be formatted in four different ways, which can be selected through the Content-Type HTTP header. The default format is JSON, but the other formats are also available:

  • CSV format
  • XLS Excel format
  • XLSX Excel format

Attaching Files as Multipart

The Async API enables the creation of multipart files. In this instance, the Content-Type HTTP header will be multipart/form-data, and the file type will be indicated in the attached content.

HTTP Header Options

The API enables the indication of the format in which the request content is to be sent, either JSON or CSV, via the HTTP header option “Content-Type”. Similarly, the API allows the indication of the format in which the response content is to be received, either JSON or CSV, via the HTTP header option “Accept”.

It is possible to send a request and receive a response in different formats. For example, a request sent in JSON format can be received in CSV format.

Content-type header

The bulk input can be provided in different formats, depending on the file type. The Content-Type header should indicate the format of the input data. The following formats are supported for both synchronous and asynchronous operations:

  • application/json: json
  • text/plain: csv
  • application/vnd.ms-excel: xls
  • application/vnd.openxmlformats-officedocument.spreadsheetml.sheet: xlsx

Accept Header

Please be advised that the bulk processing results will be created in the format indicated in the ACCEPT header of the POST call, for both synchronous and asynchronous operations. To achieve the desired result with the GET call, it is essential to ensure that the ACCEPT header is identical to that used in the POST call.

In the event that the POST is not completed with the correct MIME type in the ACCEPT header, an error message will be displayed. Similarly, if the GET is not completed with the correct MIME type in the ACCEPT header, the same error message will be displayed.

Comprehensive API actions

Synchronous bulk

Creating a synchronous bulk for entities

The Synchronous Bulk Creation process allows you to create multiple entities in a single request. This bulk operation applies to the following entities:

  • Assets
  • Devices
  • Subscriptions
  • Subscribers

Creating a synchronous bulk for tickets

The Synchronous Bulk Creation process for tickets allows you to create multiple ticket records in a single request.

Asynchronous bulk

Creating an Asynchronous bulk for entities

In the case of asynchronous calls, the POST method will return an empty body and the URL of the created bulk process in the Location header. To monitor the progress and outcome, a GET request should be made to the URL returned by the POST method.

Asynchronous searching

A comprehensive search is being conducted across all previously created bulk processes, whether completed or still in progress.

API specification

Provision functions for bulk provisioning

Limited access API

Limited access

Please note that the provision API of this feature is only available to the root profile. Similarly, the execution API (plan or bulk) of this feature is only available to the following profiles: root, admin, admin_domain, advanced and super_admin_domain. In contrast, the searching API is accessible to all users. Should you require further information, please consult your administrator.

Introduction

This API enables users to perform bulk provisioning using Provision Processors. These processors allow users to define their own Excel formatting using a JavaScript script, which adapts the formatting to align with the OpenGate APIs.

Provision Processor object structure

A Provision Processor will include a JSON object with a script field, which contains the JavaScript code responsible for processing inbound data and determining the appropriate actions for provisioning the relevant entities, such as JSON objects, devices, subscriptions and subscribers. When creating or updating a Provision Processor, only minimal parsing of the script will be performed.

Comprehensive API actions

Provision processors

Creating a provision processor

Please note that the Accept field should be set to application/JSON.

Updating a provision processor

All actions are based on application/JSON data formats.

Searching provision processors

Please search for all completed and ongoing bulk processes.

Executing provision processors

Executing plan from selected provision processor

  • As with the Bulk creation process, files will be attached as multipart, with only XLS and XLSX formats permitted.
  • In this instance, the Accept header must be set to application/JSON.

Rather than creating a bulk process, it would be more efficient to return the provision process planning for specified entries. This is a synchronisation process that does not result in changes to the database.

Executing bulk from selected provision processor

  • Files used for bulk processing will be attached to the request as multipart.
  • The attached file must contain a specific Content-Type property to indicate the format of the file.
  • Only XLS and XLSX formats are permitted.
  • The Accept header must match the attached file’s Content-Type.

Reading the bulk summary

Please note that the Accept field should be set to application/JSON.

Reading the bulk details from selected bulk

Please note that the Accept field should be the same used in the bulk creation request.

API specification

Subsections of Provision functions for bulk provisioning

JavaScript API

Introduction to provision processors

This API’s purpose is to facilitate the development of Provision Processors in the simplest possible way.

The API is divided into several modules/scripts:

  • Provision_Processor / provision_processor.js: This is the entry point from Java. It defines a template for Provision Processor execution.
  • Entities_Utils / provision_entity_utils.js: Utility class to facilitate the entities building.
  • Action_Utils / provision_actions_utils.js: Utility functions to create the actions to be returned to Java process.
  • V8_Api / provision_JavaV8_api.js: Functions used to invoke Java V8 methods.
  • V8_Utils / provision_JavaV8_utils.js: Some generic functions to use V8_API. When developing a new Provision Processor, instead of calling directly V8_Api functions is better to use the methods defined here.
  • Error_Api: Facility class to manage and transform caught OpenGate provision error.

Provision Processor

One Provision Processor is a script that, using Provision Javascript API, implements the business logic to transform inbound data into several actions to be done by Java to do correct provisioning actions.

How to Implement Provision Processor

When implementing a Provision Processor it is mandatory to implement two specific functions. These functions are called from Provision_Processor.processRow function:

  • normalizeRowMap(rawObject): This function receives a map with the data to be processed. For example, a map with the data read from an excel file. It takes the inbound parameter and transforms it into an object to be used to calculate and build the actions for this row. In this function, values validation and transformation should be done.
    • Input parameter: JSON object with raw keys and values.
    • Output: JSON object with the desired structure.
  • actionsPlanning(normalizedObject): Takes the result from normalizeRowMap function and calculates the actions to be done in Java.
    • Input parameter: Normalized object.
    • Output: Array of Actions.

It is possible to define extra functions to manage and transform provision errors. This function will be called from Main_Module.transformErrorMessage:

  • customErrorTransformer(errorManager): This function will be called when some provision error is caught (for example: duplicated entity). The goal is to create a customized error message for the Excel row update. This function is not mandatory, and if it is not defined, a default message will be returned by Main_Module.transformErrorMessage.
    • Input parameter: Object with error information (caught exception, failed action specification, and default message) and useful methods to manage this information.
    • Output: This function must return a String with the customized message.

Example of Provision Processor for creating devices and assets with some fields. It uses the functions and classes defined in Provision Javascript API.

   /* *******************
      MANDATORY FUNCTIONS 
      ******************* */

   function normalizeRawObject(rawObject) {

      try {
         var normalizedObject = {
            /* 
            In this case, raw object data comes from an excel
            and to specify the full key, we use the header name and column letter
            */
            organization: readMapValue(rawObject, 'Organization', '', 'A'),
            channel: readMapValue(rawObject, 'Channel Name', '', 'B'),

            /* maybe some values can be defined in the script as constants */
            service_group: 'emptyServiceGroup',

            /* We can do values validation and transformations. For example remove blanks from the value. */
            device_identifier: readMapValue(rawObject, 'Serial number', '', 'D').replace(/\s/g, ''),
            asset_identifier: readMapValue(rawObject, 'Asset Id', '', 'C').replace(/\s/g, '')
         };
         return normalizedObject;
      } catch (e) {
         printLog('>> normalizeRawObject(): exception: ' + e);
         throw e;
      }
   }


   function actionsPlanning(normalizedObject) {
      var actions = [];

      /* 
         In this case, we will create an asset and a device. 
         In the case of the device, if it exists, we are going to update it.
      */

      /* we check if the asset exists before creating it. */
      var assetExist = checkAsset(normalizedObject.asset_identifier);
      if(!assetExist){
         var assetEntity = generateAssetEntity(normalizedObject)
         actions.push(CREATE_ASSET_ACTION(assetEntity));
      }

      /* we check if the device exists. */
      var deviceExist = checkDevice(normalizedObject.device_identifier);
      var deviceEntity = generateDeviceEntity(normalizedObject)
      if(!deviceExist){
         actions.push(CREATE_DEVICE_ACTION(deviceEntity));
      }else{
         actions.push(UPDATE_DEVICE_ACTION(deviceEntity));
      }

      return actions;
   }


   /* ******************************************
      OPTIONAL FUNCTION for error transformation 
      ****************************************** */

   /* This function will be called when a provision exception is caught to get a customized message for excel row update */

   function customErrorTransformer(errorManager) {
      return 'This is customized message for error code: ' + errorManager.getFirstErrorCode() + ' and message: ' + errorManager.getFirstErrorMessage();
   }



   /* *************************
      Other auxiliary functions 
      ************************* */

   function generateDeviceEntity(normalizedObject) {
      try {
         var deviceEntity = new Entity()
               .addDatastream('provision.administration.channel', normalizedObject.channel)
               .addDatastream('provision.administration.serviceGroup', normalizedObject.service_group)
               .addDatastream('provision.administration.organization', normalizedObject.organization)
               .addDatastream('provision.administration.identifier', normalizedObject.device_identifier)
               .addDatastream('provision.device.related', normalizedObject.asset_identifier);

         return deviceEntity.entityJson;
      } catch (e) {
         printLog('>> generateDeviceEntity: Exception: ' + e);
         throw e;
      }
   }



   function generateAssetEntity(normalizedObject) {
      try {
         var assetEntity = new Entity()
               .addDatastream('resourceType', 'entity.asset')
               .addDatastream('provision.administration.channel', normalizedObject.channel)
               .addDatastream('provision.administration.serviceGroup', normalizedObject.service_group)
               .addDatastream('provision.administration.organization', normalizedObject.organization)
               .addDatastream('provision.administration.identifier', normalizedObject.asset_identifier);
         return assetEntity.entityJson;
      } catch (e) {
         printLog('>> generateAssetEntity: Exception: ' + e);
         throw e;
      }

   }
Important tips when writing a Provision Processor script

To add the script to Provision Processor JSON, it is necessary to take into these rules:

  • For strings, use single quotes (’) instead of double quotes (")
  • Use block comments (/**/) instead of line comments (//)
  • Format the script in a unique line script.

Action format

actionsPlanning returns an array of objects specifying the action to be done. Actions must be built with the functions defined in Action_Utils. Just to see the output format and following the previous example:

[
   {
      "action": "POST",
      "resourceType": "entity.asset",
      "actionDescription": "Create Asset",
      "json": {
         "resourceType": {
            "_value": {
               "_current": {
               "value": "entity.asset"
               }
            }
         },
         "provision.administration.channel": {
            "_value": {
               "_current": {
               "value": "some_channel"
               }
            }
         },
         "provision.administration.serviceGroup": {
            "_value": {
               "_current": {
               "value": "some_service_group"
               }
            }
         },
         "provision.administration.organization": {
            "_value": {
               "_current": {
               "value": "some_organization"
               }
            }
         },
         "provision.asset.identifier": {
            "_value": {
               "_current": {
               "value": "some_asset_identifier"
               }
            }
         }
      },
      "full": false
   },
   {
      "action": "POST",
      "entityType": "device",
      "actionDescription": "Create Device without Subscription",
      "json": {
         "resourceType": {
            "_value": {
               "_current": {
               "value": "entity.device"
               }
            }
         },
         "provision.administration.organization": {
            "_value": {
               "_current": {
               "value": "some_organization"
               }
            }
         },
         "provision.administration.channel": {
            "_value": {
               "_current": {
               "value": "some_channel"
               }
            }
         },
         "provision.administration.serviceGroup": {
            "_value": {
               "_current": {
               "value": "some_service_group"
               }
            }
         },
         "provision.device.identifier": {
            "_value": {
               "_current": {
               "value": "some_device_identifier"
               }
            }
         },
         "provision.device.related": {
            "_value": {
               "_current": {
               "value": "some_asset_identifier"
               }
            }
         }
      },
      "full": false
   }
]

Error management

Sometimes, it could be necessary to stop processing and abort all provision processes. For example, because some validation is not passed. In that case, an error must be thrown with a descriptive message. For example:

function actionsPlanning(normalizedObject) {
   var actions = [];

   ...

   if(! someValidation(normalizedObject)){
      throw new Error("Provision Processor Error: some validation not passed");
   }

   ...

   return actions;
}

Main Module

Main Module

Main Script: Defines Provision Processor template to be called from Java

Main_Module~globalParams

Global parameter with a received map of params from the java process. This parameter is set at the beginning of processRow and it can be used in any function in the script.

Kind: inner property of Main_Module

Main_Module~processRow(rawObject, processorParamsMap)

This is the function that will be called from the Java process.

To work correctly this function, it is mandatory to implement in the provision processor script the following functions:

  • normalizeRowMap(rawObject): This function will read and transform inbound rawObject and transform to normalizedObject object that will be used in actionsPlanning() function.
  • actionsPlanning(normalizedObject): This function has to apply business rules and calculate the actions array to be done by the Java process.

Kind: inner method of Main_Module
Returns: String - Json with following properties:

  • scriptDirectResult: OK or descriptive error text,
  • actionsToDo: Array with the list of Actions to be done in Java Process. This array can be empty.
Param Type Description
rawObject Object Json with excel row data
processorParamsMap Object Processor extra params map: can contain necessary parameters for odm api calls (key, organization) or useful parameters to define specific behaviors

Return Example

   {
      "scriptDirectResult": "OK",
      "actionsToDo":[
            {
               "action": "POST",
               "json": {...},
               "actionDescription": "Create Asset",
               "full": false,
               "resourceType": "entity.asset"
            },
            {
               "action": "PUT",
               "json": {...},
               "actionDescription": "Update Device",
               "full": false,
               "resourceType": "entity.device"
            }   
      ]
   }

Main_Module~_testTemplateImplementation()

Auxiliary function to check if main functions are implemented.

Kind: inner method of Main_Module
Throws:

  • Error if the main methods (normalizeRawObject and actionsPlanning) are not correctly defined as functions

Entities Utils

Entities_Utils

This module contains Entity class specifications and other useful functions to convert processor script inbound data to ODM Entities.

Entity

Class used to build Entity Jsons. It contains the necessary properties and methods to build any entity JSON.

  • entityJson: this property contains the Entity JSON.
  • addDatastream: this is the main method to be used to add or update desired datastreams to the Entity
  • deleteDatastream: this is the main method to be used to remove some datastream from Entity
  • getDatastream: this is the main method to be used get the value from specific datastream in the Entity
  • Other internal methods should not be necessary to call them.

Kind: inner class of Entities_Utils

Entity(entityIdentifier)

Init entityJson property with an entity identifier. Use new Entity(entityIdentifier) to create a new Entity.

Param Type Description
entityIdentifier String identifier for current entity.

Example of use:

const entity = new Entity("entityIdentifier");

entity.withPrefix(prefixToBeUsed)

Define the prefix of the datastreams to be used by addDatastream method. Adding a new prefix will override the previously added one. Use this method with an empty or undefined parameter to stop using any prefix.

Kind: instance method of Entity
Returns: Entity - Current Entity instance

Param Type Description
prefixToBeUsed String The prefix that will be used in next addDatastream calls. If it is empty the prefix will be removed.

Example of use:

entity.withPrefix("prefix");

entity.getDatastream(datastream, _index)

Search specified datastream and returns value. This function requires always complete datastream (ignores withPrefix functions calls).

Kind: instance method of Entity
Returns: * - Found datastream’s value, it can be complex. Null if not found.

Param Type Description
datastream String Datastream complete flattened name.
_index String If datastream is an array, index should be provided, if not, first element will be returned.

Example of use:

entity.getDatastream("datastream");

entity.deleteDatastream(datastream, _index)

Delete specified datastream. This function requires always complete datastream (ignores withPrefix functions calls).

Kind: instance method of Entity
Returns: * - Found datastream’s value, it can be complex. Null if not found.

Param Type Description
datastream String Datastream complete flattened name.
_index String If datastream is an array, index should be provided, if not, first element will be returned.

Example of use:

entity.deleteDatastream("datastream");

entity.addDatastream(datastream, value, _index)

Method to be used to add datastreams to current entity. Calling this method more than one time for the same datastream will have two different behaviors:

  • If _index parameter is defined, a new value will be added or updated to the array.
  • If _index parameter is not defined, the previous datastream will be overridden.

Kind: instance method of Entity
Returns: Entity - Current Entity instance

Param Type Description
datastream String Datastream flattened name.
value String Value for the datastream.
_index String If provided, it will create special indexed datastream (for communicationModules[] datastreams).

Example of use:

entity.addDatastream("datastream", "value");

entity._addToEntity(datastream)

Internal method. Attach provided datastream to current Entity’s JSON.

Kind: instance method of Entity
Returns: Entity - Current Entity instance.

Param Type Description
datastream Object Object to be attached to current Entity.

Example of use:

entity._addToEntity({ datastream: "value" });

entity._generateDatastreamJsonWithArray(datastream, valuesArray)

Internal method. Generates an object with datastream as field and provided array as value. This method is helpful for communicationModules[] datastreams.

Internally calls _cleanArray method to add good array.

Kind: instance method of Entity
Returns: Object - Json object with built datastream.

Param Type Description
datastream String Datastream flattened name.
valuesArray Array Array of objects for the datastream.

Example of use:

entity._generateDatastreamJsonWithArray("datastream", ["value"]);

entity._generateDatastreamWithJson(datastream, value)

Internal method. Generates an object with datastream as field and provided value. In this case, value can be a plain value (for example, String) or a complex JSON

Internally calls _generateJsonCurrentValue to build basic json structure.

Kind: instance method of Entity
Returns: Object - Json object with built datastream.

Param Type Description
datastream String Datastream flattened name.
value Object Json object with datastream value.

Example of use:

entity._generateDatastreamWithJson("datastream", { value: "value" });

entity._generateIndexedJson(index, value)

Internal method. Generates a json with provided index and value. This method will be used when creating datastreams with communicationModules[].

Kind: instance method of Entity
Returns: Object - Json object with indexed value structure.

Param Type Description
index String Identifier for _index value.
value * It can be plain value (String,…) or complex Json.

Example of use:

entity._generateIndexedJson("index", "value");

entity._generateJsonCurrentValue(value)

Internal method. Generates a JSON with basic structure datastream value.

Kind: instance method of Entity
Returns: Object - Json object with basic value structure.

Param Type Description
value * It can be plain value (String,…) or complex Json

Example of use:

entity._generateJsonCurrentValue("value");

Return example:

{
    "_value":{
        "_current":{
            "value": value
        }
    }
}

entity._cleanArray(valuesArray)

Internal method. Auxiliary method to clean empty ("", null, undefined) elements from provided array.

Kind: instance method of Entity
Returns: Array - New array without empty elements. null if the array is empty.

Param Type Description
valuesArray Array Array to be checked.

Example of use:

entity._cleanArray(["value", "", null, undefined]);

entity._generateDatastreamEntry(datastream, dsJson)

Internal method. Auxiliary method to build an object with datastream as field and provided JSON as value.

Kind: instance method of Entity
Returns: Object - Json object with built datastream.

Param Type Description
datastream String Datastream flattened name.
dsJson Object Json value for the datastream.

Example of use

entity._generateDatastreamEntry("datastream", { value: "value" });

Return examples:

{
    "datastream.name": {...}
}

or

{
    "datastream.name": [...]
}

readMapValue(map, headerName, defaultValue, headerColumn)

Auxiliary method to read values from the specified map.

A key will be created with headerName and headerColumn and the value for this key will be retrieved. If there is no entry for this key or the value is empty or undefined, defaultValue will be returned.

If headerColumn is null, only headerName will be used as the key.

Kind: inner method of Entities_Utils
Returns: * - Obtained value for specified header name and column or at least defined default value.

Param Type Description
map Object map from which to read values.
headerName String Header name for mapped row.
defaultValue * If no value is read or it is empty or undefined, default value will be returned.
headerColumn String Header column letter for mapped row (if null, only headerName will be used as key).

Example of use:

readMapValue(map, "headerName", "defaultValue", "headerColumn");

newEntityBuilder(fromEntityJson)

Creates Entity class object with specified entity json.

Kind: inner method of Entities_Utils
Returns: Entity - Entity Class instance

Param Type Description
fromEntityJson Object Json with Opengate flattened entity

Example of use:

var entity = newEntityBuilder(fromEntityJson);

Actions Utils

Action_Utils

Functions for building ODM Actions.

Action structure example:

{
   "action": "POST",
   "entityType": "device",
   "actionDescription": "Create Simple Device",
   "json": {...},
   "full": false
}

CREATE_ASSET_ACTION(entityJson, description)

Builds Create Asset action with provided JSON.

Kind: inner method of Action_Utils
Returns: Object - Created action.

Param Type Description
entityJson Object Asset Entity Json to be created.
description String Action short description.

Example of use:

const assetJson = {
    "name": "asset1",
    "description": "asset1",
    "type": "asset"
}
const action = CREATE_ASSET_ACTION(assetJson, "Create Asset");

UPDATE_ASSET_ACTION(entityJson, description)

Builds Update Asset action with provided JSON.

Kind: inner method of Action_Utils
Returns: Object - Created action.

Param Type Description
entityJson Object Asset Entity Json to be updated.
description String Action short description.

Example of use:

const assetJson = {
    "name": "asset1",
    "description": "asset1",
    "type": "asset"
}
const action = UPDATE_ASSET_ACTION(assetJson, "Update Asset");

PATCH_ASSET_ACTION(entityJson, description)

Builds Patch Asset action with provided JSON.

Kind: inner method of Action_Utils
Returns: Object - Created action.

Param Type Description
entityJson Object Asset Entity Json to be updated.
description String Action short description.

Example of use:

const assetJson = {
    "name": "asset1",
    "description": "asset1",
    "type": "asset"
}
const action = PATCH_ASSET_ACTION(assetJson, "Patch Asset");

DELETE_ASSET_ACTION(entityJson, description)

Builds Delete Asset action with provided JSON.

Kind: inner method of Action_Utils
Returns: Object - Created action.

Param Type Description
entityJson Object Asset Entity Json to be deleted.
description String Action short description.

Example of use:

const assetJson = {
    "name": "asset1",
    "description": "asset1",
    "type": "asset"
}
const action = DELETE_ASSET_ACTION(assetJson, "Delete Asset");

CREATE_DEVICE_ACTION(entityJson, description)

Builds Create Device action with provided JSON.

Kind: inner method of Action_Utils
Returns: Object - Created action.

Param Type Description
entityJson Object Device Entity Json to be created.
description String Action short description.

Example of use:

const deviceJson = {
    "name": "device1",
    "description": "device1",
    "type": "device"
}
const action = CREATE_DEVICE_ACTION(deviceJson, "Create Device");

UPDATE_DEVICE_ACTION(entityJson, description)

Builds Update Device action with provided JSON.

Kind: inner method of Action_Utils
Returns: Object - Created action.

Param Type Description
entityJson Object Device Entity Json to be updated.
description String Action short description.

Example of use:

const deviceJson = {
    "name": "device1",
    "description": "device1",
    "type": "device"
}
const action = UPDATE_DEVICE_ACTION(deviceJson, "Update Device");

PATCH_DEVICE_ACTION(entityJson, description)

Builds Patch DEVICE action with provided JSON.

Kind: inner method of Action_Utils
Returns: Object - Created action.

Param Type Description
entityJson Object Device Entity Json to be updated.
description String Action short description.

Example of use:

const deviceJson = {
    "name": "device1",
    "description": "device1",
    "type": "device"
}
const action = PATCH_DEVICE_ACTION(deviceJson, "Patch Device");

DELETE_DEVICE_ACTION(entityJson, full, description)

Builds Delete Device action with provided JSON.

Kind: inner method of Action_Utils
Returns: Object - Created action.

Param Type Description
entityJson Object Device Entity Json to be deleted.
full boolean true to delete also related Subscriptions and Subscribers.
description String Action short description.

Example of use:

const deviceJson = {
    "name": "device1",
    "description": "device1",
    "type": "device"
}
const action = DELETE_DEVICE_ACTION(deviceJson, true, "Delete Device");

CREATE_SUBSCRIPTION_ACTION(entityJson, description)

Builds Create Subscription action with provided JSON.

Kind: inner method of Action_Utils
Returns: Object - Created action.

Param Type Description
entityJson Object Subscription Entity Json to be created.
description String Action short description.

Example of use:

const subscriptionJson = {
    "name": "subscription1",
    "description": "subscription1",
    "type": "subscription"
}
const action = CREATE_SUBSCRIPTION_ACTION(subscriptionJson, "Create Subscription");

UPDATE_SUBSCRIPTION_ACTION(entityJson, description)

Builds Update Subscription action with provided JSON.

Kind: inner method of Action_Utils
Returns: Object - Created action.

Param Type Description
entityJson Object Subscription Entity Json to be updated.
description String Action short description.

Example of use:

const subscriptionJson = {
    "name": "subscription1",
    "description": "subscription1",
    "type": "subscription"
}
const action = UPDATE_SUBSCRIPTION_ACTION(subscriptionJson, "Update Subscription");

PATCH_SUBSCRIPTION_ACTION(entityJson, description)

Builds Patch Subscription action with provided JSON.

Kind: inner method of Action_Utils
Returns: Object - Created action.

Param Type Description
entityJson Object Subscription Entity Json to be updated.
description String Action short description.

Example of use:

const subscriptionJson = {
    "name": "subscription1",
    "description": "subscription1",
    "type": "subscription"
}
const action = PATCH_SUBSCRIPTION_ACTION(subscriptionJson, "Patch Subscription");

DELETE_SUBSCRIPTION_ACTION(entityJson, description)

Builds Delete Subscription action with provided JSON.

Kind: inner method of Action_Utils
Returns: Object - Created action.

Param Type Description
entityJson Object Subscription Entity Json to be deleted.
description String Action short description.

Example of use:

const subscriptionJson = {
    "name": "subscription1",
    "description": "subscription1",
    "type": "subscription"
}
const action = DELETE_SUBSCRIPTION_ACTION(subscriptionJson, "Delete Subscription");

CREATE_SUBSCRIBER_ACTION(entityJson, description)

Builds Create Subscriber action with provided JSON.

Kind: inner method of Action_Utils
Returns: Object - Created action.

Param Type Description
entityJson Object Subscriber Entity Json to be created.
description String Action short description.

Example of use:

const subscriberJson = {
    "name": "subscriber1",
    "description": "subscriber1",
    "type": "subscriber"
}
const action = CREATE_SUBSCRIBER_ACTION(subscriberJson, "Create Subscriber");

UPDATE_SUBSCRIBER_ACTION(entityJson, description)

Builds Update Subscriber action with provided JSON.

Kind: inner method of Action_Utils
Returns: Object - Created action.

Param Type Description
entityJson Object Subscriber Entity Json to be updated.
description String Action short description.

Example of use:

const subscriberJson = {
    "name": "subscriber1",
    "description": "subscriber1",
    "type": "subscriber"
}
const action = UPDATE_SUBSCRIBER_ACTION(subscriberJson, "Update Subscriber");

PATCH_SUBSCRIBER_ACTION(entityJson, description)

Builds Patch Subscriber action with provided JSON.

Kind: inner method of Action_Utils
Returns: Object - Created action.

Param Type Description
entityJson Object Subscriber Entity Json to be updated.
description String Action short description.

Example of use:

const subscriberJson = {
    "name": "subscriber1",
    "description": "subscriber1",
    "type": "subscriber"
}
const action = PATCH_SUBSCRIBER_ACTION(subscriberJson, "Patch Subscriber");

DELETE_SUBSCRIBER_ACTION(entityJson, description)

Builds Delete Subscriber action with provided JSON.

Kind: inner method of Action_Utils
Returns: Object - Created action.

Param Type Description
entityJson Object Subscriber Entity Json to be deleted.
description String Action short description.

Example of use:

const subscriberJson = {
    "name": "subscriber1",
    "description": "subscriber1",
    "type": "subscriber"
}
const action = DELETE_SUBSCRIBER_ACTION(subscriberJson, "Delete Subscriber");

_createAction(action, entityJson, entityType, full, description)

Internal method. Builds an action object with specified parameters.

Kind: inner method of Action_Utils
Returns: Object - Action object with provided parameters.

Param Type Description
action String Action to be done.
entityJson Object Entity JSON to be processed.
entityType String Entity type to be processed.
full Boolean Only for DELETE device. true to delete also related Subscriptions and Subscribers.
description String Action short description.

Example of use:

const action = _createAction("CREATE", deviceJson, "device", false, "Create Device");

V8 Utils API

V8_Api

Java V8 API: Functions encapsulate the logic for calling Java V8 Methods.

Java V8 Methods are defined in: es.amplia.odm.frontend.ws.provision.bulk.bulkProcessor.jsEngine.ProvisionProcessorScriptExecutor

These are the methods defined:

  • printLogInternal (printLog): writes INFO log messages.
    • params:
      • String msg: message to be printed.
  • getEntityInternal (getEntity): gets specific Entity for provided id.
    • params:
      • String provisionType: it should be always ‘ENTITY’.
      • String resourceType: the entity type to be retrieved.
      • String entityId: entity to be retrieved.
      • Map javaParams: mandatory params to configure the query (api key, organization id…).
    • return:
      • String: Entity json.
  • genericSearchInternal (genericSearch): searches entities with provided filter.
    • params:
      • String searchTypeValue: What kind of elements must be search.
      • String searchQueryValue: Json format filter.
      • Map javaParams: mandatory params to configure the query (api key, organization id…).
    • return:
      • String: Json with found elements and page information.

printLog(msg)

Invokes Java V8 printLogInternal method.

Kind: inner method of V8_Api

Param Type Description
msg String String to be printed in Java logs

Example of use:

printLog('Provision processor started');

getEntity(entityId, resourceType, queryContextParams)

Invokes Java V8 getEntityInternal method.

Use queryContextParams parameter to specify query behavior. It is a JSON with next properties:

  • utc: used to format datetime fields. Default value: false.
  • flattened: used to specify if entity must be returned flattened or not. Default value: true.

Kind: inner method of V8_Api
Returns: Object - Entity Json. null if no entity is found

Param Type Description
entityId String Id of the entity to be retrieved
resourceType String Parameter used to specify the entity type to be retrieved
queryContextParams Object Parameters for query. Not mandatory

Example of use:

var assetEntity = getEntity(normalizedObject.asset_identifier, 'entity.asset');

entitiesGenericSearch(searchFilter, queryContextParams)

Invokes Java V8 genericSearchInternal method for ENTITIES.

Use queryContextParams parameter to specify query behavior. It is a JSON with next properties:

  • utc: used to format datetime fields. Default value: false.
  • flattened: used to specify if entity must be returned flattened or not. Default value: true.
  • defaultSorted: specifies if result must be sorted by default field. Default value: false.

Kind: inner method of V8_Api
Returns: Object - Search result json. null if no result is found.

Param Type Description
searchFilter String json search filter
queryContextParams Object Parameters for query. Not mandatory

Example of use:

var assetEntity = entitiesGenericSearch(normalizedObject.asset_identifier, 'entity.asset');

_minJavaParams(queryContextParams)

Auxiliary method to build params maps for Java Queries

Kind: inner method of V8_Api
Returns: Object - Json object

Param Type Description
queryContextParams Object parameters for query. Not mandatory.

Example of use:

var javaParams = _minJavaParams({ utc: true });

V8_Utils

Java V8 Utils: Some predefined functions for Java V8 calls. These functions internally call V8_Api functions.

checkAsset(id)

Check if an Asset exists for specified id.

Kind: inner method of V8_Utils
Returns: boolean - If the asset exists.

Param Type Description
id String asset identifier.

Example of use:

if (checkAsset(normalizedObject.asset_identifier)) {
  printLog('Check returned true');
}

checkDevice(id)

Check if a Device exists for specified id.

Kind: inner method of V8_Utils
Returns: boolean - If the Device exists.

Param Type Description
id String Device identifier.

Example of use:

if (checkDevice(normalizedObject.device_identifier)) {
  printLog('Check returned true');
}

checkSubscription(id)

Check if a Subscription exists for specified id.

Kind: inner method of V8_Utils
Returns: boolean - If the Subscription exists.

Param Type Description
id String Subscription identifier.

Example of use:

if (checkSubscription(normalizedObject.subscription_identifier)) {
  printLog('Check returned true');
}

checkSubscriber(id)

Check if a Subscriber exists for specified id.

Kind: inner method of V8_Utils
Returns: boolean - If the Subscriber exists.

Param Type Description
id String Subscriber identifier.

Example of use:

if (checkSubscriber(normalizedObject.subscriber_identifier)) {
  printLog('Check returned true');
}

getAssetEntity(id)

Gets specific Asset for specified id.

Kind: inner method of V8_Utils
Returns: Object - Asset entity, null if the Asset does not exist.

Param Type Description
id String Asset identifier.

Example of use:

var assetEntity = getAssetEntity(normalizedObject.asset_identifier);

getDeviceEntity(id)

Gets specific Device for specified id.

Kind: inner method of V8_Utils
Returns: Object - Device entity, null if the Device does not exist.

Param Type Description
id String Device identifier.

Example of use:

var deviceEntity = getDeviceEntity(normalizedObject.device_identifier);

getSubscriptionEntity(id)

Gets specific Subscription for specified id.

Kind: inner method of V8_Utils
Returns: Object - Subscription entity, null if the Subscription does not exist.

Param Type Description
id String Subscription identifier.

Example of use:

var subscriptionEntity = getSubscriptionEntity(normalizedObject.subscription_identifier);

getSubscriberEntity(id)

Gets specific Subscriber for specified id.

Kind: inner method of V8_Utils
Returns: Object - Subscriber entity, null if the Subscriber does not exist.

Param Type Description
id String Subscriber identifier.

Example of use:

var subscriberEntity = getSubscriberEntity(normalizedObject.subscriber_identifier);

duplicatedDsInSubscriptions(currentSubscriptionId, …datastreamsToCheck)

Searches for duplicated datastreams in other Subscriptions (other than currentSubscriptionId).

Kind: inner method of V8_Utils
Returns: boolean - If some Subscription has been found with some of duplicated datastreams.

Param Type Description
currentSubscriptionId String The Subscription id with the datastreams to be checked.
…datastreamsToCheck Object Datastreams to be checked if they are duplicated. Each datastream must be defined as {“datastreamId”: “datastreamValue”}.

Example of use:

if (duplicatedDsInSubscriptions(normalizedObject.subscription_identifier, normalizedObject.datastreams)) {
  printLog('Check returned true');
}

duplicatedDsInSubscribers(currentSubscriberId, …datastreamsToCheck)

Searches for duplicated datastreams in other Subscribers (other than currentSubscriberId).

Kind: inner method of V8_Utils
Returns: boolean - If some Subscriber has been found with some of duplicated datastreams

Param Type Description
currentSubscriberId String The Subscriber id with the datastreams to be checked.
…datastreamsToCheck Object Datastreams to be checked if they are duplicated. Each datastream is defined as a pair {“datastreamId”: “datastreamValue”}.

Example of use:

if (duplicatedDsInSubscribers(normalizedObject.subscriber_identifier, normalizedObject.datastreams)) {
  printLog('Check returned true');
}

duplicatedDsInDevices(currentDeviceId, …datastreamsToCheck)

Searches for duplicated datastreams in other Devices (other than currentDeviceId).

Kind: inner method of V8_Utils
Returns: boolean - If some Device has been found with some of duplicated datastreams.

Param Type Description
currentDeviceId String The Device id with the datastreams to be checked.
…datastreamsToCheck Object Datastreams to be checked if they are duplicated. Each datastream is defined as a pair {“datastreamId”: “datastreamValue”}.

Example of use:

if (duplicatedDsInDevices(normalizedObject.device_identifier, normalizedObject.datastreams)) {
  printLog('Check returned true');
}

duplicatedDsInAssets(currentAssetId, …datastreamsToCheck)

Searches for duplicated datastreams in other Assets (other than currentAssetId).

Kind: inner method of V8_Utils
Returns: boolean - If some Asset has been found with some of duplicated datastreams.

Param Type Description
currentAssetId String The Asset id with the datastreams to be checked.
…datastreamsToCheck Object Datastreams to be checked if they are duplicated. Each datastream is defined as a pair {“datastreamId”: “datastreamValue”}.

Example of use:

if (duplicatedDsInAssets(normalizedObject.asset_identifier, normalizedObject.datastreams)) {
  printLog('Check returned true');
}

_checkEntity(id, resourceType)

Internal method. Check if an ENTITY exists for the specified id and resource type.

Kind: inner method of V8_Utils
Returns: boolean - If the ENTITY exists.

Param Type Description
id String Entity id to be checked.
resourceType String Entity type to be checked.

Example of use:

if (_checkEntity(normalizedObject.asset_identifier, 'asset')) {
  printLog('Check returned true');
}

_checkDuplicatedDS(currentEntityIdentifierDatastream, currentEntityIdentifierValue, …datastreamsToCheck)

Internal method. Searches for duplicated datastreams in other entities than the specified one.

Kind: inner method of V8_Utils
Returns: boolean - If duplicated Datasteams are found in other entities.

Param Type Description
currentEntityIdentifierDatastream String Datastream used to specify the Entity id with the datastreams to be checked.
currentEntityIdentifierValue String Value for currentEntityIdentifierDatastream field.
…datastreamsToCheck Object Datastreams to be checked if they are duplicated. Each datastream is defined as a pair {“datastreamId”: “datastreamValue”}.

Example of use:

if (_checkDuplicatedDS(normalizedObject.subscription_identifier, normalizedObject.subscription_identifier, normalizedObject.datastreams)) {
  printLog('Check returned true');
}

Error API

Error_Api

This module contains ErrorManager class specification.

ErrorManager

Class used to manage and extract information from caught provision action exception. Internally contains following objects:

  • platformErrors: list of ApiPlatformError representation.
  • actionObject: OdmProvisionAction representation.
  • defaultErrorMessage: default error message string.

Kind: inner class of Error_Api

ErrorManager(platformErrors, actionObject, defaultErrorMessage)

Initialize ErrorManager entity. Use new keyword to create an instance of ErrorManager.

Param Type Description
platformErrors Object list of ApiPlatformError representation.
actionObject Object OdmProvisionAction representation.
defaultErrorMessage String default error message.

Example of use:

var errorManager = new ErrorManager(platformErrors, actionObject, defaultErrorMessage);

errorManager.getDefaultMessage()

Kind: instance method of ErrorManager
Returns: string - initialized default message

Example of use:

var defaultMessage = errorManager.getDefaultMessage();

errorManager.getFirstError()

Returns first error object.

Kind: instance method of ErrorManager
Returns: Object - first error. It can be undefined or null.

Example of use:

var firstError = errorManager.getFirstError();

errorManager.getFirstErrorAsString()

Returns first error object as string

Kind: instance method of ErrorManager
Returns: string - first error as string. It can be undefined or null.

Example of use:

var firstErrorAsString = errorManager.getFirstErrorAsString();

errorManager.getFirstErrorMessage()

Returns first error’s message property.

Kind: instance method of ErrorManager
Returns: String - message property value. It can be undefined or null.

Example of use:

var firstErrorMessage = errorManager.getFirstErrorMessage();

errorManager.getFirstErrorCode()

Returns first error’s code property.

Kind: instance method of ErrorManager
Returns: String - code property value. It can be undefined or null.

Example of use:

var firstErrorCode = errorManager.getFirstErrorCode();

errorManager.getFirstErrorContextArray()

Returns first error’s context property.

Kind: instance method of ErrorManager
Returns: array - context property value as array. It can be undefined or null.

Example of use:

var firstErrorContextArray = errorManager.getFirstErrorContextArray();

errorManager.getFirstErrorContextArrayAsString()

Returns first error’s context property.

Kind: instance method of ErrorManager
Returns: string - context property value as string. It can be undefined or null.

Example of use:

var firstErrorContextArrayAsString = errorManager.getFirstErrorContextArrayAsString();

errorManager.getFirstContextName()

Returns first error’s first context’s name property.

Kind: instance method of ErrorManager
Returns: string - context name property value. It can be undefined or null.

Example of use:

var firstContextName = errorManager.getFirstContextName();

errorManager.getFirstContextValue()

Returns first error’s first context’s value property.

Kind: instance method of ErrorManager
Returns: string - context value property value. It can be undefined or null.

Example of use:

var firstContextValue = errorManager.getFirstContextValue();

errorManager.getFirstContext()

Returns first error’s first context object.

Kind: instance method of ErrorManager
Returns: Object - context object. It can be undefined or null.

Example of use:

var firstContext = errorManager.getFirstContext();

errorManager.getFirstContextAsString()

Returns first error’s first context object as string.

Kind: instance method of ErrorManager
Returns: string - context object as string. It can be undefined or null.

Example of use:

var firstContextAsString = errorManager.getFirstContextAsString();

errorManager.getErrorsSize()

Returns number of errors contained.

Kind: instance method of ErrorManager
Returns: number - size of contained errors.

Example of use:

var errorsSize = errorManager.getErrorsSize();

errorManager.getSpecificErrorObject(index)

Returns specific error object

Kind: instance method of ErrorManager
Returns: Object - error object. It can be undefined or null.

Param Type Description
index number error index in errors list

Example of use:

var specificErrorObject = errorManager.getSpecificErrorObject(0);

errorManager.getSpecificErrorObjectAsString(index)

Returns specific error object as a string

Kind: instance method of ErrorManager
Returns: string - error object as string. It can be undefined or null.

Param Type Description
index number error index in errors list

Example of use:

var specificErrorObjectAsString = errorManager.getSpecificErrorObjectAsString(0);

errorManager.getSpecificErrorMessage(index)

Returns specific error’s message

Kind: instance method of ErrorManager
Returns: String - message property value for specified error. It can be undefined or null.

Param Type Description
index number error index in errors list

Example of use:

var specificErrorMessage = errorManager.getSpecificErrorMessage(0);

errorManager.getSpecificErrorCode(index)

Returns specific error’s code

Kind: instance method of ErrorManager
Returns: String - code property value for specified error. It can be undefined or null.

Param Type Description
index number error index in errors list

Example of use:

var specificErrorCode = errorManager.getSpecificErrorCode(0);

errorManager.getSpecificErrorContextArray(index)

Returns specific error’s context property as array.

Kind: instance method of ErrorManager
Returns: array - context property value as array. It can be undefined or null.

Param Type Description
index number error index in errors list

Example of use:

var specificErrorContextArray = errorManager.getSpecificErrorContextArray(0);

errorManager.getSpecificErrorContextArrayAsString(index)

Returns specific error’s context property as string.

Kind: instance method of ErrorManager
Returns: string - context property value for specified error. It can be undefined or null.

Param Type Description
index number error index in errors list

Example of use:

var specificErrorContextArrayAsString = errorManager.getSpecificErrorContextArrayAsString(0);

errorManager.getSpecificContext(errorIndex, contextIndex)

Returns specific context in specific error.

Kind: instance method of ErrorManager
Returns: Object - context object. It can be undefined or null.

Param Type Description
errorIndex number error index in errors list
contextIndex number context index in specified error

Example of use:

var specificContext = errorManager.getSpecificContext(0, 0);

errorManager.getSpecificContextAsString(errorIndex, contextIndex)

Returns specific context in specific error as string.

Kind: instance method of ErrorManager
Returns: string - context object. It can be undefined or null.

Param Type Description
errorIndex number error index in errors list
contextIndex number context index in specified error

Example of use:

var specificContextAsString = errorManager.getSpecificContextAsString(0, 0);

errorManager.getSpecificContextName(errorIndex, contextIndex)

Returns specific context’s name in specific error.

Kind: instance method of ErrorManager
Returns: string - name property value for specified context. It can be undefined or null.

Param Type Description
errorIndex number error index in errors list
contextIndex number context index in specified error

Example of use:

var specificContextName = errorManager.getSpecificContextName(0, 0);

errorManager.getSpecificContextValue(errorIndex, contextIndex)

Returns specific context’s value in specific error.

Kind: instance method of ErrorManager
Returns: string - value property value for specified context. It can be undefined or null.

Param Type Description
errorIndex number error index in errors list
contextIndex number context index in specified error

Example of use:

var specificContextValue = errorManager.getSpecificContextValue(0, 0);

errorManager.getAdministrationIdentifier()

Returns entity administration identifier.

Kind: instance method of ErrorManager
Returns: string - It can be undefined or null.

Example of use:

var administrationIdentifier = errorManager.getAdministrationIdentifier();

errorManager.getDatastreamValue(index)

Returns from entity (in OdmProvisionAction) specific datastream value (datastream._value._current.value). It can be an object or plain string.

Kind: instance method of ErrorManager
Returns: Object - Object with specific datastream. It can be undefined or null.

Param Type Description
index number error index in errors list

Example of use:

var datastreamValue = errorManager.getDatastreamValue(0);

errorManager.getDatastreamValueAsString(index)

Returns from entity (in OdmProvisionAction) specific datastream value (datastream._value._current.value). It can be a json string.

Kind: instance method of ErrorManager
Returns: string - String with specific datastream. It can be undefined or null.

Param Type Description
index number error index in errors list

Example of use:

var datastreamValueAsString = errorManager.getDatastreamValueAsString(0);

errorManager.getAction()

Returns provision action type (POST, PUT, PATCH, DELETE) from OdmProvisionAction

Kind: instance method of ErrorManager
Returns: string - It can be undefined or null.

Example of use:

var action = errorManager.getAction();

errorManager.isPost()

Kind: instance method of ErrorManager
Returns: boolean - true if provision action is POST.

Example of use:

var isPost = errorManager.isPost();

errorManager.isPut()

Kind: instance method of ErrorManager
Returns: boolean - true if provision action is PUT.

Example of use:

var isPut = errorManager.isPut();

errorManager.isPatch()

Kind: instance method of ErrorManager
Returns: boolean - true if provision action is PATCH.

Example of use:

var isPatch = errorManager.isPatch();

errorManager.isDelete()

Kind: instance method of ErrorManager
Returns: boolean - true if provision action is DELETE.

Example of use:

var isDelete = errorManager.isDelete();

errorManager.getEntityType()

Returns provision entity type (asset, device, subscription, subscriber) from OdmProvisionAction

Kind: instance method of ErrorManager
Returns: string - It can be undefined or null.

Example of use:

var entityType = errorManager.getEntityType();

errorManager.isSubscription()

Kind: instance method of ErrorManager
Returns: boolean - true if provision entity is subscription.

Example of use:

var isSubscription = errorManager.isSubscription();

errorManager.isSubscriber()

Kind: instance method of ErrorManager
Returns: boolean - true if provision entity is subscriber.

Example of use:

var isSubscriber = errorManager.isSubscriber();

errorManager.isDevice()

Kind: instance method of ErrorManager
Returns: boolean - true if provision entity is device.

Example of use:

var isDevice = errorManager.isDevice();

errorManager.isAsset()

Kind: instance method of ErrorManager
Returns: boolean - true if provision entity is asset.

Example of use:

var isAsset = errorManager.isAsset();

Rules

Introduction

A rule is primarily composed of conditions and actions. When a rule is defined, a rule type can be specified, which determines the structure of the rule.

  • DATASTREAM: This type of rule would be evaluated if data were collected in the South API.
  • OPERATION: This type of rule would be evaluated if an operation were executed on the Opengate platform.
  • EVENT: This type of rule would be evaluated if an event were sent to the Opengate platform.

Automation rules

The set of conditions and actions can be defined in EASY mode using a JSON structure, or alternatively, an advanced rule can be written in JavaScript code.

Easy mode

The “easy mode” allows users to define new rules using the JSON format. Firstly, the rule type must be specified, as this will determine the structure of the rule.

  • Data stream: If this option is selected, the rules engine will evaluate data stream rules if an entity is modified using the north OpenGate API or when OpenGate collects data through any of the south connectors. In this case, the data streams that the rule will use must be configured in the condition.
  • Operation: If this option is selected, the rules engine will evaluate operation responses after they have been managed by the OpenGate operations engine.

Configure data stream and parameters in the rule

It is possible to utilise data streams and parameter values within the configuration of rules. This can be done in a number of ways, including in conditions and some attributes in rule actions.

  • datastream: $datastream:<id_datastream>
  • parameter: $parameter:<id_parameter>

Example:

  • datastream: $datastream:device.identifier._current.value
  • parameter: $parameter:threshnew

Further examples can be found in the schemas’ objects.

Comprehensive API actions

Updating a rule

All fields may be updated in accordance with the same validations as a POST request, with the exception of identifier, organisation and channel. Furthermore, an ADVANCED rule cannot be changed to EASY mode.

API specification

Subsections of Rules

Advanced Rules Mode

Rules in Advanced Mode

In advanced rules, you can write conditions and actions in javascript language.

In this javascript code, it is possible to call some defined functions to execute the same actions that you can do in easy mode. On the other hand, we also have some help functions. We will explain them below.

The main function will receive a flattened entity representation, adding the _received and _previous values to each datastream. The _received field is a simple object in provision datastreams and an array object in any other case.

We will use the following entity as an example:

entity = {
  "provision.administration.channel": {
    "_value": {
      "_current": {
        "value": "battery_channel",
        "date": "2017-12-01T08:52:37.563Z",
        "at": "2017-12-01T08:52:37.563Z"
      },
      "_previous": {
        "value": "battery_channel",
        "date": "2017-12-01T08:52:37.563Z",
        "at": "2017-12-01T08:52:37.563Z"
      }
    }
  },
  "provision.administration.identifier": {
    "_value": {
      "_current": {
        "value": "device_battery_id",
        "provType": "MONITORING",
        "date": "2017-12-01T08:52:37.57Z",
        "at": "2017-12-01T08:52:37.57Z"
      },
      "_previous": {
        "value": "battery_organization",
        "provType": "MONITORING",
        "date": "2017-12-01T08:52:37.566Z",
        "at": "2017-12-01T08:52:37.566Z"
      }
    }
  },
  "provision.administration.organization": {
    "_value": {
      "_current": {
        "value": "battery_organization",
        "provType": "MONITORING",
        "date": "2017-12-01T08:52:37.566Z",
        "at": "2017-12-01T08:52:37.566Z"
      },
      "_previous": {
        "value": "battery_organization",
        "provType": "MONITORING",
        "date": "2017-12-01T08:52:37.566Z",
        "at": "2017-12-01T08:52:37.566Z"
      }
    }
  },
  "provision.administration.plan": {
    "_value": {
      "_current": {
        "value": "FLOW_RATE_100",
        "provType": "MONITORING",
        "date": "2017-12-01T08:52:37.565Z",
        "at": "2017-12-01T08:52:37.565Z"
      },
      "_previous": {
        "value": "FLOW_RATE_100",
        "provType": "MONITORING",
        "date": "2017-12-01T08:52:37.565Z",
        "at": "2017-12-01T08:52:37.565Z"
      }
    }
  },
  "provision.administration.serviceGroup": {
    "_value": {
      "_current": {
        "value": "emptyServiceGroup",
        "provType": "MONITORING",
        "date": "2017-12-01T08:52:37.561Z",
        "at": "2017-12-01T08:52:37.561Z"
      },
      "_previous": {
        "value": "emptyServiceGroup",
        "provType": "MONITORING",
        "date": "2017-12-01T08:52:37.561Z",
        "at": "2017-12-01T08:52:37.561Z"
      }
    }
  },
  "provision.device.communicationModules[].identifier": [
    {
      "_index": {
        "path": "provision.device.communicationModules[].identifier",
        "value": {
          "_current": {
            "value": "commsMod_battery_id",
            "provType": "MONITORING",
            "date": "2017-12-01T08:52:37.577Z",
            "at": "2017-12-01T08:52:37.577Z"
          }
        }
      },
      "_value": {
        "_current": {
          "value": "commsMod_battery_id",
          "provType": "MONITORING",
          "date": "2017-12-01T08:52:37.577Z",
          "at": "2017-12-01T08:52:37.577Z"
        },
        "_previous": {
          "value": "commsMod_battery_id",
          "provType": "MONITORING",
          "date": "2017-12-01T08:52:37.577Z",
          "at": "2017-12-01T08:52:37.577Z"
        }
      }
    }
  ],
  "provision.device.communicationModules[].subscription.address": [
    {
      "_index": {
        "path": "provision.device.communicationModules[].identifier",
        "value": {
          "_current": {
            "value": "commsMod_battery_id",
            "provType": "MONITORING",
            "date": "2017-12-01T08:52:37.577Z",
            "at": "2017-12-01T08:52:37.577Z"
          }
        }
      },
      "_value": {
        "_current": {
          "value": {
            "type": "IPV4",
            "value": "99.1.1.71",
            "apn": "myapnprov.es"
          },
          "provType": "REFERENCE",
          "date": "2017-12-01T08:52:37.624Z",
          "at": "2017-12-01T08:52:37.624Z"
        },
        "_previous": {
          "value": {
            "type": "IPV4",
            "value": "99.1.1.71",
            "apn": "myapnprov.es"
          },
          "provType": "REFERENCE",
          "date": "2017-12-01T08:52:37.624Z",
          "at": "2017-12-01T08:52:37.624Z"
        }
      }
    }
  ],
  "provision.device.communicationModules[].subscription.identifier": [
    {
      "_index": {
        "path": "provision.device.communicationModules[].identifier",
        "value": {
          "_current": {
            "value": "commsMod_battery_id",
            "provType": "MONITORING",
            "date": "2017-12-01T08:52:37.577Z",
            "at": "2017-12-01T08:52:37.577Z"
          }
        }
      },
      "_value": {
        "_current": {
          "value": "subscription_battery_id",
          "provType": "MONITORING",
          "date": "2017-12-01T08:52:37.626Z",
          "at": "2017-12-01T08:52:37.626Z"
        },
        "_previous": {
          "value": "subscription_battery_id",
          "provType": "MONITORING",
          "date": "2017-12-01T08:52:37.626Z",
          "at": "2017-12-01T08:52:37.626Z"
        }
      }
    }
  ],
  "provision.device.identifier": {
    "_value": {
      "_current": {
        "value": "device_battery_id",
        "provType": "MONITORING",
        "date": "2017-12-01T08:52:37.636Z",
        "at": "2017-12-01T08:52:37.636Z"
      },
      "_previous": {
        "value": "device_battery_id",
        "provType": "MONITORING",
        "date": "2017-12-01T08:52:37.636Z",
        "at": "2017-12-01T08:52:37.636Z"
      }
    }
  },
  "provision.device.location": {
    "_value": {
      "_current": {
        "value": {
          "position": {
            "type": "Point",
            "coordinates": [
              -3.7028,
              40.41675
            ]
          },
          "postal": "28013"
        },
        "provType": "MONITORING",
        "date": "2017-12-01T08:52:37.64Z",
        "at": "2017-12-01T08:52:37.64Z"
      },
      "_previous": {
        "value": {
          "position": {
            "type": "Point",
            "coordinates": [
              -3.7028,
              40.41675
            ]
          },
          "postal": "28013"
        },
        "provType": "MONITORING",
        "date": "2017-12-01T08:52:37.64Z",
        "at": "2017-12-01T08:52:37.64Z"
      }
    }
  },
  "resourceType": {
    "_value": {
      "_current": {
        "value": "entity.device",
        "provType": "IDENTIFIER",
        "date": "2017-12-01T08:52:37.643Z",
        "at": "2017-12-01T08:52:37.643Z"
      },
      "_previous": {
        "value": "entity.device",
        "provType": "IDENTIFIER",
        "date": "2017-12-01T08:52:37.643Z",
        "at": "2017-12-01T08:52:37.643Z"
      }
    }
  },
  "device.communicationModules[].identifier": [
    {
      "_index": {
        "path": "device.communicationModules[].identifier",
        "value": {
          "_current": {
            "value": "commsMod_battery_id",
            "date": "2017-12-01T08:52:37.577Z",
            "at": "2017-12-01T08:52:37.577Z"
          }
        }
      },
      "_value": {
        "_current": {
          "value": "commsMod_battery_id",
          "date": "2017-12-01T08:52:37.577Z",
          "at": "2017-12-01T08:52:37.577Z"
        },
        "_previous": {
          "value": "commsMod_battery_id",
          "date": "2017-12-01T08:52:37.577Z",
          "at": "2017-12-01T08:52:37.577Z"
        }
      }
    }
  ],
  "device.communicationModules[].subscription.address": [
    {
      "_index": {
        "path": "device.communicationModules[].identifier",
        "value": {
          "_current": {
            "value": "commsMod_battery_id",
            "date": "2017-12-01T08:52:37.577Z",
            "at": "2017-12-01T08:52:37.577Z"
          }
        }
      },
      "_value": {
        "_current": {
          "value": {
            "type": "IPV4",
            "value": "99.1.1.71",
            "apn": "myapn.es"
          },
          "date": "2017-12-01T08:52:37.624Z",
          "at": "2017-12-01T08:52:37.624Z",
          "source": "DEVICE_OPENGATE_HTTP",
          "sourceInfo": "IoT Data Message Received"
        },
        "_previous": {
          "value": {
            "type": "IPV4",
            "value": "99.1.1.71",
            "apn": "myapn.es"
          },
          "date": "2017-12-01T08:52:37.624Z",
          "at": "2017-12-01T08:52:37.624Z",
          "source": "DEVICE_OPENGATE_HTTP",
          "sourceInfo": "IoT Data Message Received"
        }
      }
    }
  ],
  "device.communicationModules[].subscription.identifier": [
    {
      "_index": {
        "path": "device.communicationModules[].identifier",
        "value": {
          "_current": {
            "value": "commsMod_battery_id",
            "date": "2017-12-01T08:52:37.577Z",
            "at": "2017-12-01T08:52:37.577Z"
          }
        }
      },
      "_value": {
        "_current": {
          "value": "subscription_battery_id",
          "date": "2017-12-01T08:52:37.626Z",
          "at": "2017-12-01T08:52:37.626Z",
          "source": "DEVICE_OPENGATE_HTTP",
          "sourceInfo": "IoT Data Message Received"
        },
        "_previous": {
          "value": "subscription_battery_id",
          "date": "2017-12-01T08:52:37.626Z",
          "at": "2017-12-01T08:52:37.626Z",
          "source": "DEVICE_OPENGATE_HTTP",
          "sourceInfo": "IoT Data Message Received"
        }
      }
    }
  ],
  "device.identifier": {
    "_value": {
      "_received": [{
        "value": "device_battery_id",
        "date": "2017-12-01T08:52:37.636Z",
        "at": "2017-12-01T08:52:37.636Z",
        "source": "DEVICE_OPENGATE_HTTP",
        "sourceInfo": "IoT Data Message Received"
      }],
      "_current": {
        "value": "device_battery_id",
        "date": "2017-12-01T08:52:37.636Z",
        "at": "2017-12-01T08:52:37.636Z",
        "source": "DEVICE_OPENGATE_HTTP",
        "sourceInfo": "IoT Data Message Received"
      },
      "_previous": {
        "value": "device_battery_id",
        "date": "2017-12-01T08:52:37.636Z",
        "at": "2017-12-01T08:52:37.636Z",
        "source": "DEVICE_OPENGATE_HTTP",
        "sourceInfo": "IoT Data Message Received"
      }
    }
  },
  "device.temperature.value": {
    "_value": {
      "_received": [{
        "value": 25.3,
        "date": "2017-12-01T08:52:37.64Z",
        "at": "2017-12-01T08:52:37.64Z",
        "source": "DEVICE_OPENGATE_HTTP",
        "sourceInfo": "IoT Data Message Received"
      }],
      "_current": {
        "value": 25.3,
        "date": "2017-12-01T08:52:37.64Z",
        "at": "2017-12-01T08:52:37.64Z",
        "source": "DEVICE_OPENGATE_HTTP",
        "sourceInfo": "IoT Data Message Received"
      },
      "_previous": {
        "value": 23.3,
        "date": "2017-12-01T05:52:37.64Z",
        "at": "2017-12-01T05:52:37.64Z",
        "source": "DEVICE_OPENGATE_HTTP",
        "sourceInfo": "IoT Data Message Received"
      }
    }
  }
}
  

Executing Actions

Executing actions

openAlarm(subEntityIdentifier, alarmName, ruleName, severity, priority, alarmDescription, extraInfo)

Deprecated: Use alarm object functions instead.

Opens an alarm for the selected entity.

Kind: global function
Returns: void

Param Type Description
subEntityIdentifier String You can open an alarm on device, subscription or subscriber identifier. With subEntityIdentifier you define selected identifier. If is undefined it will open on provision.administration.identifier identifier.
alarmName String Name that you want to see in opened alarm
ruleName String Name of rule that produce opening of alarm.
severity String Alarm severity. Values can be INFORMATIVE, URGENT or CRITICAL.
priority String Alarm priority. Values can be LOW, MEDIUM or HIGH.
alarmDescription String Alarm description.
extraInfo String Extra information.

Examples of use This example open alarm apnMismatch to subscription.

openAlarm('subscription_battery_id', 'apnMismatch' , 'apnMismatchRule', 'URGENT', 'MEDIUM', 'APN mismatch with provisioned value')

And this example open alarm highTemperature to device.

openAlarm(undefined, 'highTemperature' , 'highTemperatureRule', 'URGENT', 'MEDIUM', 'Device temperature is high')

closeAlarmByRuleName(entityIdDatastream, ruleName)

Deprecated: Use alarm object functions instead.

Closes an alarm for the selected entity using rule name.

Kind: global function
Returns: void

Param Type Description
entityIdDatastream String You can close an alarm on device, subscription or subscriber identifier. With entityIdDatastream you define selected identifier. If is undefined it will close on provision.administration.identifier identifier.
ruleName String Name of rule that open alarm.

Example of use:

closeAlarmByRuleName(undefined, 'highTemperatureRule')

closeAlarmByAlarmName(entityIdDatastream, alarmName)

Deprecated: Use alarm object functions instead.

Closes an alarm for the selected entity using alarm name.

Kind: global function
Returns: void

Param Type Description
entityIdDatastream String You can close an alarm on device, subscription or subscriber identifier. With entityIdDatastream you define selected identifier. If is undefined it will close on provision.administration.identifier identifier.
alarmName String Name of alarm to close.

Example of use:

closeAlarmByAlarmName(undefined, 'alarm name')

addEmailNotification(recipients, notificationName, notificationBody, ruleName, mailParameters)

Deprecated: Use notification object functions instead.

Sends email notification to defined recipients.

Kind: global function
Returns: void

Param Type Description
recipients Array Array of recipients to send email. This param has same format as defined in easy mode.
notificationName String Name of notification that will be received in subject field.
notificationBody String Mustache template with email’s body
ruleName String Name of rule that launch email request.
mailParameters Object Json object with key-value pairs that will be replaces in mustache evaluation.

Example of use:

The example send email to example@recipient.es with highTemperature notification.

parameters = {};
parameters['deviceIdentifier'] = getDatastreamFromEntity('device.identifier')._current.value;
parameters['deviceTemperature'] = getDatastreamFromEntity('device.temperature')._current.value;
addEmailNotification(['example@recipient.es'], 'highTemperature', 'Received high temperature from {{deviceIdentifier}} with value {{deviceTemperature}}', 'highTemperatureRule', parameters);

addTrapNotification(recipients, variables, notificationName, trapOID, enterpriseOID, ruleName)

Deprecated: Use notification object functions instead.

Sends trap notification to defined recipients.

Kind: global function
Returns: void

Param Type Description
recipients Array Array of recipients (<ip>:<port>) to send trap. This param has same format as defined in easy mode.
variables Object Map of variables. Each pair defines OID variable and sent value for this OID.
notificationName String Name of notification
trapOID String OID of trap
enterpriseOID String OID of enterprise
ruleName String Name of rule

Example of use:

The example send trap to 25.35.98.5:8585 with highTemperature notification.

var recipients = ['25.35.98.5:8585'];
var trapVariables = {
  '1.1.1': entity['provision.administration.organization']._value._current.value,
  '1.1.2': entity['provision.administration.channel']._value._current.value,
  '1.1.3': entity['provision.administration.identifier']._value._current.value,
  '1.1.4': entity['device.temperature']._value._current.value,
  '1.1.5': entity['device.temperature']._value._previous.value,
  '1.1.6': Date.now()
};         

addTrapNotification(recipients, trapVariables, 'highTemperature', '1.100.1', '1.2.7.3.1.2.25841', 'highTemperatureRule');

sendHttp(httpJson)

Deprecated: Use notification object functions instead.

Sends http notification to defined recipients.

Kind: global function
Returns: void

Param Type Description
httpJson Object Same json that easy mode.

Example of use:

The example send http request to http://myService/request with highTemperature notification.

httpJson = {
  'url': 'http://myService/request',
  'method' : 'POST',
  'headers': {
    'Content-type': 'application/json'
  },
  'queryParams' : {
    'deviceId' : entity['provision.device.identifier']._value._current.value
  },
  'body' : 'New alert received by high temperature received. Current value: ' + entity['device.temperature']._value._current.value
};
sendHttp(httpJson);

executeOperation(subEntityIdentifier, operationType, operationTimeout, jobUser, retries, ackTimeout, retriesDelay, stopValue, stopMode, parameters, callback)

Deprecated: Use operation object functions instead.

Executes selected operation to received identifier.

Kind: global function
Returns: void

Param Type Description
subEntityIdentifier String You can execute operation on device, subscription or subscriber identifier. With subEntityIdentifier you define selected identifier. If is undefined it will open on provision.administration.identifier identifier.
operationType String Operation Identifier. You can get this values getting operation catalog. Mandatory field. The rule will be created, but the operation will not.
operationTimeout Number Operation timeout in milliseconds. Default: 60000 milliseconds
jobUser String User apiKey that launch this operation. Mandatory field. The rule will be created, but the operation will not.
retries Number Operation retries number. Default: 0.
ackTimeout Number ACK timeout in milliseconds. Default: null.
retriesDelay Number Delay in seconds between retries. Default: null.
stopValue Number Stop value, this value depends of stop mode selected. Default: Operation timeout + 5000.
stopMode String Stop mode. Default: delayed. Possible values: date (stop value is a date in YYYY-MM-DDThh:mm:ssTZD format) and delayed (stop value is a time defined in milliseconds).
parameters Object This value is a json with accepted value in selected operation. You can see parameters getting operation catalog.
callback String URI where the result of the operation execution is received.

NOTE: The Job of the operation will be created with an active status by default.

Example of use:

The example execute REFRESH_PRESENCE operation to received device.

apiKey = getVariableValue(parameters['apiKey']);
parameters = {
  'active': false
};
executeOperation(entity['provision.administration.identifier']._value._current.value, 'REFRESH_PRESENCE', 20000, apiKey, 0, null, null, 25000, 'delayed', parameters, callback);

cancelDelay(ruleName)

Deprecated: Use utils object functions instead.

Cancels active delayed action produced by another rule activation.

Kind: global function
Returns: void

Param Type Description
ruleName String Name of rule that produce delayed actions.

Example of use:

The example cancel delay of ‘highTemperatureRule’ rule.

cancelDelay('highTemperatureRule');

Alarm utils

Alarm

The alarm object is the main object for managing alarms.

alarm.open(alarmConfig)

Opens an alarm.

Returns: void

This function takes as parameter an object with the following fields:

Property Type Default Mandatory Description
subEntityIdentifier String entityId No You can open an alarm on device, subscription or subscriber identifier. With subEntityIdentifier you define selected identifier. If is undefined it will open on provision.administration.identifier identifier
alarmName String No Name that you want to see in opened alarm
ruleName String No Name of rule that produce opening of alarm
severity String ‘INFORMATIVE’ No Severity of alarm. Values can be INFORMATIVE, URGENT or CRITICAL
priority String ‘LOW’ No Priority of alarm. Values can be LOW, MEDIUM or HIGH
description String No Alarm description
extraInfo String No Extra information.

Example of use:

This example open alarm apnMismatch to subscription.

alarmConfig = {
    subEntityIdentifier: "id",
    alarmName: "apnMismatch",
    ruleName: "apnMismatchRule",
    severity: "URGENT",
    priority: "MEDIUM",
    description: "APN mismatch with provisioned value",
    extraInfo: "Extra information"
}
  
alarm.open(alarmConfig);

And this example open alarm highTemperature to device.

alarmConfigDevice = {
    alarmName: "highTemperature",
    ruleName: "highTemperatureRule",
    severity: "URGENT",
    priority: "MEDIUM",
    description: "Device temperature is high"
}

alarm.open(alarmConfigDevice);

alarm.closeByRuleName(closeByRuleConfig)

Closes alarm by rule name.

Returns: void

This function takes as parameter an object with the following fields:

Property Type Default Mandatory Description
ruleName String Yes Rule name that open alarm.
entityIdDatastream String No You can close an alarm on device, subscription or subscriber identifier. With entityIdDatastream you define selected identifier. If is undefined it will close on provision.administration.identifier identifier.

Example of use:

The example close alarm generated by highTemperatureRule to device.

closeByRuleConfig = {
    ruleName: "highTemperatureRule"
}

alarm.closeByRuleName(closeByRuleConfig);

alarm.closeByAlarmName(closeByNameConfig)

Closes alarm by alarm name.

Returns: void

This function takes as parameter an object with the following fields:

Property Type Default Mandatory Description
alarmName String Yes Opened alarm name.
entityIdDatastream String No You can close an alarm on device, subscription or subscriber identifier. With entityIdDatastream you define selected identifier. If is undefined it will close on provision.administration.identifier identifier.

Example of use:

The example close opened alarm apnMismatch to device.

closeByNameConfig = {
    alarmName: "highTemperatureRule"
}

alarm.closeByAlarmName(closeByNameConfig);

Notifications utils

Notification

The notification object is the main object for managing notifications.

notification.addEmailNotification(emailConfig)

Sends an email notification to defined recipients.

Returns: void

This function takes as parameter an object with the following fields:

Property Type Default Mandatory Description
jsRecipients List Yes Array of recipients to send email. This param has same format as defined in easy mode
notificationName String Yes Name of notification that will be received in subject field
notificationBody String Yes Mustache template with email’s body
ruleName String Yes Name of rule that launch email request
mailParameters Object No Json object with key-value pairs that will be replaces in mustache evaluation

Example of use:

The example send email to example@recipient.es with highTemperature notification.

emailNotifConfig = {
    jsRecipients: ['example@recipient.es'],
    notificationName: 'highTemperature',
    notificationBody: 'Received high temperature from {{deviceIdentifier}} with value {{deviceTemperature}}',
    ruleName: 'highTemperatureRule',
    mailParameters: {
        deviceIdentifier: getDatastreamFromEntity('device.identifier')._current.value,
        deviceTemperature: getDatastreamFromEntity('device.temperature')._current.value
    }
}
    
notification.addEmailNotification(emailNotifConfig);

notification.addTrapNotification(trapConfig)

Sends an SNMP trap notification to defined recipients.

This function takes as parameter an object with the following fields:

Property Type Default Mandatory Description
jsRecipients List Yes Array of recipients (<ip>:<port>) to send trap. This param has same format as defined in easy mode
jsVariables Object Yes Map of variables. Each pair defines OID variable and sent value for this OID
notificationName String Yes Name of notification
trapOID String Yes OID of trap
enterpriseOID String Yes OID of enterprise
ruleName String Yes Name of rule

Example of use:

The example send trap to 25.35.98.5:8585 with highTemperature notification.

trapNotifConfig = {
    jsRecipients: ['25.35.98.5:8585'],
    jsVariables: {
      '1.1.1': entity['provision.administration.organization']._value._current.value,
      '1.1.2': entity['provision.administration.channel']._value._current.value,
      '1.1.3': entity['provision.administration.identifier']._value._current.value,
      '1.1.4': entity['device.temperature']._value._current.value,
      '1.1.5': entity['device.temperature']._value._previous.value,
      '1.1.6': Date.now()
    },
    notificationName: 'highTemperature',
    trapOID: '1.100.1',
    enterpriseOID: '1.2.7.3.1.2.25841',
    ruleName: 'highTemperatureRule'
}

notification.addTrapNotification(trapNotifConfig);

notification.sendHttp(httpConfig)

Sends an HTTP request notification to a specified URL.

Returns: void

This function takes as parameter an object with the following fields:

Property Type Default Mandatory Description
url String Yes URL to which the HTTP request will be sent
method String Yes HTTP method to be used for the request
headers Object No Key-value pairs representing HTTP headers
queryParams Object No Key-value pairs representing query parameters
body String No Body of the HTTP request

Example of use:

The example sends http request to http://myService/request with highTemperature notification.

httpJson = {
  'url': 'http://myService/request',
  'method' : 'POST',
  'headers': {
    'Content-type': 'application/json'
  },
  'queryParams' : {
    'deviceId' : entity['provision.device.identifier']._value._current.value
  },
  'body' : 'New alert received by high temperature received. Current value: ' + entity['device.temperature']._value._current.value
};

notification.sendHttp(httpJson);

Operation utils

Operation

The operation object is the main object for executing operations.

operation.execute(operationConfig)

Execute selected operation to received identifier.

Returns: void

This function takes as parameter an object with the following fields:

Property Type Default Mandatory Description
subEntityIdentifier String No You can execute operation on device, subscription or subscriber identifier. With subEntityIdentifier you define selected identifier. Default: If is undefined it will open on provision.administration.identifier identifier.
operationType String Yes Operation Identifier. You can get this values getting operation catalog. Mandatory field. The rule will be created, but the operation will not.
operationTimeout Number 60000 No Operation timeout in milliseconds.
jobUser String Yes User apiKey that launch this operation. Mandatory field. The rule will be created, but the operation will not.
retries Number 0 No Operation retries number.
ackTimeout Number null No ACK timeout in milliseconds.
retriesDelay Number 0 No Delay in seconds between retries.
stopValue String operationTimeout + 5000 No Stop value, this value depends of stop mode selected.
stopMode String delayed No Stop mode. Possible values are: date: If this mode is selected, stop value is a date in YYYY-MM-DDThh:mm:ssTZD format. delayed: If this mode is selected, stop value is a time defined in milliseconds.
parameters Object {} No This value is a json with accepted value in selected operation. You can see parameters getting operation catalog.
callback String null No URI where the result of the operation execution is received.

NOTE: The Job of the operation will be created with an active status by default.

Example of use:

The example execute ADMINISTRATIVE_STATUS_CHANGE operation to received device.

operationConfig = {
    subEntityIdentifier: entity['provision.administration.identifier']._value._current.value,
    operationType: 'ADMINISTRATIVE_STATUS_CHANGE',     
    operationTimeout: 20000,   
    jobUser: apiKey,           
    retries: 1,            
    ackTimeout: 5000,        
    retriesDelay: 0,      
    stopValue: '25000',         
    stopMode: 'delayed',
    callback: 'http://127.0.0.1:7070/directory',
    parameters: {
        admsts: 'BANNED'
    }
}

operation.execute(operationConfig);

Another example with stopMode = date

operationConfig = {
    subEntityIdentifier: entity['provision.administration.identifier']._value._current.value,
    operationType: 'REFRESH_PRESENCE',     
    operationTimeout: 20000,   
    jobUser: apiKey,           
    retries: 1,            
    ackTimeout: 5000,        
    retriesDelay: 0,      
    stopMode: 'date',
    stopValue: '2045-11-08T08:30:00+02:00',
    callback: 'http://127.0.0.1:7070/directory',
    parameters: {}
}

operation.execute(operationConfig);

Provision utils

Provision

The provision object is the main object for changing provision data.

provision.datastreams(provisionConfig)

Returns: void

This function takes as parameter an object with the following fields:

Property Type Mandatory Description
datastreams Object Yes Map where key is datastreamId and value is value to set in provision.
apiKey String Yes User apiKey that launches this provision.

Example of use:

var provisionConfig = {
    datastreams: {'datastream1':'value1','datastreamN':'valueN'},
    apiKey: 'the_api_key'
}

provision.datastreams(provisionConfig);

Datastreams and values

Getting and formatting datastreams and values

getVariableValue(variable)

This method reads a variable value.

Kind: global function
Returns: The read value, or undefined if the variable is not found.

Param Type Description
variable String Variable to obtain value.

Examples of use:

var myVar = undefined;
var finalVar = getVariableValue(myVar);

Result is ‘’;

This function returns the same value

var myVar = 2;
var finalVar = getVariableValue(myVar);

Result is 2;

getDatastreamFromEntity(datastreamId)

This method returns completed datastream of received entity.

Kind: global function
Returns: Completed datastream or undefined if the datastream is not found.

Param Type Description
datastreamId String Datastream to obtain value.

Example of use:

var deviceTemperature = getDatastreamFromEntity('device.temperature');

Result:

{
  "_received": [
    {
      "value": 25.3,
      "date": "2017-12-01T08:52:37.64Z",
      "at": "2017-12-01T08:52:37.64Z",
      "source": "DEVICE_OPENGATE_HTTP",
      "sourceInfo": "IoT Data Message Received"
    }
  ],
  "_current": {
    "value": 25.3,
    "date": "2017-12-01T08:52:37.64Z",
    "at": "2017-12-01T08:52:37.64Z",
    "source": "DEVICE_OPENGATE_HTTP",
    "sourceInfo": "IoT Data Message Received"
  },
  "_previous": {
    "value": 23.3,
    "date": "2017-12-01T05:52:37.64Z",
    "at": "2017-12-01T05:52:37.64Z",
    "source": "DEVICE_OPENGATE_HTTP",
    "sourceInfo": "IoT Data Message Received"
  }
}

getDatastreamValueFromEntity(datastreamObject)

Returns _value._current._value from datastream object

Kind: global function
Returns: Value object from datastream object.

Param Type Description
datastreamObject Object Datastream object.

Example of use:

var deviceTemperature = getDatastreamFromEntity('device.temperature');
var deviceTemperatureValue = getDatastreamValueFromEntity(deviceTemperature);

Result:

{
  "value": 25.3,
  "date": "2017-12-01T08:52:37.64Z",
  "at": "2017-12-01T08:52:37.64Z",
  "source": "DEVICE_OPENGATE_HTTP",
  "sourceInfo": "IoT Data Message Received"
}

getCommsDatastreamFromEntity(datastreamId, commsId)

Returns complete datastream in selected communication module of received entity.

Kind: global function
Returns: Complete datastream or undefined if the datastream is not found.

Param Type Description
datastreamId String Datastream to obtain value.
commsId String Communication module identifier.

Example of use:

datastream = getCommsDatastreamFromEntity('device.communicationModules[].subscription.address', 'commsMod_battery_id');

Result:

{
  "_current": {
    "value": {
      "type": "IPV4",
      "value": "99.1.1.71",
      "apn": "myapn.es"
    },
    "date": "2017-12-01T08:52:37.624Z",
    "at": "2017-12-01T08:52:37.624Z",
    "source": "DEVICE_OPENGATE_HTTP",
    "sourceInfo": "IoT Data Message Received"
  },
  "_previous": {
    "value": {
      "type": "IPV4",
      "value": "99.1.1.71",
      "apn": "myapn.es"
    },
    "date": "2017-12-01T08:52:37.624Z",
    "at": "2017-12-01T08:52:37.624Z",
    "source": "DEVICE_OPENGATE_HTTP",
    "sourceInfo": "IoT Data Message Received"
  }
}

getCounterValue(datastreamValue, incValue, resetDate)

Obtains incValue if datastreamValue date is before than resetDate or increments received value in datastream to incValue if the date is after.

Kind: global function
Returns: Incremented value or reset value.

Param Type Description
datastreamValue Object Datastream value.
incValue Number Value to increment.
resetDate Date Date of reset.

Example of use:

var datastream = {'value':3, 'date': toDate('2021-06-30T11:20:21.352Z')}
var resetDate = toDate('2021-06-30T00:00:0.000Z');
var counter = getCounterValue(datastream, 1, resetDate); 

Result: 4

This example get reseted daily counter to myCounterDatastream datastream:

var datastream = {'value':3, 'date': toDate('2021-06-29T11:20:21.352Z')}
var resetDate = toDate('2021-06-30T00:00:0.000Z');
var counter = getCounterValue(datastream, 1, resetDate); 

Result: 1

Dates manipulation

Dates manipulation

toDate(localDateTime)

Obtain date type from string date representation with format YYYY-MM-DDThh:mm:ssTZD.

Kind: global function
Returns: Date

Param Type Description
localDateTime string Date string representation with format YYYY-MM-DDThh:mm:ssTZD.

Example of use:

var date = toDate('2021-06-30T10:10:23.256Z');

getDailyResetDate()

Obtains date to reset daily counters.

This function returns date with current date, but with 00:00:00 hours.

Kind: global function
Returns: Date

Example of use:

var date = getDailyResetDate();

getDailyResetDateWithZuluHour(hour)

Obtains date to reset daily counters with defined hour in gmt+0.

Kind: global function
Returns: Date

Param Type Description
hour string Hour in format HH:mm:ss.

Example of use:

var date = getDailyResetDateWithZuluHour('02:00:00');

This function returns date with current date, but with 2:00:00 hours. For example, if current day is 2021-06-30, the returned date in previously called function is 2021-06-30T02:00:00Z

getMonthlyResetDate()

Obtains date to reset monthly counters.

This function returns date with first day of current month and 00:00:00 hours.

Kind: global function
Returns: Date

Example of use:

var date = getMonthlyResetDate();

getMonthlyResetDateWithZuluHour(hour)

Obtains date to reset monthly counters with defined hour in gmt+0.

Kind: global function
Returns: Date

Param Type Description
hour string Hour in format HH:mm:ss.
var date = getMonthlyResetDateWithZuluHour('02:00:00');

This function returns date with first day of current month, but with 2:00:00 hours. For example, if current day is 2021-06-30, the returned date in previously called function is 2021-06-01T02:00:00Z

getMonthlyResetDateWithZuluHourAndDayOfMonth(hour, dayOfMonth)

Obtains date to reset monthly counters with defined hour in gmt+0.

Kind: global function
Returns: Date

Param Type Description
hour string Hour in format HH:mm:ss.
dayOfMonth number Day of Month.
var date = getMonthlyResetDateWithZuluHourAndDayOfMonth('02:00:00', 21);

This function returns date of the day 21 of current month, but with 2:00:00 hours, when day of the month is null, then return first day of the month. For example, the returned date in previously called function is 2023-02-21T02:00:00Z

Logging utils

Logging

The logger object is the main object for logging functions.

logger.trace(…msg)

Creates TRACE level logging messages. It concatenates msg parameters to compound message to be logged.

Returns: void

Param Type Description
msg string list of elements to be concatenated to generate the string message to be printed.

Example of use:

logger.trace('Operation sent to', host_var, ' and port ', port_var, '. Operation content: ', operation_var);

logger.debug(…msg)

Creates DEBUG level logging messages. It concatenates msg parameters to compound message to be logged.

Returns: void

Param Type Description
msg string list of elements to be concatenated to generate the string message to be printed.

Example of use:

logger.debug('Operation sent to', host_var, ' and port ', port_var, '. Operation content: ', operation_var);

logger.info(…msg)

Creates INFO level logging messages. It concatenates msg parameters to compound message to be logged.

Returns: void

Param Type Description
msg string list of elements to be concatenated to generate the string message to be printed.

Example of use:

logger.info('Operation sent to', host_var, ' and port ', port_var, '. Operation content: ', operation_var);

logger.warn(…msg)

Creates WARN level logging messages. It concatenates msg parameters to compound message to be logged.

Returns: void

Param Type Description
msg string list of elements to be concatenated to generate the string message to be printed.

Example of use:

logger.warn('Operation sent to', host_var, ' and port ', port_var, '. Operation content: ', operation_var);

logger.error(…msg)

Creates ERROR level logging messages. It concatenates msg parameters to compound message to be logged.

Returns: void

Param Type Description
msg string list of elements to be concatenated to generate the string message to be printed.

Example of use:

logger.error('Error connecting to host ', host_var, ' and port ', port_var, '. Stop processing');

Cypher utils

String utils

encryptString(originalValue, datastreamId, organization)

Deprecated: Use utils object functions instead.

Encrypt an original string with the configuration established by the datastream of the organization

Kind: global function
Returns: String

Param Type Description
originalValue string The original value to encrypt.
datastreamId string The datastream of provision type, of the datamodel that define this value.
organization string The organization name to which the datamodel belongs.

Example of use:

var encryptedValue = encryptString('text to encrypt', 'provision.data.encrypt', 'organization_name');

decryptString(encryptedValue, datastreamId, organization)

Deprecated: Use utils object functions instead.

Decrypt an encrypted string with the configuration established by the datastream of the organization

Kind: global function
Returns: String

Param Type Description
encryptedValue string The encrypted value to decrypt.
datastreamId string The datastream of provision type, of the datamodel that define this value.
organization string The organization name to which the datamodel belongs.

Example of use:

var decryptedValue = decryptString('text to decrypt', 'provision.data.encrypt', 'organization_name');

Utils

Utils

The utils object is the main object for utilities.

utils.cancelDelay(ruleName)

Cancels an active delayed action produced by another rule activation.

Returns: void

This function takes as parameter an object with the following fields:

Property Type Default Mandatory Description
ruleName String Yes Name of rule that produce delayed actions.

Example of use:

The example cancels delay of ‘highTemperatureRule’ rule.

utils.cancelDelay('highTemperatureRule');

utils.encryptString(encryptConfig)

Encrypt a value.

Returns: String

This function takes as parameter an object with the following fields:

Property Type Default Mandatory Description
originalValue String Yes The value to encrypt
datastreamId String Yes The datastream of provision type, of datamodel that define this value
organization String Yes The organization name to which the datamodel belongs

Example of use:

encryptConfig = {
    originalValue: 'text to encrypt',
    datastreamId: 'provision.data.encrypt',
    organization: 'organization_name'
}

var encryptedValue = utils.encryptString(encryptConfig);

utils.decryptString(decryptConfig)

Decrypt a value.

Returns: String

This function takes as parameter an object with the following fields:

Property Type Default Mandatory Description
encryptedValue String Yes The value to decrypt
datastreamId String Yes The datastream of provision type, of datamodel that define this value
organization String Yes The organization name to which the datamodel belongs

Example of use:

decryptConfig = {
    encryptedValue: 'text to decrypt',
    datastreamId: 'provision.data.encrypt',
    organization: 'organization_name'
}

var decryptedValue = utils.decryptString(decryptConfig);

Default rules catalog

Name Rule Type Mode Active Description
activityForbiddenDatastream DATASTREAM ADVANCED false Activity detected for an entity with administrative state disabled
activityForbiddenOperation OPERATION ADVANCED false Activity detected for an entity with administrative state disabled
areaInputWithParameter DATASTREAM ADVANCED false Checks if an entity has entered in a geofence
areaOutputWithParameter DATASTREAM ADVANCED false Checks if an entity has exitted of a geofence
batteryThreshold DATASTREAM EASY false Current value of datastream has an unusual value
cancelBatteryThreshold DATASTREAM EASY false Current value of datastream has is returned to usual value
changeCommsModuleOperationalStatusByNokPing DATASTREAM ADVANCED false Put selected operational status to communication module if consecutive NOK Ping reach selected value
changeCommsModuleOperationalStatusByOkPing DATASTREAM ADVANCED false Put selected operational status to communication module if OK Ping received
checkDistance DATASTREAM ADVANCED false Checks if entity is farther than a defined distance
collectAreas DATASTREAM ADVANCED false Calculate entity.area datastream (and its derivatives) based on entity.location datastream
countAccountingStart DATASTREAM ADVANCED false Count accounting start in subscription
countPings DATASTREAM ADVANCED false Count number of ping [OK/NOK/NOK consecutives] to get information in mobile net
diagnosticFailed OPERATION EASY false Diagnostic with error in some operation
messageFlowRateExceeded EVENT EASY false Message flow rate exceeded, not process message
mobileICCMismatch DATASTREAM EASY false Collected ICC does not match with provisioned
mobileICCValueChanged DATASTREAM EASY false Compare current with previous values of one datastream
presenceReachableAllInterfaces DATASTREAM ADVANCED true Current value of datastream has an unusual value with margen temporal or no
presenceUnreachableAllInterfaces DATASTREAM ADVANCED true Current value of datastream has an unusual value with margen temporal or no
receivedBanned DATASTREAM EASY false Received data for a banned entity
securityConfigMismatch EVENT EASY false Security error validate, device validation failedSecurity error validate, device validation failed
subscriptionActivation DATASTREAM ADVANCED false Check if subscription is administrativeState = ACTIVE for a configured operator
subscriptionSuspension DATASTREAM ADVANCED false Check if subscription is administrativeState = SUSPENSION for a configured operator
sumSessionBytes DATASTREAM ADVANCED true Sum traffic bytes can get information in mobile net

Work groups

Introduction

The workgroup entity is employed for the purpose of consolidating users who occupy identical roles within the specified organisation.

API specification

Subsections of Work groups

Work groups relations

Introduction

The workgroup entity enables the consolidation of disparate channels, thereby conferring management permissions upon distinct user roles.

API specification

Geo-clusters

Limited access

This feature is only available to root and super_admin_domain profiles. Ask your administrator for proper user role profiling.

Introduction

A geo-cluster is defined as a grouping of devices belonging to multiple organisations, which are related to work groups.

API specification

Users

Introduction

  • For further details regarding role permissions, please refer to the section on user profiles.

  • For further details regarding the login process in OpenGate, please refer to the user LOG-IN section.

Two-Factor Authentication (2FA)

Two-Factor Authentication (2FA) can be configured at the user level.

The only possible value is “TOTP”. (Time-Based On-Time) as defined in [RFC-6238] (https://www.rfc-editor.org/rfc/rfc6238).

By default, this field will be set to “NONE”. If you wish to deactivate the 2FA, please set the property 2FaType to NONE and perform a PUT on the user.

Please refer to the schema for each attribute used.

Log in with Two-Factor Authentication (2FA)

In the event that two-factor authentication (2FA) has been enabled for a particular user, it is necessary to incorporate the code generated by the associated application into the “2FaCode” attribute of the JSON.

Configure your application

Upon initial login following the configuration of two-factor authentication (2FA), the LOGIN service will respond with a URL location in the headers containing the configuration parameters. These parameters should be used to configure your application to generate the codes.

The URL will be as follows: otpauth://totp/2FA?secret=CAX3VP5O7GWZXUDWQOK4267DGXXSFIDQ&issuer=OpenGate&algorithm=SHA1&digits=6&period=30

Description of the attributes of the URL

  • secret: Contains the secret key to generate codes.
  • period: Defines the time validation period of the code.
  • digits: Defines the length of the generated code.
  • algorithm: Defines the algorithm used to generate the codes.
  • issuer: Defines the subject, the name of the server.

Some applications only require the secret field, while others may need all parameters.

Comprehensive API actions

Reading a user

Please replace {id} with the email address of the user you wish to retrieve. There are two ways to use the GET method:

  1. Administrative: This is the standard use of the GET method as defined in HTTP. In this case, you use GET with the Apikey.
  2. Login: You can use the method GET to log in, adding the password in the field of the header X-ApiPass. The Apikey is not necessary.

Updating a user

An administrator is able to modify another user’s API key or password, update their own API key, or update their own password.

To update the ApiKey or password of another user by an administrator

Any user with administration role is allowed to change the ApiKey / password of any managed user (excluding himself), the same way as any other user’s field.

In this case, the ApiKey or password will be considered as any other basic user data. In this case, it’s allowed to change the ApiKey or password with any other user’s field. If the administrator needs to change his own ApiKey/password, it must be done as explained bellow.

To update your own ApiKey

Any user with an administrative role is permitted to modify the ApiKey/password of any managed user (excluding themselves), in a manner consistent with the process for modifying any other user’s field.

In this instance, the ApiKey or password will be treated in the same way as any other basic user data. It is therefore permitted to change the ApiKey or password with any other user’s field. If the administrator wishes to change their own ApiKey/password, this must be done in accordance with the instructions set out below.

To update your own password

As with updating your own ApiKey, any user is able to change their own password. This is the only method available, regardless of whether the user has an administration profile. In this case, the current user’s password must be included in the X-ApiPass field of the REQUEST HEADERS section (the X-ApiKey field is not required). Additionally, the JSON of the REQUEST BODY should include only the new password as shown in the “Change the user’s own password” option. Please note that it is not permitted to change any other user’s field.

When setting a password…

The password must meet the following criteria for both creating and updating users:

  • It must be between 12 and 25 characters long.
  • It must include upper case letters.
  • It must include lowercase letters.
  • It must include numbers.
  • It must include special characters: !"#$%&’()*+,-./:;<=>?@[]^_`{|}~

The password will have an expiration time of 6 months, by default.

Logging in OpenGate platform.

Note

It is not a requisite to include an API key or JWT token in the header of the request.

The JWT token will be validated by OpenGate under the following conditions:

  1. The JWT token will have an expiration time, typically 24 hours.
  2. The JWT token will be signed with an OpenGate encrypted key. If the token received is not signed with the same encrypted key or has been modified, it will be rejected.

API specification

Subsections of Users

User login

For you are authenticate in OpenGate you have to do LOG-IN to obtain a token JWT or an ApiKey:

Do login

Basic login

Do you need an email and password.

flowchart TD
    CU["CREATE User"] --> V{"Valid User"}
    V -- No --> E400["ERROR 400<br>Json malformed"]
    V -- "Yes, LOG-IN" --> LOGIN["Do LOG-IN<br>email and password"]
    LOGIN --> VC{"Valid<br>email and password"}
    VC -- No --> E401["ERROR 401<br>Bad credentials"]
    VC -- Yes --> OK["Return: 200 OK<br>Return data (JWT and ApiKey)"]

    classDef error fill:#f9d0d0,stroke:#c85a5a,color:#000
    classDef ok fill:#a8ecd0,stroke:#2b9c6e,color:#000
    class E400,E401 error
    class OK ok

Login with Two Factor Authentication

Do you need an email, password and an 2FA Code generated.

How can you generate the 2FA code?

First, you have to configure your application to generate codes.

Configure your application

When you do login in OpenGate, the first time after configuring 2FA, the LOG-IN service responds with an error code 401, but in the headers contains an URL in the attribute location with the parameters of configuration.

You have to use this parameters to configure your application to generate the codes.

The URL of location will be like this otpauth://totp/2FA?secret=CAX3VP5O7GWZXUDWQOK4267DGXXSFIDQ&issuer=OpenGate&algorithm=SHA1&digits=6&period=30

Description of the attributes of the URL:

  • secret: contain the secret key to generate codes.
  • period: define the time of validation of the code.
  • digits: define the length of the code generated.
  • algorithm: define the Algorithm used to generate the codes.
  • issuer: define the subject, the name of the server.

Some applications only need the secret field, and others need all parameters.

You can see the flow of this process in follow diagram:

flowchart TD
    CU["CREATE or UPDATE USER<br>with 2FA"] --> V{"Valid User<br>with 2FA type"}
    V -- No --> E400["ERROR 400<br>Json malformed"]
    V -- "Yes, LOG-IN" --> LOGIN["Do LOG-IN<br>without 2FA Code"]
    LOGIN --> FIRST{"First time"}
    FIRST -- No --> E401A["ERROR 401<br>Bad Credentials<br>or Bad 2Fa Code sent"]
    FIRST -- Yes --> HDR["Return: ERROR 401<br>Headers with URL 2FA"]
    HDR --> APP["With URL - Configure APP"]
    APP --> GEN["Generate 2FA code<br>with the application"]
    GEN --> LOGIN2["Do LOG-IN with 2FA"]
    LOGIN2 --> VC{"Valid<br>email and password"}
    VC -- No --> E401B["ERROR 401<br>Bad Credentials"]
    VC -- Yes --> EXP{"Code expired<br>Code invalid"}
    EXP -- No --> OK["Return 200 OK<br>Return data (JWT and ApiKey)"]
    EXP -- Yes --> E401C["401 ERROR<br>Invalid Code"]

    classDef error fill:#f9d0d0,stroke:#c85a5a,color:#000
    classDef ok fill:#a8ecd0,stroke:#2b9c6e,color:#000
    classDef step fill:#addcf8,stroke:#2b7cb8,color:#000
    class E400,E401A,E401B,E401C,HDR error
    class OK ok
    class LOGIN,APP,GEN,LOGIN2 step

2FA error responses

Every 2FA failure returns 401 Unauthorized, so the error code is what tells the cases apart:

Code Situation Context
0x000065 First login after configuring 2FA. Read the location header to configure your application. 2FA
0x000065 2FA is configured but no code was sent. 2FaCode is null
0x000066 The code sent is invalid or expired. 2FaCode
0x000067 A code was sent but the user has no 2FA configured. Log in without the TOTP code. 2FaCode

An expired password is a different case: it returns 403 with code 0x010063.

User profiles

OpenGate by default incorporates a set of user profiles which is listed below:

New adhoc user profiles can be added to adapt to specific needs.

Profiles

  • root
  • super_admin_domain
  • admin_domain
  • admin
  • advanced
  • viewer

root

Total control for managing all resources in the platform

super_admin_domain

super_admin_domain access to the Provision API

  • Domains (create, update, delete)
  • Subdomains (create and update)
  • Organizations (create, update, delete)
  • Work groups (create, update, delete)
  • Channels (create, update, delete)
  • Users (create, update, delete)
  • Certificates (create, update, delete, download)
  • Data models (create, update, delete)
  • Areas (create, read, update, delete)
  • Bulk of Assets, Devices, subscriptions (create, update, delete)
  • Assets entities (create, read, update, delete)
  • Devices entities (create, read, update, delete)
  • Subscriptions entities (create, read, update, delete)
  • Subscribers entities (create, read, update, delete)
  • APNs (create)
  • Radius Clients (create)
  • Tags (create)
  • Tickets (create, read, update, delete)
  • Manufacturers (create, read, update, delete)
  • Models (create, read, update, delete)
  • Datasets (create, read, update, delete)
  • Provision processors (create, read, update, delete)
  • Timeseries (create, read, update, delete)
  • Artificial Intelligence (create, read, update, delete)

super_admin_domain access to the Search API

Full access.

super_admin_domain access to the Operation API

  • Jobs (create, read, update, delete)
  • Tasks (create, read, update, delete)
  • Alarms (read, attend, close)
  • Rules (read, update, clone, delete)
  • Bundles (create, read, update, delete, execute)
  • Download csv

admin_domain

admin_domain access to the Provision API

  • Domains (create, update, delete)
  • Subdomains (create and update)
  • Organizations (create, update, delete)
  • Work groups (create, update, delete)
  • Channels (create, update, delete)
  • Users (create, update, delete)
  • Certificates (create, update, delete, download)
  • Data models (create, update, delete)
  • Areas (create, read, update, delete)
  • Bulk of Assets, Devices, subscriptions (create, update, delete)
  • Assets entities (create, read, update, delete)
  • Devices entities (create, read, update, delete)
  • Subscriptions entities (create, read, update, delete)
  • Subscribers entities (create, read, update, delete)
  • APNs (create)
  • Radius Clients (create)
  • Tags (create)
  • Tickets (create, read, update, delete)
  • Artificial Intelligence (read)

admin_domain access to the Search API

Full access.

admin_domain access to the Operation API

  • Jobs (create, read, update, delete)
  • Tasks (create, read, update, delete)
  • Alarms (read, attend, close)
  • Rules (read, update, clone, delete)
  • Bundles (create, read, update, delete, execute)
  • Download csv

admin

admin access to the Provision API

  • Work groups (create, update, delete)
  • Channels (create, update, delete)
  • Users (create, update, delete)
  • Certificates (create, update, delete, download)
  • Data models (create, update, delete)
  • Areas (create, read, update, delete)
  • Bulk of Assets, Devices, subscriptions (create, update, delete)
  • Assets entities (create, read, update, delete)
  • Devices entities (create, read, update, delete)
  • Subscriptions entities (create, read, update, delete)
  • Subscribers entities (create, read, update, delete)
  • APNs (create)
  • Radius Clients (create)
  • Tags (create)
  • Tickets (create, read, update, delete)
  • Artificial Intelligence (read)

admin access to the Search APIs

Full access.

admin access to the Operation API

  • Jobs (create, read, update, delete)
  • Tasks (create, read, update, delete)
  • Alarms (read, attend, close)
  • Rules (read, update, clone, delete)
  • Bundles (create, read, update, delete, execute)
  • Download csv

advanced

advanced access to the Provision API

  • Users (update yourself)
  • Certificates (download)
  • Areas (create, read, update, delete)
  • Bulk of Assets, Devices, subscriptions (create, update, delete)
  • Assets entities (create, read, update, delete)
  • Devices entities (create, read, update, delete)
  • Subscriptions entities (create, read, update, delete)
  • Subscribers entities (create, read, update, delete)
  • Tags (create)
  • Tickets (create, read, update, delete)
  • Artificial Intelligence (read)

advanced access to the Search API

Full access.

advanced access to the Operation API

  • Jobs (create, read, update, delete)
  • Tasks (create, read, update, delete)
  • Alarms (read, attend, close)
  • Rules (read, update, clone, delete)
  • Bundles (create, read, update, delete, execute)
  • Download csv

viewer

viewer access to the Provision API

  • Users (update yourself)
  • Certificates (download)
  • Areas (read)
  • Assets entities (read)
  • Devices entities (read)
  • Subscriptions entities (read)
  • Subscribers entities (read)
  • Tickets (read)
  • Artificial Intelligence (read)

viewer access to the Search API

Full access.

viewer access to the Operation API

  • Jobs (read)
  • Tasks (read)
  • Alarms (read)
  • Rules (read)
  • Bundles (read)
  • Download csv

Software and configuration bundles

Software, firmware, configuration. You can rely on OpenGate to update the software, the firmware, or the configuration files of your remote devices.

The updates can be executed using the operations API, but first of all, OpenGate must know the structure of your update bundles.

The following sections show you how to feed OpenGate with your software, firmware, and configuration files.

Bundle object structure

A bundle is a group of deployment elements you want to deploy in a remote device. A bundle can contain four file types:

  1. SOFTWARE
  2. FIRMWARE
  3. CONFIGURATION
  4. PARAMETERS

See Bundle Object

Bundle management workflow

flowchart TD
    START(("Start")) --> B["POST bundle"]
    B --> DE["POST deployment element<br>to the bundle"]
    DE --> Q{"Should the bundle have<br>more deployment elements?"}
    Q -- Yes --> DE
    Q -- No --> END(("End"))

    classDef step fill:#addcf8,stroke:#2b7cb8,color:#000
    classDef terminal fill:#a8ecd0,stroke:#2b9c6e,color:#000
    class B,DE step
    class START,END terminal

We want to make sure you understand the bundle management workflow, because the update operations will use your bundles.

First of all, you must POST a bundle.

Then you must upload, i.e. POST, as many deployment elements as the bundle should have.

Finally, you must set up the state bundle attribute to ACTIVE.

Deployment element

What is a deployment element? A bundle is formed by deployment elements, each of these elements can have files associated or not, depending on the operation associated with the deployment element. In a bundle, through the deployment elements, you can define different actions that you want to perform in the device, such as installing software, updating it, and more.

The operations allowed for a deployment element are:

  1. Install - With this operation, you are trying to include a new deployment (of any type) in the device.
  2. Uninstall - With this operation, you are trying to uninstall a deployment element in the device.
  3. Upgrade - With this operation, you are trying to change the version of a deployment element.

See the structure of a deployment element object at Deployment Element

Attach deployment elements

In order to attach a deployment element to a bundle in the OpenGate API, you must replace {bundle_name} and {version_name} with the identifiers of the bundle and version you want to attach the deployment element to. Because deployment elements need to be uploaded, this POST request differs from others in the OpenGate API. The request must be encoded according to RFC 1867, “Form-based File Upload in HTML”, which OpenGate can parse to “attach” the deployment element to the bundle.

When creating a deployment element, you have three options for attaching a file:

  1. Filling only the downloadUrl field: In this case, the file will be located at the path provided in the downloadUrl field.

  2. Attaching a file without filling the downloadUrl field: Here, the file is uploaded, and the downloadUrl field is automatically populated with the URL of the OpenGate internal file repository.

  3. Attaching a file and filling the downloadUrl field: This option combines the previous two; the file is uploaded to the default path, and the device downloads the file from the path specified in the downloadUrl field.

Important

You must upload at least one deployment element, or your bundle cannot be activated.

Additionally, there is an optional parameter called FileValidationRequired, which forces the platform to validate the file’s integrity. This parameter is only relevant when a valid validator parameter is passed within the accompanying JSON file.

Note that the deployment element file has a maximum size, which can be configured administratively. By default, this limit is set to 22,020,096 bytes.

For the POST request, you must include either the downloadUrl parameter, the associated file, or both.

Comprehensive API actions

Creating a bundle

There are two different ways for creating a bundle:

  • Step by step creating in the first step the bundle and after that creating the different deployment elements included in the bundle
  • Introducing in the post request a zip file with the complete structure of the bundle.

The zip file will have the next content:

  • A file called “manifest.txt” where the content of the bundle is explained
  • The files that will become deployment elements within the bundle.

Updating a bundle

You must replace {bundle_name} with the identifier of the bundle you want to update and {version_name} with the selected version to be updated.

Note

You cannot update a bundle using the file option available in the create option.

You cannot update all the fields of a bundle. The following fields are allowed:

  • description
  • preaction
  • postaction
  • userNotes
  • active
  • Some fields of the deployments elements
Important

If a bundle has been used in an update operation, you can only update the following fields:

  • description
  • userNotes
  • active

Software, firmware, configuration. You can rely on OpenGate to update the software, the firmware, or the configuration files of your remote devices.

The updates can be executed using the operations API, but first of all, OpenGate must know the structure of your update bundles.

The following sections show you how to feed OpenGate with your software, firmware, and configuration files.

Deleting a bundle

Important

If a bundle has been used in an update operation, it can’t be deleted.

API specification

Geo-areas

Introduction

A geographical area is defined as a geographic zone delineated by a GeoJSON. The detection of device entry or exit at a specific location can be facilitated through the utilisation of these areas. Furthermore, automation rules can be devised to generate alerts when a device enters or exits a designated area.

Comprehensive API actions

Creating an area

An area can be created based on the methodology by which the geographic zone is determined: either by a GeoJSON or a group of devices. Subsequently, the option to retrieve information from both (GeoJSON and device group) is provided. Further details can be found in the section on creating an area specification.

Updating an area

It is permissible to modify all of the fields, with the exception of the identifier.

Searching areas

The OpenGate API query enables the retrieval of various platform areas, contingent on the user’s visualization capacity for their respective organization.

API specification

Manufacturers & Models

Each organization has its own hardware manufacturers and model catalogue. This information can be related to entities like devices.

Limited access API

Limited access

The provisioning API of this feature is only available to admin_domain and super_admin_domain profiles; on the other hand, anyone can use the searching API. Ask your administrator for proper user role profiling.

Some information of interest

Unique manufacturer name restriction

When a manufacturer is created, this can be assigned to entities in the same organization, including this one’s children; the non-name repeating restriction applies to the entire tree where that organization is located.

Hardware models and their relationships with entities

Entities such as devices can have their hardware model stored as part of their information. These models will be the ones belonging to the manufacturers available for the organization where the entity is.

When you edit or delete manufacturers’ or models’ information, you can choose whether you want this reflected in the entity’s information.

Follow the following links to check out the OpenAPI specs:

Subsections of Manufacturers & Models

Manufacturers

This is an API that allow to provide and manage the list of hardware models and manufacturers used in an organization. Here you can register manufacturers and models data to be referenced in devices information.

See Manufacturer object bellow on schemas.

Comprehensive API actions

Updating a manufacturer

‘UpdateDevices’ parameter

It is possible that entities may contain references to models that were previously manufactured by a now-deleted manufacturer. Consequently, deleting the manufacturer may result in a new discrepancy between its information and that of the entities. The updateDevices parameter allows the user to choose whether this action should be reflected or not. However, this only affects the manufacturer’s information; models remain unaffected.

Deleting Manufacturer

Warning

In the event that a manufacturer has already deployed models within the OpenGate framework, it is not possible to remove them.

‘UpdateDevices’ parameter

It is possible that entities may contain references to models that were previously manufactured by a now-deleted manufacturer. Consequently, deleting the manufacturer may result in a new discrepancy between its information and that of the entities. The updateDevices parameter allows the user to choose whether this action should be reflected or not. However, this only affects the manufacturer’s information; models remain unaffected.

Reading the organization manufacturer list

Visibility parameter

There are multiple methods for retrieving manufacturer lists, which are controlled by the “visibility” parameter. This parameter has the following possible values:

  • default: In the event that the aforementioned parameter is not transmitted, or if it is transmitted with the default value, the list of manufacturers that are part of the specified organisation, as indicated in the URL, will be returned.
  • assignable: The aforementioned value will yield a list of manufacturers that can be assigned to entities within the specified organisational structure, as indicated by the URL. This list comprises the manufacturers within the aforementioned organisational structure, along with their respective parents.
  • administrable: Upon transmission of this value, a list of manufacturers that can be managed will be returned. In the event that permissions are lacking for the specified action, or if the manufacturer is part of the organisation indicated in the URL and its subsidiaries, the list will be empty.

API specification

Models

Introduction

This API enables the provisioning and management of hardware models that are utilized to associate with the entities within an organizational structure.

Comprehensive API actions

Reading a model

It is possible that entities may contain references to models that were previously manufactured by a now-deleted manufacturer. Consequently, deleting the manufacturer may result in a new discrepancy between its information and that of the entities. The updateDevices parameter allows the user to choose whether this action should be reflected or not. However, this only affects the manufacturer’s information; models remain unaffected.

Deleting a model

It is possible that entities may contain references to models that were previously manufactured by a now-deleted manufacturer. Consequently, deleting the manufacturer may result in a new discrepancy between its information and that of the entities. The updateDevices parameter allows the user to choose whether this action should be reflected or not. However, this only affects the manufacturer’s information; models remain unaffected.

API specification

Data models

Introduction

A data model can be defined as a set of data stream templates. It defines all the variables associated with a device or type of entity for its management and monitoring. These variables represent the information about an individual “measure” that evolves over time, and thus define the main features of a data stream. Further details on this concept can be found in the default data model catalogue. This API enables the management of data models.

Comprehensive API actions

Updating a datamodel

Regarding the datastream (templates), the behavior of this request is:

  • All new data streams are incorporated into the existing data model.
  • For all existing data streams that have been provisioned and are included in the JSON request, all fields can be modified except for the identifier.
  • Please note that all datastreams that have already been provisioned and are not present in the JSON request will be removed. This is only the case if they have not previously been collected as datapoint instances. In the event that at least one datastream with previously collected datapoints is not present in the put option, an error is returned for the entire request.

Default data model catalog edition

Although the above fields are restricted from modification, the following fields of the data model can be adjusted:

  • datamodel.description
  • datamodel.category.datastream.description
  • datamodel.category.datastream.storage
  • datamodel.category.datastream.tags
  • datamodel.category.datastream.unit
  • datamodel.category.datastream.qrating
  • datamodel.category.datastream.views
  • datamodel.category.datastream.icon

The datamodel.category.datastream.schema field can also be modified, but only for the next datastreams:

  • provision.device.specificType
  • provision.device.communicationModules[].specificType
  • provision.device.communicationModules[].subscription.specificType
  • provision.device.communicationModules[].subscriber.specificType
  • provision.asset.specificType
  • device.specificType
  • device.communicationModules[].specificType
  • device.communicationModules[].subscription.specificType
  • device.communicationModules[].subscriber.specificType

This is an example of how to modify the schema field of the datastream provision.device.specificType:

{
   "identifier":"provision.device.specificType",
   "name":"Prov. Specific type",
   "period":"PULSE",
   "access":"READ",
   "schema":{
      "type":"string",
      "enum":[
         "BLOODPRESSURE_SENSOR",
         "COMHUB",
         "CONCENTRATOR"
      ]
   }
}

Deleting a datamodel

It is not possible to delete a data stream if it contains data points that have already been collected.

API specification

Subsections of Data models

Default data models

Introduction

The following list shows all the data models available in the default OpenGate’s catalog.

See data models to learn how to create a new data model for your IoT solution.

Data model catalog

collectionAsset

  • Identifier: collectionAsset
  • Version: 8.0.0.0
  • Description: Specific Datamodel to asset branch
  • Allowed resource types:
    • entity.asset
  • Categories:
    • assetCollectedInfo
      • Data streams:
        • Identifier
          • Identifier: asset.identifier
          • Unit: basicSI
          • Period: PULSE
          • Storage: NEVER
          • Tags: dmm
        • Specific type
          • Identifier: asset.specificType
          • Unit: basicSI
          • Period: PULSE
          • Storage: NEVER
          • Tags: dmm | collection
        • Name
          • Identifier: asset.name
          • Unit: basicSI
          • Period: PULSE
          • Storage: NEVER
          • Tags: dmm | collection
        • Description
          • Identifier: asset.description
          • Unit: basicSI
          • Period: PULSE
          • Storage: NEVER
          • Tags: dmm | collection

provisionAsset

  • Identifier: provisionAsset
  • Version: 8.0.0.0
  • Description: Specific Datamodel to provision asset branch
  • Allowed resource types:
    • entity.asset
  • Categories:
    • assetProvisionedInfo
      • Data streams:
        • Prov. Identifier
          • Identifier: provision.asset.identifier
          • Unit: basicSI
          • Period: PULSE
          • Storage: NEVER
          • Tags: dmm | provision
        • Prov. Specific type
          • Identifier: provision.asset.specificType
          • Unit: basicSI
          • Period: PULSE
          • Storage: NEVER
          • Tags: dmm | provision
        • Prov. Administrative state
          • Identifier: provision.asset.administrativeState
          • Unit: basicSI
          • Period: PULSE
          • Storage:
          • Tags: dmm | provision
        • Prov. Name
          • Identifier: provision.asset.name
          • Unit: basicSI
          • Period: PULSE
          • Storage: NEVER
          • Tags: dmm | provision
        • Prov. Description
          • Identifier: provision.asset.description
          • Unit: basicSI
          • Period: PULSE
          • Storage: NEVER
          • Tags: dmm | provision
        • Prov. Location
          • Identifier: provision.asset.location
          • Unit: basicSI
          • Period: INSTANT
          • Storage:
          • Tags: dmm | provision
        • Prov. Image
          • Identifier: provision.asset.image
          • Unit: basicSI
          • Period: PULSE
          • Storage:
          • Tags: dmm | provision
        • Prov. Related
          • Identifier: provision.asset.related
          • Unit: basicSI
          • Period: PULSE
          • Storage:
          • Tags: dmm | provision

bts

  • Identifier: bts
  • Version: 8.0.32.0
  • Description: BTS Datamodel
  • Allowed resource types:
    • entity.asset
  • Categories:
    • btsProvisionedInfo
      • Data streams:
        • btsOperator
          • Identifier: provision.btsOperator
          • Unit: basicSI
          • Period: PULSE
          • Storage:
          • Tags: dmm | provision
    • btsCollectedInfo
      • Data streams:
        • btsIpPercentage
          • Identifier: btsIpPercentage
          • Unit: basicSI
          • Period: PULSE
          • Storage:
          • Tags: analytics | bts
        • btsDataContextPercentage
          • Identifier: btsDataContextPercentage
          • Unit: basicSI
          • Period: PULSE
          • Storage:
          • Tags: analytics | collection
        • btsUnknownPercentage
          • Identifier: btsUnknownPercentage
          • Unit: basicSI
          • Period: PULSE
          • Storage:
          • Tags: analytics | collection
        • btsGsmPercentage
          • Identifier: btsGsmPercentage
          • Unit: basicSI
          • Period: PULSE
          • Storage:
          • Tags: analytics | collection

collectionChannel

  • Identifier: collectionChannel
  • Version: 8.0.2.0
  • Description: Specific Datamodel to collected channel info
  • Allowed resource types:
    • channel
  • Categories:
    • channelCollectedInfo
      • Data streams:
        • Identifier
          • Identifier: channel.identifier
          • Unit: basicSI
          • Period: PULSE
          • Storage: NEVER
          • Tags: channel

provisionChannel

  • Identifier: provisionChannel
  • Version: 8.0.2.0
  • Description: Specific Datamodel to provision a channel
  • Allowed resource types:
    • channel
  • Categories:
    • channelProvisionInfo
      • Data streams:
        • Prov. Identifier
          • Identifier: provision.channel.identifier
          • Unit: basicSI
          • Period: PULSE
          • Storage: NEVER
          • Tags: channel
        • Prov. Removable
          • Identifier: provision.channel.removable
          • Unit: basicSI
          • Period: PULSE
          • Storage: NEVER
          • Tags: channel
        • Description
          • Identifier: provision.channel.description
          • Unit: basicSI
          • Period: PULSE
          • Storage: NEVER
          • Tags: channel
        • Prov. Certificates
          • Identifier: provision.channel.certificates
          • Unit: basicSI
          • Period: PULSE
          • Storage: NEVER
          • Tags: dmm | provision

collectionDevice

  • Identifier: collectionDevice
  • Version: 8.0.0.0
  • Description: Specific Datamodel to device branch
  • Allowed resource types:
    • entity.device
  • Categories:
    • deviceCollectedInfo
      • Data streams:
        • Identifier
          • Identifier: device.identifier
          • Unit: basicSI
          • Period: PULSE
          • Storage: NEVER
          • Tags: dmm
        • Specific type
          • Identifier: device.specificType
          • Unit: basicSI
          • Period: PULSE
          • Storage: NEVER
          • Tags: dmm | collection
        • Name
          • Identifier: device.name
          • Unit: basicSI
          • Period: PULSE
          • Storage: NEVER
          • Tags: dmm | collection
        • Description
          • Identifier: device.description
          • Unit: basicSI
          • Period: PULSE
          • Storage: NEVER
          • Tags: dmm | collection
        • Birthdate
          • Identifier: device.birthDate
          • Unit: basicSI
          • Period: PULSE
          • Storage: NEVER
          • Tags: dmm | collection
        • Serial number
          • Identifier: device.serialNumber
          • Unit: basicSI
          • Period: PULSE
          • Storage: NEVER
          • Tags: dmm | collection
        • Model
          • Identifier: device.model
          • Unit: basicSI
          • Period: PULSE
          • Storage: NEVER
          • Tags: dmm | collection
        • Software
          • Identifier: device.software
          • Unit: basicSI
          • Period: PULSE
          • Storage:
          • Tags: dmm | collection
        • Operational status
          • Identifier: device.operationalStatus
          • Unit: basicSI
          • Period: PULSE
          • Storage:
          • Tags: dmm | collection
        • Administrative state
          • Identifier: device.administrativeState
          • Unit: basicSI
          • Period: PULSE
          • Storage:
          • Tags: dmm | provision
        • Path
          • Identifier: device.topology.path
          • Unit: basicSI
          • Period: PULSE
          • Storage:
          • Tags: dmm | collection
        • Trusted boot
          • Identifier: device.trustedBoot
          • Unit: basicSI
          • Period: INSTANT
          • Storage:
          • Tags: dmm | collection
        • Up time
          • Identifier: device.upTime
          • Unit: basicSI seconds
          • Period: CUMULATIVE
          • Storage:
          • Tags: dmm | status
        • Clock
          • Identifier: device.clock
          • Unit: basicSI
          • Period: INSTANT
          • Storage:
          • Tags: dmm | status
        • Session type
          • Identifier: device.session.type
          • Unit: basicSI
          • Period: PULSE
          • Storage: NEVER
          • Tags: dmm | collection
        • Session connector UUID
          • Identifier: device.session.connectorUuid
          • Unit: basicSI
          • Period: PULSE
          • Storage: NEVER
          • Tags: dmm | collection
    • devicePerformanceCollectedInfo
      • Data streams:
        • Performance
          • Identifier: device.performance
          • Unit: basicSI
          • Period: PULSE
          • Storage: NEVER
          • Tags: dmm | collection
    • deviceCpuCollectedInfo
      • Data streams:
        • CPU status
          • Identifier: device.cpu.status
          • Unit: basicSI
          • Period: INSTANT
          • Storage:
          • Tags: dmm | cpu
        • CPU usage
          • Identifier: device.cpu.usage
          • Unit: basicSI
          • Period: INSTANT
          • Storage:
          • Tags: dmm | cpu
        • CPU total
          • Identifier: device.cpu.total
          • Unit: basicSI
          • Period: INSTANT
          • Storage:
          • Tags: dmm | cpu
    • deviceTemperatureCollectedInfo
      • Data streams:
        • Temperature
          • Identifier: device.temperature.value
          • Unit: basicSI degress
          • Period: INSTANT
          • Storage:
          • Tags: dmm | temperature | degrees
        • Temperature status
          • Identifier: device.temperature.status
          • Unit: basicSI
          • Period: INSTANT
          • Storage:
          • Tags: dmm | temperature | status
    • devicePowerSupplyCollectedInfo
      • Data streams:
        • Powersupply status
          • Identifier: device.powersupply.status
          • Unit: basicSI
          • Period: INSTANT
          • Storage:
          • Tags: dmm | power | status
        • Powersupply source
          • Identifier: device.powersupply.source
          • Unit: basicSI
          • Period: INSTANT
          • Storage:
          • Tags: dmm | power | source
        • Powersupply battery status
          • Identifier: device.powersupply.battery.status
          • Unit: basicSI Volts
          • Period: INSTANT
          • Storage:
          • Tags: dmm | power | battery | voltage
        • Powersupply battery charge
          • Identifier: device.powersupply.battery.charge
          • Unit: basicSI percentage
          • Period: INSTANT
          • Storage:
          • Tags: dmm | power | percentage
        • Powersupply battery voltage
          • Identifier: device.powersupply.battery.voltage
          • Unit: basicSI milli Volts
          • Period: INSTANT
          • Storage:
          • Tags: dmm | power | battery | status
        • Powersupply battery
          • Identifier: device.powersupply.battery.current
          • Unit: basicSI Amps
          • Period: INSTANT
          • Storage:
          • Tags: dmm | power | battery | status
        • Powersupply outage
          • Identifier: device.powersupply.outage
          • Unit: basicSI date
          • Period: INSTANT
          • Storage:
          • Tags: dmm | power | outage
    • deviceMemoryCollectedInfo
      • Data streams:
        • RAM usage
          • Identifier: device.ram.usage
          • Unit: basicSI percentage
          • Period: INSTANT
          • Storage:
          • Tags: dmm | ram | memory | percentage
        • RAM total
          • Identifier: device.ram.total
          • Unit: basicSI megabytes
          • Period: INSTANT
          • Storage:
          • Tags: dmm | ram | memory | status
    • deviceRamDiskStorageCollectedInfo
      • Data streams:
        • RAM disk usage
          • Identifier: device.storage.ramDisk.usage
          • Unit: basicSI percentage
          • Period: INSTANT
          • Storage:
          • Tags: dmm | ramDisk | storage | percentage
        • RAM disk total
          • Identifier: device.storage.ramDisk.total
          • Unit: basicSI
          • Period: INSTANT
          • Storage:
          • Tags: dmm | ramDisk | storage | total
    • deviceDiskStorageCollectedInfo
      • Data streams:
        • Disk usage
          • Identifier: device.storage.disk.usage
          • Unit: basicSI percentage
          • Period: INSTANT
          • Storage:
          • Tags: dmm | disk | storage
        • Disk total
          • Identifier: device.storage.disk.total
          • Unit: basicSI megabytes
          • Period: INSTANT
          • Storage:
          • Tags: dmm | disk | total
    • commsModuleCollectedInfo
      • Data streams:
        • CM identifier
          • Identifier: device.communicationModules[].identifier
          • Unit: basicSI
          • Period: PULSE
          • Storage: NEVER
          • Tags: dmm | provision
        • CM specific type
          • Identifier: device.communicationModules[].specificType
          • Unit: basicSI
          • Period: PULSE
          • Storage: NEVER
          • Tags: dmm | collection
        • CM name
          • Identifier: device.communicationModules[].name
          • Unit: basicSI
          • Period: PULSE
          • Storage: NEVER
          • Tags: dmm | collection
        • CM description
          • Identifier: device.communicationModules[].description
          • Unit: basicSI
          • Period: PULSE
          • Storage: NEVER
          • Tags: dmm | collection
        • CM serial number
          • Identifier: device.communicationModules[].serialNumber
          • Unit: basicSI
          • Period: PULSE
          • Storage: NEVER
          • Tags: dmm | collection
        • CM model
          • Identifier: device.communicationModules[].model
          • Unit: basicSI
          • Period: PULSE
          • Storage: NEVER
          • Tags: dmm | collection
        • CM operational status
          • Identifier: device.communicationModules[].operationalStatus
          • Unit: basicSI
          • Period: PULSE
          • Storage:
          • Tags: dmm | status
        • CM software
          • Identifier: device.communicationModules[].software
          • Unit: basicSI
          • Period: PULSE
          • Storage: NEVER
          • Tags: dmm | collection
        • CM IMEI
          • Identifier: device.communicationModules[].mobile.imei
          • Unit: basicSI
          • Period: PULSE
          • Storage: NEVER
          • Tags: dmm | collection
    • commsModuleRadioCollectedInfo
      • Data streams:
        • CM frequency band
          • Identifier: device.communicationModules[].mobile.frequencyBand
          • Unit: basicSI Hz
          • Period: PULSE
          • Storage:
          • Tags: dmm | status
        • CM antenna status
          • Identifier: device.communicationModules[].mobile.antenna.status
          • Unit: basicSI
          • Period: PULSE
          • Storage:
          • Tags: dmm | status
    • deviceCountersInfo
      • Data streams:
        • Accounting start last day counter
          • Identifier: device.counters.presence.accountingStartLastDay
          • Unit: basicSI bytes
          • Period: CUMULATIVE
          • Storage: NEVER
          • Tags: dmm | counters
        • Total used bytes last day counter
          • Identifier: device.counters.totalBytesLastDay
          • Unit: basicSI bytes
          • Period: CUMULATIVE
          • Storage: NEVER
          • Tags: dmm | counters
        • Total used bytes last month counter
          • Identifier: device.counters.totalBytesLastMonth
          • Unit: basicSI bytes
          • Period: CUMULATIVE
          • Storage: NEVER
          • Tags: dmm | counters
        • Total sent bytes last day counter
          • Identifier: device.counters.sentBytesLastDay
          • Unit: basicSI bytes
          • Period: CUMULATIVE
          • Storage: NEVER
          • Tags: dmm | counters
        • Total sent bytes last month counter
          • Identifier: device.counters.sentBytesLastMonth
          • Unit: basicSI bytes
          • Period: CUMULATIVE
          • Storage: NEVER
          • Tags: dmm | counters
        • Total received bytes last day counter
          • Identifier: device.counters.receivedBytesLastDay
          • Unit: basicSI bytes
          • Period: CUMULATIVE
          • Storage: NEVER
          • Tags: dmm | counters
        • Total received bytes last month counter
          • Identifier: device.counters.receivedBytesLastMonth
          • Unit: basicSI bytes
          • Period: CUMULATIVE
          • Storage: NEVER
          • Tags: dmm | counters
        • Total ping ok operations last day counter
          • Identifier: device.counters.presence.pingOKLastDay
          • Unit: basicSI bytes
          • Period: CUMULATIVE
          • Storage: NEVER
          • Tags: dmm | counters
        • Total ping nok operations last day counter
          • Identifier: device.counters.presence.pingNOKLastDay
          • Unit: basicSI bytes
          • Period: CUMULATIVE
          • Storage: NEVER
          • Tags: dmm | counters
        • Percentage ping ok operations last day counter
          • Identifier: device.counters.availabilityLastDay
          • Unit: basicSI bytes
          • Period: CUMULATIVE
          • Storage: NEVER
          • Tags: dmm | counters
        • Total consecutive ping nok operations per month counter
          • Identifier: device.counters.presence.consecutivePingNOK
          • Unit: basicSI bytes
          • Period: CUMULATIVE
          • Storage: NEVER
          • Tags: dmm | counters
    • deviceIdentificationUndeterminedInfo
      • Data streams:
        • Identification unknown
          • Identifier: device.identification.unknown
          • Unit: basicSI
          • Period: PULSE
          • Storage:
          • Tags: device | identification | unknown
        • Identification conflict
          • Identifier: device.identification.conflict
          • Unit: basicSI
          • Period: PULSE
          • Storage:
          • Tags: device | identification | conflict

provisionDevice

  • Identifier: provisionDevice
  • Version: 8.0.0.0
  • Description: Specific Datamodel to provision device branch
  • Allowed resource types:
    • entity.device
  • Categories:
    • deviceProvisionedInfo
      • Data streams:
        • Prov. Identifier
          • Identifier: provision.device.identifier
          • Unit: basicSI
          • Period: PULSE
          • Storage: NEVER
          • Tags: dmm | provision
        • Prov. Certificates
          • Identifier: provision.device.certificates
          • Unit: basicSI
          • Period: INSTANT
          • Storage: NEVER
          • Tags: dmm | provision
        • Prov. Specific type
          • Identifier: provision.device.specificType
          • Unit: basicSI
          • Period: PULSE
          • Storage: NEVER
          • Tags: dmm | provision
        • Prov. Name
          • Identifier: provision.device.name
          • Unit: basicSI
          • Period: PULSE
          • Storage: NEVER
          • Tags: dmm | provision
        • Prov. Description
          • Identifier: provision.device.description
          • Unit: basicSI
          • Period: PULSE
          • Storage: NEVER
          • Tags: dmm | provision
        • Prov. Administrative state
          • Identifier: provision.device.administrativeState
          • Unit: basicSI
          • Period: PULSE
          • Storage:
          • Tags: dmm | provision
        • Prov. Serial number
          • Identifier: provision.device.serialNumber
          • Unit: basicSI
          • Period: PULSE
          • Storage: NEVER
          • Tags: dmm | provision
        • Prov. Operational status
          • Identifier: provision.device.operationalStatus
          • Unit: basicSI
          • Period: PULSE
          • Storage:
          • Tags: dmm | provision
        • Prov. Model
          • Identifier: provision.device.model
          • Unit: basicSI
          • Period: PULSE
          • Storage: NEVER
          • Tags: dmm | provision
        • Prov. Software
          • Identifier: provision.device.software
          • Unit: basicSI
          • Period: PULSE
          • Storage: NEVER
          • Tags: dmm | provision
        • Prov. Path
          • Identifier: provision.device.topology.path
          • Unit: basicSI
          • Period: PULSE
          • Storage:
          • Tags: dmm | provision
        • Prov. Location
          • Identifier: provision.device.location
          • Unit: basicSI
          • Period: INSTANT
          • Storage:
          • Tags: dmm | provision
        • Prov. Trusted boot
          • Identifier: provision.device.trustedBoot
          • Unit: basicSI
          • Period: INSTANT
          • Storage:
          • Tags: dmm | provision
        • Prov. Clock
          • Identifier: provision.device.clock
          • Unit: basicSI
          • Period: INSTANT
          • Storage:
          • Tags: dmm | provision
        • Prov. Related
          • Identifier: provision.device.related
          • Unit: basicSI
          • Period: PULSE
          • Storage: NEVER
          • Tags: dmm | provision
        • Prov. Image
          • Identifier: provision.device.image
          • Unit: basicSI
          • Period: PULSE
          • Storage:
          • Tags: dmm | provision
        • Prov. connector Id
          • Identifier: provision.device.connectorId
          • Unit:
          • Period: INSTANT
          • Storage:
          • Tags: connector | provision
    • commsModuleProvisionedInfo
      • Data streams:
        • Prov. CM identifier
          • Identifier: provision.device.communicationModules[].identifier
          • Unit: basicSI
          • Period: PULSE
          • Storage: NEVER
          • Tags: dmm | provision
        • Prov. CM specific type
          • Identifier: provision.device.communicationModules[].specificType
          • Unit: basicSI
          • Period: PULSE
          • Storage: NEVER
          • Tags: dmm | provision
        • Prov. CM name
          • Identifier: provision.device.communicationModules[].name
          • Unit: basicSI
          • Period: PULSE
          • Storage: NEVER
          • Tags: dmm | provision
        • Prov. CM description
          • Identifier: provision.device.communicationModules[].description
          • Unit: basicSI
          • Period: PULSE
          • Storage: NEVER
          • Tags: dmm | provision
        • Prov. CM serial number
          • Identifier: provision.device.communicationModules[].serialNumber
          • Unit: basicSI
          • Period: PULSE
          • Storage: NEVER
          • Tags: dmm | provision
        • Prov. CM model
          • Identifier: provision.device.communicationModules[].model
          • Unit: basicSI
          • Period: PULSE
          • Storage: NEVER
          • Tags: dmm | provision
        • Prov. CM operational status
          • Identifier: provision.device.communicationModules[].operationalStatus
          • Unit: basicSI
          • Period: PULSE
          • Storage:
          • Tags: dmm | provision
        • Prov. CM software
          • Identifier: provision.device.communicationModules[].software
          • Unit: basicSI
          • Period: PULSE
          • Storage: NEVER
          • Tags: dmm | provision
        • Prov. CM IMEI
          • Identifier: provision.device.communicationModules[].mobile.imei
          • Unit: basicSI
          • Period: PULSE
          • Storage: NEVER
          • Tags: dmm | provision

entity

  • Identifier: entity
  • Version: 8.0.0.0
  • Description: Specific Datamodel to entity
  • Allowed resource types:
    • entity.device
    • entity.asset
  • Categories:
    • entity
      • Data streams:
        • entity.areas
          • Identifier: entity.areas
          • Unit: basicSI
          • Period: PULSE
          • Storage:
          • Tags: dmm
        • entity.location
          • Identifier: entity.location
          • Unit: basicSI
          • Period: INSTANT
          • Storage:
          • Tags: dmm | collection
        • entity.alarms
          • Identifier: entity.alarms
          • Unit: basicSI
          • Period: INSTANT
          • Storage: NEVER
          • Tags: dmm | collection

provisionGeneric

  • Identifier: provisionGeneric
  • Version: 8.0.2.0
  • Description: Define part of generic provision structure (serviceGroup, plan, defaultFeed)
  • Allowed resource types:
    • entity.asset
    • entity.device
    • entity.subscriber
    • entity.subscription
  • Categories:
    • provisionAdministrationFields
      • Data streams:
        • Service group
          • Identifier: provision.administration.serviceGroup
          • Unit: basicSI
          • Period: PULSE
          • Storage: NEVER
          • Tags: dmm | provision
        • Plan
          • Identifier: provision.administration.plan
          • Unit: basicSI
          • Period: PULSE
          • Storage: NEVER
          • Tags: dmm | provision
        • Default feed
          • Identifier: provision.administration.defaultFeed
          • Unit: basicSI
          • Period: PULSE
          • Storage: NEVER
          • Tags: dmm | provision
        • Username for SSH
          • Identifier: provision.administration.connection.ssh.username
          • Unit: basicSI
          • Period: PULSE
          • Storage: NEVER
          • Tags: dmm | provision
        • Password for SSH
          • Identifier: provision.administration.connection.ssh.password
          • Unit: basicSI
          • Period: PULSE
          • Storage: NEVER
          • Tags: dmm | provision
        • Port for SSH
          • Identifier: provision.administration.connection.ssh.port
          • Unit: basicSI
          • Period: PULSE
          • Storage: NEVER
          • Tags: dmm | provision
        • Transport protocol used in DLMS
          • Identifier: provision.administration.connection.dlms.connectionType
          • Unit: basicSI
          • Period: PULSE
          • Storage: NEVER
          • Tags: dmm | provision
        • TCP or UDP port for DLMS
          • Identifier: provision.administration.connection.dlms.port
          • Unit: basicSI
          • Period: PULSE
          • Storage: NEVER
          • Tags: dmm | provision
        • Client transport wrapper port for DLMS
          • Identifier: provision.administration.connection.dlms.cwport
          • Unit: basicSI
          • Period: PULSE
          • Storage: NEVER
          • Tags: dmm | provision
        • Server transport wrapper port for DLMS
          • Identifier: provision.administration.connection.dlms.swport
          • Unit: basicSI
          • Period: PULSE
          • Storage: NEVER
          • Tags: dmm | provision
        • Authentication algorithm for DLMS
          • Identifier: provision.administration.connection.dlms.authentication
          • Unit: basicSI
          • Period: PULSE
          • Storage: NEVER
          • Tags: dmm | provision
        • Authentication password for DLMS
          • Identifier: provision.administration.connection.dlms.password
          • Unit: basicSI
          • Period: PULSE
          • Storage: NEVER
          • Tags: dmm | provision
        • Security for DLMS
          • Identifier: provision.administration.connection.dlms.security
          • Unit: basicSI
          • Period: PULSE
          • Storage: NEVER
          • Tags: dmm | provision
        • SecuritySuite for DLMS
          • Identifier: provision.administration.connection.dlms.securitySuite
          • Unit: basicSI
          • Period: PULSE
          • Storage: NEVER
          • Tags: dmm | provision
        • AuthenticationKey for DLMS
          • Identifier: provision.administration.connection.dlms.authenticationKey
          • Unit: basicSI
          • Period: PULSE
          • Storage: NEVER
          • Tags: dmm | provision
        • BlockCipherKey for DLMS
          • Identifier: provision.administration.connection.dlms.blockCipherKey
          • Unit: basicSI
          • Period: PULSE
          • Storage: NEVER
          • Tags: dmm | provision
        • Certificate for Kite
          • Identifier: provision.administration.connection.kite.certificate
          • Unit: basicSI
          • Period: PULSE
          • Storage: NEVER
          • Tags: kite | provision
        • Private key for Kite
          • Identifier: provision.administration.connection.kite.privateKey
          • Unit: basicSI
          • Period: PULSE
          • Storage: NEVER
          • Tags: kite | provision
        • Api key for organization
          • Identifier: provision.administration.apiKey
          • Unit: basicSI
          • Period: INSTANT
          • Storage: NEVER
          • Tags: provision

provisionGenericChannel

  • Identifier: provisionGenericChannel
  • Version: 8.0.2.0
  • Description: Define part of generic provision structure (channel)
  • Allowed resource types:
    • entity.asset
    • entity.device
    • entity.subscriber
    • entity.subscription
  • Categories:
    • provisionAdministrationChannel
      • Data streams:
        • Prov. Channel
          • Identifier: provision.administration.channel
          • Unit: basicSI
          • Period: PULSE
          • Storage: NEVER
          • Tags: dmm | provision

provisionGenericIdentifier

  • Identifier: provisionGenericIdentifier
  • Version: 8.0.2.0
  • Description: Define part of generic provision structure (identifier)
  • Allowed resource types:
    • entity.asset
    • entity.device
    • entity.subscriber
    • entity.subscription
    • ticket
    • organization
    • channel
  • Categories:
    • provisionAdministrationIdentifier
      • Data streams:
        • Prov. Identifier
          • Identifier: provision.administration.identifier
          • Unit: basicSI
          • Period: PULSE
          • Storage: NEVER
          • Tags: ticket | dmm | provision

provisionGenericOrganization

  • Identifier: provisionGenericOrganization
  • Version: 8.0.2.0
  • Description: Define part of generic provision structure (organization)
  • Allowed resource types:
    • entity.asset
    • entity.device
    • entity.subscriber
    • entity.subscription
    • ticket
    • channel
  • Categories:
    • provisionAdministrationOrganization
      • Data streams:
        • Prov. Organization
          • Identifier: provision.administration.organization
          • Unit: basicSI
          • Period: PULSE
          • Storage: NEVER
          • Tags: ticket | dmm | provision

human

  • Identifier: human
  • Version: 8.0.21.0
  • Description: Human Provisioned and Collected Datamodel
  • Allowed resource types:
    • entity.asset
  • Categories:
    • humanProvisionedInfo
      • Data streams:
        • Identifier
          • Identifier: provision.human.identifier
          • Unit: basiSI
          • Period: PULSE
          • Storage: NEVER
          • Tags: human | collection
        • Name
          • Identifier: provision.human.name
          • Unit: basiSI
          • Period: PULSE
          • Storage: NEVER
          • Tags: human | collection
        • Surname
          • Identifier: provision.human.surname
          • Unit: basiSI
          • Period: PULSE
          • Storage: NEVER
          • Tags: human | collection
        • Surname2
          • Identifier: provision.human.surname2
          • Unit: basiSI
          • Period: PULSE
          • Storage: NEVER
          • Tags: human | collection
        • Birthdate
          • Identifier: provision.human.birthdate
          • Unit: basiSI
          • Period: PULSE
          • Storage: NEVER
          • Tags: human | collection
        • Image
          • Identifier: provision.human.image
          • Unit: basiSI
          • Period: PULSE
          • Storage:
          • Tags: human | collection
        • Email
          • Identifier: provision.human.email
          • Unit: basiSI
          • Period: PULSE
          • Storage: NEVER
          • Tags: human | collection
        • Telephone
          • Identifier: provision.human.telephone
          • Unit: basiSI
          • Period: PULSE
          • Storage: NEVER
          • Tags: human | collection

  • Identifier:
  • Version:
  • Description:
  • Allowed resource types:
  • Categories:

og.electricity

  • Identifier: ogElectricity
  • Version: 3.5
  • Description: Specific Datamodel to OpenGate electricity
  • Allowed resource types:
    • entity.device
    • entity.asset
  • Categories:
    • electricityEnergy
      • Data streams:
        • Absolute imported active energy diary summary
          • Identifier: eImpActTotDia
          • Unit: SI kilo Watt/hour
          • Period: INSTANT
          • Storage:
          • Tags: electricity | imported
        • Absolute exported active energy diary summary
          • Identifier: eExpActTotDia
          • Unit: SI kilo Watt/hour
          • Period: INSTANT
          • Storage:
          • Tags: electricity | exported
        • Absolute quadrant I reactive energy diary summary
          • Identifier: eImpReQ1TotDia
          • Unit: SI kilo Volt Ampere Reactive/hour
          • Period: INSTANT
          • Storage:
          • Tags: electricity | imported
        • Absolute quadrant II reactive energy diary summary
          • Identifier: eImpReQ2TotDia
          • Unit: SI kilo Volt Ampere Reactive/hour
          • Period: INSTANT
          • Storage:
          • Tags: electricity | imported
        • Absolute quadrant III reactive energy diary summary
          • Identifier: eImpReQ3TotDia
          • Unit: SI kilo Volt Ampere Reactive/hour
          • Period: INSTANT
          • Storage:
          • Tags: electricity | imported
        • Absolute quadrant IV reactive energy diary summary
          • Identifier: eImpReQ4TotDia
          • Unit: SI kilo Volt Ampere Reactive/hour
          • Period: INSTANT
          • Storage:
          • Tags: electricity | imported
        • Absolute imported active energy
          • Identifier: eImpActTot
          • Unit: SI kilo Watt/hour
          • Period: INSTANT
          • Storage:
          • Tags: electricity | imported
        • Absolute exported active energy
          • Identifier: eExpActTot
          • Unit: SI kilo Watt/hour
          • Period: INSTANT
          • Storage:
          • Tags: electricity | exported
        • Absolute quadrant I reactive energy
          • Identifier: eImpReQ1Tot
          • Unit: SI kilo Volt Ampere Reactive/hour
          • Period: INSTANT
          • Storage:
          • Tags: electricity | imported
        • Absolute quadrant II reactive energy
          • Identifier: eImpReQ2Tot
          • Unit: SI kilo Volt Ampere Reactive/hour
          • Period: INSTANT
          • Storage:
          • Tags: electricity | imported
        • Absolute quadrant III reactive energy
          • Identifier: eImpReQ3Tot
          • Unit: SI kilo Volt Ampere Reactive/hour
          • Period: INSTANT
          • Storage:
          • Tags: electricity | imported
        • Absolute quadrant IV reactive energy
          • Identifier: eImpReQ4Tot
          • Unit: SI kilo Volt Ampere Reactive/hour
          • Period: INSTANT
          • Storage:
          • Tags: electricity | imported
        • Array de energía activa importada absoluto
          • Identifier: eImpActTotArray
          • Unit:
          • Period: INSTANT
          • Storage:
          • Tags: electricity | imported
        • Increment imported active energy diary summary
          • Identifier: eImpActIncDia
          • Unit: SI kilo Watt/hour
          • Period: PULSE
          • Storage:
          • Tags: electricity | imported
        • Increment exported active energy diary summary
          • Identifier: eExpActIncDia
          • Unit: SI kilo Watt/hour
          • Period: PULSE
          • Storage:
          • Tags: electricity | exported
        • Increment quadrant I reactive energy diary summary
          • Identifier: eImpReQ1IncDia
          • Unit: SI kilo Volt Ampere Reactive/hour
          • Period: PULSE
          • Storage:
          • Tags: electricity | imported
        • Increment quadrant II reactive energy diary summary
          • Identifier: eImpReQ2IncDia
          • Unit: SI kilo Volt Ampere Reactive/hour
          • Period: PULSE
          • Storage:
          • Tags: electricity | imported
        • Increment quadrant III reactive energy diary summary
          • Identifier: eImpReQ3IncDia
          • Unit: SI kilo Volt Ampere Reactive/hour
          • Period: PULSE
          • Storage:
          • Tags: electricity | imported
        • Increment quadrant IV reactive energy diary summary
          • Identifier: eImpReQ4IncDia
          • Unit: SI kilo Volt Ampere Reactive/hour
          • Period: PULSE
          • Storage:
          • Tags: electricity | imported
        • Increment imported active energy
          • Identifier: eImpActInc
          • Unit: SI kilo Watt/hour
          • Period: PULSE
          • Storage:
          • Tags: electricity | imported
        • Increment exported active energy
          • Identifier: eExpActInc
          • Unit: SI kilo Watt/hour
          • Period: PULSE
          • Storage:
          • Tags: electricity | exported
        • Increment quadrant I reactive energy
          • Identifier: eImpReQ1Inc
          • Unit: SI kilo Volt Ampere Reactive/hour
          • Period: PULSE
          • Storage:
          • Tags: electricity | imported
        • Increment quadrant II reactive energy
          • Identifier: eImpReQ2Inc
          • Unit: SI kilo Volt Ampere Reactive/hour
          • Period: PULSE
          • Storage:
          • Tags: electricity | imported
        • Increment quadrant III reactive energy
          • Identifier: eImpReQ3Inc
          • Unit: SI kilo Volt Ampere Reactive/hour
          • Period: PULSE
          • Storage:
          • Tags: electricity | imported
        • Increment quadrant IV reactive energy
          • Identifier: eImpReQ4Inc
          • Unit: SI kilo Volt Ampere Reactive/hour
          • Period: PULSE
          • Storage:
          • Tags: electricity | imported
        • Array de energía activa importada incremental
          • Identifier: eImpActIncArray
          • Unit:
          • Period: INSTANT
          • Storage:
          • Tags: electricity | imported
    • electricity.device
      • Data streams:
        • Manufacturer Code
          • Identifier: manufacturerCode
          • Unit: SI
          • Period: INSTANT
          • Storage:
          • Tags: electricity | device
        • Meter identifier
          • Identifier: contIdentifier
          • Unit: SI
          • Period: INSTANT
          • Storage:
          • Tags: electricity | device
        • Serial port 1 speed
          • Identifier: serialPort1Speed
          • Unit: SI
          • Period: INSTANT
          • Storage:
          • Tags: electricity | device
        • Serial port 1 configuration (data bits/parity/stop bits)
          • Identifier: serialPort1Conf
          • Unit: SI
          • Period: INSTANT
          • Storage:
          • Tags: electricity | device
        • Sending mode of the initialization string of the modem by serial port 1
          • Identifier: serialPort1ShipMode
          • Unit: SI
          • Period: INSTANT
          • Storage:
          • Tags: electricity | device
        • Ascii string to send via serial port 1
          • Identifier: serialPort1AsciiString
          • Unit: SI
          • Period: INSTANT
          • Storage:
          • Tags: electricity | device
        • Serial port 2 speed
          • Identifier: serialPort2Speed
          • Unit: SI
          • Period: INSTANT
          • Storage:
          • Tags: electricity | device
        • Serial port 2 configuration (data bits/parity/stop bits)
          • Identifier: serialPort2Conf
          • Unit: SI
          • Period: INSTANT
          • Storage:
          • Tags: electricity | device
        • Link address
          • Identifier: elinkAddress
          • Unit: SI
          • Period: INSTANT
          • Storage:
          • Tags: electricity | device
        • Measure points quantity
          • Identifier: measurePointsQuantity
          • Unit: SI
          • Period: INSTANT
          • Storage:
          • Tags: electricity | device
        • Measure point
          • Identifier: measurePoint
          • Unit: SI
          • Period: INSTANT
          • Storage:
          • Tags: electricity | device
        • Access password
          • Identifier: accessPass
          • Unit: SI
          • Period: INSTANT
          • Storage:
          • Tags: electricity | device
        • Integration period
          • Identifier: intPeriod
          • Unit: SI
          • Period: INSTANT
          • Storage:
          • Tags: electricity | device
        • Registry depth
          • Identifier: regDepth
          • Unit: SI
          • Period: INSTANT
          • Storage:
          • Tags: electricity | device
    • deviceReading
      • Data streams:
        • Reading state
          • Identifier: readingState
          • Unit: SI
          • Period: INSTANT
          • Storage:
          • Tags: electricity | device
    • electricity.voltage
      • Data streams:
        • Value in volts * 10 V primary
          • Identifier: voltPrim
          • Unit: SI Volts
          • Period: INSTANT
          • Storage:
          • Tags: electricity | voltage
        • Value in voltios * 10 V secondary
          • Identifier: voltSec
          • Unit: SI Volts
          • Period: INSTANT
          • Storage:
          • Tags: electricity | voltage
    • electricity.intensity
      • Data streams:
        • Value in amperes * 10 V primary
          • Identifier: intenPrim
          • Unit: SI Ampere
          • Period: INSTANT
          • Storage:
          • Tags: electricity | intensity
        • Value in amperes * 10 V secondary
          • Identifier: intenSec
          • Unit: SI Ampere
          • Period: INSTANT
          • Storage:
          • Tags: electricity | intensity
    • electricity.integration
      • Data streams:
        • Integration period in minutes of the 1st load curve
          • Identifier: IntPerLoadCurve1
          • Unit: SI
          • Period: INSTANT
          • Storage:
          • Tags: electricity | integration period
        • Integration period in minutes of the 2nd load curve
          • Identifier: IntPerLoadCurve2
          • Unit: SI
          • Period: INSTANT
          • Storage:
          • Tags: electricity | integration period
        • Integration period in minutes of the 3rd load curve
          • Identifier: IntPerLoadCurve3
          • Unit: SI
          • Period: INSTANT
          • Storage:
          • Tags: electricity | integration period
    • electricity.contract
      • Data streams:
        • Type of contract
          • Identifier: contractType
          • Unit: SI
          • Period: INSTANT
          • Storage:
          • Tags: electricity | contract
        • State of contract
          • Identifier: contractState
          • Unit: SI
          • Period: INSTANT
          • Storage:
          • Tags: electricity | contract
    • electricity.protocol
      • Data streams:
        • Standard date
          • Identifier: protocolDate
          • Unit: SI
          • Period: INSTANT
          • Storage:
          • Tags: electricity | protocol
        • Date of the version of this protocol
          • Identifier: protocolRevDate
          • Unit: SI
          • Period: INSTANT
          • Storage:
          • Tags: electricity | protocol
    • rate1Current
      • Data streams:
        • Current absolute energy in tariff period 1
          • Identifier: eRate1ActTotCur
          • Unit: SI kilo Watt/hour
          • Period: INSTANT
          • Storage:
          • Tags: electricity | tariff 1 | current
        • Current increment energy in tariff period 1
          • Identifier: eRate1ActIncCur
          • Unit: SI kilo Watt/hour
          • Period: PULSE
          • Storage:
          • Tags: electricity | tariff 1 | current
        • Current absolute inductive reactive energy in tariff period 1
          • Identifier: eRate1ReIndTotCur
          • Unit: SI kilo Volt Ampere Reactive/hour
          • Period: INSTANT
          • Storage:
          • Tags: electricity | tariff 1 | current
        • Current increment inductive reactive energy in tariff period 1
          • Identifier: eRate1ReIndIncCur
          • Unit: SI kilo Volt Ampere Reactive/hour
          • Period: PULSE
          • Storage:
          • Tags: electricity | tariff 1 | current
        • Current absolute capacitive reactive energy in tariff period 1
          • Identifier: eRate1ReCapTotCur
          • Unit: SI kilo Volt Ampere Reactive/hour
          • Period: INSTANT
          • Storage:
          • Tags: electricity | tariff 1 | current
        • Current increment capacitive reactive energy in tariff period 1
          • Identifier: eRate1ReCapIncCur
          • Unit: SI kilo Volt Ampere Reactive/hour
          • Period: PULSE
          • Storage:
          • Tags: electricity | tariff 1 | current
        • Current maximum power in tariff period 1
          • Identifier: rate1PowerMaxValCur
          • Unit: SI kilo Watt
          • Period: INSTANT
          • Storage:
          • Tags: electricity | tariff 1 | current
        • Current excess power in tariff period 1
          • Identifier: rate1PowerExValCur
          • Unit: SI kilo Watt
          • Period: INSTANT
          • Storage:
          • Tags: electricity | tariff 1 | current
        • Current init period in tariff period 1
          • Identifier: rate1PricInitPeriCur
          • Unit: SI
          • Period: INSTANT
          • Storage:
          • Tags: electricity | tariff 1 | current
        • Current end period in tariff period 1
          • Identifier: rate1PricEndPeriCur
          • Unit: SI
          • Period: INSTANT
          • Storage:
          • Tags: electricity | tariff 1 | current
        • Total current r.s
          • Identifier: eRate1ActTotArrayCur
          • Unit: SI
          • Period: INSTANT
          • Storage:
          • Tags: electricity | tariff 1 | current
    • rate1Memory
      • Data streams:
        • Memory absolute energy in tariff period 1
          • Identifier: eRate1ActTotMem
          • Unit: SI kilo Watt/hour
          • Period: INSTANT
          • Storage:
          • Tags: electricity | tariff 1 | memory
        • Memory increment energy in tariff period 1
          • Identifier: eRate1ActIncMem
          • Unit: SI kilo Watt/hour
          • Period: PULSE
          • Storage:
          • Tags: electricity | tariff 1 | memory
        • Memory absolute inductive reactive energy in tariff period 1
          • Identifier: eRate1ReIndTotMem
          • Unit: SI kilo Volt Ampere Reactive/hour
          • Period: INSTANT
          • Storage:
          • Tags: electricity | tariff 1 | memory
        • Memory increment inductive reactive energy in tariff period 1
          • Identifier: eRate1ReIndIncMem
          • Unit: SI kilo Volt Ampere Reactive/hour
          • Period: PULSE
          • Storage:
          • Tags: electricity | tariff 1 | memory
        • Memory absolute capacitive reactive energy in tariff period 1
          • Identifier: eRate1ReCapTotMem
          • Unit: SI kilo Volt Ampere Reactive/hour
          • Period: INSTANT
          • Storage:
          • Tags: electricity | tariff 1 | memory
        • Memory increment capacitive reactive energy in tariff period 1
          • Identifier: eRate1ReCapIncMem
          • Unit: SI kilo Volt Ampere Reactive/hour
          • Period: PULSE
          • Storage:
          • Tags: electricity | tariff 1 | memory
        • Memory maximum power in tariff period 1
          • Identifier: rate1PowerMaxValMem
          • Unit: SI kilo Watt
          • Period: INSTANT
          • Storage:
          • Tags: electricity | tariff 1 | memory
        • Memory excess power in tariff period 1
          • Identifier: rate1PowerExValMem
          • Unit: SI kilo Watt
          • Period: INSTANT
          • Storage:
          • Tags: electricity | tariff 1 | memory
        • Memory init period in tariff period 1
          • Identifier: rate1PricInitPeriMem
          • Unit: SI
          • Period: INSTANT
          • Storage:
          • Tags: electricity | tariff 1 | memory
        • Memory end period in tariff period 1
          • Identifier: rate1PricEndPeriMem
          • Unit: SI
          • Period: INSTANT
          • Storage:
          • Tags: electricity | tariff 1 | memory
        • Total memory r.s
          • Identifier: eRate1ActTotArrayMem
          • Unit: SI
          • Period: INSTANT
          • Storage:
          • Tags: electricity | tariff 1 | current
    • rate2Current
      • Data streams:
        • Current absolute energy in tariff period 2
          • Identifier: eRate2ActTotCur
          • Unit: SI kilo Watt/hour
          • Period: INSTANT
          • Storage:
          • Tags: electricity | tariff 2 | current
        • Current increment energy in tariff period 2
          • Identifier: eRate2ActIncCur
          • Unit: SI kilo Watt/hour
          • Period: PULSE
          • Storage:
          • Tags: electricity | tariff 2 | current
        • Current absolute inductive reactive energy in tariff period 2
          • Identifier: eRate2ReIndTotCur
          • Unit: SI kilo Volt Ampere Reactive/hour
          • Period: INSTANT
          • Storage:
          • Tags: electricity | tariff 2 | current
        • Current increment inductive reactive energy in tariff period 2
          • Identifier: eRate2ReIndIncCur
          • Unit: SI kilo Volt Ampere Reactive/hour
          • Period: PULSE
          • Storage:
          • Tags: electricity | tariff 2 | current
        • Current absolute capacitive reactive energy in tariff period 2
          • Identifier: eRate2ReCapTotCur
          • Unit: SI kilo Volt Ampere Reactive/hour
          • Period: INSTANT
          • Storage:
          • Tags: electricity | tariff 2 | current
        • Current increment capacitive reactive energy in tariff period 2
          • Identifier: eRate2ReCapIncCur
          • Unit: SI kilo Volt Ampere Reactive/hour
          • Period: PULSE
          • Storage:
          • Tags: electricity | tariff 2 | current
        • Current maximum power in tariff period 2
          • Identifier: rate2PowerMaxValCur
          • Unit: SI kilo Watt
          • Period: INSTANT
          • Storage:
          • Tags: electricity | tariff 2 | current
        • Current excess power in tariff period 2
          • Identifier: rate2PowerExValCur
          • Unit: SI kilo Watt
          • Period: INSTANT
          • Storage:
          • Tags: electricity | tariff 2 | current
        • Current init period in tariff period 2
          • Identifier: rate2PricInitPeriCur
          • Unit: SI
          • Period: INSTANT
          • Storage:
          • Tags: electricity | tariff 2 | current
        • Current end period in tariff period 2
          • Identifier: rate2PricEndPeriCur
          • Unit: SI
          • Period: INSTANT
          • Storage:
          • Tags: electricity | tariff 2 | current
    • rate2Memory
      • Data streams:
        • Memory absolute energy in tariff period 2
          • Identifier: eRate2ActTotMem
          • Unit: SI kilo Watt/hour
          • Period: INSTANT
          • Storage:
          • Tags: electricity | tariff 2 | memory
        • Memory increment energy in tariff period 2
          • Identifier: eRate2ActIncMem
          • Unit: SI kilo Watt/hour
          • Period: PULSE
          • Storage:
          • Tags: electricity | tariff 2 | memory
        • Memory absolute inductive reactive energy in tariff period 2
          • Identifier: eRate2ReIndTotMem
          • Unit: SI kilo Volt Ampere Reactive/hour
          • Period: INSTANT
          • Storage:
          • Tags: electricity | tariff 2 | memory
        • Memory increment inductive reactive energy in tariff period 2
          • Identifier: eRate2ReIndIncMem
          • Unit: SI kilo Volt Ampere Reactive/hour
          • Period: PULSE
          • Storage:
          • Tags: electricity | tariff 2 | memory
        • Memory absolute capacitive reactive energy in tariff period 2
          • Identifier: eRate2ReCapTotMem
          • Unit: SI kilo Volt Ampere Reactive/hour
          • Period: INSTANT
          • Storage:
          • Tags: electricity | tariff 2 | memory
        • Memory increment capacitive reactive energy in tariff period 2
          • Identifier: eRate2ReCapIncMem
          • Unit: SI kilo Volt Ampere Reactive/hour
          • Period: PULSE
          • Storage:
          • Tags: electricity | tariff 2 | memory
        • Memory maximum power in tariff period 2
          • Identifier: rate2PowerMaxValMem
          • Unit: SI kilo Watt
          • Period: INSTANT
          • Storage:
          • Tags: electricity | tariff 2 | memory
        • Memory excess power in tariff period 2
          • Identifier: rate2PowerExValMem
          • Unit: SI kilo Watt
          • Period: INSTANT
          • Storage:
          • Tags: electricity | tariff 2 | memory
        • Memory init period in tariff period 2
          • Identifier: rate2PricInitPeriMem
          • Unit: SI
          • Period: INSTANT
          • Storage:
          • Tags: electricity | tariff 2 | memory
        • Memory end period in tariff period 2
          • Identifier: rate2PricEndPeriMem
          • Unit: SI
          • Period: INSTANT
          • Storage:
          • Tags: electricity | tariff 2 | memory
    • rate3Current
      • Data streams:
        • Current absolute energy in tariff period 3
          • Identifier: eRate3ActTotCur
          • Unit: SI kilo Watt/hour
          • Period: INSTANT
          • Storage:
          • Tags: electricity | tariff 3 | current
        • Current increment energy in tariff period 3
          • Identifier: eRate3ActIncCur
          • Unit: SI kilo Watt/hour
          • Period: PULSE
          • Storage:
          • Tags: electricity | tariff 3 | current
        • Current absolute inductive reactive energy in tariff period 3
          • Identifier: eRate3ReIndTotCur
          • Unit: SI kilo Volt Ampere Reactive/hour
          • Period: INSTANT
          • Storage:
          • Tags: electricity | tariff 3 | current
        • Current increment inductive reactive energy in tariff period 3
          • Identifier: eRate3ReIndIncCur
          • Unit: SI kilo Volt Ampere Reactive/hour
          • Period: PULSE
          • Storage:
          • Tags: electricity | tariff 3 | current
        • Current absolute capacitive reactive energy in tariff period 3
          • Identifier: eRate3ReCapTotCur
          • Unit: SI kilo Volt Ampere Reactive/hour
          • Period: INSTANT
          • Storage:
          • Tags: electricity | tariff 3 | current
        • Current increment capacitive reactive energy in tariff period 3
          • Identifier: eRate3ReCapIncCur
          • Unit: SI kilo Volt Ampere Reactive/hour
          • Period: PULSE
          • Storage:
          • Tags: electricity | tariff 3 | current
        • Current maximum power in tariff period 3
          • Identifier: rate3PowerMaxValCur
          • Unit: SI kilo Watt
          • Period: INSTANT
          • Storage:
          • Tags: electricity | tariff 3 | current
        • Current excess power in tariff period 3
          • Identifier: rate3PowerExValCur
          • Unit: SI kilo Watt
          • Period: INSTANT
          • Storage:
          • Tags: electricity | tariff 3 | current
        • Current init period in tariff period 3
          • Identifier: rate3PricInitPeriCur
          • Unit: SI
          • Period: INSTANT
          • Storage:
          • Tags: electricity | tariff 3 | current
        • Current end period in tariff period 3
          • Identifier: rate3PricEndPeriCur
          • Unit: SI
          • Period: INSTANT
          • Storage:
          • Tags: electricity | tariff 3 | current
    • rate3Memory
      • Data streams:
        • Memory absolute energy in tariff period 3
          • Identifier: eRate3ActTotMem
          • Unit: SI kilo Watt/hour
          • Period: INSTANT
          • Storage:
          • Tags: electricity | tariff 3 | memory
        • Memory increment energy in tariff period 3
          • Identifier: eRate3ActIncMem
          • Unit: SI kilo Watt/hour
          • Period: PULSE
          • Storage:
          • Tags: electricity | tariff 3 | memory
        • Memory absolute inductive reactive energy in tariff period 3
          • Identifier: eRate3ReIndTotMem
          • Unit: SI kilo Volt Ampere Reactive/hour
          • Period: INSTANT
          • Storage:
          • Tags: electricity | tariff 3 | memory
        • Memory increment inductive reactive energy in tariff period 3
          • Identifier: eRate3ReIndIncMem
          • Unit: SI kilo Volt Ampere Reactive/hour
          • Period: PULSE
          • Storage:
          • Tags: electricity | tariff 3 | memory
        • Memory absolute capacitive reactive energy in tariff period 3
          • Identifier: eRate3ReCapTotMem
          • Unit: SI kilo Volt Ampere Reactive/hour
          • Period: INSTANT
          • Storage:
          • Tags: electricity | tariff 3 | memory
        • Memory increment capacitive reactive energy in tariff period 3
          • Identifier: eRate3ReCapIncMem
          • Unit: SI kilo Volt Ampere Reactive/hour
          • Period: PULSE
          • Storage:
          • Tags: electricity | tariff 3 | memory
        • Memory maximum power in tariff period 3
          • Identifier: rate3PowerMaxValMem
          • Unit: SI kilo Watt
          • Period: INSTANT
          • Storage:
          • Tags: electricity | tariff 3 | memory
        • Memory excess power in tariff period 3
          • Identifier: rate3PowerExValMem
          • Unit: SI kilo Watt
          • Period: INSTANT
          • Storage:
          • Tags: electricity | tariff 3 | memory
        • Memory init period in tariff period 3
          • Identifier: rate3PricInitPeriMem
          • Unit: SI
          • Period: INSTANT
          • Storage:
          • Tags: electricity | tariff 3 | memory
        • Memory end period in tariff period 3
          • Identifier: rate3PricEndPeriMem
          • Unit: SI
          • Period: INSTANT
          • Storage:
          • Tags: electricity | tariff 3 | memory
    • rate4Current
      • Data streams:
        • Current absolute energy in tariff period 4
          • Identifier: eRate4ActTotCur
          • Unit: SI kilo Watt/hour
          • Period: INSTANT
          • Storage:
          • Tags: electricity | tariff 4 | current
        • Current increment energy in tariff period 4
          • Identifier: eRate4ActIncCur
          • Unit: SI kilo Watt/hour
          • Period: PULSE
          • Storage:
          • Tags: electricity | tariff 4 | current
        • Current absolute inductive reactive energy in tariff period 4
          • Identifier: eRate4ReIndTotCur
          • Unit: SI kilo Volt Ampere Reactive/hour
          • Period: INSTANT
          • Storage:
          • Tags: electricity | tariff 4 | current
        • Current increment inductive reactive energy in tariff period 4
          • Identifier: eRate4ReIndIncCur
          • Unit: SI kilo Volt Ampere Reactive/hour
          • Period: PULSE
          • Storage:
          • Tags: electricity | tariff 4 | current
        • Current absolute capacitive reactive energy in tariff period 4
          • Identifier: eRate4ReCapTotCur
          • Unit: SI kilo Volt Ampere Reactive/hour
          • Period: INSTANT
          • Storage:
          • Tags: electricity | tariff 4 | current
        • Current increment capacitive reactive energy in tariff period 4
          • Identifier: eRate4ReCapIncCur
          • Unit: SI kilo Volt Ampere Reactive/hour
          • Period: PULSE
          • Storage:
          • Tags: electricity | tariff 4 | current
        • Current maximum power in tariff period 4
          • Identifier: rate4PowerMaxValCur
          • Unit: SI kilo Watt
          • Period: INSTANT
          • Storage:
          • Tags: electricity | tariff 4 | current
        • Current excess power in tariff period 4
          • Identifier: rate4PowerExValCur
          • Unit: SI kilo Watt
          • Period: INSTANT
          • Storage:
          • Tags: electricity | tariff 4 | current
        • Current init period in tariff period 4
          • Identifier: rate4PricInitPeriCur
          • Unit: SI
          • Period: INSTANT
          • Storage:
          • Tags: electricity | tariff 4 | current
        • Current end period in tariff period 4
          • Identifier: rate4PricEndPeriCur
          • Unit: SI
          • Period: INSTANT
          • Storage:
          • Tags: electricity | tariff 4 | current
    • rate4Memory
      • Data streams:
        • Memory absolute energy in tariff period 4
          • Identifier: eRate4ActTotMem
          • Unit: SI kilo Watt/hour
          • Period: INSTANT
          • Storage:
          • Tags: electricity | tariff 4 | memory
        • Memory increment energy in tariff period 4
          • Identifier: eRate4ActIncMem
          • Unit: SI kilo Watt/hour
          • Period: PULSE
          • Storage:
          • Tags: electricity | tariff 4 | memory
        • Memory absolute inductive reactive energy in tariff period 4
          • Identifier: eRate4ReIndTotMem
          • Unit: SI kilo Volt Ampere Reactive/hour
          • Period: INSTANT
          • Storage:
          • Tags: electricity | tariff 4 | memory
        • Memory increment inductive reactive energy in tariff period 4
          • Identifier: eRate4ReIndIncMem
          • Unit: SI kilo Volt Ampere Reactive/hour
          • Period: PULSE
          • Storage:
          • Tags: electricity | tariff 4 | memory
        • Memory absolute capacitive reactive energy in tariff period 4
          • Identifier: eRate4ReCapTotMem
          • Unit: SI kilo Volt Ampere Reactive/hour
          • Period: INSTANT
          • Storage:
          • Tags: electricity | tariff 4 | memory
        • Memory increment capacitive reactive energy in tariff period 4
          • Identifier: eRate4ReCapIncMem
          • Unit: SI kilo Volt Ampere Reactive/hour
          • Period: PULSE
          • Storage:
          • Tags: electricity | tariff 4 | memory
        • Memory maximum power in tariff period 4
          • Identifier: rate4PowerMaxValMem
          • Unit: SI kilo Watt
          • Period: INSTANT
          • Storage:
          • Tags: electricity | tariff 4 | memory
        • Memory excess power in tariff period 4
          • Identifier: rate4PowerExValMem
          • Unit: SI kilo Watt
          • Period: INSTANT
          • Storage:
          • Tags: electricity | tariff 4 | memory
        • Memory init period in tariff period 4
          • Identifier: rate4PricInitPeriMem
          • Unit: SI
          • Period: INSTANT
          • Storage:
          • Tags: electricity | tariff 4 | memory
        • Memory end period in tariff period 4
          • Identifier: rate4PricEndPeriMem
          • Unit: SI
          • Period: INSTANT
          • Storage:
          • Tags: electricity | tariff 4 | memory
    • rate5Current
      • Data streams:
        • Current absolute energy in tariff period 5
          • Identifier: eRate5ActTotCur
          • Unit: SI kilo Watt/hour
          • Period: INSTANT
          • Storage:
          • Tags: electricity | tariff 5 | current
        • Current increment energy in tariff period 5
          • Identifier: eRate5ActIncCur
          • Unit: SI kilo Watt/hour
          • Period: PULSE
          • Storage:
          • Tags: electricity | tariff 5 | current
        • Current absolute inductive reactive energy in tariff period 5
          • Identifier: eRate5ReIndTotCur
          • Unit: SI kilo Volt Ampere Reactive/hour
          • Period: INSTANT
          • Storage:
          • Tags: electricity | tariff 5 | current
        • Current increment inductive reactive energy in tariff period 5
          • Identifier: eRate5ReIndIncCur
          • Unit: SI kilo Volt Ampere Reactive/hour
          • Period: PULSE
          • Storage:
          • Tags: electricity | tariff 5 | current
        • Current absolute capacitive reactive energy in tariff period 5
          • Identifier: eRate5ReCapTotCur
          • Unit: SI kilo Volt Ampere Reactive/hour
          • Period: INSTANT
          • Storage:
          • Tags: electricity | tariff 5 | current
        • Current increment capacitive reactive energy in tariff period 5
          • Identifier: eRate5ReCapIncCur
          • Unit: SI kilo Volt Ampere Reactive/hour
          • Period: PULSE
          • Storage:
          • Tags: electricity | tariff 5 | current
        • Current maximum power in tariff period 5
          • Identifier: rate5PowerMaxValCur
          • Unit: SI kilo Watt
          • Period: INSTANT
          • Storage:
          • Tags: electricity | tariff 5 | current
        • Current excess power in tariff period 5
          • Identifier: rate5PowerExValCur
          • Unit: SI kilo Watt
          • Period: INSTANT
          • Storage:
          • Tags: electricity | tariff 5 | current
        • Current init period in tariff period 5
          • Identifier: rate5PricInitPeriCur
          • Unit: SI
          • Period: INSTANT
          • Storage:
          • Tags: electricity | tariff 5 | current
        • Current end period in tariff period 5
          • Identifier: rate5PricEndPeriCur
          • Unit: SI
          • Period: INSTANT
          • Storage:
          • Tags: electricity | tariff 5 | current
    • rate5Memory
      • Data streams:
        • Memory absolute energy in tariff period 5
          • Identifier: eRate5ActTotMem
          • Unit: SI kilo Watt/hour
          • Period: INSTANT
          • Storage:
          • Tags: electricity | tariff 5 | memory
        • Memory increment energy in tariff period 5
          • Identifier: eRate5ActIncMem
          • Unit: SI kilo Watt/hour
          • Period: PULSE
          • Storage:
          • Tags: electricity | tariff 5 | memory
        • Memory absolute inductive reactive energy in tariff period 5
          • Identifier: eRate5ReIndTotMem
          • Unit: SI kilo Volt Ampere Reactive/hour
          • Period: INSTANT
          • Storage:
          • Tags: electricity | tariff 5 | memory
        • Memory increment inductive reactive energy in tariff period 5
          • Identifier: eRate5ReIndIncMem
          • Unit: SI kilo Volt Ampere Reactive/hour
          • Period: PULSE
          • Storage:
          • Tags: electricity | tariff 5 | memory
        • Memory absolute capacitive reactive energy in tariff period 5
          • Identifier: eRate5ReCapTotMem
          • Unit: SI kilo Volt Ampere Reactive/hour
          • Period: INSTANT
          • Storage:
          • Tags: electricity | tariff 5 | memory
        • Memory increment capacitive reactive energy in tariff period 5
          • Identifier: eRate5ReCapIncMem
          • Unit: SI kilo Volt Ampere Reactive/hour
          • Period: PULSE
          • Storage:
          • Tags: electricity | tariff 5 | memory
        • Memory maximum power in tariff period 5
          • Identifier: rate5PowerMaxValMem
          • Unit: SI kilo Watt
          • Period: INSTANT
          • Storage:
          • Tags: electricity | tariff 5 | memory
        • Memory excess power in tariff period 5
          • Identifier: rate5PowerExValMem
          • Unit: SI kilo Watt
          • Period: INSTANT
          • Storage:
          • Tags: electricity | tariff 5 | memory
        • Memory init period in tariff period 5
          • Identifier: rate5PricInitPeriMem
          • Unit: SI
          • Period: INSTANT
          • Storage:
          • Tags: electricity | tariff 5 | memory
        • Memory end period in tariff period 5
          • Identifier: rate5PricEndPeriMem
          • Unit: SI
          • Period: INSTANT
          • Storage:
          • Tags: electricity | tariff 5 | memory
    • rate6Current
      • Data streams:
        • Current absolute energy in tariff period 6
          • Identifier: eRate6ActTotCur
          • Unit: SI kilo Watt/hour
          • Period: INSTANT
          • Storage:
          • Tags: electricity | tariff 6 | current
        • Current increment energy in tariff period 6
          • Identifier: eRate6ActIncCur
          • Unit: SI kilo Watt/hour
          • Period: PULSE
          • Storage:
          • Tags: electricity | tariff 6 | current
        • Current absolute inductive reactive energy in tariff period 6
          • Identifier: eRate6ReIndTotCur
          • Unit: SI kilo Volt Ampere Reactive/hour
          • Period: INSTANT
          • Storage:
          • Tags: electricity | tariff 6 | current
        • Current increment inductive reactive energy in tariff period 6
          • Identifier: eRate6ReIndIncCur
          • Unit: SI kilo Volt Ampere Reactive/hour
          • Period: PULSE
          • Storage:
          • Tags: electricity | tariff 6 | current
        • Current absolute capacitive reactive energy in tariff period 6
          • Identifier: eRate6ReCapTotCur
          • Unit: SI kilo Volt Ampere Reactive/hour
          • Period: INSTANT
          • Storage:
          • Tags: electricity | tariff 6 | current
        • Current increment capacitive reactive energy in tariff period 6
          • Identifier: eRate6ReCapIncCur
          • Unit: SI kilo Volt Ampere Reactive/hour
          • Period: PULSE
          • Storage:
          • Tags: electricity | tariff 6 | current
        • Current maximum power in tariff period 6
          • Identifier: rate6PowerMaxValCur
          • Unit: SI kilo Watt
          • Period: INSTANT
          • Storage:
          • Tags: electricity | tariff 6 | current
        • Current excess power in tariff period 6
          • Identifier: rate6PowerExValCur
          • Unit: SI kilo Watt
          • Period: INSTANT
          • Storage:
          • Tags: electricity | tariff 6 | current
        • Current init period in tariff period 6
          • Identifier: rate6PricInitPeriCur
          • Unit: SI
          • Period: INSTANT
          • Storage:
          • Tags: electricity | tariff 6 | current
        • Current end period in tariff period 6
          • Identifier: rate6PricEndPeriCur
          • Unit: SI
          • Period: INSTANT
          • Storage:
          • Tags: electricity | tariff 6 | current
    • rate6Memory
      • Data streams:
        • Memory absolute energy in tariff period 6
          • Identifier: eRate6ActTotMem
          • Unit: SI kilo Watt/hour
          • Period: INSTANT
          • Storage:
          • Tags: electricity | tariff 6 | memory
        • Memory increment energy in tariff period 6
          • Identifier: eRate6ActIncMem
          • Unit: SI kilo Watt/hour
          • Period: PULSE
          • Storage:
          • Tags: electricity | tariff 6 | memory
        • Memory absolute inductive reactive energy in tariff period 6
          • Identifier: eRate6ReIndTotMem
          • Unit: SI kilo Volt Ampere Reactive/hour
          • Period: INSTANT
          • Storage:
          • Tags: electricity | tariff 6 | memory
        • Memory increment inductive reactive energy in tariff period 6
          • Identifier: eRate6ReIndIncMem
          • Unit: SI kilo Volt Ampere Reactive/hour
          • Period: PULSE
          • Storage:
          • Tags: electricity | tariff 6 | memory
        • Memory absolute capacitive reactive energy in tariff period 6
          • Identifier: eRate6ReCapTotMem
          • Unit: SI kilo Volt Ampere Reactive/hour
          • Period: INSTANT
          • Storage:
          • Tags: electricity | tariff 6 | memory
        • Memory increment capacitive reactive energy in tariff period 6
          • Identifier: eRate6ReCapIncMem
          • Unit: SI kilo Volt Ampere Reactive/hour
          • Period: PULSE
          • Storage:
          • Tags: electricity | tariff 6 | memory
        • Memory maximum power in tariff period 6
          • Identifier: rate6PowerMaxValMem
          • Unit: SI kilo Watt
          • Period: INSTANT
          • Storage:
          • Tags: electricity | tariff 6 | memory
        • Memory excess power in tariff period 6
          • Identifier: rate6PowerExValMem
          • Unit: SI kilo Watt
          • Period: INSTANT
          • Storage:
          • Tags: electricity | tariff 6 | memory
        • Memory init period in tariff period 6
          • Identifier: rate6PricInitPeriMem
          • Unit: SI
          • Period: INSTANT
          • Storage:
          • Tags: electricity | tariff 6 | memory
        • Memory end period in tariff period 6
          • Identifier: rate6PricEndPeriMem
          • Unit: SI
          • Period: INSTANT
          • Storage:
          • Tags: electricity | tariff 6 | memory
    • rateTotalCurrent
      • Data streams:
        • Current absolute energy in tariff period total
          • Identifier: eRateTotActTotCur
          • Unit: SI kilo Watt/hour
          • Period: INSTANT
          • Storage:
          • Tags: electricity | tariff total | current
        • Current increment energy in tariff period total
          • Identifier: eRateTotActIncCur
          • Unit: SI kilo Watt/hour
          • Period: PULSE
          • Storage:
          • Tags: electricity | tariff total | current
        • Current absolute inductive reactive energy in tariff period total
          • Identifier: eRateTotReIndTotCur
          • Unit: SI kilo Volt Ampere Reactive/hour
          • Period: INSTANT
          • Storage:
          • Tags: electricity | tariff total | current
        • Current increment inductive reactive energy in tariff period total
          • Identifier: eRateTotReIndIncCur
          • Unit: SI kilo Volt Ampere Reactive/hour
          • Period: PULSE
          • Storage:
          • Tags: electricity | tariff total | current
        • Current absolute capacitive reactive energy in tariff period total
          • Identifier: eRateTotReCapTotCur
          • Unit: SI kilo Volt Ampere Reactive/hour
          • Period: INSTANT
          • Storage:
          • Tags: electricity | tariff total | current
        • Current increment capacitive reactive energy in tariff period total
          • Identifier: eRateTotReCapIncCur
          • Unit: SI kilo Volt Ampere Reactive/hour
          • Period: PULSE
          • Storage:
          • Tags: electricity | tariff total | current
        • Current maximum power in tariff period total
          • Identifier: rateTotPowerMaxValCur
          • Unit: SI kilo Watt
          • Period: INSTANT
          • Storage:
          • Tags: electricity | tariff total | current
        • Current excess power in tariff period total
          • Identifier: rateTotPowerExValCur
          • Unit: SI kilo Watt
          • Period: INSTANT
          • Storage:
          • Tags: electricity | tariff total | current
        • Current init period in tariff period total
          • Identifier: rateTotPricInitPeriCur
          • Unit: SI
          • Period: INSTANT
          • Storage:
          • Tags: electricity | tariff total | current
        • Current end period in tariff period total
          • Identifier: rateTotPricEndPeriCur
          • Unit: SI
          • Period: INSTANT
          • Storage:
          • Tags: electricity | tariff total | current
    • rateTotalMemory
      • Data streams:
        • Memory absolute energy in tariff period total
          • Identifier: eRateTotActTotMem
          • Unit: SI kilo Watt/hour
          • Period: INSTANT
          • Storage:
          • Tags: electricity | tariff total | memory
        • Memory increment energy in tariff period total
          • Identifier: eRateTotActIncMem
          • Unit: SI kilo Watt/hour
          • Period: PULSE
          • Storage:
          • Tags: electricity | tariff total | memory
        • Memory absolute inductive reactive energy in tariff period total
          • Identifier: eRateTotReIndTotMem
          • Unit: SI kilo Volt Ampere Reactive/hour
          • Period: INSTANT
          • Storage:
          • Tags: electricity | tariff total | memory
        • Memory increment inductive reactive energy in tariff period total
          • Identifier: eRateTotReIndIncMem
          • Unit: SI kilo Volt Ampere Reactive/hour
          • Period: PULSE
          • Storage:
          • Tags: electricity | tariff total | memory
        • Memory absolute capacitive reactive energy in tariff period total
          • Identifier: eRateTotReCapTotMem
          • Unit: SI kilo Volt Ampere Reactive/hour
          • Period: INSTANT
          • Storage:
          • Tags: electricity | tariff total | memory
        • Memory increment capacitive reactive energy in tariff period total
          • Identifier: eRateTotReCapIncMem
          • Unit: SI kilo Volt Ampere Reactive/hour
          • Period: PULSE
          • Storage:
          • Tags: electricity | tariff total | memory
        • Memory maximum power in tariff period total
          • Identifier: rateTotPowerMaxValMem
          • Unit: SI kilo Watt
          • Period: INSTANT
          • Storage:
          • Tags: electricity | tariff total | memory
        • Memory excess power in tariff period total
          • Identifier: rateTotPowerExValMem
          • Unit: SI kilo Watt
          • Period: INSTANT
          • Storage:
          • Tags: electricity | tariff total | memory
        • Memory init period in tariff period total
          • Identifier: rateTotPricInitPeriMem
          • Unit: SI
          • Period: INSTANT
          • Storage:
          • Tags: electricity | tariff total | memory
        • Memory end period in tariff period total
          • Identifier: rateTotPricEndPeriMem
          • Unit: SI
          • Period: INSTANT
          • Storage:
          • Tags: electricity | tariff total | memory
    • PrimeConcentratorState
      • Data streams:
        • S24 state
          • Identifier: cS24State
          • Unit: SI
          • Period: INSTANT
          • Storage:
          • Tags: electricity | Concentrator | PRIME
        • S11 state
          • Identifier: cS11State
          • Unit: SI
          • Period: INSTANT
          • Storage:
          • Tags: electricity | Concentrator | PRIME
        • S02 state
          • Identifier: cS02State
          • Unit: SI
          • Period: INSTANT
          • Storage:
          • Tags: electricity | Concentrator | PRIME
        • S03 state
          • Identifier: cS03State
          • Unit: SI
          • Period: INSTANT
          • Storage:
          • Tags: electricity | Concentrator | PRIME
        • S09 state
          • Identifier: cS09State
          • Unit: SI
          • Period: INSTANT
          • Storage:
          • Tags: electricity | Concentrator | PRIME
        • S18 state
          • Identifier: cS18State
          • Unit: SI
          • Period: INSTANT
          • Storage:
          • Tags: electricity | Concentrator | PRIME
        • S23 state
          • Identifier: cS23State
          • Unit: SI
          • Period: INSTANT
          • Storage:
          • Tags: electricity | Concentrator | PRIME
        • Protocol version
          • Identifier: protVersion
          • Unit: SI
          • Period: INSTANT
          • Storage:
          • Tags: electricity | Concentrator | PRIME
    • PrimeConcentratorBaseNodePLC_S11
      • Data streams:
        • MacSNA
          • Identifier: macSNA
          • Unit: SI
          • Period: INSTANT
          • Storage:
          • Tags: electricity | Concentrator | PRIME
        • macBeaconsPerFrame
          • Identifier: macBeaconsPerFrame
          • Unit: SI
          • Period: INSTANT
          • Storage:
          • Tags: electricity | Concentrator | PRIME
        • MacState
          • Identifier: macState
          • Unit: SI
          • Period: INSTANT
          • Storage:
          • Tags: electricity | Concentrator | PRIME
        • MacSCPLength
          • Identifier: macSCPLength
          • Unit: SI
          • Period: INSTANT
          • Storage:
          • Tags: electricity | Concentrator | PRIME
        • MacNodeHierarchyLevel
          • Identifier: macNodeHierarchyLevel
          • Unit: SI
          • Period: INSTANT
          • Storage:
          • Tags: electricity | Concentrator | PRIME
        • MacBeaconSlotCount
          • Identifier: macBeaconSlotCount
          • Unit: SI
          • Period: INSTANT
          • Storage:
          • Tags: electricity | Concentrator | PRIME
        • MacBeaconTxSlot
          • Identifier: macBeaconTxSlot
          • Unit: SI
          • Period: INSTANT
          • Storage:
          • Tags: electricity | Concentrator | PRIME
        • MacBeaconTxFrequency
          • Identifier: macBeaconTxFrequency
          • Unit: SI
          • Period: INSTANT
          • Storage:
          • Tags: electricity | Concentrator | PRIME
        • MacCSMAChBusyCount
          • Identifier: macCSMAChBusyCount
          • Unit: SI
          • Period: INSTANT
          • Storage:
          • Tags: electricity | Concentrator | PRIME
    • PrimeConcentratorMacList_S11
      • Data streams:
        • macListRegDevices
          • Identifier: macListRegDevices
          • Unit: SI
          • Period: INSTANT
          • Storage:
          • Tags: electricity | Concentrator | PRIME
        • macListActiveConn
          • Identifier: macListActiveConn
          • Unit: SI
          • Period: INSTANT
          • Storage:
          • Tags: electricity | Concentrator | PRIME
        • macListMcastEntries
          • Identifier: macListMcastEntries
          • Unit: SI
          • Period: INSTANT
          • Storage:
          • Tags: electricity | Concentrator | PRIME
        • macListSwitchTable
          • Identifier: macListSwitchTable
          • Unit: SI
          • Period: INSTANT
          • Storage:
          • Tags: electricity | Concentrator | PRIME
        • macListDirectConn
          • Identifier: macListDirectConn
          • Unit: SI
          • Period: INSTANT
          • Storage:
          • Tags: electricity | Concentrator | PRIME
        • macListDirectTable
          • Identifier: macListDirectTable
          • Unit: SI
          • Period: INSTANT
          • Storage:
          • Tags: electricity | Concentrator | PRIME
        • macListAvailableSwitches
          • Identifier: macListAvailablesSwitches
          • Unit: SI
          • Period: INSTANT
          • Storage:
          • Tags: electricity | Concentrator | PRIME
    • PrimeMeter
      • Data streams:
        • comStatus
          • Identifier: meterComState
          • Unit: SI
          • Period: INSTANT
          • Storage:
          • Tags: electricity | Meter | PRIME
        • Date
          • Identifier: lastAcDCtoMeter
          • Unit: SI
          • Period: INSTANT
          • Storage:
          • Tags: electricity | Meter | PRIME
        • Active
          • Identifier: DCActive
          • Unit: SI
          • Period: INSTANT
          • Storage:
          • Tags: electricity | Meter | PRIME
        • Meter state
          • Identifier: MeterState
          • Unit: SI
          • Period: INSTANT
          • Storage:
          • Tags: electricity | Meter | PRIME
        • Meter event
          • Identifier: MeterEvent
          • Unit: SI
          • Period: INSTANT
          • Storage:
          • Tags: electricity | Meter | PRIME
        • resOperation
          • Identifier: resOperation
          • Unit: SI
          • Period: INSTANT
          • Storage:
          • Tags: electricity | meter | PRIME
    • provisionDevice
      • Data streams:
        • IP
          • Identifier: provision.ip
          • Unit: basicSI
          • Period: INSTANT
          • Storage:
          • Tags:
        • Port
          • Identifier: provision.port
          • Unit: basicSI
          • Period: INSTANT
          • Storage:
          • Tags:
        • User
          • Identifier: provision.user
          • Unit: basicSI
          • Period: INSTANT
          • Storage:
          • Tags:
        • Password
          • Identifier: provision.password
          • Unit: basicSI
          • Period: INSTANT
          • Storage:
          • Tags:
        • Port config
          • Identifier: provision.portConfig
          • Unit: basicSI
          • Period: INSTANT
          • Storage:
          • Tags:
        • Speed
          • Identifier: provision.speed
          • Unit: basicSI Baudios
          • Period: INSTANT
          • Storage:
          • Tags:
        • Parity
          • Identifier: provision.parity
          • Unit: basicSI
          • Period: INSTANT
          • Storage:
          • Tags:
        • Stop bits
          • Identifier: provision.stopBits
          • Unit: basicSI
          • Period: INSTANT
          • Storage:
          • Tags:
        • Data bits
          • Identifier: provision.dataBits
          • Unit: basicSI
          • Period: INSTANT
          • Storage:
          • Tags:
        • Control flow
          • Identifier: provision.flowControl
          • Unit: basicSI
          • Period: INSTANT
          • Storage:
          • Tags:
        • Hardware control flow
          • Identifier: provision.hwFlowControl
          • Unit: basicSI
          • Period: INSTANT
          • Storage:
          • Tags:
    • provisionSmartMeter
      • Data streams:
        • Type of meter
          • Identifier: provision.type
          • Unit: SI
          • Period: INSTANT
          • Storage:
          • Tags: electricity | type
        • Distributor name
          • Identifier: provision.distributorName
          • Unit: SI
          • Period: INSTANT
          • Storage:
          • Tags: electricity
        • Link address
          • Identifier: provision.linkAddress
          • Unit: basicSI
          • Period: INSTANT
          • Storage:
          • Tags:
        • Measure point
          • Identifier: provision.measurePoint
          • Unit: basicSI
          • Period: INSTANT
          • Storage:
          • Tags:
        • Password access
          • Identifier: provision.passwordAccess
          • Unit: basicSI
          • Period: INSTANT
          • Storage:
          • Tags:
        • IEC102 connection timeout
          • Identifier: provision.timeoutIEC102
          • Unit: basicSI
          • Period: INSTANT
          • Storage:
          • Tags:
        • Password write
          • Identifier: provision.passwordWrite
          • Unit: basicSI
          • Period: INSTANT
          • Storage:
          • Tags:
        • CUPS
          • Identifier: provision.cups
          • Unit: basicSI
          • Period: INSTANT
          • Storage:
          • Tags:
        • Rate
          • Identifier: provision.rate
          • Unit: basicSI
          • Period: INSTANT
          • Storage:
          • Tags:
        • Backoffice code
          • Identifier: provision.backofficeCode
          • Unit: basicSI
          • Period: INSTANT
          • Storage:
          • Tags:
        • Start date
          • Identifier: provision.startDate
          • Unit: basicSI
          • Period: INSTANT
          • Storage:
          • Tags:
        • End date
          • Identifier: provision.endDate
          • Unit: basicSI
          • Period: INSTANT
          • Storage:
          • Tags:
        • Telemetry signature
          • Identifier: provision.telemetrySigned
          • Unit: basicSI
          • Period: INSTANT
          • Storage:
          • Tags:
        • Activation date
          • Identifier: provision.activationDate
          • Unit: basicSI
          • Period: INSTANT
          • Storage:
          • Tags:
        • Meter owner
          • Identifier: provision.meterOwner
          • Unit: basicSI
          • Period: INSTANT
          • Storage:
          • Tags:
        • Customer name
          • Identifier: provision.customerName
          • Unit: basicSI
          • Period: INSTANT
          • Storage:
          • Tags:
    • provisionPrimeRequestTypeConcentrator
      • Data streams:
        • Type of request S24
          • Identifier: provision.requestTypeS24
          • Unit: SI
          • Period: INSTANT
          • Storage:
          • Tags: electricity | Concentrator | PRIME
        • Type of request S11
          • Identifier: provision.requestTypeS11
          • Unit: SI
          • Period: INSTANT
          • Storage:
          • Tags: electricity | Concentrator | PRIME
        • Type of request S02
          • Identifier: provision.requestTypeS02
          • Unit: SI
          • Period: INSTANT
          • Storage:
          • Tags: electricity | Concentrator | PRIME
        • Type of request S03
          • Identifier: provision.requestTypeS03
          • Unit: SI
          • Period: INSTANT
          • Storage:
          • Tags: electricity | Concentrator | PRIME
        • Type of request S09
          • Identifier: provision.requestTypeS09
          • Unit: SI
          • Period: INSTANT
          • Storage:
          • Tags: electricity | Concentrator | PRIME
        • Type of request S18
          • Identifier: provision.requestTypeS18
          • Unit: SI
          • Period: INSTANT
          • Storage:
          • Tags: electricity | Concentrator | PRIME
        • Type of request S23
          • Identifier: provision.requestTypeS23
          • Unit: SI
          • Period: INSTANT
          • Storage:
          • Tags: electricity | Concentrator | PRIME
        • Type of request B03
          • Identifier: provision.requestTypeB03
          • Unit: SI
          • Period: INSTANT
          • Storage:
          • Tags: electricity | Concentrator | PRIME
        • Type of request B02
          • Identifier: provision.requestTypeB02
          • Unit: SI
          • Period: INSTANT
          • Storage:
          • Tags: electricity | Concentrator | PRIME
        • Protocol version
          • Identifier: provision.protVersion
          • Unit: SI
          • Period: INSTANT
          • Storage:
          • Tags: electricity | Concentrator | PRIME
    • provisionPrimeFtpConcentrator
      • Data streams:
        • FTP user
          • Identifier: provision.ftpUser
          • Unit: SI
          • Period: INSTANT
          • Storage:
          • Tags: electricity | Concentrator | PRIME
        • FTP password
          • Identifier: provision.ftpPass
          • Unit: SI
          • Period: INSTANT
          • Storage:
          • Tags: electricity | Concentrator | PRIME
        • FTP IP
          • Identifier: provision.ftpIp
          • Unit: SI
          • Period: INSTANT
          • Storage:
          • Tags: electricity | Concentrator | PRIME
        • FTP port
          • Identifier: provision.ftpPort
          • Unit: SI
          • Period: INSTANT
          • Storage:
          • Tags: electricity | Concentrator | PRIME
        • FTP path
          • Identifier: provision.ftpPath
          • Unit: SI
          • Period: INSTANT
          • Storage:
          • Tags: electricity | Concentrator | PRIME
        • Soap port
          • Identifier: provision.soapPort
          • Unit: SI
          • Period: INSTANT
          • Storage:
          • Tags: electricity | Concentrator | PRIME
        • Soap IP
          • Identifier: provision.soapIp
          • Unit: SI
          • Period: INSTANT
          • Storage:
          • Tags: electricity | Concentrator | PRIME
    • S18
      • Data streams:
        • Order Execution Time
          • Identifier: orderExecutionTime
          • Unit: SI
          • Period: INSTANT
          • Storage:
          • Tags: electricity | Meter | PRIME
        • Executed Order
          • Identifier: executedOrder
          • Unit: SI
          • Period: INSTANT
          • Storage:
          • Tags: electricity | Concentrator | meter | PRIME
    • S23
      • Data streams:
        • Present Contract Power Activation Date
          • Identifier: presentContPowerActDate
          • Unit: SI
          • Period: INSTANT
          • Storage:
          • Tags: electricity | Meter | PRIME
        • Potencia Contrato 1 periodo de tarificación 1
          • Identifier: pCr1Tr1
          • Unit: SI
          • Period: INSTANT
          • Storage:
          • Tags: electricity | Meter | PRIME
        • Potencia Contrato 1 periodo de tarificación 2
          • Identifier: pCr1Tr2
          • Unit: SI
          • Period: INSTANT
          • Storage:
          • Tags: electricity | Meter | PRIME
        • Potencia Contrato 1 periodo de tarificación 3
          • Identifier: pCr1Tr3
          • Unit: SI
          • Period: INSTANT
          • Storage:
          • Tags: electricity | Meter | PRIME
        • Potencia Contrato 1 periodo de tarificación 4
          • Identifier: pCr1Tr4
          • Unit: SI
          • Period: INSTANT
          • Storage:
          • Tags: electricity | Meter | PRIME
        • Potencia Contrato 1 periodo de tarificación 5
          • Identifier: pCr1Tr5
          • Unit: SI
          • Period: INSTANT
          • Storage:
          • Tags: electricity | Meter | PRIME
        • Potencia Contrato 1 periodo de tarificación 6
          • Identifier: pCr1Tr6
          • Unit: SI
          • Period: INSTANT
          • Storage:
          • Tags: electricity | Meter | PRIME
        • Potencia residual Contrato 1 periodo de tarificación 1
          • Identifier: pResTr1
          • Unit: SI
          • Period: INSTANT
          • Storage:
          • Tags: electricity | Meter | PRIME
        • Potencia residual Contrato 1 periodo de tarificación 2
          • Identifier: pResTr2
          • Unit: SI
          • Period: INSTANT
          • Storage:
          • Tags: electricity | Meter | PRIME
        • Potencia residual Contrato 1 periodo de tarificación 3
          • Identifier: pResTr3
          • Unit: SI
          • Period: INSTANT
          • Storage:
          • Tags: electricity | Meter | PRIME
        • Potencia residual Contrato 1 periodo de tarificación 4
          • Identifier: pResTr4
          • Unit: SI
          • Period: INSTANT
          • Storage:
          • Tags: electricity | Meter | PRIME
        • Potencia residual Contrato 1 periodo de tarificación 5
          • Identifier: pResTr5
          • Unit: SI
          • Period: INSTANT
          • Storage:
          • Tags: electricity | Meter | PRIME
        • Potencia residual Contrato 1 periodo de tarificación 6
          • Identifier: pResTr6
          • Unit: SI
          • Period: INSTANT
          • Storage:
          • Tags: electricity | Meter | PRIME

collectionOrganization

  • Identifier: collectionOrganization
  • Version: 8.0.2.0
  • Description: Specific Datamodel to collected organization info
  • Allowed resource types:
    • organization
  • Categories:
    • organizationCollectedInfo
      • Data streams:
        • Identifier
          • Identifier: organization.identifier
          • Unit: basicSI
          • Period: PULSE
          • Storage: NEVER
          • Tags: organization

provisionOrganization

  • Identifier: provisionOrganization
  • Version: 8.0.1.0
  • Description: Specific Datamodel to provision an organization
  • Allowed resource types:
    • organization
  • Categories:
    • organizationProvisionedInfo
      • Data streams:
        • Prov. Identifier
          • Identifier: provision.organization.identifier
          • Unit: basicSI
          • Period: PULSE
          • Storage: NEVER
          • Tags: organization
        • Prov. Description
          • Identifier: provision.organization.description
          • Unit: basicSI
          • Period: PULSE
          • Storage: NEVER
          • Tags: organization
        • Prov. Country code
          • Identifier: provision.organization.countryCode
          • Unit: basicSI
          • Period: PULSE
          • Storage: NEVER
          • Tags: organization
        • Prov. Lang code
          • Identifier: provision.organization.langCode
          • Unit: basicSI
          • Period: PULSE
          • Storage: NEVER
          • Tags: organization
        • Prov. Timezone
          • Identifier: provision.organization.timezone
          • Unit: basicSI
          • Period: PULSE
          • Storage: NEVER
          • Tags: organization
        • Prov. Domain
          • Identifier: provision.organization.domain
          • Unit: basicSI
          • Period: PULSE
          • Storage:
          • Tags: organization
        • Map
          • Identifier: provision.organization.mapDefault
          • Unit: basicSI
          • Period: PULSE
          • Storage: NEVER
          • Tags: organization
        • Prov. Plan
          • Identifier: provision.organization.plan
          • Unit: basicSI
          • Period: PULSE
          • Storage: NEVER
          • Tags: organization
        • Prov. Assigned certificates
          • Identifier: provision.organization.onlyAssignedDomainCertificates
          • Unit: basicSI
          • Period: PULSE
          • Storage:
          • Tags: organization

collectionSubscriber

  • Identifier: collectionSubscriber
  • Version: 8.0.0.0
  • Description: Specific Datamodel to subscriber branch
  • Allowed resource types:
    • entity.device
    • entity.subscriber
  • Categories:
    • subscriberCollectedInfo
      • Data streams:
        • Identifier
          • Identifier: device.communicationModules[].subscriber.identifier
          • Unit: basicSI
          • Period: PULSE
          • Storage: NEVER
          • Tags: dmm | provision
        • Specific type
          • Identifier: device.communicationModules[].subscriber.specificType
          • Unit: basicSI
          • Period: PULSE
          • Storage: NEVER
          • Tags: dmm | collection
        • Name
          • Identifier: device.communicationModules[].subscriber.name
          • Unit: basicSI
          • Period: PULSE
          • Storage: NEVER
          • Tags: dmm | collection
        • Description
          • Identifier: device.communicationModules[].subscriber.description
          • Unit: basicSI
          • Period: PULSE
          • Storage: NEVER
          • Tags: dmm | collection
        • Serial number
          • Identifier: device.communicationModules[].subscriber.serialNumber
          • Unit: basicSI
          • Period: PULSE
          • Storage: NEVER
          • Tags: dmm | collection
        • Model
          • Identifier: device.communicationModules[].subscriber.model
          • Unit: basicSI
          • Period: PULSE
          • Storage: NEVER
          • Tags: dmm | collection
        • Software
          • Identifier: device.communicationModules[].subscriber.software
          • Unit: basicSI
          • Period: PULSE
          • Storage: NEVER
          • Tags: dmm | collection
        • Administrative state
          • Identifier: device.communicationModules[].subscriber.administrativeState
          • Unit: basicSI
          • Period: PULSE
          • Storage:
          • Tags: dmm | provision
        • ICC
          • Identifier: device.communicationModules[].subscriber.mobile.icc
          • Unit: basicSI
          • Period: PULSE
          • Storage: NEVER
          • Tags: dmm | collection
        • EIS availableForProfiles
          • Identifier: device.communicationModules[].subscriber.eis.availableForProfiles
          • Unit: basicSI
          • Period: PULSE
          • Storage: NEVER
          • Tags: dmm | collection
        • EIS eid
          • Identifier: device.communicationModules[].subscriber.eis.eid
          • Unit: basicSI
          • Period: PULSE
          • Storage: NEVER
          • Tags: dmm | collection
        • EIS cattpSupport
          • Identifier: device.communicationModules[].subscriber.eis.euiccCapabilities.cattpSupport
          • Unit: basicSI
          • Period: PULSE
          • Storage: NEVER
          • Tags: dmm | collection
        • EIS httpSupport
          • Identifier: device.communicationModules[].subscriber.eis.euiccCapabilities.httpSupport
          • Unit: basicSI
          • Period: PULSE
          • Storage: NEVER
          • Tags: dmm | collection
        • EIS httpVersion
          • Identifier: device.communicationModules[].subscriber.eis.euiccCapabilities.httpVersion
          • Unit: basicSI
          • Period: PULSE
          • Storage: NEVER
          • Tags: dmm | collection
        • EIS remoteProvisioningVersion
          • Identifier: device.communicationModules[].subscriber.eis.euiccCapabilities.remoteProvisioningVersion
          • Unit: basicSI
          • Period: PULSE
          • Storage: NEVER
          • Tags: dmm | collection
        • EIS securePacketVersion
          • Identifier: device.communicationModules[].subscriber.eis.euiccCapabilities.securePacketVersion
          • Unit: basicSI
          • Period: PULSE
          • Storage: NEVER
          • Tags: dmm | collection
        • EIS eumCertificateId
          • Identifier: device.communicationModules[].subscriber.eis.eumCertificateId
          • Unit: basicSI
          • Period: PULSE
          • Storage: NEVER
          • Tags: dmm | collection
        • EIS eumId
          • Identifier: device.communicationModules[].subscriber.eis.eumId
          • Unit: basicSI
          • Period: PULSE
          • Storage: NEVER
          • Tags: dmm | collection
        • EIS isdpLoadfileAid
          • Identifier: device.communicationModules[].subscriber.eis.isdpLoadfileAid
          • Unit: basicSI
          • Period: PULSE
          • Storage: NEVER
          • Tags: dmm | collection
        • EIS isdpModuleAid
          • Identifier: device.communicationModules[].subscriber.eis.isdpModuleAid
          • Unit: basicSI
          • Period: PULSE
          • Storage: NEVER
          • Tags: dmm | collection
        • EIS platformType
          • Identifier: device.communicationModules[].subscriber.eis.platformType
          • Unit: basicSI
          • Period: PULSE
          • Storage: NEVER
          • Tags: dmm | collection
        • EIS platformVersion
          • Identifier: device.communicationModules[].subscriber.eis.platformVersion
          • Unit: basicSI
          • Period: PULSE
          • Storage: NEVER
          • Tags: dmm | collection
        • EIS productionDate
          • Identifier: device.communicationModules[].subscriber.eis.productionDate
          • Unit: basicSI
          • Period: PULSE
          • Storage: NEVER
          • Tags: dmm | collection
        • EIS remainingMemory
          • Identifier: device.communicationModules[].subscriber.eis.remainingMemory
          • Unit: basicSI
          • Period: PULSE
          • Storage: NEVER
          • Tags: dmm | collection
        • EIS signature
          • Identifier: device.communicationModules[].subscriber.eis.signature
          • Unit: basicSI
          • Period: PULSE
          • Storage: NEVER
          • Tags: dmm | collection
        • EIS signatureAlgorithm
          • Identifier: device.communicationModules[].subscriber.eis.signatureAlgorithm
          • Unit: basicSI
          • Period: PULSE
          • Storage: NEVER
          • Tags: dmm | collection
        • EIS smsrId
          • Identifier: device.communicationModules[].subscriber.eis.smsrId
          • Unit: basicSI
          • Period: PULSE
          • Storage: NEVER
          • Tags: dmm | collection
        • EIS lastOperationDate
          • Identifier: device.communicationModules[].subscriber.eis.lastOperationDate
          • Unit: basicSI
          • Period: PULSE
          • Storage: NEVER
          • Tags: dmm | collection
        • EIS lastOperationStatus
          • Identifier: device.communicationModules[].subscriber.eis.lastOperationStatus
          • Unit: basicSI
          • Period: PULSE
          • Storage: NEVER
          • Tags: dmm | collection
        • EIS lastSMTransactionStatus
          • Identifier: device.communicationModules[].subscriber.eis.lastSMTransactionStatus
          • Unit: basicSI
          • Period: PULSE
          • Storage: NEVER
          • Tags: dmm | collection
        • EIS status
          • Identifier: device.communicationModules[].subscriber.eis.status
          • Unit: basicSI
          • Period: PULSE
          • Storage: NEVER
          • Tags: dmm | collection
        • EIS cardGroupId
          • Identifier: device.communicationModules[].subscriber.eis.cardGroupId
          • Unit: basicSI
          • Period: PULSE
          • Storage: NEVER
          • Tags: dmm | collection
        • EIS currentSubscription
          • Identifier: device.communicationModules[].subscriber.eis.currentSubscription
          • Unit: basicSI
          • Period: PULSE
          • Storage: NEVER
          • Tags: dmm | collection
        • EIS profileList
          • Identifier: device.communicationModules[].subscriber.eis.profileList
          • Unit: basicSI
          • Period: PULSE
          • Storage: NEVER
          • Tags: dmm | collection
        • device.communicationModules[].subscriber.alarms
          • Identifier: device.communicationModules[].subscriber.alarms
          • Unit: basicSI
          • Period: INSTANT
          • Storage: NEVER
          • Tags: dmm | collection

provisionSubscriber

  • Identifier: provisionSubscriber
  • Version: 8.0.0.0
  • Description: Specific Datamodel to provision subscriber branch
  • Allowed resource types:
    • entity.device
    • entity.subscriber
  • Categories:
    • subscriberProvisionedInfo
      • Data streams:
        • Prov. Identifier
          • Identifier: provision.device.communicationModules[].subscriber.identifier
          • Unit: basicSI
          • Period: PULSE
          • Storage: NEVER
          • Tags: dmm | provision
        • Prov. Specific type
          • Identifier: provision.device.communicationModules[].subscriber.specificType
          • Unit: basicSI
          • Period: PULSE
          • Storage: NEVER
          • Tags: dmm | provision
        • Prov. Name
          • Identifier: provision.device.communicationModules[].subscriber.name
          • Unit: basicSI
          • Period: PULSE
          • Storage: NEVER
          • Tags: dmm | provision
        • Prov. Description
          • Identifier: provision.device.communicationModules[].subscriber.description
          • Unit: basicSI
          • Period: PULSE
          • Storage: NEVER
          • Tags: dmm | provision
        • Prov. Administrative state
          • Identifier: provision.device.communicationModules[].subscriber.administrativeState
          • Unit: basicSI
          • Period: PULSE
          • Storage:
          • Tags: dmm | provision
        • Prov. Serial number
          • Identifier: provision.device.communicationModules[].subscriber.serialNumber
          • Unit: basicSI
          • Period: PULSE
          • Storage: NEVER
          • Tags: dmm | provision
        • Prov. Model
          • Identifier: provision.device.communicationModules[].subscriber.model
          • Unit: basicSI
          • Period: PULSE
          • Storage: NEVER
          • Tags: dmm | provision
        • Prov. Software
          • Identifier: provision.device.communicationModules[].subscriber.software
          • Unit: basicSI
          • Period: PULSE
          • Storage: NEVER
          • Tags: dmm | provision
        • Prov. ICC
          • Identifier: provision.device.communicationModules[].subscriber.mobile.icc
          • Unit: basicSI
          • Period: PULSE
          • Storage: NEVER
          • Tags: dmm | provision
        • Prov. EIS availableForProfiles
          • Identifier: provision.device.communicationModules[].subscriber.eis.availableForProfiles
          • Unit: basicSI
          • Period: PULSE
          • Storage: NEVER
          • Tags: dmm | provision
        • Prov. EIS eid
          • Identifier: provision.device.communicationModules[].subscriber.eis.eid
          • Unit: basicSI
          • Period: PULSE
          • Storage: NEVER
          • Tags: dmm | provision
        • Prov. EIS cattpSupport
          • Identifier: provision.device.communicationModules[].subscriber.eis.euiccCapabilities.cattpSupport
          • Unit: basicSI
          • Period: PULSE
          • Storage: NEVER
          • Tags: dmm | provision
        • Prov. EIS httpSupport
          • Identifier: provision.device.communicationModules[].subscriber.eis.euiccCapabilities.httpSupport
          • Unit: basicSI
          • Period: PULSE
          • Storage: NEVER
          • Tags: dmm | provision
        • Prov. EIS httpVersion
          • Identifier: provision.device.communicationModules[].subscriber.eis.euiccCapabilities.httpVersion
          • Unit: basicSI
          • Period: PULSE
          • Storage: NEVER
          • Tags: dmm | provision
        • Prov. EIS remoteProvisioningVersion
          • Identifier: provision.device.communicationModules[].subscriber.eis.euiccCapabilities.remoteProvisioningVersion
          • Unit: basicSI
          • Period: PULSE
          • Storage: NEVER
          • Tags: dmm | provision
        • Prov. EIS securePacketVersion
          • Identifier: provision.device.communicationModules[].subscriber.eis.euiccCapabilities.securePacketVersion
          • Unit: basicSI
          • Period: PULSE
          • Storage: NEVER
          • Tags: dmm | provision
        • Prov. EIS eumCertificateId
          • Identifier: provision.device.communicationModules[].subscriber.eis.eumCertificateId
          • Unit: basicSI
          • Period: PULSE
          • Storage: NEVER
          • Tags: dmm | provision
        • Prov. EIS eumId
          • Identifier: provision.device.communicationModules[].subscriber.eis.eumId
          • Unit: basicSI
          • Period: PULSE
          • Storage: NEVER
          • Tags: dmm | provision
        • Prov. EIS isdpLoadfileAid
          • Identifier: provision.device.communicationModules[].subscriber.eis.isdpLoadfileAid
          • Unit: basicSI
          • Period: PULSE
          • Storage: NEVER
          • Tags: dmm | provision
        • Prov. EIS isdpModuleAid
          • Identifier: provision.device.communicationModules[].subscriber.eis.isdpModuleAid
          • Unit: basicSI
          • Period: PULSE
          • Storage: NEVER
          • Tags: dmm | provision
        • Prov. EIS platformType
          • Identifier: provision.device.communicationModules[].subscriber.eis.platformType
          • Unit: basicSI
          • Period: PULSE
          • Storage: NEVER
          • Tags: dmm | provision
        • Prov. EIS platformVersion
          • Identifier: provision.device.communicationModules[].subscriber.eis.platformVersion
          • Unit: basicSI
          • Period: PULSE
          • Storage: NEVER
          • Tags: dmm | provision
        • Prov. EIS productionDate
          • Identifier: provision.device.communicationModules[].subscriber.eis.productionDate
          • Unit: basicSI
          • Period: PULSE
          • Storage: NEVER
          • Tags: dmm | provision
        • Prov. EIS remainingMemory
          • Identifier: provision.device.communicationModules[].subscriber.eis.remainingMemory
          • Unit: basicSI
          • Period: PULSE
          • Storage: NEVER
          • Tags: dmm | provision
        • Prov. EIS signature
          • Identifier: provision.device.communicationModules[].subscriber.eis.signature
          • Unit: basicSI
          • Period: PULSE
          • Storage: NEVER
          • Tags: dmm | provision
        • Prov. EIS signatureAlgorithm
          • Identifier: provision.device.communicationModules[].subscriber.eis.signatureAlgorithm
          • Unit: basicSI
          • Period: PULSE
          • Storage: NEVER
          • Tags: dmm | provision
        • Prov. EIS smsrId
          • Identifier: provision.device.communicationModules[].subscriber.eis.smsrId
          • Unit: basicSI
          • Period: PULSE
          • Storage: NEVER
          • Tags: dmm | provision
        • Prov. EIS lastOperationDate
          • Identifier: provision.device.communicationModules[].subscriber.eis.lastOperationDate
          • Unit: basicSI
          • Period: PULSE
          • Storage: NEVER
          • Tags: dmm | provision
        • Prov. EIS lastOperationStatus
          • Identifier: provision.device.communicationModules[].subscriber.eis.lastOperationStatus
          • Unit: basicSI
          • Period: PULSE
          • Storage: NEVER
          • Tags: dmm | provision
        • Prov. EIS lastSMTransactionStatus
          • Identifier: provision.device.communicationModules[].subscriber.eis.lastSMTransactionStatus
          • Unit: basicSI
          • Period: PULSE
          • Storage: NEVER
          • Tags: dmm | provision
        • Prov. EIS status
          • Identifier: provision.device.communicationModules[].subscriber.eis.status
          • Unit: basicSI
          • Period: PULSE
          • Storage: NEVER
          • Tags: dmm | provision
        • Prov. EIS cardGroupId
          • Identifier: provision.device.communicationModules[].subscriber.eis.cardGroupId
          • Unit: basicSI
          • Period: PULSE
          • Storage: NEVER
          • Tags: dmm | provision
        • Prov. EIS currentSubscription
          • Identifier: provision.device.communicationModules[].subscriber.eis.currentSubscription
          • Unit: basicSI
          • Period: PULSE
          • Storage: NEVER
          • Tags: dmm | provision
        • Prov. EIS profileList
          • Identifier: provision.device.communicationModules[].subscriber.eis.profileList
          • Unit: basicSI
          • Period: PULSE
          • Storage: NEVER
          • Tags: dmm | provision

collectionSubscription

  • Identifier: collectionSubscription
  • Version: 8.0.21.0
  • Description: Specific Datamodel to subscription branch
  • Allowed resource types:
    • entity.device
    • entity.subscription
  • Categories:
    • subscriptionCollectedInfo
      • Data streams:
        • Identifier
          • Identifier: device.communicationModules[].subscription.identifier
          • Unit: basicSI
          • Period: PULSE
          • Storage: NEVER
          • Tags: dmm | collection
        • Administrative state
          • Identifier: device.communicationModules[].subscription.administrativeState
          • Unit: basicSI
          • Period: PULSE
          • Storage:
          • Tags: dmm | collection
        • Specific type
          • Identifier: device.communicationModules[].subscription.specificType
          • Unit: basicSI
          • Period: PULSE
          • Storage: NEVER
          • Tags: dmm | collection
        • Name
          • Identifier: device.communicationModules[].subscription.name
          • Unit: basicSI
          • Period: PULSE
          • Storage: NEVER
          • Tags: dmm | collection
        • Description
          • Identifier: device.communicationModules[].subscription.description
          • Unit: basicSI
          • Period: PULSE
          • Storage: NEVER
          • Tags: dmm | collection
        • IMSI
          • Identifier: device.communicationModules[].subscription.mobile.imsi
          • Unit: basicSI
          • Period: PULSE
          • Storage: NEVER
          • Tags: dmm | collection
        • Home PLMN
          • Identifier: device.communicationModules[].subscription.mobile.homePlmn
          • Unit: basicSI
          • Period: PULSE
          • Storage: NEVER
          • Tags: dmm | collection
        • Home operator
          • Identifier: device.communicationModules[].subscription.mobile.homeOperator
          • Unit: basicSI
          • Period: PULSE
          • Storage: NEVER
          • Tags: dmm | collection
        • MSISDN
          • Identifier: device.communicationModules[].subscription.mobile.msisdn
          • Unit: basicSI
          • Period: PULSE
          • Storage: NEVER
          • Tags: dmm | collection
        • Voice MSISDN
          • Identifier: device.communicationModules[].subscription.mobile.voice.msisdn
          • Unit: basicSI
          • Period: PULSE
          • Storage: NEVER
          • Tags: dmm | collection
        • Address
          • Identifier: device.communicationModules[].subscription.address
          • Unit: basicSI
          • Period: PULSE
          • Storage:
          • Tags: dmm | collection
        • device.communicationModules[].subscription.alarms
          • Identifier: device.communicationModules[].subscription.alarms
          • Unit: basicSI
          • Period: INSTANT
          • Storage: NEVER
          • Tags: dmm | collection
    • subscriptionNetworkCollectedInfo
      • Data streams:
        • Rat type
          • Identifier: device.communicationModules[].subscription.mobile.ratType
          • Unit: basicSI
          • Period: PULSE
          • Storage:
          • Tags: dmm | mobile
        • VLR
          • Identifier: device.communicationModules[].subscription.mobile.vlr.globalTitle
          • Unit: basicSI
          • Period: PULSE
          • Storage:
          • Tags: dmm | mobile
        • VLR PLMN
          • Identifier: device.communicationModules[].subscription.mobile.vlr.plmn
          • Unit: basicSI
          • Period: PULSE
          • Storage:
          • Tags: dmm | mobile
        • VLR IP
          • Identifier: device.communicationModules[].subscription.mobile.vlr.ipAddress
          • Unit: basicSI
          • Period: PULSE
          • Storage:
          • Tags: dmm | mobile
        • VLR operator
          • Identifier: device.communicationModules[].subscription.mobile.vlr.operatorName
          • Unit: basicSI
          • Period: PULSE
          • Storage:
          • Tags: dmm | mobile
        • VLR country name
          • Identifier: device.communicationModules[].subscription.mobile.vlr.countryName
          • Unit: basicSI
          • Period: PULSE
          • Storage:
          • Tags: dmm | mobile
        • VLR country code
          • Identifier: device.communicationModules[].subscription.mobile.vlr.countryCode
          • Unit: basicSI
          • Period: PULSE
          • Storage:
          • Tags: dmm | mobile
        • MSC
          • Identifier: device.communicationModules[].subscription.mobile.msc.globalTitle
          • Unit: basicSI
          • Period: PULSE
          • Storage:
          • Tags: dmm | mobile
        • MSC PLMN
          • Identifier: device.communicationModules[].subscription.mobile.msc.plmn
          • Unit: basicSI
          • Period: PULSE
          • Storage:
          • Tags: dmm | mobile
        • MSC IP
          • Identifier: device.communicationModules[].subscription.mobile.msc.ipAddress
          • Unit: basicSI
          • Period: PULSE
          • Storage:
          • Tags: dmm | mobile
        • MSC operator
          • Identifier: device.communicationModules[].subscription.mobile.msc.operatorName
          • Unit: basicSI
          • Period: PULSE
          • Storage:
          • Tags: dmm | mobile
        • MSC country name
          • Identifier: device.communicationModules[].subscription.mobile.msc.countryName
          • Unit: basicSI
          • Period: PULSE
          • Storage:
          • Tags: dmm | mobile
        • MSC country code
          • Identifier: device.communicationModules[].subscription.mobile.msc.countryCode
          • Unit: basicSI
          • Period: PULSE
          • Storage:
          • Tags: dmm | mobile
        • SGSN
          • Identifier: device.communicationModules[].subscription.mobile.sgsn.globalTitle
          • Unit: basicSI
          • Period: PULSE
          • Storage:
          • Tags: dmm | mobile
        • SGSN PLMN
          • Identifier: device.communicationModules[].subscription.mobile.sgsn.plmn
          • Unit: basicSI
          • Period: PULSE
          • Storage:
          • Tags: dmm | mobile
        • SGSN IP
          • Identifier: device.communicationModules[].subscription.mobile.sgsn.ipAddress
          • Unit: basicSI
          • Period: PULSE
          • Storage:
          • Tags: dmm | mobile
        • SGSN operator
          • Identifier: device.communicationModules[].subscription.mobile.sgsn.operatorName
          • Unit: basicSI
          • Period: PULSE
          • Storage:
          • Tags: dmm | mobile
        • SGSN country name
          • Identifier: device.communicationModules[].subscription.mobile.sgsn.countryName
          • Unit: basicSI
          • Period: PULSE
          • Storage:
          • Tags: dmm | mobile
        • SGSN country code
          • Identifier: device.communicationModules[].subscription.mobile.sgsn.countryCode
          • Unit: basicSI
          • Period: PULSE
          • Storage:
          • Tags: dmm | mobile
        • GGSN
          • Identifier: device.communicationModules[].subscription.mobile.ggsn.globalTitle
          • Unit: basicSI
          • Period: PULSE
          • Storage:
          • Tags: dmm | mobile
        • GGSN PLMN
          • Identifier: device.communicationModules[].subscription.mobile.ggsn.plmn
          • Unit: basicSI
          • Period: PULSE
          • Storage:
          • Tags: dmm | mobile
        • GGSN IP
          • Identifier: device.communicationModules[].subscription.mobile.ggsn.ipAddress
          • Unit: basicSI
          • Period: PULSE
          • Storage:
          • Tags: dmm | mobile
        • GGSN operator
          • Identifier: device.communicationModules[].subscription.mobile.ggsn.operatorName
          • Unit: basicSI
          • Period: PULSE
          • Storage:
          • Tags: dmm | mobile
        • GGSN country name
          • Identifier: device.communicationModules[].subscription.mobile.ggsn.countryName
          • Unit: basicSI
          • Period: PULSE
          • Storage:
          • Tags: dmm | mobile
        • GGSN country code
          • Identifier: device.communicationModules[].subscription.mobile.ggsn.countryCode
          • Unit: basicSI
          • Period: PULSE
          • Storage:
          • Tags: dmm | mobile
    • subscriptionMobileCellCollectedInfo
      • Data streams:
        • Registered MCC
          • Identifier: device.communicationModules[].subscription.mobile.registeredMcc
          • Unit: basicSI
          • Period: INSTANT
          • Storage:
          • Tags: dmm | mcc
        • Registered MNC
          • Identifier: device.communicationModules[].subscription.mobile.registeredMnc
          • Unit: basicSI
          • Period: INSTANT
          • Storage:
          • Tags: dmm | mnc
        • Registered PLMN
          • Identifier: device.communicationModules[].subscription.mobile.registeredPlmn
          • Unit: basicSI
          • Period: INSTANT
          • Storage:
          • Tags: dmm | plmn
        • LAC
          • Identifier: device.communicationModules[].subscription.mobile.registeredLac
          • Unit: basicSI
          • Period: INSTANT
          • Storage:
          • Tags: dmm | lac
        • Registered operator
          • Identifier: device.communicationModules[].subscription.mobile.registeredOperator
          • Unit: basicSI
          • Period: INSTANT
          • Storage:
          • Tags: dmm | operator
        • ULI cellId
          • Identifier: device.communicationModules[].subscription.mobile.uli.cellId
          • Unit: basicSI
          • Period: INSTANT
          • Storage:
          • Tags: dmm | cell
        • ULI rac
          • Identifier: device.communicationModules[].subscription.mobile.uli.rac
          • Unit: basicSI
          • Period: INSTANT
          • Storage:
          • Tags: dmm | cell
        • ULI eci
          • Identifier: device.communicationModules[].subscription.mobile.uli.eci
          • Unit: basicSI
          • Period: INSTANT
          • Storage:
          • Tags: dmm | cell
        • ULI cgi
          • Identifier: device.communicationModules[].subscription.mobile.uli.cgi
          • Unit: basicSI
          • Period: INSTANT
          • Storage:
          • Tags: dmm | cell
        • ULI cgiLac
          • Identifier: device.communicationModules[].subscription.mobile.uli.cgiLac
          • Unit: basicSI
          • Period: INSTANT
          • Storage:
          • Tags: dmm | cell
        • ULI SAI
          • Identifier: device.communicationModules[].subscription.mobile.uli.sai
          • Unit: basicSI
          • Period: INSTANT
          • Storage:
          • Tags: dmm | cell
        • ULI saiLac
          • Identifier: device.communicationModules[].subscription.mobile.uli.saiLac
          • Unit: basicSI
          • Period: INSTANT
          • Storage:
          • Tags: dmm | cell
        • ULI saiSac
          • Identifier: device.communicationModules[].subscription.mobile.uli.saiSac
          • Unit: basicSI
          • Period: INSTANT
          • Storage:
          • Tags: dmm | cell
        • ULI RAI
          • Identifier: device.communicationModules[].subscription.mobile.uli.rai
          • Unit: basicSI
          • Period: INSTANT
          • Storage:
          • Tags: dmm | cell
        • ULI raiLac
          • Identifier: device.communicationModules[].subscription.mobile.uli.raiLac
          • Unit: basicSI
          • Period: INSTANT
          • Storage:
          • Tags: dmm | cell
        • ULI raiRac
          • Identifier: device.communicationModules[].subscription.mobile.uli.raiRac
          • Unit: basicSI
          • Period: INSTANT
          • Storage:
          • Tags: dmm | cell
        • ULI tai
          • Identifier: device.communicationModules[].subscription.mobile.uli.tai
          • Unit: basicSI
          • Period: INSTANT
          • Storage:
          • Tags: dmm | cell
        • ULI taiTac
          • Identifier: device.communicationModules[].subscription.mobile.uli.taiTac
          • Unit: basicSI
          • Period: INSTANT
          • Storage:
          • Tags: dmm | cell
        • ULI ecgi
          • Identifier: device.communicationModules[].subscription.mobile.uli.ecgi
          • Unit: basicSI
          • Period: INSTANT
          • Storage:
          • Tags: dmm | cell
        • ULI ecgiEci
          • Identifier: device.communicationModules[].subscription.mobile.uli.ecgiEci
          • Unit: basicSI
          • Period: INSTANT
          • Storage:
          • Tags: dmm | cell
        • MR
          • Identifier: device.communicationModules[].subscription.mobile.mr
          • Unit: basicSI
          • Period: INSTANT
          • Storage:
          • Tags: dmm | cell
        • BCCH
          • Identifier: device.communicationModules[].subscription.mobile.bcch
          • Unit: basicSI
          • Period: INSTANT
          • Storage:
          • Tags: dmm | cell
        • Timing advance
          • Identifier: device.communicationModules[].subscription.mobile.timingAdvance
          • Unit: basicSI
          • Period: INSTANT
          • Storage:
          • Tags: dmm | cell
    • subscriptionMobileNetworkSignalCollectedInfo
      • Data streams:
        • Signal strength
          • Identifier: device.communicationModules[].subscription.mobile.signalStrength
          • Unit: basicSI Dbm
          • Period: INSTANT
          • Storage:
          • Tags: dmm | dbm | total
        • Signal strength status
          • Identifier: device.communicationModules[].subscription.mobile.signalStrengthStatus
          • Unit: basicSI
          • Period: INSTANT
          • Storage:
          • Tags: dmm | dbm | status
        • Signal quality
          • Identifier: device.communicationModules[].subscription.mobile.signalQuality
          • Unit: basicSI percentage
          • Period: INSTANT
          • Storage:
          • Tags: dmm | signal | percentage
        • Signal quality status
          • Identifier: device.communicationModules[].subscription.mobile.signalQualityStatus
          • Unit: basicSI
          • Period: INSTANT
          • Storage:
          • Tags: dmm | signal | status
    • subscriptionMobilePresenceCollectedInfo
      • Data streams:
        • GSM presence
          • Identifier: device.communicationModules[].subscription.mobile.presence.gsm
          • Unit: basicSI
          • Period: PULSE
          • Storage:
          • Tags: dmm | presence
        • GPRS presence
          • Identifier: device.communicationModules[].subscription.mobile.presence.gprs
          • Unit: basicSI
          • Period: PULSE
          • Storage:
          • Tags: dmm | presence
        • IP presence
          • Identifier: device.communicationModules[].subscription.presence.ip
          • Unit: basicSI
          • Period: PULSE
          • Storage:
          • Tags: dmm | presence | ip
        • IP RTT presence
          • Identifier: device.communicationModules[].subscription.presence.ipRtt
          • Unit: basicSI milliseconds
          • Period: INSTANT
          • Storage:
          • Tags: dmm | presence | ip
        • Unified presence
          • Identifier: device.communicationModules[].subscription.presence.unifiedPresence
          • Unit: basicSI
          • Period: PULSE
          • Storage:
          • Tags: dmm | presence
    • subscriptionTrafficCollectedInfo
      • Data streams:
        • Sent bytes
          • Identifier: device.communicationModules[].subscription.traffic.sentBytes
          • Unit: basicSI bytes
          • Period: INSTANT
          • Storage:
          • Tags: dmm | traffic
        • Received bytes
          • Identifier: device.communicationModules[].subscription.traffic.receivedBytes
          • Unit: basicSI bytes
          • Period: INSTANT
          • Storage:
          • Tags: dmm | traffic
        • Sent packets
          • Identifier: device.communicationModules[].subscription.traffic.sentPackets
          • Unit: basicSI bytes
          • Period: INSTANT
          • Storage:
          • Tags: dmm | traffic
        • Received packets
          • Identifier: device.communicationModules[].subscription.traffic.receivedPackets
          • Unit: basicSI bytes
          • Period: INSTANT
          • Storage:
          • Tags: dmm | traffic
        • Session
          • Identifier: device.communicationModules[].subscription.session
          • Unit: basicSI
          • Period: INSTANT
          • Storage:
          • Tags: dmm | traffic
        • ICC
          • Identifier: device.communicationModules[].subscription.mobile.icc
          • Unit: basicSI
          • Period: PULSE
          • Storage: NEVER
          • Tags: dmm | collection
        • Radius user name
          • Identifier: device.communicationModules[].subscription.mobile.radius.userName
          • Unit: basicSI
          • Period: PULSE
          • Storage:
          • Tags: radius | collection
        • Radius user password
          • Identifier: device.communicationModules[].subscription.mobile.radius.userPassword
          • Unit: basicSI
          • Period: PULSE
          • Storage:
          • Tags: radius | collection
        • Radius frame Ip netmask
          • Identifier: device.communicationModules[].subscription.mobile.radius.framedIpNetmask
          • Unit: basicSI
          • Period: PULSE
          • Storage:
          • Tags: radius | collection
        • Radius activation
          • Identifier: device.communicationModules[].subscription.mobile.radius.activation
          • Unit: basicSI
          • Period: PULSE
          • Storage:
          • Tags: radius | collection
    • subscriptionCountersInfo
      • Data streams:
        • Accounting start last day counter by subscription
          • Identifier: device.communicationModules[].subscription.counters.presence.accountingStartLastDay
          • Unit: basicSI bytes
          • Period: CUMULATIVE
          • Storage: NEVER
          • Tags: dmm | counters
        • Total used bytes last day counter by subscription
          • Identifier: device.communicationModules[].subscription.counters.totalBytesLastDay
          • Unit: basicSI bytes
          • Period: CUMULATIVE
          • Storage: NEVER
          • Tags: dmm | counters
        • Total used bytes last month counter by subscription
          • Identifier: device.communicationModules[].subscription.counters.totalBytesLastMonth
          • Unit: basicSI bytes
          • Period: CUMULATIVE
          • Storage: NEVER
          • Tags: dmm | counters
        • Total received bytes last day counter by subscription
          • Identifier: device.communicationModules[].subscription.counters.receivedBytesLastDay
          • Unit: basicSI bytes
          • Period: CUMULATIVE
          • Storage: NEVER
          • Tags: dmm | counters
        • Total received bytes last month counter by subscription
          • Identifier: device.communicationModules[].subscription.counters.receivedBytesLastMonth
          • Unit: basicSI bytes
          • Period: CUMULATIVE
          • Storage: NEVER
          • Tags: dmm | counters
        • Total sent bytes last day counter by subscription
          • Identifier: device.communicationModules[].subscription.counters.sentBytesLastDay
          • Unit: basicSI bytes
          • Period: CUMULATIVE
          • Storage: NEVER
          • Tags: dmm | counters
        • Total sent bytes last month counter by subscription
          • Identifier: device.communicationModules[].subscription.counters.sentBytesLastMonth
          • Unit: basicSI bytes
          • Period: CUMULATIVE
          • Storage: NEVER
          • Tags: dmm | counters
        • Ping OK executions counter
          • Identifier: device.communicationModules[].subscription.counters.presence.pingOKLastDay
          • Unit: basicSI bytes
          • Period: CUMULATIVE
          • Storage: NEVER
          • Tags: dmm | counters
        • Ping non OK executions counter
          • Identifier: device.communicationModules[].subscription.counters.presence.pingNOKLastDay
          • Unit: basicSI bytes
          • Period: CUMULATIVE
          • Storage: NEVER
          • Tags: dmm | integer
        • Consecutive ping non OK executions counter
          • Identifier: device.communicationModules[].subscription.counters.presence.consecutivePingNOK
          • Unit: basicSI
          • Period: CUMULATIVE
          • Storage: NEVER
          • Tags: dmm | counters
        • Percentage ping OK executions counter
          • Identifier: device.communicationModules[].subscription.counters.availabilityLastDay
          • Unit: basicSI
          • Period: CUMULATIVE
          • Storage: NEVER
          • Tags: dmm | counters
        • EIS allocatedMemory
          • Identifier: device.communicationModules[].subscription.eis.allocatedMemory
          • Unit: basicSI
          • Period: PULSE
          • Storage: NEVER
          • Tags: dmm | collection
        • EIS dpId
          • Identifier: device.communicationModules[].subscription.eis.dpId
          • Unit: basicSI
          • Period: PULSE
          • Storage: NEVER
          • Tags: dmm | collection
        • EIS fallback
          • Identifier: device.communicationModules[].subscription.eis.fallback
          • Unit: basicSI
          • Period: PULSE
          • Storage: NEVER
          • Tags: dmm | collection
        • EIS freeMemory
          • Identifier: device.communicationModules[].subscription.eis.freeMemory
          • Unit: basicSI
          • Period: PULSE
          • Storage: NEVER
          • Tags: dmm | collection
        • EIS isdpAid
          • Identifier: device.communicationModules[].subscription.eis.isdpAid
          • Unit: basicSI
          • Period: PULSE
          • Storage: NEVER
          • Tags: dmm | collection
        • EIS profileType
          • Identifier: device.communicationModules[].subscription.eis.profileType
          • Unit: basicSI
          • Period: PULSE
          • Storage: NEVER
          • Tags: dmm | collection
        • EIS status
          • Identifier: device.communicationModules[].subscription.eis.status
          • Unit: basicSI
          • Period: PULSE
          • Storage: NEVER
          • Tags: dmm | collection

provisionSubscription

  • Identifier: provisionSubscription
  • Version: 8.0.21.0
  • Description: Specific Datamodel to provision subscription branch
  • Allowed resource types:
    • entity.device
    • entity.subscription
  • Categories:
    • subscriptionProvisionedInfo
      • Data streams:
        • Prov. Identifier
          • Identifier: provision.device.communicationModules[].subscription.identifier
          • Unit: basicSI
          • Period: PULSE
          • Storage: NEVER
          • Tags: dmm | provision
        • Prov. Specific type
          • Identifier: provision.device.communicationModules[].subscription.specificType
          • Unit: basicSI
          • Period: PULSE
          • Storage: NEVER
          • Tags: dmm | provision
        • Prov. Name
          • Identifier: provision.device.communicationModules[].subscription.name
          • Unit: basicSI
          • Period: PULSE
          • Storage: NEVER
          • Tags: dmm | provision
        • Prov. Description
          • Identifier: provision.device.communicationModules[].subscription.description
          • Unit: basicSI
          • Period: PULSE
          • Storage: NEVER
          • Tags: dmm | provision
        • Prov. Administrative state
          • Identifier: provision.device.communicationModules[].subscription.administrativeState
          • Unit: basicSI
          • Period: PULSE
          • Storage:
          • Tags: dmm | provision
        • Prov. Ticket ID
          • Identifier: provision.device.communicationModules[].subscription.ticketId
          • Unit: basicSI
          • Period: PULSE
          • Storage:
          • Tags: dmm | provision
        • Prov. IMSI
          • Identifier: provision.device.communicationModules[].subscription.mobile.imsi
          • Unit: basicSI
          • Period: PULSE
          • Storage: NEVER
          • Tags: dmm | provision
        • Prov. MSISDN
          • Identifier: provision.device.communicationModules[].subscription.mobile.msisdn
          • Unit: basicSI
          • Period: PULSE
          • Storage: NEVER
          • Tags: dmm | provision
        • Prov. Voice MSISDN
          • Identifier: provision.device.communicationModules[].subscription.mobile.voice.msisdn
          • Unit: basicSI
          • Period: PULSE
          • Storage: NEVER
          • Tags: dmm | provision
        • Prov. Address
          • Identifier: provision.device.communicationModules[].subscription.address
          • Unit: basicSI
          • Period: PULSE
          • Storage:
          • Tags: dmm | provision
        • Prov. Home operator
          • Identifier: provision.device.communicationModules[].subscription.mobile.homeOperator
          • Unit: basicSI
          • Period: PULSE
          • Storage:
          • Tags: dmm | provision
        • Prov. Registered operator
          • Identifier: provision.device.communicationModules[].subscription.mobile.registeredOperator
          • Unit: basicSI
          • Period: PULSE
          • Storage: NEVER
          • Tags: dmm | provision
        • Prov. ICC
          • Identifier: provision.device.communicationModules[].subscription.mobile.icc
          • Unit: basicSI
          • Period: PULSE
          • Storage: NEVER
          • Tags: dmm | provision
        • Prov. Radius user name
          • Identifier: provision.device.communicationModules[].subscription.mobile.radius.userName
          • Unit: basicSI
          • Period: PULSE
          • Storage:
          • Tags: radius | collection
        • Prov. Radius user password
          • Identifier: provision.device.communicationModules[].subscription.mobile.radius.userPassword
          • Unit: basicSI
          • Period: PULSE
          • Storage:
          • Tags: radius | collection
        • Prov. Radius frame Ip netmask
          • Identifier: provision.device.communicationModules[].subscription.mobile.radius.framedIpNetmask
          • Unit: basicSI
          • Period: PULSE
          • Storage:
          • Tags: radius | collection
        • Prov. EIS allocatedMemory
          • Identifier: provision.device.communicationModules[].subscription.eis.allocatedMemory
          • Unit: basicSI
          • Period: PULSE
          • Storage: NEVER
          • Tags: dmm | provision
        • Prov. EIS dpId
          • Identifier: provision.device.communicationModules[].subscription.eis.dpId
          • Unit: basicSI
          • Period: PULSE
          • Storage: NEVER
          • Tags: dmm | provision
        • Prov. EIS fallback
          • Identifier: provision.device.communicationModules[].subscription.eis.fallback
          • Unit: basicSI
          • Period: PULSE
          • Storage: NEVER
          • Tags: dmm | provision
        • Prov. EIS freeMemory
          • Identifier: provision.device.communicationModules[].subscription.eis.freeMemory
          • Unit: basicSI
          • Period: PULSE
          • Storage: NEVER
          • Tags: dmm | provision
        • Prov. EIS isdpAid
          • Identifier: provision.device.communicationModules[].subscription.eis.isdpAid
          • Unit: basicSI
          • Period: PULSE
          • Storage: NEVER
          • Tags: dmm | provision
        • Prov. EIS profileType
          • Identifier: provision.device.communicationModules[].subscription.eis.profileType
          • Unit: basicSI
          • Period: PULSE
          • Storage: NEVER
          • Tags: dmm | provision
        • Prov. EIS status
          • Identifier: provision.device.communicationModules[].subscription.eis.status
          • Unit: basicSI
          • Period: PULSE
          • Storage: NEVER
          • Tags: dmm | provision

ticket

  • Identifier: ticket
  • Version: 8.0.21.0
  • Description: Specific Datamodel to provision a ticket
  • Allowed resource types:
    • ticket
  • Categories:
    • ticketInfo
      • Data streams:
        • Identifier
          • Identifier: provision.ticket.identifier
          • Unit: basicSI
          • Period: PULSE
          • Storage: NEVER
          • Tags: ticket
        • Name
          • Identifier: provision.ticket.name
          • Unit: basicSI
          • Period: PULSE
          • Storage: NEVER
          • Tags: ticket
        • Description
          • Identifier: provision.ticket.description
          • Unit: basicSI
          • Period: PULSE
          • Storage: NEVER
          • Tags: ticket
        • Location
          • Identifier: provision.ticket.location
          • Unit: basicSI
          • Period: INSTANT
          • Storage:
          • Tags: dmm | provision
        • Label
          • Identifier: provision.ticket.label
          • Unit: basicSI
          • Period: PULSE
          • Storage: NEVER
          • Tags: ticket
        • Type
          • Identifier: provision.ticket.type
          • Unit: basicSI
          • Period: PULSE
          • Storage: NEVER
          • Tags: ticket
        • Severity
          • Identifier: provision.ticket.severity
          • Unit: basicSI
          • Period: PULSE
          • Storage:
          • Tags: ticket
        • Priority
          • Identifier: provision.ticket.priority
          • Unit: basicSI
          • Period: PULSE
          • Storage:
          • Tags: ticket
        • Reporter
          • Identifier: provision.ticket.reporter
          • Unit: basicSI
          • Period: PULSE
          • Storage: NEVER
          • Tags: ticket
        • Owner
          • Identifier: provision.ticket.owner
          • Unit: basicSI
          • Period: PULSE
          • Storage:
          • Tags: ticket
        • Assignee
          • Identifier: provision.ticket.assignee
          • Unit: basicSI
          • Period: PULSE
          • Storage:
          • Tags: ticket
        • Status
          • Identifier: provision.ticket.status
          • Unit: basicSI
          • Period: PULSE
          • Storage:
          • Tags: ticket
        • Specific type
          • Identifier: provision.ticket.specificType
          • Unit: basicSI
          • Period: PULSE
          • Storage:
          • Tags: ticket
        • Section
          • Identifier: provision.ticket.section
          • Unit: basicSI
          • Period: PULSE
          • Storage: NEVER
          • Tags: ticket
        • Entity
          • Identifier: provision.ticket.entity
          • Unit: basicSI
          • Period: PULSE
          • Storage:
          • Tags: ticket
        • Creation date
          • Identifier: provision.ticket.creationDate
          • Unit: basicSI
          • Period: INSTANT
          • Storage: NEVER
          • Tags: ticket
        • Reporter date
          • Identifier: provision.ticket.reporterDate
          • Unit: basicSI
          • Period: INSTANT
          • Storage: NEVER
          • Tags: ticket
        • Assigned date
          • Identifier: provision.ticket.assignedDate
          • Unit: basicSI
          • Period: INSTANT
          • Storage:
          • Tags: ticket
        • Answered date
          • Identifier: provision.ticket.answeredDate
          • Unit: basicSI
          • Period: INSTANT
          • Storage:
          • Tags: ticket
        • Updated date
          • Identifier: provision.ticket.updatedDate
          • Unit: basicSI
          • Period: INSTANT
          • Storage:
          • Tags: ticket
        • Restoration date
          • Identifier: provision.ticket.restorationDate
          • Unit: basicSI
          • Period: INSTANT
          • Storage:
          • Tags: ticket
        • Resolution date
          • Identifier: provision.ticket.resolutionDate
          • Unit: basicSI
          • Period: INSTANT
          • Storage:
          • Tags: ticket
        • Closed date
          • Identifier: provision.ticket.closedDate
          • Unit: basicSI
          • Period: INSTANT
          • Storage: NEVER
          • Tags: ticket
        • Parent ticket
          • Identifier: provision.ticket.parentTicket
          • Unit: basicSI
          • Period: PULSE
          • Storage: NEVER
          • Tags: ticket
        • Identifier
          • Identifier: provision.ticket.isOnSLA
          • Unit: basicSI
          • Period: PULSE
          • Storage: NEVER
          • Tags: ticket
        • Assignation time
          • Identifier: provision.ticket.assignationTime
          • Unit: basicSI
          • Period: INSTANT
          • Storage: NEVER
          • Tags: ticket
        • Answering time
          • Identifier: provision.ticket.answeringTime
          • Unit: basicSI
          • Period: INSTANT
          • Storage: NEVER
          • Tags: ticket
        • Restoration time
          • Identifier: provision.ticket.restorationTime
          • Unit: basicSI
          • Period: INSTANT
          • Storage: NEVER
          • Tags: ticket
        • Resolution time
          • Identifier: provision.ticket.resolutionTime
          • Unit: basicSI
          • Period: INSTANT
          • Storage: NEVER
          • Tags: ticket
        • Confirmation time
          • Identifier: provision.ticket.confirmationTime
          • Unit: basicSI
          • Period: INSTANT
          • Storage: NEVER
          • Tags: ticket
        • Closed time
          • Identifier: provision.ticket.closedTime
          • Unit: basicSI
          • Period: INSTANT
          • Storage: NEVER
          • Tags: ticket

Data streams default schemas

It is possible to utilise the predefined types (JSON schemas) for custom OpenGate data streams.

Tags

Tag entity object structure

In certain instances, it may be desirable to execute the same operation on a multitude of devices simultaneously.

The question then arises as to how one might select all the target devices. In this context, the answer lies in the use of tags.

It is possible to tag all the devices and other entities that are to be included in the operation, and then to execute it. The tag is employed as the target. This section will demonstrate the process of creating tags and applying them to OpenGate entities. The provisioning API.

Further information on the utilisation of tags can be found in the operations section.

Comprehensive API actions

Creating a tag

There are two alternatives to include entities in a tag:

  • Choose a specific list of entities
  • Using a previously created tag.
Warning

In regard to operational issues, the service is constrained by a limitation in the array size of the JSON. The aforementioned limit may be configured at the administrative level. The default limit is 5,000 elements in the array. It is recommended that you consult with your administrator to ascertain the configured limit. In order to ascertain the configured limit, it is necessary to consult with the administrator.

In the event that a large number of entities must be operated upon, the recommended course of action is to utilise the updating function. A PUT operation may be employed to append new entities to the target, taking the aforementioned limit into accoun

It is not possible for a user to include entities that are not in the same workgroup as themselves in the label that they create.

API specification

Tickets

Introduction

A ticket is a resource type on the platform. It allows users to register and track on-field deployments, incidents or requests (required needs).

Comprehensive API actions

Updating a ticket

Please note that the following fields cannot be modified:

  • identifier
  • type
  • reporter
  • entity: If the ticket does not contain the entity, it can be updated.

Please be advised that the dates will be updated by the platform internally, depending on the status of the ticket. Please note that these dates cannot be modified.

  • creationDate
  • assignedDate
  • answeredDate
  • updatedDate
  • restorationDate
  • resolutionDate
  • closedDate

Searching tickets

The OpenGate API query enables the retrieval of the list of tickets.

The results can be obtained in two different formats, as detailed in the HTTP Header Options:

  • JSON Format (default)
  • CSV Format

API specification

Manufacturer & Model Catalog

OpenGate has its own hardware manufacturers and models catalog, available for being queried by users. You are allowed to use this information to extend your organization’s catalog.

Limited access API

Limited access

The provision API of this feature is only available to root profile, on the other hand, anyone can use the searching API. Ask your administrator for proper user role profiling.

Catalog Provision

API specification

Search the global hardware catalog (manufacturers and models) and get a summary count of results.

Subsections of Manufacturer & Model Catalog

Manufacturers catalog API Spec

Introduction

The application programming interface (API) permits the provision of hardware manufacturers as a foundation for organisational catalogues. Images can be associated with the manufacturers as logos or documentation.

Manufacturer Media Files

A media file is defined as a file that is associated with a particular manufacturer, typically through the use of a manufacturer logo. There is no limit to the number of files that can be added, and the process is straightforward. For further details on the structure of a media object, please refer to the relevant schemas.

Comprehensive API actions

Reading a single media file element

The process of downloading a previously uploaded media file is a relatively straightforward one. In order to do so, it is simply necessary to send the same GET request that was used to extract the media file meta-information, with the addition of a format parameter equal to raw.

Updating a manufacturer

It is possible to update all manufacturer fields, with the exception of the identifier field.

API specification

Models catalog API Spec

Introduction

The application programming interface (API) permits the provision of hardware manufacturers as a foundation for organisational catalogues. Images can be associated with the manufacturers as logos or documentation.

Comprehensive API actions

mediaTypes

Reading a single media file element

The process of downloading a previously uploaded media file is a relatively straightforward one. In order to do so, it is simply necessary to send the same GET request that was used to extract the media file meta-information, with the addition of a format parameter equal to raw.

Models

Updating a model

With the exception of the Identifier field, all model fields may be updated.

API specification

Usage plans

Introduction

The OpenGate API query enables the retrieval of the available plans that have been provisioned under the domain of the user who has initiated the request.

API specification

Certificates

Introduction

The application programming interface (API) enables the administration of security certificates, which may be utilised for a variety of purposes, including file signing validation, communication encryption, access control, and others.

Supported File Types

  • type: PEM
  • mime-type: x-pem-file
  • file extension: .pem

How trustChains parameter works

The trustChains parameter represents an array of trust chains. The initial array comprises a series of string arrays, arranged from left to right, which collectively represent the path traversed by a certificate’s parents from the root or self-signed certificate to the certificate’s immediate parent.

To illustrate, if a certificate C is signed by a certificate B, which in turn is signed by a certificate A, the path will be A→B→C. The trustChain will contain the identifier of the certificate A in the initial position of the array, followed by the identifier of the certificate B in the subsequent position. Please refer to the example below, which assumes that:

  • Identifier of A: 1427353136
  • Identifier of B: 1427353426

trustChains parameter single path example “trustChains” : [ [ “1427353136”, “1427353426” ] ]

In the aforementioned example, if the same C certificate is present but with an alternative trust chain, namely A→B2→C,

  • Identifier of B2: 1427353447

trustChains parameter multiple path example “trustChains” : [ [ “1427353136”, “1427353426” ], [ “1427353136”, “1427353447” ] ]

Comprehensive API actions

It is possible for devices to establish a connection with OpenGate through the utilisation of an authentication system based on a Public Key Infrastructure (PKI). The Certificate Provision API facilitates the administration of certificates.

Creating a certificate

Warning

It is necessary to upload the files (JSON request and certificate) with the content-type header as multipart/form-data. For further information regarding supported file types, please refer to the Supported File Types section.

In order to create new certificates, it is first necessary to be aware of the following tips:

  • A user is permitted to upload a certificate to the platform, which may be in their own domain or in any of the domains with a low hierarchy that are managed by the user.
  • A certificate can only be signed by a certificate uploaded to the platform with the usage code CERT_SIGN. Furthermore, the aforementioned certificate must be in the same domain or in a domain with a visible upper hierarchy.
  • It is permissible to upload the same certificate to the platform on numerous occasions, provided that the identification data is different on each occasion.
  • In the event of a change to the domain of a certificate, the trust chain will be updated in a manner that is consistent with the principle of least privilege. This entails the inclusion of only those certificates that are associated with visible domains within the new domain.

Reading a certificate

A user is only permitted to access the certificates in their possession.

Deleting a certificate

A user is only permitted to remove certificates in respect of which they are the owner.

Searching certificates

Fetch parameter

The fetch parameter in the URL request, /north/v80/search/certificates?fetch={value}, enables the retrieval of different response objects. The value of this parameter can be any of the following:

  • 0: In the absence of the aforementioned parameter, the default value is as stated. The result is delineated in the section pertaining to the Certificate object structure.

  • 1: A comprehensive account of the data pertaining to the certificates exhibited in the “trust chains” object, inclusive of the “entities” object.

Visibility parameter

The utilisation of the visibility parameter within the URL request, /north/v80/search/certificates?visibility={value}, enables the retrieval of disparate response objects. The value of the parameter, {value}, can be:

  • assignable: In this instance, the relevant certificates will be issued, which can then be assigned to domains, channels and devices. It should be noted that these certificates are associated with the user’s domain or, where applicable, the user’s domain or domains with a visible upper hierarchy.

  • administrable: In the absence of the parameter, the default value is returned. Consequently, the user will receive the certificates that can be administered, that is to say, the certificates that can be managed, including the option to update or delete them. The certificate in question belongs to the user’s domain or to domains with a low hierarchy managed by the user.

Note

It is anticipated that the option with a summary will be available in future versions.

API specification

Subsections of Mobile operators

APN

Limited access

This feature is only available to root and super_admin_domain profiles. Ask your administrator for proper user role profiling.

Introduction

An APN (Access Point Name) functions as a conduit between a mobile network and the Internet. The APN entity stores information pertaining to the access point names of M2M networks, which devices utilise to establish a connection with IoT applications.

API specification

GGSN

Limited access

This feature is only available to root and super_admin_domain profiles. Ask your administrator for proper user role profiling.

Introduction

The OpenGate platform has the capacity to receive information regarding the operational status of M2M communications networks from either the Remote Access Servers or delegated Radius Servers.

These diverse types of nodes are able to relay Radius information to the platform, specifically Radius Accounting packets.

GGSN - RADIUS clients

Gateway GPRS support nodes are integral components of the mobile operator’s network, possessing the capability to forward RADIUS requests.

API specification

Data retrieval

Everything OpenGate stores about your fleet is queryable through one consistent mechanism: POST a JSON query, get rows back. There is no query string to assemble and no SQL to learn — the resource lives in the URL, and the conditions live in a JSON body.

How a query is built

flowchart LR
    URL["<b>The URL</b><br>what you are querying<br>/north/v80/search/devices"] --> REQ(["POST"])
    BODY["<b>The JSON body</b><br>which rows you want<br>filter, select, sort, group, limit"] --> REQ
    REQ --> RES["<b>Rows</b><br>JSON or CSV"]

Two things to learn, and this section is organized around exactly that:

  1. What you can query — the index of every search endpoint, so you know which URL to POST to.
  2. Data Lake — the query language: filter, select, sort, group and limit.

Then, because three kinds of storage answer slightly differently, Query dialects lays their differences side by side.

Your first query in 60 seconds

Ask for your devices. No filter, no options — just the resource:

curl --request POST \
     --header "X-ApiKey: <your-api-key>" \
     --header "Content-Type: application/json" \
     --data '{}' \
     https://api.opengate.es/north/v80/search/devices

You get an array named after the resource. Each row is a flat map of dotted field paths, and each value is wrapped in _value._current.value — the same shape the platform uses to hold a current value and its metadata:

{
  "devices": [
    {
      "provision.administration.identifier": {
        "_value": { "_current": { "value": "device_battery_id" } }
      },
      "provision.administration.channel": {
        "_value": { "_current": { "value": "battery_channel" } }
      },
      "provision.device.location": {
        "_value": { "_current": { "value": {
          "position": { "type": "Point", "coordinates": [-3.7028, 40.41675] },
          "postal": "28013"
        } } }
      }
    }
  ],
  "page": { "number": 1 }
}

Those dotted paths are also the field names you filter and sort on. Narrow the query with a filter tree and page it with limit:

{
  "filter": {
    "and": [
      { "like": { "provision.device.administrativeState": "NORMAL" } },
      { "like": { "provision.device.communicationModules[].mobile.imei": "351873000102290" } }
    ]
  },
  "limit": { "start": 1, "size": 50 }
}
Discovering field names

Run the query with an empty body first. The paths you see in the response are exactly the paths you can filter, sort and select on — which is the fastest way to learn any resource’s fields.

Swap devices in the URL for datapoints, entities/alarms or any resource from What you can query, and the same body shape applies — only the field names change.

Reading the answer

You want Use Where
Rows The search endpoint Data Lake
How many, not which The same endpoint with /summary Summary
Only some fields select Selecting
Rows in pages limit Pagination
Rows grouped and aggregated group Grouping
A CSV file instead of JSON An HTTP header option Query dialects

What each store is for

Store Holds Query it when
Data streams The current value of each measurement You want the latest reading, not the history
Alarms Alarms raised on entities You are monitoring what went wrong
Time series Values pre-aggregated into fixed time buckets per device You want history at scale: hourly or daily aggregates already computed
Data sets A tabular projection of chosen data streams You want a flat table, typically to export as CSV
Notebook scheduler Notebooks run unattended, once or on a schedule Your analysis is code, not a query
Data points Every raw value a device ever sent Deprecated. Superseded by time series

Subsections of Data retrieval

What you can query

Every query in OpenGate is a POST to a URL that names what you are querying, with a JSON body that says which rows you want. This page is the index of that first half: find your resource, take the URL, and write the body using the query language.

The URL pattern

POST https://api.opengate.es/north/v80/search/<resource>

That covers most resources, which are global or scoped by your API key. Two families depart from it, and knowing which one you are in saves a lot of guessing.

Time series and data sets — you query one named store, so the organization and its identifier are part of the URL:

POST /north/v80/timeseries/provision/organizations/{organization}/{identifier}/data
POST /north/v80/datasets/provision/organizations/{organization}/{identifier}/data

Operations — note the missing north prefix, which the operations service predates:

POST /v80/search/jobs

Three more resources invert the shape into /<resource>/search: rules, provision processors and operation types.

The /summary variant

Most search endpoints have a twin ending in /summary that returns aggregated counters instead of rows. Same URL, same body, different answer: use it when you want how many, not which ones. See Summary. Endpoints offering it are marked below.

Paths in the tables below

Paths are shown relative to /north/v80, except in the operations table, where they are relative to /v80. A + in the Summary column means the endpoint also has a /summary twin. {org} is the organization name and {id} the identifier of the time series or data set.

Collected data

What the devices have sent you.

To query POST to Summary Documented in
Current data stream values search/datastreams Data streams
Historical data points — deprecated search/datapoints Data points
All raised alarms search/entities/alarms + Alarms
Alarms on devices search/entities/devices/alarms + Alarms
Alarms on subscriptions search/entities/subscriptions/alarms + Alarms
Data of one time series timeseries/provision/organizations/{org}/{id}/data Time series
A time series aggregated per device timeseries/provision/organizations/{org}/{id}/dataset Time series
A time series as a Parquet export timeseries/provision/organizations/{org}/{id}/export Time series
Data of one data set datasets/provision/organizations/{org}/{id}/data Data sets
The data set catalog search/catalog/datasets Data sets

Entities and provisioning

What you have registered on the platform.

To query POST to Summary Documented in
Any entity, whatever its type search/entities + Entities
Devices search/devices + Devices
Assets search/assets + Assets
Subscribers search/subscribers + Subscribers
Subscriptions search/subscriptions + Subscriptions
Channels search/channels + Channels
Organizations search/organizations + Organizations
Work groups search/workgroups + Work groups
Users search/users + Users
Geo-areas search/areas Geo-areas
Tickets search/tickets + Tickets
Data models search/datamodels Data models
Software and configuration bundles search/bundles Bundles
Certificates search/certificates Certificates
Hardware catalog search/catalog/hardwares + Hardware catalog
Mobile operators catalog search/catalog/operators Operators
Rules rules/search Rules
Provision processors provisionProcessors/bulk/search Provision functions
Asynchronous bulk requests search/bulk/async Bulk

Operations

What you have asked the devices to do. Note the missing north prefix.

To query POST to Summary Documented in
Jobs search/jobs + Jobs
Tasks search/tasks Tasks
Operations on devices search/entities/devices/operations + Jobs
Operations on subscribers search/entities/subscribers/operations + Jobs
Operations on subscriptions search/entities/subscriptions/operations + Jobs
Closed operations history search/entities/operations/history + Jobs
Operation types operationTypes/search Operation types

Which fields can I filter on?

The clause syntax is the same everywhere, but the field names depend on the resource. They are dotted paths, and entity searches expose two families of them:

Field family Example Holds
provision.* provision.device.administrativeState Provisioned configuration
<entity>.* device.serialNumber Entity attributes, including collected ones
<resource>.* datapoints.datastreamId, jobs.report.summary.status The fields of a non-entity resource
A column name Prov Identifier Data sets and time series, where you define the columns yourself

Arrays are addressed with [], optionally indexed: provision.device.communicationModules[].mobile.imei.

Each resource’s filterable fields are listed in its own API specification, rendered on the page named in the tables above. The fastest shortcut, though, is to run the query with an empty body {} and read the paths off the response: those are exactly the paths you can filter, sort and select on.

Data Lake

Searching data with OpenGate API

The searching API lets you retrieve provisioned and collected information from the entities registered on the platform.

Using search API, you can manage many situations in which you need to get information, collected by OpenGate, about your remote devices.

Some examples of questions you can answer using the searching API are:

  • Where is my lost truck?
  • Is my vending machine connected to Internet?
  • What is the software version of this smart meter which is rebooting all the time?
  • How is the signal strength of this weather station which is off-line most of the time?
  • What are the latest operations launched over different devices and their current status?
  • What are the latest raised alarms associated with my in-field resources?
  • What is the latest value and history of different sensors and machine parameters?

Searching Features

Where are the FROM and WHERE?

Well, if you’re still thinking in SQL, then you’ll expect to find the word FROM anywhere. Remember, OpenGate exposes its API through a REST interface, so in this case the word FROM is in the URL suffix.

That suffix is the resource you are querying, and every available one is listed in What you can query. The WHERE — and the ORDER BY, the SELECT and the GROUP BY — is the JSON body described below.

In all response cases, you must POST a valid JSON query and you’ll get an array with the matched specific resources. The query could have next main objects:

  • filter: Allows to select the resources that meets with desired information, see Filtering
  • limit: Allows paginating the response, see Pagination
  • sort: Allows sorting the results, see Sorting
  • select: Allows selecting only the parameters you need, see Selecting
  • group: Allows grouping the results, see Grouping
{
  "filter": {}, // filter document omitted
  "limit": {}, // limit document omitted
  "sort": {}, // sort document omitted
  "select": {}, // select document omitted
  "group": {} // group document omitted
}

Procedure

Searching in OpenGate platform is pretty easy. You have to send a HTTP request to the API using the POST method, the prefix always is /north/v80/search. Optionally you can attach a JSON file (in the HTTP body) if you need to use paging, sorting, selecting, grouping or filtering features.

You can use the URL above for searching information. So for the impatient, let’s suppose you’re trying to search over your previously provisioned device list, and you’re thinking in a SQL WHERE clause like that:

name like 'device_name' AND (
    serialNumber like '82A75D494B0EBF7A95587285AE78E83F' OR
    serialNumber like '08D83B1864A1F9CFED76DAF426EB04D7')

in this case you must use https://api.opengate.es/north/v80/search/devices URL and POST a JSON payload like that:

{
  "filter": {
    "and": [
      {
        "like": {
          "device.name": "device_name"
        }
      },
      {
        "or": [
          {
            "like": {
              "device.serialNumber": "82A75D494B0EBF7A95587285AE78E83F"
            }
          },
          {
            "like": {
              "device.serialNumber": "08D83B1864A1F9CFED76DAF426EB04D7"
            }
          }
        ]
      }
    ]
  },
  "limit": {
    "start": 26,
    "size": 50
  }
}

Requesting with curl:

curl --request POST \
     --data-binary @search-query.json \
     --header "X-ApiKey: YOUR_API_KEY_HERE" \
     --verbose \
     https://[your_opengate_address]/north/v80/search/devices \
     -H "Content-type: application/json"

Then you’ll receive the device list matching with your query, the response body should be something like that.

{
  "devices": [
    {}, // device body omitted
    {}, // device body omitted
    // a number of other devices
    {}
  ]
}

Where to go next

The clauses above are documented one page each, below. Two things live outside this section:

  • Which URL to POST to: What you can query indexes every search endpoint.
  • Where the clauses behave differently: time series and data sets accept the same syntax with stricter rules and a different response shape. The differences are collected in Query dialects.

Subsections of Data Lake

Filtering

The search API uses the following filtering options to facilitate the search and allow to perform a wide range of consultations.

Several techniques solve the filtering issue when you’re querying over a RESTful interface. For example, you can use standard HTTP parameters to add filtering capabilities to your query. It’s pretty simple but doesn’t cover complex needs. We require a SQL-like approach, with typical operators like AND, OR, EQUAL, NOT EQUAL, etc. OpenGate allows you to filter your queries by sending a POST request to a specific URI. In the POST request, you must send a JSON document with a fashionable DSL structure. It is a command pattern approach in contrast with the entity/collection pattern used in the provisioning API.

Filtering operators

Filtering comparison operator list

  • eq: Equals.
  • neq: Not equals.
  • like: Regex pattern like.
  • gt: Greater than.
  • lt: Lower than.
  • gte: Greater than or equals.
  • lte: Lower than or equals.
  • in[]: Included in a concrete group.
  • nin[]: Not included in a concrete group.
  • exists: Exists.
  • within: Included in an areas.geometry GeoJson (exclusive for Area search).
See supported identifiers for existing comparison operator.
  • asset: identifier
  • channel: identifier
  • device:
    • identifier
    • serialNumber
  • device.communicationModules[]:
    • identifier
    • mobile.imei
  • device.communicationModules[].subscriber:
    • identifier
  • device.communicationModules[].subscription:
    • identifier
    • address
    • mobile.imsi
    • mobile.msisdn
    • mobile.icc
    • presence.ipRtt
    • presence.unifiedPresence
  • entity:
    • areas
    • location
  • organization: identifier
  • provision.asset:
    • identifier
    • location
  • provision.device:
    • identifier
    • location
  • provision.device.communicationModules[]: identifier
  • provision.device.communicationModules[].subscriber: identifier
  • provision.device.communicationModules[].subscription:
    • identifier
    • address
    • mobile
    • imsi
    • mobile
    • msisdn
    • mobile.icc
  • provision.organization:
    • identifier
    • plan
  • provision.ticket:
    • identifier
    • location
    • owner
    • assignee
    • specificType
    • section
    • entity
    • assignedDate
    • answeredDate
    • updatedDate
    • restorationDate
    • resolutionDate
    • closedDate
    • parentTicket

Filtering logical operators list

  • and[]: And
  • or[]: Or

How to use filters

Let’s suppose we want to filter devices with device.operationalStatus equals to NORMAL and with device.communicationModules[].mobile.imei starting with 351873000102290.

If we were dealing with a SQL database we’d write the following SQL sentence:

SELECT * FROM device
WHERE device.operationalStatus LIKE 'NORMAL'
AND device.communicationModules[].mobile.imei LIKE '351873000102290'
Note

Remember, you can use all the data streams defined in the default data models and your own data streams in the WHERE clause.

Translating the previous SQL sentence to OpenGate searching API we’ll have:

{
  "filter": {
    "and": [
      {
        "like": {
          "provision.device.administrativeState": "NORMAL"
        }
      },
      {
        // The result will contain all devices with collected operational Status that
        // contains NORMAL and are related with communications modules with collected
        // imei containing 351873000102290
        "like": {
          "provision.device.communicationModules[].mobile.imei": "351873000102290"
        }
      }
    ]
  }
}

The result will contain all devices with collected operational Status that contains NORMAL and are related to communications modules with collected imei containing 351873000102290.

Another example comparing SQL to JSON, searching all devices except the one with serialNumber equal to 82A75D494B0EBF7A95587285AE78E83F:

SELECT * FROM device WHERE serialNumber <> '82A75D494B0EBF7A95587285AE78E83F'
/north/v80/search/devices
{
  "filter": {
    "neq": { "device.serialNumber": "82A75D494B0EBF7A95587285AE78E83F" }
  },
  "limit": {
    "start": 2
  }
}

More filtering examples

Click on any of the following links to expand the contents.

Searching using in and nin operators like an aggregation of ids
{
  "filter": {
    "and": [
      { "in": { "device.name": ["device_1", "device_2"] } },
      { "nin": { "device.description": ["device default description"] } }
    ]
  },
  "limit": {
    "start": 26,
    "size": 50
  }
}
Searching using the tag attribute
{
  "filter": {
    "eq": { "tag": "my_sticky_tag" }
  },
  "limit": {
    "start": 26,
    "size": 50
  }
}
Searching for collected hardware fields
{
  "filter": {
    "and": [
      { "like": { "device.model": "EF5" } },
      { "exists": { "device.identifier": true } }
    ]
  },
  "limit": {
    "start": 1,
    "size": 10
  }
}
Searching for software field (device whose software has this regex chain)
{
  "filter": {
    "like": { "device.software": "1.0" }
  },
  "limit": {
    "start": 1,
    "size": 10
  }
}
Retrieve all the operations in the catalog applicable to the Subscription & Asset entities
{
  "filter": {
    "in": { "operationEntityType": ["SUBSCRIPTION", "ASSET"] }
  },
  "limit": {
    "start": 1,
    "size": 10
  }
}
Searching for device alarms, /north/v80/search/entities/devices/alarms
{
  "filter": {
    "in": { "device.name": ["DEVICE22"] }
  },
  "limit": {
    "start": 1,
    "size": 10
  }
}
Searching for a particular data of a complex value
{
  "filter": {
    "like": {
      "provision.device.location._current.value.postal": "41015"
    }
  }
}

Selecting

By default, the search response includes all the data streams of the searched entities. You can retrieve only the information you need using the select sub-document in the search JSON.

The select sub-document can be used only on entity searching and must not be empty.

You can also use this sub-document when you search for information in CSV format.

Warning

If the size of the CSV file exceeds 18MB, you must paginate your searchings using the following parameters as HTTP headers:

  • page: It sets the CSV page you want.
  • size: It sets the number of rows you want in the CSV.

If the select clause isn’t in the filter, the behavior is the following:

  • In JSON format, the response will contain all the data streams collected or provisioned in the devices you are searching.
  • In CSV format, the search API raises an error in the response, asking for the select clause.

As described above, any data stream of the default data models or data models defined by the user can be used as select fields.

The order to apply the filters is securitization and next the following fields whenever there are resourceType, sort, filter, select (the data streams to show)

Select JSON object

  • select[]: Array of parameters to be selected.

    • name: String. Data stream name in the default or user-defined data models.

    • fields[]: Array of strings with the name of the fields to be retrieved.

      The possible values are: (See current object attributes table for field description):

      • value
      • date
      • at
      • from
      • tags
      • feedId
      • scoring.performance
      • scoring.qrating
      • provType
      • value.simplexAttribute: where simplexAttribute is an attribute of the complex object. For example, the provision.device.location is a complex data stream. If you need only de postal code, the value would be value.postal
    • alias: String. Shortname replaces the parameter’s full name when a CSV format is required. Example:

      • Using “alias”=“imei”
      • The device.communicationModules[].mobile.imei becomes imei in the CSV header

      The complete data stream name in the CSV header will appear if this field doesn’t exist. The CSV format shows this field, but the JSON format ignores it.

Select examples

Here’s how to search devices with a filter with a select clause

The following snippet shows the request using curl:

curl --request POST \
     --data-binary @subscription.json \
     --header "X-ApiKey: YOUR_API_KEY_HERE" \
     --verbose \
     https://[your_opengate_address]/north/v80/search/devices \
     -H "Content-type: application/json"

You include the filter with the select clause in the request’s body.

Filter using predefined device fields

{
  "select": [
    {
      "name": "provision.device.identifier",
      "fields": [
        {
          "field": "value",
          "alias": "id"
        },
        {
          "field": "date",
          "alias": "date"
        }
      ]
    }
  ]
}

Filter obtaining a field of a complex value

{
  "select": [
    {
      "name": "provision.device.location",
      "fields": [
        {
          "field": "value.postal",
          "alias": "Postal code"
        }
      ]
    }
  ]
}

Depending on the parameter header, the response can be in two different formats, see HTTP Header Options:

  • JSON Format (Default)
  • CSV Format

Response to the filter in JSON format example

{
  "devices": [
    {
      "id": "bca8cbbb-b151-442b-8b0d-96ed77789c45",
      "device": {
        "operationalStatus": {
          "current": {
            "value": "NORMAL",
            "date": "2017-02-02T09:05:58Z",
            "performance": 75
          }
        },
        "communicationsModules": [
          {
            "identifier": "351873000102290",
            "mobile": {
              "imei": {
                "current": {
                  "value": "351873000102290",
                  "date": "2017-02-02T09:05:58Z"
                }
              }
            }
          }
        ]
      },
      "health": {
        "heart": {
          "rate": {
            "current": {
              "value": 60,
              "date": "2017-02-02T09:05:58Z",
              "performance": 78
            }
          }
        }
      }
    }
  ]
}

Response to the Filter in CSV format example

device.operationalStatus.current.value;device.operationalStatus.current.updated;device.operationalStatus.current.performance;imei.current.value;imei.current.updated;imei.current.performance;rate.current.value;rate.current.updated;rate.current.performance;
"NORMAL";"2017-02-02T09:05:58Z";75;"351873000102290";"2017-02-02T09:05:58Z";;60;"2017-02-02T09:05:58Z";78

Sorting

The searching API allows ordering of the results. You can sort your search results, including an order object to the JSON.

Quick sort example

{
  "filter": {},
  "sort": {
    // Array of ordering parameters
    "parameters": [
      {
        // Name of parameter defined in the Default Datamodels
        "name": "provision.administration.identifier",
        // Enumeration string with ordering type. Valid values are:
        // - ASCENDING
        // - DESCENDING
        "type": "ASCENDING"
      }
    ]
  }
}

Grouping

Thanks to the group keyword in the search JSON, it is possible to group by some parameters of the default data models. This keyword is optional.

Quick grouping example:

{
  "filter": {},
  // Group sub-document
  "group": {
    // List of data streams to group by
    "parameters": [
      {
        "name": "provision.device.model"
      }
    ]
  }
}
List of data streams with grouping support
  • All enum values
  • device.model
  • device.software
  • device.communicationModules[].model
  • device.communicationModules[].software
  • device.communicationModules[].subscriber.model
  • device.communicationModules[].subscriber.software
  • device.communicationModules[].subscription.mobile.homePlmn
  • device.communicationModules[].subscription.mobile.homeOperator
  • device.communicationModules[].subscription.mobile.vlr.plmn
  • device.communicationModules[].subscription.mobile.vlr.operatorName
  • device.communicationModules[].subscription.mobile.vlr.countryName
  • device.communicationModules[].subscription.mobile.vlr.countryCode
  • device.communicationModules[].subscription.mobile.msc.plmn
  • device.communicationModules[].subscription.mobile.msc.operatorName
  • device.communicationModules[].subscription.mobile.msc.countryName
  • device.communicationModules[].subscription.mobile.msc.countryCode
  • device.communicationModules[].subscription.mobile.sgsn.plmnd
  • device.communicationModules[].subscription.mobile.sgsn.operatorName
  • device.communicationModules[].subscription.mobile.sgsn.countryName
  • device.communicationModules[].subscription.mobile.sgsn.countryCode
  • device.communicationModules[].subscription.mobile.ggsn.plmn
  • device.communicationModules[].subscription.mobile.ggsn.operatorName
  • device.communicationModules[].subscription.mobile.ggsn.countryName
  • device.communicationModules[].subscription.mobile.ggsn.countryCode
  • device.communicationModules[].subscription.mobile.registeredPlmn
  • device.communicationModules[].subscription.mobile.registeredOperator
  • provision.device.model
  • provision.device.software
  • provision.device.communicationModules[].model
  • provision.device.communicationModules[].software
  • provision.device.communicationModules[].subscriber.model
  • provision.device.communicationModules[].subscriber.software
  • provision.device.communicationModules[].subscription.mobile.homeOperator
  • provision.device.communicationModules[].subscription.mobile.registeredOperator
  • provision.administration.channel
  • provision.administration.organization
  • provision.administration.serviceGroup
  • provision.administration.plan

Group examples

Click on any of the following links to expand the contents.

Group Search Request example
{
  "filter": {
    "and": [
      {
        "like": {
          "provision.administration.organization": "battery_organization"
        }
      }
    ]
  },
  "group": {
    "parameters": [
      {
        "name": "provision.device.model"
      }
    ]
  }
}
Group Search Response example
{
  "summary": {
    "count": 6,
    "summaryGroup": [
      {
        "provision.administration.organization": {
          "count": 6,
          "list": [
            {
              "count": 6,
              "name": "battery_organization"
            }
          ]
        }
      },
      {
        "provision.administration.channel": {
          "count": 6,
          "list": [
            {
              "count": 6,
              "name": "battery_channel"
            }
          ]
        }
      },
      {
        "provision.device.model.name": {
          "count": 6,
          "list": [
            {
              "count": 1,
              "name": "model_name-7"
            },
            {
              "count": 2,
              "name": "model_name-4"
            },
            {
              "count": 1,
              "name": "model_name-10"
            },
            {
              "count": 1,
              "name": "model_name-5"
            },
            {
              "count": 1,
              "name": "model_name-11"
            }
          ]
        }
      }
    ]
  }
}

Pagination

The API allows you obtaining the response to a search in blocks with predefined number of results.

  • limit:
    • start: Page number you request. The count starts with the number 1
    • size: The number of entities that you can see on the page
Default number of items returned

The search API limits the page size to 50 items by default, but you probably have thousands of devices. How do you walk through all your devices?

Well, let’s suppose you have exactly 2500 devices matching your query. Obviously, your result exceeds the default limit. In this case, you’ll find a page object in your response.

Paginated examples

Paginated example response

{
    "page" : { "number" : 1 },
    "resources" : [
        { ... },
        { ... },
        { ... },
        { ... },
        ...
        { ... }
    ]
}

Warning about the previous example

Warning

Please, take the resources field on the previous example as a placeholder for any reserved word into the scope of the searched resource: entities, devices, subscriptions, data models, bundles, data streams, data points, etc.

The number attribute is the current number of pages based on the limit setup.

What can you do to get the following page? It’s easy. You only have to include a limit object in your query. See next example.

Pagination example request

{
  "limit": {
    "start": 2
  }
}

Paginated example generic response

{
   "page" : { "number" : 2 },
   "resources" : [
       { ... },
       { ... },
       { ... },
       { ... },
       ...
       { ... }
   ]
}

See previous warning about the resources word in the example.

You can change the page limit from the beginning. Supposing you want to retrieve 50 items per query, you must set up the limit object with a starting point and the page size you want.

Paginated example request

Changing the starting page and the limit

{
  "limit": {
    "start": 2,
    "size": 50
  }
}

The top margin for the page size in the limit object is 1000. You’ll receive a server error response if you set up a size attribute over this limit.

Another example of pagination response

With the starting page and the limit changed

{
    "page" : { "number" : 2},
    "resources" : [
         { ... },
         { ... },
         { ... },
         { ... },
         ...
         { ... }
    ]
}

See previous warning about the resources word in the example.

Summary

Responses to all search requests include a summary object with different counters regarding the results obtained. It is closely related to the grouping feature.

By default, the summary always shows the total count, the organization’s grouping counter, and the channel grouping counter.

  • count (field): number of occurrences found in the whole search
  • summaryGroup []: array of type of summarized specific object structure
    • SpecificObjectParameterDatamodel: object inside the Parameter of the data models
      • count: number of these specific elements found
      • list: array of each type of summarized element
        • count: number of these specific elements found
        • name: value of the parameter of the data model

Here’s how to search devices with a summary without a group clause

This is the request using curl:

curl --request POST \
     --data-binary @subscription.json \
     --header "X-ApiKey: YOUR_API_KEY_HERE" \
     --verbose \
     https://[your_opengate_address]/north/v80/search/devices/summary \
     -H "Content-type: application/json"

Some grouping examples

Response summary without grouping

{
  "summary": {
    "count": 6,
    "summaryGroup": [
      {
        "provision.administration.organization": {
          "count": 6,
          "list": [
            {
              "count": 6,
              "name": "organization1"
            }
          ]
        }
      },
      {
        "provision.administration.channel": {
          "count": 6,
          "list": [
            {
              "count": 6,
              "name": "channel1"
            }
          ]
        }
      }
    ]
  }
}

This is the request using curl:

curl --request POST \
     --data-binary @subscription.json \
     --header "X-ApiKey: YOUR_API_KEY_HERE" \
     --verbose \
     https://[your_opengate_address]/north/v80/search/devices/summary \
     -H "Content-type: application/json"

In the body of the request, you include the filter with the select clause.

Example Filter using group clause

{
  "filter": {
    "and": [
      {
        "like": {
          "provision.administration.organization": "battery_organization"
        }
      }
    ]
  },
  "group": {
    "parameters": [
      {
        "name": "provision.device.model"
      }
    ]
  }
}

Response summary with group clause

{
  "summary": {
    "count": 6,
    "summaryGroup": [
      {
        "provision.administration.organization": {
          "count": 6,
          "list": [
            {
              "count": 6,
              "name": "battery_organization"
            }
          ]
        }
      },
      {
        "provision.administration.channel": {
          "count": 6,
          "list": [
            {
              "count": 6,
              "name": "battery_channel"
            }
          ]
        }
      },
      {
        "provision.device.model.name": {
          "count": 6,
          "list": [
            {
              "count": 1,
              "name": "model_name-7"
            },
            {
              "count": 2,
              "name": "model_name-4"
            },
            {
              "count": 1,
              "name": "model_name-10"
            },
            {
              "count": 1,
              "name": "model_name-5"
            },
            {
              "count": 1,
              "name": "model_name-11"
            }
          ]
        }
      }
    ]
  }
}

Query dialects

The five clauses — filter, select, sort, group, limit — look the same everywhere, but three kinds of store answer them slightly differently. This page is the diff, so you do not have to read three long pages to find it.

The three dialects at a glance

Generic search Time series Data sets
URL /north/v80/search/<resource> /north/v80/timeseries/provision/organizations/{org}/{id}/data /north/v80/datasets/provision/organizations/{org}/{id}/data
Field names Dotted paths of the resource bucketColumn, identifierColumn, columns.name, context.name identifierColumn, columns.name
filter Full operator set Same syntax, only on filterable columns Same syntax, only on filterable columns
select Objects with name and fields Same keys as filter Array of column names
sort An object of parameters, each a field and a direction A string: the identifier of a sort declared in the definition A string: the identifier of a sort declared in the definition
group Supported Not applicable Does not exist
limit start and size Same, with CSV caveat below Same, with CSV caveat below
Response Array named after the resource columns plus data matrix columns plus data matrix
CSV output Yes Yes

Why time series and data sets are stricter

Both are pre-computed projections: you declare their columns up front, and the platform builds indexes for exactly those. That is what makes them fast, and it is also why you cannot filter or sort on an arbitrary field.

Sorting is declared, not composed. A generic search accepts any field in its sort object. A time series or a data set accepts only the identifier of a sort declared in its definition — a named, ordered list of columns with directions — plus the reverse of each one, which the platform exposes automatically because the same index serves it backwards. There is no per-column sortable flag and no cap on how many sorts a definition may hold.

{ "sort": { "parameters": [ { "name": "provision.device.identifier", "type": "ASCENDING" } ] } }   // generic
{ "sort": "sortByDeviceAsc" }                                                                      // time series, data sets

The real limit is a budget, not a number. Each filterable column and each declared sort consumes optimization units, and each definition has a budget of them. Both stores offer an optimizationPlan endpoint that reports what a definition would consume before you commit, and expose usedSearchOptimizationUnits and freeSearchOptimizationUnits on the definition itself.

See Defining a time series and Defining a data set.

Filters have four modes, not two: NO, YES for optional equality, ALWAYS for a filter every query must supply, and RANGE for >, < and BETWEEN. RANGE applies to numeric columns only; date-time columns are always range-searchable.

The matrix response

Generic searches return objects, one per row. Time series and data sets return a matrix instead: a columns array naming the fields, and a data array of rows, each row an array of values in that same order.

{
  "page": { "number": 26 },
  "columns": ["Prov Identifier", "Coll manufacturer", "Coll model"],
  "data": [
    ["MyDevice1", "OpenGate", "OpenGate"],
    ["MyDevice2", "OpenGate", "OpenGate"]
  ]
}

Read the values off columns rather than hardcoding positions. If you do rely on the order, this is what it is when you omit select:

Store Column order without select
Time series bucketColumn, then identifierColumn, then the context columns, then the aggregated columns
Data sets identifierColumn, then the defined columns.name in declaration order

Time series additionally offer an aggregated read, POST .../{id}/dataset, which collapses every bucket of a device into a single output row. There select.columns takes a column, an alias and an aggregation function per output variable, and the result is always sorted ascending by identifierColumn, which is included whether you ask for it or not. See Time series.

CSV output changes the rules

Time series and data sets can answer in CSV instead of JSON, and that switch changes two behaviours that surprise people:

limit flips meaning. In JSON, omitting limit applies the configured defaults. In CSV, omitting it means give me everything:

Body JSON response CSV response
{"filter": {}, "limit": {"size": 500, "start": 1}} 500 rows from row 1 500 rows from row 1
{"filter": {}} Configured default page The complete data set
{"filter": {}, "limit": {}} Configured default page Error: an incomplete limit is rejected

Sorting is disabled. CSV retrieval turns sorting off deliberately, to keep large exports fast. If you need ordered output, either sort downstream or use the JSON response.

Complete retrieval is expensive

Omitting limit in CSV mode downloads the entire store. On a large time series that is a long, heavy request. Page it unless you genuinely want everything.

CSV formatting — the quoting character, the escape character, the end-of-line sequence and how nulls are represented — is customizable through HTTP header options, and you are responsible for the result being well-formed CSV.

Undocumented header names

The specific header names for those CSV options are not currently published in the API specification. Until they are, ask your platform contact for the exact names.

What stays the same

Worth stating plainly, because it is most of the surface:

  • POST with a JSON body, always.
  • X-ApiKey for authentication.
  • The filter operatorseq, neq, like, gt, lt, gte, lte, in, nin, exists, and, or — behave identically in all three dialects.
  • limit uses start and size everywhere.
  • The utc=true header option returns date fields in UTC in all of them.

Alarms

An alarm is what OpenGate raises when a rule detects something worth a human’s attention: a device that stopped reporting, a value out of range, an identification conflict. This API is how a back-office application finds them, counts them, and records that somebody dealt with them.

The alarm life cycle

stateDiagram-v2
    direction LR
    [*] --> OPEN: a rule raises the alarm
    OPEN --> ATTENDED: action ATTEND
    OPEN --> CLOSED: action CLOSE
    ATTENDED --> CLOSED: action CLOSE
    CLOSED --> [*]
Status Meaning
OPEN The alarm is active
ATTENDED An operator is dealing with it
CLOSED The alarm is closed

Two more attributes tell you how much it matters:

Attribute Values
severity INFORMATIVE (only informative) · URGENT (needs attention soon) · CRITICAL (critical for service operation)
priority LOW · MEDIUM · HIGH

Endpoints

To POST to
Search alarms on any entity /north/v80/search/entities/alarms
Search alarms on devices /north/v80/search/entities/devices/alarms
Search alarms on subscriptions /north/v80/search/entities/subscriptions/alarms
Count instead of list The same three URLs with /summary
Attend or close alarms /north/v80/alarms

Searches follow the standard query language: filter, select, sort, group and limit, with results in JSON by default or CSV through header options.

Finding alarms

curl --request POST \
     --header "X-ApiKey: <your-api-key>" \
     --header "Content-Type: application/json" \
     --data '{"filter": {"like": {"alarm.channel": "default_channel"}}}' \
     https://api.opengate.es/north/v80/search/entities/alarms
{
  "alarms": [
    {
      "identifier": "6c6c3bcb-633e-4418-ae6d-ed69a1db7e96",
      "name": "alarmForDevice",
      "severity": "CRITICAL",
      "priority": "HIGH",
      "status": "CLOSED",
      "entityIdentifier": "device_ogmapiXXX9",
      "organization": "org_ogmapiXXX9",
      "channel": "chn_ogmapiXXX9",
      "openingDate": "2020-08-21T10:42:35.507Z",
      "closureDate": "2020-08-21T10:42:54.186Z"
    }
  ],
  "page": { "number": 1 }
}

Fields you can filter and sort on

Group Fields
Identity alarm.identifier · alarm.name · alarm.rule · alarm.description
Classification alarm.severity · alarm.priority · alarm.status
Where alarm.organization · alarm.channel · alarm.entityIdentifier · alarm.subEntityIdentifier · alarm.resourceType
Opening alarm.openingDate
Attention alarm.attentionDate · alarm.attentionUser · alarm.attentionNote
Closure alarm.closureDate · alarm.ClosureUser · alarm.closureNote

Everyday queries follow from those: everything still open and critical, everything a given operator attended, everything raised on one device last week.

{
  "filter": {
    "and": [
      { "eq": { "alarm.status": "OPEN" } },
      { "eq": { "alarm.severity": "CRITICAL" } }
    ]
  },
  "sort": { "parameters": [ { "name": "alarm.openingDate", "type": "DESCENDING" } ] }
}

Counting alarms

The /summary endpoints answer how many, which is what a dashboard needs. An empty filter summarizes everything:

{ "filter": {} }

The response counts alarms and breaks them down by group:

{
  "summary": {
    "date": "2020-08-14T11:06:26.04Z",
    "count": 6,
    "summaryGroup": [
      { "severity": { "count": 6, "list": [
        { "count": 1, "name": "URGENT" },
        { "count": 3, "name": "CRITICAL" },
        { "count": 2, "name": "INFORMATIVE" }
      ] } },
      { "rule": { "count": 3, "list": [
        { "count": 1, "name": "alarmForSubsInDevice" },
        { "count": 1, "name": "alarmForDevice" },
        { "count": 1, "name": "alarmForSubscription" }
      ] } },
      { "status": { "count": 3, "list": [ { "count": 3, "name": "OPEN" } ] } },
      { "name": { "count": 3, "list": [ { "count": 3, "name": "identificationConflict" } ] } }
    ]
  }
}
Only four fields can group a summary

Summaries group by alarm.name, alarm.rule, alarm.status and alarm.severity. Any other field returns 400 Bad Request.

Attending and closing

Alarms are not deleted, they are moved along their life cycle. One request handles a batch, and the notes field records why — which is what makes the alarm history auditable afterwards:

curl --request POST \
     --header "X-ApiKey: <your-api-key>" \
     --header "Content-Type: application/json" \
     --data '{"action": "CLOSE", "alarms": ["50dca9ab-f552-4805-9cff-019090d5b92b"], "notes": "notes of the reason"}' \
     https://api.opengate.es/north/v80/alarms
Field Holds
action ATTEND or CLOSE
alarms The identifiers to act on, one or many
notes The reason, stored as attentionNote or closureNote

The user performing the action is recorded in attentionUser or ClosureUser, with its timestamp, so you can query later who handled what.

API specification

Data points

Deprecated — superseded by Time series

Data points are superseded by time series, and their availability in future versions of OpenGate is not guaranteed.

Do not build new integrations on this API. If you are querying data points today, plan the move: define a time series with the columns and aggregation you need, and query that instead.

What a data point is

A data point is one instance of a data stream at one instant. Its at attribute is when the measurement was taken, and the whole set of data points for a data stream is the raw history of that measurement.

Why time series replaces it

Both hold history, but they answer differently:

Data points Time series
Granularity Every raw value Values aggregated per time bucket
Aggregation You fetch everything and compute it Computed on ingestion
Cost of a month of data Every value crosses the wire One row per device per bucket
Future support Not guaranteed The supported path

The practical difference shows up at fleet scale: asking a month of readings for ten thousand devices means millions of data points to transfer and reduce yourself, versus a pre-aggregated table that answers in one request.

Querying data points

While the API remains available, it is a standard Data Lake search:

POST /north/v80/search/datapoints
curl --request POST \
     --header "X-ApiKey: <your-api-key>" \
     --header "Content-Type: application/json" \
     --data '{"filter": {"and": [{"like": {"datapoints.datastreamId": "batteryPercentage"}}]}}' \
     https://api.opengate.es/north/v80/search/datapoints
{
  "datapoints": [
    {
      "organization": "battery_organization",
      "channel": "battery_channel",
      "datastreamId": "batteryPercentage",
      "entityIdentifier": "device_1ADA8F",
      "_current": {
        "value": 82,
        "date": "2018-06-04T12:18:11.147+02:00",
        "at": "2018-06-04T12:18:10+02:00",
        "source": "DEVICE_SIGFOX"
      }
    }
  ],
  "page": { "number": 1 }
}

Filter fields are prefixed datapoints., so datapoints.datastreamId, datapoints.entityIdentifier and the _current fields of the value.

Response format

Results come back as JSON by default or as CSV through header options. A flattened parameter returns each data point flat instead of nested, which is easier to feed into a table — see the datapoint parameters in the specification below.

API specification

Data sets

Limited access

This feature is only available to root and super_admin_domain profiles. Ask your administrator for proper user role profiling.

What a data set is

A data set is a flat table over your devices: one row per device, one column per value you chose. You pick the data streams that become columns, and the platform keeps the table current.

It is the answer to “give me a spreadsheet of my fleet” — the identifier, the model, the ICC, the last reading — without writing a query that walks each device’s data streams and flattens the result.

Data sets Time series Data points
Shape One row per device One row per device per period One row per measurement
Time Current values Aggregated history Full raw history
Best for Exports, inventories, tabular views Trends at scale Auditing exact readings

Column values are limited to strings, numbers and booleans. If a data stream holds an object or an array, the column definition has to include a path down to one of those primitive values. Devices with communication modules need one column per module.

The two halves of the API

Defining a data set is administration: choose the columns, their paths, and which of them are filterable, and declare the sorts a query may ask for. Done once.

Querying a data set is the daily work: POST a filter, read rows back as JSON or CSV.

API specification

Subsections of Data sets

Defining a data set

Defining a data set means choosing which data streams become columns. This is administration work, done once per data set.

The identifier column

Every data set needs an identifierColumn. It maps to provision.administration.identifier._current.value, with filtering enabled and sorting available, and it identifies the device each row belongs to.

Column paths

A column’s path has three parts, and the third is only required when the data stream is not a primitive value.

1. The data stream identifier — the datastreamId you want. If it contains communicationModules[], include the index of the module you mean:

device.communicationModules[0].subscription.mobile.imsi._current.value

2. The data stream field — one of:

_current.value · _current.date · _current.at · _current.feedId · _current.source · _current.sourceInfo

3. The value path — when the data stream holds an object or an array, a path down to a primitive value.

What a column can be filtered by

Every column carries a filter value that decides how queries may use it:

Value Meaning
NO Not filterable. The default
YES Optional equality filter
ALWAYS Required equality filter: every query must constrain this column
RANGE Range filter, >, < and BETWEEN, as well as equality

RANGE is only allowed on numeric columns, integer and number. Columns of type date-time are always range-searchable whatever the value says.

The sorts section

Sorting is declared in the definition, not composed at query time. The sorts section holds a list of named sorts, each an ordered list of columns with a direction, and a query asks for one by its identifier.

"sorts": [
  {
    "identifier": "sortByDeviceAsc",
    "description": "Sort by device identifier ascending",
    "columns": [
      { "name": "Prov Identifier", "direction": "ASC" }
    ]
  }
]
Field Rules
identifier Required, unique within the list. Letters, digits, spaces, _ and -. Generated as a UUID if omitted, so name it
description Optional free text
columns Required, at least one. A column name from the columns section plus ASC or DESC

At least one sort is mandatory, and the order inside columns is the sort precedence.

The reverse of every sort comes for free

For each sort you declare, OpenGate also exposes its reverse, served by the same index through a reverse scan. Those come back marked derived: true, which is read-only: the platform sets it and the web console uses it. Never declare a derived sort yourself — flipping the direction of one you already have just spends optimization units on an index you were given.

Limits

There is no fixed maximum number of filterable columns or declared sorts. Each filterable column and each declared sort consumes optimization units, and the data set has a budget of them — that budget is the limit.

Where to look What it tells you
The searchOptimizationInfo of a data set usedSearchOptimizationUnits and freeSearchOptimizationUnits
POST .../optimizationPlan What a definition would consume, before committing to it
POST /north/v80/datasets/provision/organizations/{organizationName}/optimizationPlan

Creating

POST /north/v80/datasets/provision/organizations/{organizationName}

Updating

PUT /north/v80/datasets/provision/organizations/{organizationName}/{identifier}

Updating can affect the data already stored or the structure holding it, which starts an adaptation process. Until it completes, dirty values may be present.

These fields can be modified:

Name · Description · IdentifierColumn · Columns · Sorts

Rules for columns:

  • Names are unique. You cannot add or rename a column to a name already in use.
  • filter: ALWAYS is immutable. You cannot add or remove a column that has it, you cannot set it on an existing column, and you cannot change it away once set.
  • Paths cannot be edited. Remove the column and create it again, which gets you the same result.

The optimization unit budget applies to updates as well, so run optimizationPlan before adding filterable columns or sorts to a definition that is already close to it.

Listing and deleting

GET    /north/v80/datasets/provision/organizations/{organizationName}
GET    /north/v80/datasets/provision/organizations/{organizationName}/{identifier}
DELETE /north/v80/datasets/provision/organizations/{organizationName}/{identifier}

Read the organization’s data sets:

curl --request GET \
     --header "X-ApiKey: <your-api-key>" \
     https://api.opengate.es/north/v80/datasets/provision/organizations/{organizationName}

Querying a data set

Reading a data set is a POST with the data set identifier in the URL:

POST /north/v80/datasets/provision/organizations/{organizationName}/{identifier}/data

Copy this and change the identifiers:

curl --request POST \
     --header "X-ApiKey: <your-api-key>" \
     --header "Content-Type: application/json" \
     --data '{"filter": {"eq": {"Prov Identifier": "MyDevice1"}}}' \
     https://api.opengate.es/north/v80/datasets/provision/organizations/{organizationName}/{identifier}/data

The response names its columns and gives you rows in that order:

{
  "page": { "number": 26 },
  "columns": ["Coll Mobile ICC value", "Coll Mobile ICC date", "Prov Identifier", "Coll manufacturer", "Coll model", "Prov Mobile ICC value"],
  "data": [
    ["icc1", "2021-04-06T12:35:22.784Z", "MyDevice1", "OpenGate", "OpenGate", "icc1"],
    ["icc2", "2021-04-06T07:45:57.468Z", "MyDevice2", "OpenGate", "OpenGate", "icc2"]
  ]
}

Without a select clause, columns holds the identifier column first, then the defined columns in declaration order.

The request body

Data set queries use the same clauses as any other search, with two differences worth memorising:

Clause In a data set query
filter Standard operators, keyed by identifierColumn or a column name
sort A string: the identifier of a sort declared in the data set — see below
select An array of column names, not the object form used elsewhere
limit start and size, as everywhere else
group Does not exist for data sets

The full comparison against the other query dialects is in Query dialects.

Asking for a sort

You do not compose an ordering in the request. You name one that already exists:

{ "filter": {}, "sort": "sortByDeviceAsc" }

Valid values are the identifier of any sort in the data set definition, plus the automatically exposed reverse of each one, so declaring an ascending sort gives you the descending direction too.

Omit sort and results come back sorted by the identifier column, ascending.

There is no fixed limit on how many sorts a definition can hold; the constraint is the optimization unit budget, described in Defining a data set.

Pagination and CSV

Data sets answer in JSON or CSV, and the format changes what an absent limit means:

Body JSON CSV
{"filter": {}, "limit": {"size": 500, "start": 1}} 500 rows from row 1 500 rows from row 1
{"filter": {}} Configured default page The complete data set
{"filter": {}, "limit": {}} Configured default page Error — an incomplete limit is rejected

CSV retrieval turns sorting off on purpose: it is what makes large exports fast, and CSV output is usually consumed by something that will sort it anyway.

Complete retrieval is expensive

Omitting limit in CSV mode downloads the whole data set. Page it unless you truly want everything.

CSV formatting is customizable through HTTP header options — the quoting character (double quotes by default), the escape character (a backslash by default), the end-of-line sequence (\n by default) and how nulls are represented. You are responsible for the combination producing well-formed CSV. The exact header names are not currently published, so ask your platform contact for them.

The other data set endpoints

Three more endpoints exist, and one of them is not what its URL suggests:

POST /north/v80/search/catalog/datasets
POST /north/v80/search/organizations/{organizationName}/datasets/{datasetId}
POST /north/v80/search/organizations/{organizationName}/datasets/{datasetId}/summary

search/catalog/datasets lists the data sets available to you.

The other two are not a mirror of the .../data read above: they take a different request body. The .../data endpoint uses the data set’s own dialect — sort as a declared identifier, select as an array of column names, no group. These two take the generic Data Lake search body, with sort as the {"parameters": [{"name": ..., "type": ...}]} object, select in its object form, and group available.

Endpoint Request body
datasets/provision/.../{identifier}/data Data set dialect: sort is a declared sort identifier
search/organizations/.../datasets/{datasetId} Generic Data Lake search body

Use .../data unless you specifically need the generic clauses. Which of the two is intended to be the long-term path has not been confirmed by the product team.

Data streams

A data stream is one measurement of a device — battery percentage, temperature, signal strength — and this API returns its current value, not its history.

Each instance has an alphanumeric identifier unique within its device. When that identifier matches a data stream template of the device’s data model, the instance inherits the template’s characteristics: units, period, tags and the rest. That is why a response carries not just a value but the metadata to interpret it.

Which store do I want?

You want Use
The latest reading of a measurement Data streams, this page
Values aggregated per hour, day or any period Time series
A flat table of chosen values across devices Data sets
Every raw value ever collected Data points, deprecated

Querying data streams

A standard Data Lake search:

POST /north/v80/search/datastreams
curl --request POST \
     --header "X-ApiKey: <your-api-key>" \
     --header "Content-Type: application/json" \
     --data '{"filter": {"eq": {"datastreams.datastreamId": "batteryPercentage"}}}' \
     https://api.opengate.es/north/v80/search/datastreams
{
  "page": { "number": 1 },
  "datastreams": [
    {
      "entityIdentifier": "device_battery_id",
      "datastreamId": "batteryPercentage",
      "name": "batteryPercentage",
      "unit": {
        "label": "%",
        "symbol": "%",
        "type": "basicSI"
      },
      "period": "INSTANT",
      "datamodelId": "teliot",
      "access": "READ",
      "channel": "battery_channel",
      "organization": "battery_organization",
      "_current": {
        "value": 100,
        "date": "2019-04-15T09:18:43.926Z",
        "at": "2019-04-15T09:18:43.926Z"
      }
    }
  ]
}

Reading the response

Field Holds
datastreamId, name The measurement’s identifier and display name
entityIdentifier The device the value belongs to
unit Label, symbol and type, so the number is interpretable
period How often the value is expected, INSTANT for on-change values
datamodelId The data model the definition comes from
access Whether the stream is readable, writable or both
_current.value The value itself
_current.date When the platform recorded it
_current.at When the measurement was actually taken

The distinction between date and at matters when a device buffers readings and reports them later: at is the truth about the measurement, date is when OpenGate learned about it.

Filter fields are prefixed datastreams., and results come back as JSON by default or as CSV through header options.

API specification

Time series

Limited access

This feature is only available to root and super_admin_domain profiles. Ask your administrator for proper user role profiling.

What a time series is

A time series turns the stream of values a device sends into a table of rows over time: one row per device per time period, with each column holding a value aggregated over that period.

Ask for the average temperature per hour of ten thousand devices for the last month. Over data points that is millions of raw values to fetch and aggregate yourself. Over a time series it is already computed — the engine aggregated each hour as the data arrived.

That is the trade: you declare up front what you want aggregated and how, and in exchange the query is cheap.

Time buckets

The aggregation period is called a time bucket, and two fields define it:

Field Meaning
origin The starting date of the time series
timeBucket The length of each period in seconds, counted from origin

With an origin of 2022-01-01T00:00:00.000Z and a one hour bucket, the first period runs from 2022-01-01T00:00:00.001Z to 2022-01-01T01:00:00.000Z, the second from 2022-01-01T01:00:00.001Z to 2022-01-01T02:00:00.000Z, and so on:

2022-01-01T00:00:00.000Z -> 2022-01-01T01:00:00.000Z -> 2022-01-01T02:00:00.000Z ->...

Setting timeBucket to 0 seconds switches the engine into a different mode, storing every value instead of aggregating:

  • With only context columns defined, one record is saved per event received, and only when a column value actually changed — so you get a change log over time.
  • With aggregated columns defined, data is grouped by the at field of the incoming data points, and the aggregation function is applied when a new event arrives with the same at.

Which store do I want?

Time series Data points Data sets
Holds Values aggregated per period Every raw value Latest values, flat table
Rows One per device per bucket One per measurement One per device
Aggregation Computed on ingestion You compute it None
Best for Trends and history at scale Auditing exact readings Exports and tabular views

The two halves of the API

Defining a time series is administration: you declare the columns, their aggregation functions, the bucket length and the retention. Done once, usually by an administrator.

Querying a time series is what applications do every day: POST a filter and read rows back, as JSON or CSV.

The aggregation functions available to columns come from the time series functions catalog, which also lets you register your own.

API specification

Subsections of Time series

Defining a time series

Defining a time series is declaring, up front, what the engine should compute as data arrives. This is administration work: done once, changed rarely, and with consequences for data already stored — the last section of this page covers those.

Columns

A time series has four kinds of column, and only the first two are yours to name freely.

Aggregated columns (columns)

These hold a value aggregated over each time bucket. Each one names an aggregation function, and the engine re-applies it every time new data lands in an existing row. The available functions come from the time series functions catalog.

When timeBucket is 0, all received data is stored instead of aggregated, and only FIRST (keep the first value) or LAST (overwrite with the newest) make sense. Two consequences worth knowing:

  1. The search endpoint returns all the historical data collected.
  2. Several data streams can land in different columns of the same row when they share an at value.

When timeBucket is greater than 0, bucketColumn becomes required: it names the column the engine adds to search responses holding the end date of each bucket.

Context columns (context)

Context columns capture the value at the moment the bucket was created, and are never updated afterwards even if the aggregated columns keep changing. That is why they take no aggregation function. Use them for the things you want to know about the device at that point in time — its serial number, its firmware version, its subscription — so that a row is self-describing.

Identifier column (identifierColumn)

Required. It names the column that identifies the device, and always maps to provision.administration.identifier._current.value with filter=YES. The engine adds it to every row of every search result, using the name you chose.

Bucket columns (bucketColumn, bucketInitColumn)

Named by you, filled by the engine, holding the end and start instants of the bucket.

The path field

Every column and context needs a path, which the engine uses as a query to extract a data stream value and project it into the column. A path has two or three parts:

1. The data stream identifier — a data stream defined in an OpenGate data model.

Communication modules need an index

If the data stream id contains communicationModules[], the index is required: device.communicationModules[0].subscription.mobile.imsi

2. The data stream field — appended with a dot, one of:

_current.value · _current.date · _current.at · _current.feedId · _current.source · _current.sourceInfo

3. The value path — only when the data stream holds a JSON object or array, a JSONPath down to a primitive value.

What a column can be filtered by

Every column and context carries a filter value that decides how queries may use it:

Value Meaning
NO Not filterable. The default
YES Optional equality filter
ALWAYS Required equality filter: every query must constrain this column
RANGE Range filter, >, < and BETWEEN, as well as equality

RANGE is only allowed on numeric columns, integer and number. Columns of type date-time are always range-searchable whatever the value says, so you do not need RANGE for a bucket or a timestamp.

Retention

retention sets how long rows stay in the time series, in seconds. It cannot exceed the retention allowed by your organization’s policies.

The sorts section

Sorting is declared in the definition, not composed at query time. The sorts section holds a list of named sorts, each one an ordered list of columns with a direction, and a query then asks for a sort by its identifier.

"sorts": [
  {
    "identifier": "signalStrengthAsc",
    "description": "Sort by average signal strength ascending",
    "columns": [
      { "name": "Average Signal strength", "direction": "ASC" }
    ]
  },
  {
    "identifier": "bucket_id_desc",
    "columns": [
      { "name": "bucket_id", "direction": "DESC" }
    ]
  }
]
Field Rules
identifier Required, unique within the list. Letters, digits, spaces, _ and -. Generated as a UUID if you omit it, which makes it awkward to use, so name it
description Optional free text, for whoever reads the definition later
columns Required, at least one. Each entry is a column name from the columns or context sections plus a direction of ASC or DESC

At least one sort is mandatory. Order matters inside columns: the list is the sort precedence.

The reverse of every sort comes for free

For each sort you declare, OpenGate also exposes its reverse, served by the same index through a reverse scan. Those appear in the definition marked derived: true, which is read-only: the platform sets it and the web console uses it. Never declare a derived sort yourself on create or update — flip the direction of an existing one and you are duplicating an index you already have.

Filtering and sorting limits

There is no fixed maximum number of filterable columns or declared sorts. Instead, each filterable column, each context and each declared sort consumes optimization units, and each time series has a budget of them. That budget is the real limit, and it is what keeps queries fast.

Where to look What it tells you
The searchOptimizationInfo section of a time series usedSearchOptimizationUnits and freeSearchOptimizationUnits
POST .../optimizationPlan What a definition would consume, before you commit to it

Simulate with optimizationPlan while you are still designing. It is much cheaper than discovering the budget is spent after the fact — and since the reverse of each sort is free, declaring both directions wastes units for nothing.

Creating and updating

Creating a time series starts collecting data from devices into it. Updating one is where care is needed: changes can affect the data already stored or its structure, which triggers an adaptation process. Until that process finishes, dirty values can be present.

These fields can be modified:

Name · Description · IdentifierColumn · BucketColumn · BucketInitColumn · Retention · TimeBucket · Context · Columns · Sorts

Simulate the update before applying it

PUT accepts an onlyPlan query parameter. With onlyPlan=true nothing is modified: the response is a plan that summarizes the changes you asked for and explains their consequences, warning you where necessary. Default is false.

Use it on any non-trivial change. It is the difference between reading about dirty values and causing them.

Rules for columns and contexts:

  • Names are unique across all columns, contexts, the identifier and both bucket columns. You cannot rename something to a name already in use.
  • filter: ALWAYS is immutable. You cannot add or remove a column or context that has it, you cannot set it on an existing one, and you cannot change it away once it is set.
  • Paths cannot be edited. Remove the column and create it again, which gets you the same result.

Creation example

A daily time series (timeBucket: 86400) retained for 30 days, with one context column and one aggregated column summing the bytes a device sent:

curl --request POST \
     --header "X-ApiKey: <your-api-key>" \
     --header "Content-Type: application/json" \
     --data @timeserie.json \
     https://api.opengate.es/north/v80/timeseries/provision/organizations/{organizationName}

Content of timeserie.json:

{
  "name": "basic_timeserie",
  "organizationId": "organizationName",
  "description": "time series description",
  "timeBucket": 86400,
  "retention": 2592000,
  "origin": "2021-01-01 00:00:00+00:00",
  "bucketColumn": "bucket_id",
  "identifierColumn": "Admin Identifier",
  "context": [
    {
      "path": "provision.device.serialNumber._current.value",
      "name": "Prov serial",
      "filter": "YES"
    }
  ],
  "columns": [
    {
      "path": "device.communicationModules[].subscription.traffic.sentBytes._current.value",
      "name": "Daily sent bytes",
      "filter": "NO",
      "aggregationFunction": "SUM"
    }
  ],
  "sorts": [
    {
      "identifier": "bucket_id_desc",
      "description": "Most recent bucket first",
      "columns": [
        { "name": "bucket_id", "direction": "DESC" }
      ]
    }
  ]
}

The reverse of that sort, oldest bucket first, is available without declaring it.

Changing the time bucket

Buckets have a fixed length, so changing timeBucket changes the length of new ones. As a precaution, buckets in the future are deleted when you do this. The situations below are the edge cases worth understanding before you change it on a live time series.

Buckets that started before the change and end after it

The engine closes them at the instant of the update, and if needed the next bucket starts at that same instant and runs until the following one would start according to the new definition.

Changing time bucket to a lower value Changing the time bucket to a lower value

Changing time bucket to a bigger value Changing the time bucket to a bigger value

Devices with no buckets yet

Adaptation only applies to devices that collected data before the change. A device whose first data arrives after the update simply gets a bucket following the new definition.

Changing time bucket before first device data collection Changing the time bucket before the first data collection of a device

Both at once

Combine the two and different devices end up with buckets that do not line up with each other. A device can also collect data belonging to a bucket in the past: if that bucket exists the engine uses it as is, otherwise it creates a new one following the new definition. Both are the price of changing the bucket length.

Two devices with different buckets after changing time bucket Two devices with different buckets after changing the time bucket

Two devices with different buckets in the past after changing time bucket Two devices with different buckets in the past after changing the time bucket

From zero to a higher value

Going from timeBucket: 0 to a real length means each collection now creates a bucket of the new length. Zero-length buckets that the new bucket would overlap are absorbed rather than left behind, and their values feed the aggregation functions of each column.

Changing time bucket from zero to higher value Changing the time bucket from zero to a higher value

Deleting

DELETE /north/v80/timeseries/provision/organizations/{organizationName}/{identifier}

Removes the time series identified in the URL. Confirm the identifier before sending the request.

Querying a time series

Reading a time series is a POST with a JSON body, like every other OpenGate query:

POST /north/v80/timeseries/provision/organizations/{organizationName}/{identifier}/data

Copy this and change the identifiers:

curl --request POST \
     --header "X-ApiKey: <your-api-key>" \
     --header "Content-Type: application/json" \
     --data '{"filter": {"eq": {"Prov Identifier": "MyDevice1"}}, "sort": "EntityAscBucketDesc"}' \
     https://api.opengate.es/north/v80/timeseries/provision/organizations/{organizationName}/{identifier}/data

The response is a columns array naming the fields and a data array of rows in that order:

{
  "page": { "number": 26 },
  "columns": ["Bucket id", "Prov identifier", "Manufacturer", "ICC", "Daily sent bytes", "Daily received bytes", "Last presence", "Average Signal strength"],
  "data": [
    ["2021-04-06T12:00:00.000Z", "MyDevice1", "OpenGate", "icc1", 23500, 532, "IP", 75],
    ["2021-04-06T12:01:00.000Z", "MyDevice1", "OpenGate", "icc1", 3500, 14532, "IP", 65]
  ]
}

The request body

Clause Accepts
filter The standard operators, keyed by bucketColumn, identifierColumn, columns.name or context.name
sort A string: the identifier of one of the sorts declared in the time series, not a list of fields
select The same keys as filter
limit start and size, as everywhere else

Two things differ from a plain Data Lake search, and both come from the time series being pre-computed: you can only filter on columns declared filterable, and you can only sort by sorts declared in the definition. See Defining a time series for how those are declared, and Query dialects for the full comparison.

Column order when you omit select

columns tells you the order, so read values off it rather than hardcoding positions. If you do depend on the order, it is:

  1. The bucketColumn, holding the end date of the bucket
  2. The identifierColumn, holding provision.administration.identifier._current.value
  3. The context columns
  4. The aggregated columns

Asking for a sort

You do not compose an ordering in the request. You name one that already exists:

{ "filter": {}, "sort": "bucket_id_desc" }

Valid values are the identifier of any sort in the time series definition, plus the automatically exposed reverse of each one. So a definition declaring bucket_id_desc gives you both directions without declaring the second.

Read the definition to see what is available — GET the time series, or use expand=sorts, and the sorts list comes back with the derived ones included. There is no fixed limit on how many sorts a definition can hold; the constraint is the optimization unit budget, described in Defining a time series.

Pagination and CSV

The response format changes what limit means, which catches people out:

Body JSON CSV
{"filter": {}, "limit": {"size": 500, "start": 1}} 500 rows from row 1 500 rows from row 1
{"filter": {}} Configured default page Everything
{"filter": {}, "limit": {}} Configured default page Error — an incomplete limit is rejected

CSV retrieval also turns sorting off, deliberately, so that large exports stay fast. If you need ordered output, sort downstream or read JSON.

Complete retrieval is expensive

Omitting limit in CSV mode downloads the whole time series. Page it unless you truly want everything.

The CSV formatting itself — quoting character, escape character, end-of-line sequence and how nulls are represented — is set through HTTP header options, and you are responsible for the result being well-formed. The exact header names are not currently published, so ask your platform contact for them.

Aggregated read: one row per device

Besides reading buckets, you can collapse every bucket of a device into a single row:

POST /north/v80/timeseries/provision/organizations/{organizationName}/{identifier}/dataset

Here select.columns describes the output variables, each with the source column, an alias for the output name, and the aggregation function to apply across buckets:

{
  "filter": {
    "gt": { "bucket_id": "device_200" }
  },
  "limit": { "start": 1, "size": 50 },
  "select": {
    "columns": [
      { "column": "temperature", "alias": "first", "aggregation": "FIRST" },
      { "column": "temperature", "alias": "last",  "aggregation": "LAST" },
      { "column": "temperature", "alias": "avg",   "aggregation": "AVG" },
      { "column": "temperature", "alias": "max",   "aggregation": "MAX" },
      { "column": "temperature", "alias": "min",   "aggregation": "MIN" },
      { "column": "cpu",         "alias": "p_avg", "aggregation": "AVG" },
      { "column": "cpu",         "alias": "p_count", "aggregation": "COUNT" }
    ]
  }
}

filter and limit behave as above, and CSV output is available too. Two rules are specific to this endpoint:

  • The output is always sorted ascending by identifierColumn.
  • The identifierColumn is always included, added as the first column if you did not ask for it.

Parquet export

For bulk analytical work, a time series can be exported to a Parquet file:

POST /north/v80/timeseries/provision/organizations/{organizationName}/{identifier}/export
GET  /north/v80/timeseries/provision/organizations/{organizationName}/{identifier}/export

POST starts the export, GET reports the state of the current one. The output order is decided internally and cannot be changed.

Time Series Functions

Limited access

This feature is only available to root and super_admin_domain profiles. Ask your administrator for proper user role profiling.

Introduction

The objective of custom time series functions is to augment the capabilities of the default functions (see Common Platform Functions) through the addition of bespoke functions written in JavaScript. These functions will be managed through the creation of a catalogue tailored to the specific requirements of each organisation.

Common Platform Functions

A common catalogue will be established for all organisations, comprising default platform time series functions. The following functions have been defined:

  • FIRST: Please note that the engine will store only the first received value per time bucket. Consequently, the collection engine will ignore the following values obtained in the same time bucket.
  • LAST: Please note that the engine will store only the last received value per time bucket, overwriting the previous ones.
  • AVG: The engine will calculate the arithmetic mean of all values received within the specified time interval. This feature is only available for numeric values.
  • MAX: The engine will save the maximum value of all received values within the configured time frame. Please note that this feature is only available for numeric values.
  • MIN: The engine will save the lowest value of all received values within the configured time frame. This feature is only available for numeric values.
  • SUM: The engine will accumulate the total of all received values within the specified time interval. This feature is only available for numeric values.
  • COUNT: The engine will record the total number of values received in each time bucket for subsequent analysis.
  • MEDIAN: The engine will calculate the median of all received values within the configured time bucket. Please note that this feature is only available for numeric values.
  • GEO_AVG: The engine will calculate the geometric average of all received values within the configured time bucket. Please note that this feature is only available for numeric values.
  • VARIANCE: The engine will calculate the variance of all received values within the configured time bucket. Please note that this feature is only available for numeric values.
  • STD_DEVIATION: The engine will calculate the standard deviation of all received values within the configured time bucket. Please note that this feature is only available for numeric values.
Note

Please note that these functions will be available for querying with the API defined below. However, please be aware that it will not be possible to modify or delete them.

Custom Catalog

Each organisation will have access to a custom time series functions catalogue, which will enable them to manage their functions effectively. These functions can be used to define time series columns, which can then be referenced in the aggregationFunction field. The following example illustrates this process:

{
  "name": "basic_timeserie",
  "organizationId": "organizationName",
  "description": "time series description",
  "timeBucket": 86400,
  "retention": 2592000,
  "origin": "2021-01-01T00:00:00.000Z",
  "bucketColumn": "bucket_id",
  "identifierColumn": "Admin Identifier",
  "context": [
    ...
  ],
  "columns": [
      {
          "path":"some.path.A.value._current.value",
          "name":"columnaA",
          ...
          ...
          "aggregationFunction":"AVG", //platform aggregation function
      },
      
      
      {
          "path":"some.path.B.value._current.value",
          "name":"columnaB",
          ...
          ...
          "aggregationFunction":"myCustomTimeserieFunction" //custom function
      }
  ]
}
Warning

The defined API enables the modification of the script for the custom aggregation function. It should be noted that such modifications may result in changes to the aggregated data. Consequently, there is a possibility of inconsistencies between the new aggregated data and the previous values.

Note

The defined API permits the deletion of a custom aggregation function, provided that it is not utilised in any time series.

Custom Time series Function script

Considerations when developing Custom Aggregation Function:

The following are the code’s implicit input parameters:

  • receivedValues: an array of new values to be used for the final value calculation.

  • currentValue: the column’s current value.

  • extra: JSON object containing the current extra variables for the column, used for the value calculation. The code should utilise implicit input values to calculate the final value and subsequently construct the result object. It will be possible to use helper functions defined in the JS API. The code must return a JSON with three specific properties:

  • executionResult: If the execution was completed successfully, the OK value must be returned. If not, an error description must be provided.

  • value: The calculated value

  • extra: A JSON with the updated extra variables

    ```json
    {
      "executionResult": "OK",
      "value": 5, 
      "extra":{
        "sum": 10,
        "count": 2
      }
    }
    ```
    
Note

Any datetime values included in the ‘receivedValues’ input parameter will be formatted as an ISO string.

Note

For further details on how to implement custom aggregation functions, please refer to the JavaScript API documentation, specifically the section on aggregation functions.

Functions values types

To confirm that a time series function can be assigned to a time series column, the valueTypes field will be used. This field is an array of strings that accepts the following values:

  • integer
  • number
  • string
  • boolean
  • date-time

These types are the same as those specified for time series column type fields. When assigning a time series function to a specific column, the system will verify that the time series function in the array matches the type specified for that column.

Note

Please note that this field is not mandatory. If it is not defined by default, it will be set to an empty array. In the event that the time series function has empty valueTypes, no validation will be carried out when assigning to a column.

Note

Please note that it will not be possible to update the time series function and remove one of the ‘valueTypes’ if the function is being used by some column whose type is the removed value. However, if all valueTypes are removed, this should not cause any issues.

Comprehensive API actions

Existing Timeseries Functions List

Getting custom timeserie functions full catalog

In both instances, only the metadata will be retrieved (no script) from both the organisations’ custom timeseries functions and the platform timeseries functions.

Usage examples

Get the full time series functions catalog (organization custom functions plus platform functions, metadata only):

curl --request GET \
     --header "X-ApiKey: <your-api-key>" \
     https://api.opengate.es/north/v80/timeseries/provision/organizations/{organizationName}/catalog

Trimmed JSON response:

[
  {
    "id": "01234567890abcdeffffffff",
    "name": "customAvg",
    "description": "Custom implementation for avg function.",
    "valueType": ["integer", "number"],
    "catalog": "ORGANIZATION"
  },
  {
    "id": "AVG",
    "name": "AVG",
    "description": "The engine will calculate the arithmetic average of all received values in the configured time bucket. Only available in numeric values.",
    "valueType": ["integer", "number"],
    "catalog": "PLATFORM"
  }
]

Create a new custom function (multipart request with a metadata JSON part and a script plain text part):

curl --request POST \
     --header "X-ApiKey: <your-api-key>" \
     --form 'metadata={"name": "customAvg", "description": "Custom implementation for avg function."};type=application/json' \
     --form 'script=@custom_avg.js;type=text/plain' \
     https://api.opengate.es/north/v80/timeseries/provision/organizations/{organizationName}/catalog

API specification

Subsections of Time Series Functions

JavaScript API

Timeseries functions JS API guide

This guide describes how to write Custom Timeseries Functions and the contents of the JS API.

The API contains both the implementation of some predefined timeseries functions and some useful functions that can be used when writing Custom Aggregation Functions.

Writing Custom Aggregation Function

Input parameters

All functions will have three implicit input parameters that must be used for value calculation.

  • receivedValues: Array of Json of collected values. Each value will have two fields:
    • value: collected value. value type depends on Column’s datastream type (please note that any datetime value will be formatted as an ISO string).
    • at: datetime of collected value. This value will be defined in ISO string.
  • currentValue: Columns current aggregated value. The type depends on aggregation function behavior.
  • extra: Json with useful data for aggregated value updating. In some cases, when aggregated value must be updated, some previous auxiliary data must be used to calculate new values. The fields and their format will be defined taking into account the requirements of the function. For example, if an average data must be updated, previously received number of elements and their sum are necessary to calculate correctly new average value.

receivedValues example:

"receivedValues":[
    {
        "value": 3,
        "at": "2023-03-01T00:30:00.000Z"
    },{
        "value": 5,
        "at": "2023-03-01T01:30:00.000Z"
    },{
        "value": 6,
        "at": "2023-03-01T02:30:00.000Z"
    },{
        "value": 8,
        "at": "2023-03-01T02:30:00.000Z"
    }
];

currentValue example:

"currentValue": 4;

extra example:

"extra": {
  "sum": 8,
  "count": 2  
};

Timeserie function result

Defined function must return a result with specific format. It will be a json with two parameters:

  • value: New calculated value.
  • extra: A JSON with auxiliary data updated. The content of this JSON will be the same of the extra input parameter.

Result example:

return {
    "executionResult": "OK",
    "value": 5,
    "extra": {
      "sum": 30,
      "count": 5  
    }
};

There is an auxiliary function that takes value and extra fields as parameters and returns the json with correct format. For further description of this function check documentation.

Result example using auxiliary function:

return result.ok(5, {"sum":30}, {"count":6});

If some timeserie function execution throws an exception it will be internally caught. In this case result object will be like this:

return {
    "executionResult": "Some javascript execution error message"
}

This behavior can be forced using result.error function with an Error object or an string message. For example:

return result.error(new Error("Custom error message"));
// or
return result.error("Custom error message");

Function implementation example

Taking described Input parameters and the Result to be returned into account, AVG Aggregation Function implementation example is shown here:

var newCount = receivedValues.length;
var newSum = 0;
for(var recVal in receivedValues){
    newSum = newSum + receivedValues[recVal].value;
}
if (extra) {
    if(data.exists(extra.count)) newCount = newCount + extra.count;
    if(data.exists(extra.sum)) newSum = newSum + extra.sum;
}
var newValue = newSum / newCount;
return result.ok(newValue, {"sum":newSum}, {"count":newCount});

JS API

data.exists(value)

Aux method to check if some value has value. If value is undefined or null it will return false.

Kind: global function
Returns: Boolean - Json with result.

Param Type Description
value any value to be checked.

Example of use:

if(data.exists(receivedValues[recVal].value)){
    newSum = newSum + receivedValues[recVal].value;
}

data.undefined2null(value)

Aux method to replace all undefined fields with null values. Internally used to avoid issues when processing execution result.

Kind: global function
Returns: Any - Json with result.

Param Type Description
value any value to be checked and transformed.

Example of use:

var newValue = data.undefined2null(undefined);

console.log(newValue) // null

result.ok(value, …extraParams)

Used to build aggregation function result object

Kind: global function
Returns: Object - Json with result.

Param Type Description
value any value to be used to update column data.
extraParams any List of parameters to be used to compound extra json. Each parameter must be a Json with unique parameter and value.

Example of use:

var newValue = result.ok(5, {"sum":30}, {"count":6});

result.error(error)

Internally used to build aggregation function result object when some execution exception is caught.

Kind: global function
Returns: Object - Json with result.

Param Type Description
error any Caught error. It can be Error type or String type

Example of use:

var newValue = result.error(new Error("Custom error message"));

aggFunct.AVG(receivedValues, currentValue, extra)

The engine will calculate the arithmetic average of all received values in the configured time bucket. Only available in numeric values.

Kind: global function
Returns: Object - Json with result.

Param Type Description
receivedValues Array Array of objects with new values to be used for final value calculation.
currentValue any Column’s current value.
extra Object JSON with auxiliary parameters for final value calculation.

Example of use:

var newValue = aggFunct.AVG(receivedValues, currentValue, extra);

aggFunct.COUNT(receivedValues, currentValue, extra)

The engine will store the count of total number values received per time bucket.

Kind: global function
Returns: Object - Json with result.

Param Type Description
receivedValues Array Array of objects with new values to be used for final value calculation.
currentValue any Column’s current value.
extra Object JSON with auxiliary parameters for final value calculation.

Example of use:

var newValue = aggFunct.COUNT(receivedValues, currentValue, extra);

aggFunct.FIRST(receivedValues, currentValue, extra)

The engine will store only the first received value per time bucket. The collection engine ignores the following values obtained in the same time bucket.

Kind: global function
Returns: Object - Json with result.

Param Type Description
receivedValues Array Array of objects with new values to be used for final value calculation.
currentValue any Column’s current value.
extra Object JSON with auxiliary parameters for final value calculation.

Example of use:

var newValue = aggFunct.FIRST(receivedValues, currentValue, extra);

aggFunct.GEO_AVG(receivedValues, currentValue, extra)

The engine will calculate the geometric average of all received values in the configured time bucket. Only available in numeric values.

Kind: global function
Returns: Object - Json with result.

Param Type Description
receivedValues Array Array of objects with new values to be used for final value calculation.
currentValue any Column’s current value.
extra Object JSON with auxiliary parameters for final value calculation.

Example of use:

var newValue = aggFunct.GEO_AVG(receivedValues, currentValue, extra);

aggFunct.LAST(receivedValues, currentValue, extra)

The engine will store only the last received value per time bucket, overwriting the previous ones.

Kind: global function
Returns: Object - Json with result.

Param Type Description
receivedValues Array Array of objects with new values to be used for final value calculation.
currentValue any Column’s current value.
extra Object JSON with auxiliary parameters for final value calculation.

Example of use:

var newValue = aggFunct.LAST(receivedValues, currentValue, extra);

aggFunct.MAX(receivedValues, currentValue, extra)

The engine will save the maximum value of all received values in the configured time bucket. Only available for numeric values.

Kind: global function
Returns: Object - Json with result.

Param Type Description
receivedValues Array Array of objects with new values to be used for final value calculation.
currentValue any Column’s current value.
extra Object JSON with auxiliary parameters for final value calculation.

Example of use:

var newValue = aggFunct.MAX(receivedValues, currentValue, extra);

aggFunct.MEDIAN(receivedValues, currentValue, extra)

The engine will calculate the median of all received values in the configured time bucket. Only available in numeric values.

Kind: global function
Returns: Object - Json with result.

Param Type Description
receivedValues Array Array of objects with new values to be used for final value calculation.
currentValue any Column’s current value.
extra Object JSON with auxiliary parameters for final value calculation.

Example of use:

var newValue = aggFunct.MEDIAN(receivedValues, currentValue, extra);

aggFunct.MIN(receivedValues, currentValue, extra)

The engine will save the minimum value of all received values in the configured time bucket. Only available for numeric values.

Kind: global function
Returns: Object - Json with result.

Param Type Description
receivedValues Array Array of objects with new values to be used for final value calculation.
currentValue any Column’s current value.
extra Object JSON with auxiliary parameters for final value calculation.

Example of use:

var newValue = aggFunct.MIN(receivedValues, currentValue, extra);

aggFunct.STD_DEVIATION(receivedValues, currentValue, extra)

The engine will calculate the standard deviation of all received values in the configured time bucket. Only available in numeric values.

Kind: global function
Returns: Object - Json with result.

Param Type Description
receivedValues Array Array of objects with new values to be used for final value calculation.
currentValue any Column’s current value.
extra Object JSON with auxiliary parameters for final value calculation.

Example of use:

var newValue = aggFunct.STD_DEVIATION(receivedValues, currentValue, extra);

aggFunct.SUM(receivedValues, currentValue, extra)

The engine will save the sum of all received values in the configured time bucket. Only available for numeric values.

Kind: global function
Returns: Object - Json with result.

Param Type Description
receivedValues Array Array of objects with new values to be used for final value calculation.
currentValue any Column’s current value.
extra Object JSON with auxiliary parameters for final value calculation.

Example of use:

var newValue = aggFunct.SUM(receivedValues, currentValue, extra);

aggFunct.VARIANCE(receivedValues, currentValue, extra)

The engine will calculate the variance of all received values in the configured time bucket. Only available in numeric values.

Kind: global function
Returns: Object - Json with result.

Param Type Description
receivedValues Array Array of objects with new values to be used for final value calculation.
currentValue any Column’s current value.
extra Object JSON with auxiliary parameters for final value calculation.

Example of use:

var newValue = aggFunct.VARIANCE(receivedValues, currentValue, extra);

log.trace(…msg)

Creates TRACE level logging messages. It concatenates msg parameters to compound message to be logged.

Kind: global function

Param Type Description
…msg any The function takes as parameters a list of elements to be concatenated to generate the string message to be printed.

Example of use:

log.trace("This is a trace message");

log.debug(…msg)

Creates DEBUG level logging messages. It concatenates msg parameters to compound message to be logged.

Kind: global function

Param Type Description
…msg any The function takes as parameters a list of elements to be concatenated to generate the string message to be printed.

Example of use:

log.debug("This is a debug message");

log.info(…msg)

Creates INFO level logging messages. It concatenates msg parameters to compound message to be logged.

Kind: global function

Param Type Description
…msg any The function takes as parameters a list of elements to be concatenated to generate the string message to be printed.

Example of use:

log.info("This is an info message");

log.warn(…msg)

Creates WARN level logging messages. It concatenates msg parameters to compound message to be logged.

Kind: global function

Param Type Description
…msg any The function takes as parameters a list of elements to be concatenated to generate the string message to be printed.

Example of use:

log.warn("This is a warn message");

log.error(…msg)

Creates ERROR level logging messages. It concatenates msg parameters to compound message to be logged.

Kind: global function

Param Type Description
…msg any The function takes as parameters a list of elements to be concatenated to generate the string message to be printed.

Example of use:

log.error("This is an error message");

date.fromString(stringDate)

Create Date object from ISO string.

Kind: global function

Param Type Description
stringDate string Iso string date

Example of use:

var parsedDate = date.fromString("2022-01-01T00:00:00.000Z");

date.toString(date)

Returns iso string representation of Date object.

Kind: global function

Param Type Description
date Date Date object

Example of use:

var isoDate = date.toString(new Date());

date.compare(date1, date2)

Compares two dates. These dates can be passed as strings in ISO format or as Date objects. The result is:

  • 0: when both are equal.
  • negative: when date1 is lower than date2
  • positive: when date1 is higher than date2

Kind: global function

Param Type Description
date1 Date Date object
date2 Date Date object

Example of use:

var date1 = date.fromString("2022-01-01T00:00:00.000Z");
var date2 = date.fromString("2022-01-02T00:00:00.000Z");
var result = date.compare(date1, date2);

Analytics

Limited access

This feature is only available to root and super_admin_domain profiles. Ask your administrator for proper user role profiling.

Analytic tasks

An analytic task is a JSON document that describes an analysis over your stored data. The platform turns that document into the query it runs against the data store, so the task is a declaration of what to compute rather than code you write. Some of its fields are mandatory.

Where analytics actually happens

Analytics in OpenGate spans more than this API, and the working documentation lives elsewhere:

To Go to
Write and run analysis interactively, in Jupyter Lab Analytics and Datalab
Read and write platform data from Python The opengate-data library, in OpenGate Libraries
Run a notebook unattended, once or on a schedule Notebook scheduler
Query stored data directly over REST What you can query
Configure the platform’s AI settings The Analytics section of the web console

If you are looking for how to analyse your data, the Datalab how-to and the notebook scheduler are the practical route. This page covers only the analytic task API object.

Specification not currently published

The API specification for analytic tasks is not shipped with the documentation at the moment, so the endpoint reference is unavailable here. Ask your platform contact for the endpoint details in the meantime.

Notebook scheduler

Limited access

This feature is only available to root and super_admin_domain profiles. Ask your administrator for proper user role profiling.

What it is for

The notebooks you write in the OpenGate Data Lab are interactive by nature: you open Jupyter Lab, run cells, look at results. The notebook scheduler takes a notebook out of that interactive loop and runs it unattended — once, or on a repeating schedule — with parameters supplied from outside and an optional report kept for a number of days.

That turns a notebook into a scheduled job: a nightly aggregation, a weekly report, a periodic model retraining. See the Analytics and Datalab how-to for writing the notebooks themselves.

Each scheduled execution becomes a cron job in the platform’s Kubernetes cluster, which is why the API talks about cron jobs and cron patterns.

Endpoints

Authentication uses the Authorization header, not X-ApiKey.

To Call
List the notebooks available to you GET /planner/notebooks
Run one notebook now POST /planner/notebooks/{notebookId}/execute
Schedule a notebook POST /planner/schedulers
List your scheduled executions GET /planner/schedulers
Delete a scheduled execution DELETE /planner/schedulers/{cronjobId}
Check the service is up GET /planner/health-check
Read the service version GET /planner/nsversion

Running a notebook once

The body carries the parameters the notebook needs and what to do with its report:

{
  "generateReport": true,
  "reportRetentionDays": 2,
  "params": [
    { "name": "DB_URL", "value": "..." }
  ]
}
Field Meaning
generateReport Whether to produce a report of the execution
reportRetentionDays How many days to keep that report
params Name and value pairs passed to the notebook as environment parameters

Scheduling a notebook

Same body plus the notebook and a standard cron pattern:

{
  "notebookId": "12345678",
  "cronPattern": "*/5 * * * *",
  "generateReport": true,
  "reportRetentionDays": 2,
  "params": [
    { "name": "DB_URL", "value": "..." }
  ]
}

*/5 * * * * runs every five minutes. The five fields are, in order, minute, hour, day of month, month and day of week.

Reading your scheduled executions

GET /planner/schedulers returns the cron jobs belonging to the current user. Each one reports:

Field Holds
id The cron job identifier, which is what DELETE takes
notebook The notebook being run
schedule The cron pattern
lastExecutionTime When it last ran
params The parameters it passes
generateReport, reportRetentionDays The report settings
user The owner

A 204 No Content means you have no scheduled executions, not an error.

API specification

Operations

What is an operation?

An operation is an action that OpenGate executes on a remote entity: reboot a device, update its firmware, read or write its configuration parameters, run a diagnostic, change its administrative status. If data collection is how the platform reads from the field, operations are how it writes to it.

Operations are the answer to a question every IoT deployment eventually asks: I have fifty thousand devices in the field — how do I make them all do something, and how do I know whether it worked?

Why operations matter

They work at fleet scale. A single API request can target one device or every device matching a tag or a filter. OpenGate explodes that request into one operation per entity, tracks each one independently, and gives you both an aggregated summary and the per-entity detail.

They are asynchronous by nature, and modelled as such. A device may be asleep, roaming, or out of coverage. Operations have their own life cycle, with timeouts, retries, pause and resume, so a request that cannot be served right now is not a request that failed.

They are extensible without touching your code. An operation is identified by a name and a parameter object. Adding a new operation type to your organization does not change the API contract: the same POST endpoint executes REBOOT_EQUIPMENT today and your own CALIBRATE_SENSOR tomorrow.

They report progress, not just outcomes. Operations can be multi-step. A firmware update reports download progress, installation start and end, and the final result — so a two-hour update over a narrowband link is observable while it runs.

They are transport-agnostic. Back-office applications always talk to the same north API. How the operation actually reaches the device (HTTP, MQTT, a connector function) is resolved by the platform.

Operations act on the real world

A single request with a tag or a filter can reach thousands of entities, and cancelling a job does not roll back steps that already executed. Verify the target selection before activating a job.

The operation model

Five concepts carry the whole service:

flowchart TB
    OT["Operation type<br>REBOOT_EQUIPMENT<br>(what can be requested)"]
    TASK["Task<br>(a schedule)"]
    JOB["Job<br>(one execution over a target)"]
    OP1["Operation<br>device_1"]
    OP2["Operation<br>device_2"]
    OPN["Operation<br>device_N"]
    ST["Steps<br>progress and result<br>reported per entity"]

    OT --> JOB
    OT --> TASK
    TASK -->|"one job per scheduled run"| JOB
    JOB --> OP1
    JOB --> OP2
    JOB --> OPN
    OP1 --> ST
    OP2 --> ST
    OPN --> ST
Concept What it is Where it lives
Operation type The definition of an action: its name, its parameter schema and its steps. Cloned from the platform catalog or created by your organization. Operation types, Default catalog
Job One execution of an operation type over a target set of entities, with its own schedule, timeouts and retries. Jobs
Task A schedule that creates jobs over time — periodically, or on a weekly, monthly or yearly pattern. Tasks
Operation The execution on a single entity. A job with 300 targets produces 300 operations, each with its own status and result. Jobs, Status reference
Step A stage inside a single operation, with its own result and timestamp. Multi-step operations report each one as it happens. Execution flows

Two ways to execute

Job Task
Purpose Run an operation once Run an operation repeatedly over time
Endpoint POST /v80/operation/jobs POST /v80/operation/tasks
Timing Immediately, after a delay, or at a date Start date + repetition period or calendar pattern
Produces One set of operations One job per scheduled execution
Changes apply to The job itself, while it has not started The next executions, never the job already running

Run your first operation

Create a job that reboots two devices. The operation name and its parameters come from your organization’s operation types; everything else configures how the execution is managed:

curl --request POST \
     --header "X-ApiKey: <your-api-key>" \
     --header "Content-Type: application/json" \
     --data @job.json \
     https://api.opengate.es/v80/operation/jobs

Content of job.json:

{
  "job": {
    "request": {
      "name": "REBOOT_EQUIPMENT",
      "parameters": {
        "type": "HARDWARE"
      },
      "active": true,
      "notify": true,
      "schedule": {
        "start": {
          "date": "2010-12-11T10:10:00Z"
        },
        "stop": {
          "delayed": 300000
        }
      },
      "operationParameters": {
        "ackTimeout": 5000,
        "timeout": 60000,
        "retries": 0,
        "retriesDelay": 1000,
        "retryResultList": ["ERROR_PROCESSING"]
      },
      "target": {
        "append": {
          "entities": ["device_1", "device_2"]
        }
      }
    }
  }
}

The response returns 201 with a location header containing the job identifier. Read the job to follow its progress:

curl --request GET \
     --header "X-ApiKey: <your-api-key>" \
     https://api.opengate.es/v80/operation/jobs/a38f7735-dcef-4f5a-9ca4-b6a8f7517522

The report tells you how the execution is going across the whole target set (trimmed response):

{
  "id": "a38f7735-dcef-4f5a-9ca4-b6a8f7517522",
  "request": {
    "name": "REBOOT_EQUIPMENT",
    "parameters": {
      "TYPE": "HARDWARE"
    },
    "active": true,
    "notify": false,
    "user": "user@mail.com"
  },
  "report": {
    "execution": {
      "activatedDate": "2014-03-12T11:43:35Z",
      "startedDate": "2014-03-12T11:43:35Z",
      "finishedDate": "2014-03-12T11:44:52Z"
    },
    "summary": {
      "status": "FINISHED",
      "total": 3,
      "finished": {
        "total": 2,
        "successful": 1,
        "error": 0
      }
    }
  }
}

Where to go next

Subsections of Operations

Jobs

A job is one execution of an operation type over a target set of entities. Creating a job is the normal way to run an operation: you POST a job request, and OpenGate turns it into one operation per target entity.

POST /v80/operation/jobs

Anatomy of a job request

Section Purpose
name The operation type to execute, for example REBOOT_EQUIPMENT.
parameters The parameters of the operation itself. See Operation parameters.
target Which entities the operation runs on.
active Whether the job starts. false creates the job without launching it.
schedule When the job runs and when it gives up.
operationParameters Timeouts and retry policy applied to each individual operation.
notify Whether to notify the operation result by email or trap. Defaults to false.
callback URI to be notified on job progress instead of polling. See Callbacks.
userNotes Free-text notes attached to the job instance.

Selecting the target

There are three ways to reference the entities a job acts on, and they are mutually exclusive — a single job cannot mix entity lists, tags and filters.

An explicit list of entities

"target": { "append": { "entities": ["device_1", "device_2"] } }

The same parametrization is applied to every entity in the list. Two limits apply:

  • Entities per array: 100 by default.
  • Request body size: 300 KBytes by default.

Both are configurable per platform, so check the values with your administrator. To launch an operation over a larger list, create the job with active set to false and use PUT requests to append entities in batches, activating the job in the last call.

A tag

"target": { "append": { "tags": ["fleet_north"] } }

Only one tag name can be passed. OpenGate resolves the tag into the target set and builds the internal structure of the job; when that work finishes the job waits in IDLE if it is not active, or in SCHEDULED if it is.

A filter

"target": { "append": { "filter": { "eq": { "device.model": "MDL-1" } } } }

The filter is evaluated by the platform to resolve the target set. Previously created filters cannot be reused here — the filter must be inlined in the request.

The optional resourceType query string parameter restricts the filter to one entity type:

Value Entities considered
entity.device Devices
entity.asset Assets
entity.commsModule Communication modules
entity.subscription Subscriptions
entity.subscriber Subscribers
Filter targets cannot be updated

The target section of a filter-based job cannot be modified afterwards. To change the target set, deactivate the job and create a new one with the new filter.

Scheduling

The schedule block controls when the job runs. start accepts either an exact date or a delayed value in milliseconds; stop sets the deadline after which pending operations are cancelled.

Two optional modes refine how the operations are distributed inside that window.

Window

window restricts execution to given weekdays and a daily time range — useful when field interventions are only acceptable during a maintenance window.

Periods must be whole hours; intermediate periods are rejected:

Window Allowed
"start": "09:00:00Z""stop": "15:00:00Z" Yes
"start": "09:30:00Z""stop": "15:30:00Z" Yes
"start": "09:00:00Z""stop": "15:30:00Z" No

Scattering

scattering spreads the individual operations across the available time instead of firing them all at once. It exists to protect shared infrastructure — typically a mobile operator cell that would collapse if thousands of devices woke up simultaneously.

Field Meaning
maxSpread Percentage (0–100) of the job’s effective time used to spread operations. 0 runs as fast as possible, 100 spreads over the whole window. Default 0.
strategy.field Entity field used to group operations. Currently only subscription.collected.cellInfo.
strategy.factor Dispersion level (0–100) applied within each group. 0 clusters maximally, 100 scatters maximally. Default 0.
strategy.warningMaxRate Speed control in operations per second, to verify the resulting rate stays within maxSpread.

Per-operation timeouts and retries

operationParameters applies to each individual operation, not to the job as a whole:

Field Meaning
ackTimeout Milliseconds to wait for the device to accept the operation. On expiry the operation is cancelled.
timeout Milliseconds to wait for the operation to finish. Default 60000.
retries Number of retries when the operation gets no acknowledgement or times out. Default 0.
retriesDelay Milliseconds between retries.
retryResultList Results that trigger a retry. ERROR_TIMEOUT is always included.
Minimum internal timeout

OpenGate enforces a minimum internal timeout of 40 seconds, so timeout plus ackTimeout must be greater than that. The default of 60 seconds is a good starting point.

Job life cycle

A job’s status reflects the aggregate progress of all its operations:

stateDiagram-v2
    direction TB
    [*] --> IDLE: active=false
    [*] --> SCHEDULED: active=true<br>start delayed
    [*] --> IN_PROGRESS: active=true<br>start now

    IDLE --> SCHEDULED: active=true<br>start delayed
    IDLE --> IN_PROGRESS: active=true<br>start now
    SCHEDULED --> IDLE: active=false
    SCHEDULED --> IN_PROGRESS: start time<br>reached

    IN_PROGRESS --> PAUSED: active=false
    PAUSED --> IN_PROGRESS: active=true

    IN_PROGRESS --> FINISHED: all ok
    IN_PROGRESS --> FINISHED_WITH_ERRORS: with errors
    IN_PROGRESS --> CANCELLING_BY_USER: cancelled<br>by a user
    IN_PROGRESS --> CANCELLING_BY_ENGINE: timeout<br>reached
    SCHEDULED --> CANCELLING_BY_USER: cancelled<br>by a user
    CANCELLING_BY_USER --> CANCELLED: all operations<br>cancelled
    CANCELLING_BY_ENGINE --> TIMEOUT_CANCELLED: all operations<br>cancelled

    FINISHED --> [*]
    FINISHED_WITH_ERRORS --> [*]
    TIMEOUT_CANCELLED --> [*]
    CANCELLED --> [*]
Transition Trigger
Into IDLE The job is created or updated with active set to false.
Into SCHEDULED The job is active and its schedule.start is a date or a delay.
Into IN_PROGRESS The job is active with an immediate start, or the scheduled start time is reached.
IN_PROGRESSPAUSED active set to false on a running job.
PAUSEDIN_PROGRESS active set to true on a paused job.
Into FINISHED Every operation reached a final state successfully.
Into FINISHED_WITH_ERRORS Operations failed or were cancelled.
Into CANCELLING_BY_USER A user cancels the job, through the console or the API.
Into CANCELLING_BY_ENGINE The job’s timeout is reached, so the platform cancels it.
Into CANCELLED Every entity operation of a user-cancelled job finished cancelling.
Into TIMEOUT_CANCELLED The same, for a job the timeout cancelled.

Both cancelling states are transient: the job stays there until every one of its operations has finished cancelling, which on a job targeting thousands of entities is not instant.

One detail still unconfirmed

The specification defines what each state means but not which terminal state the engine path ends in. The pairing above — a user cancellation ending in CANCELLED, a timeout ending in TIMEOUT_CANCELLED — follows from their descriptions and is pending confirmation.

See the status reference for the complete list of job, operation and step values.

Reading the result

An execution involves as many entities as the target references, so one job explodes into many results. The API exposes both levels:

flowchart LR
    JOB["Job"] --> SUM["report.summary<br>one aggregated view<br>counters per state"]
    JOB --> RES["operations<br>one result per entity<br>status, result, steps"]
Endpoint Returns
GET /v80/operation/jobs/{jobId} The job request plus report.summary
GET /v80/operation/jobs/{jobId}/operations Paginated per-entity results
GET /v80/operation/jobs/{jobId}/operations/{id} A single entity’s result

The per-entity list is paginated with start and size parameters — necessary when a job targets thousands of entities. Each operation object carries its own status, result, description and steps array.

To be notified when the job starts and when it finishes instead of polling these endpoints, configure a callback.

Updating a job

PUT /v80/operation/jobs/{jobId}

A job can only be modified while active is false and it has not started. What you can change:

  • Request fields: active, notify, callback, userNotes, schedule.start, schedule.stop.
  • The target entity list, by appending or removing entities.

The same JSON size limit as in creation applies. In the last PUT, set active to true to start the execution.

Pause and resume

The same endpoint controls a running job through the active field:

  • Pause: set active to false on a job in IN_PROGRESS. The job moves to PAUSED. While paused, the job’s features cannot be modified.
  • Resume: set active to true on a paused job. The job returns to IN_PROGRESS.

Cancelling a job

DELETE /v80/operation/jobs/{jobId}

The job moves to CANCELLING_BY_USER first — or to CANCELLING_BY_ENGINE when the platform itself cancels it — and to CANCELLED once all of its operations are cancelled.

Cancellation does not roll back

Cancelling a job does not undo steps that already executed on the devices. A firmware update cancelled halfway leaves the device halfway. Be deliberate.

Searching jobs and operations

Job and operation searches follow the platform’s standard search pattern, with support for filtering, sorting, field selection and summaries:

POST /v80/search/jobs
POST /v80/search/jobs/summary
POST /v80/search/entities/devices/operations
POST /v80/search/entities/operations/history

Equivalent endpoints exist for subscribers and subscriptions. Results are returned as JSON by default, or as CSV through HTTP header options. The full parameter list is in the API reference.

Tasks

A task is a schedule that creates jobs. Where a job runs an operation once, a task runs it again and again — every night, every Monday, the first day of every month — creating one job per execution.

POST /v80/operation/tasks

A task wraps a complete job request in its job.request field, so everything you know about jobs applies: the operation name, its parameters, the target, the per-operation timeouts and the callback. What the task adds on top is when and how often.

flowchart LR
    T["Task<br>schedule + job template"] --> J1["Job<br>run 1"]
    T --> J2["Job<br>run 2"]
    T --> JN["Job<br>run N"]
    J1 --> O1["operations<br>per entity"]
    J2 --> O2["operations<br>per entity"]
    JN --> ON["operations<br>per entity"]

The task schedule

Field Purpose
schedule.start First execution. Defaults to now when omitted.
schedule.stop When to stop: a date, a number of executions, or nothing at all — which means forever.
schedule.repeating.period Repeat every n time units.
schedule.repeating.pattern Repeat on a calendar pattern: weekly, monthly or yearly.
active When false, no jobs are launched.
state Current task state: ACTIVE, INACTIVE, FINISHED, CANCELLING, CANCELLED.

Repeating by period

period repeats on a fixed interval — each time units of unit, where unit is one of SECONDS, MINUTES, HOURS or DAYS.

Repeating by calendar pattern

pattern targets specific calendar positions, optionally pinned to a time of day in hh:mm:ssTZD format:

Pattern Fields Values
weekly days MON, TUE, WED, THU, FRI, SAT, SUN — at least one
monthly day, months Day 131; months JANDEC
yearly day, months Day 131; months JANDEC

Example: a reboot every Monday and Wednesday at 10:30 UTC, stopping after 10 executions.

{
  "task": {
    "id": "task_1",
    "name": "task_1_name",
    "description": "example task request",
    "active": true,
    "schedule": {
      "start": { "date": "2010-12-11T10:10:00Z" },
      "stop": { "executions": 10 },
      "repeating": {
        "period": { "each": 7, "unit": "DAYS" },
        "pattern": {
          "time": "10:30:00Z",
          "weekly": { "days": ["MON", "WED"] }
        }
      }
    },
    "job": {
      "request": {
        "name": "REBOOT_EQUIPMENT",
        "parameters": { "TYPE": "HARDWARE" },
        "schedule": { "stop": { "delayed": 300000 } },
        "notify": true,
        "operationParameters": {
          "ackTimeout": 5000,
          "timeout": 60000
        },
        "target": { "append": { "entities": ["device_1", "device_2"] } }
      }
    }
  }
}
Scheduling the job of a task

Inside job.request.schedule, the only valid form of start and stop is delayed — an exact date cannot be used, because the task itself decides when each job starts.

If id is omitted at creation, OpenGate generates a UUID. If provided, it must be unique.

Selecting the target

Target selection works exactly as in jobs, inside job.request.target: an explicit list of entities, a tag, or an inlined filter — never a combination of them. The same 300 KByte request size limit applies, and large target lists can be built up with successive PUT requests.

The optional resourceType query string parameter restricts a filter to a single entity type (entity.device, entity.asset, entity.commsModule, entity.subscription, entity.subscriber).

See selecting the target for the full description of the three modes and their limits.

Modifying a task

PUT /v80/operation/tasks/{taskId}

Changes apply to the next executions of the task, never to the job that is already running. This includes appending or removing target entities.

Listing the jobs created by a task

GET /v80/operation/tasks/{taskId}/jobs
GET /v80/tasks/{taskId}/entities

The first endpoint returns the jobs the task has produced, which is how you audit a recurring operation over time. Each of those jobs is read exactly like a standalone job.

Cancelling a task

DELETE /v80/operation/tasks/{taskId}

The task is marked CANCELLED. If the cancellation arrives while one of its jobs is running, the task stays in CANCELLING until that job finishes cancelling all of its operations.

Cancellation does not roll back

As with jobs, cancelling a task does not undo steps already executed on the devices.

Searching tasks

POST /v80/search/tasks

Tasks are searchable with the platform’s standard filter, sort and select clauses. Every field of the task object is available as a filter field, prefixed with tasks. — for example tasks.schedule.repeating.period.unit or tasks.job.request.name. See the API reference for the complete list.

Operation parameters

Parameters are what turn a generic operation type into a concrete instruction: not just reboot, but reboot the hardware; not just update, but install bundle 1.0.

There are two distinct parameter blocks in a job request, and confusing them is a common mistake:

Block Configures Defined by
parameters The operation itself — what the device must do The operation type’s JSON schema
operationParameters How the platform manages the execution — timeouts, retries The platform, identical for every operation type. See Jobs

Declaring parameters with JSON schema

As an operations administrator you declare an operation’s parameters with JSON Schema when creating or editing an operation type. JSON Schema gives you the whole range from a single enumerated string to nested objects and arrays, with validation and defaults.

Taking REBOOT_EQUIPMENT from the catalog as an example, its parameters are declared as:

{
    "type": "object",
    "properties": {
        "type": {
            "type": "string",
            "title": "Reboot Type",
            "enum": [
                "HARDWARE",
                "SOFTWARE"
            ],
            "default": "HARDWARE"
        }
    },
    "additionalProperties": false
}

Three things this declaration buys you:

  • Validation: a job requesting "type": "WARM" is rejected before reaching any device.
  • Defaults: omitting type yields HARDWARE.
  • A usable interface: title is what the OpenGate web console renders when a user launches the operation by hand, so a well-written schema also produces a well-formed form.

Setting additionalProperties to false, as above, rejects unknown parameters instead of silently ignoring them.

Filling parameters in a north API call

Back-office applications pass parameters as a plain JSON object matching the schema:

{
  "job": {
    "request": {
      "name": "REBOOT_EQUIPMENT",
      "parameters": {
        "type": "HARDWARE"
      },
      "active": true,
      "target": {
        "append": {
          "entities": ["device_1"]
        }
      }
    }
  }
}

If the operation type declares no parameters, the block can be omitted entirely.

How parameters reach the device

The platform does not forward your JSON object verbatim. It translates it into the south API format before delivering it to the device, where each parameter travels as a named, typed value inside the operation request.

The exact format the device receives is described in the device integration section. For a complete payload, including nested array parameters, see the update operation example.

Callbacks

Polling a job to know whether it has finished works, but it does not scale and it wastes time. A callback inverts the flow: OpenGate notifies your application over HTTP as the job progresses.

Enabling callbacks

Set the callback field of the job request to the URI you want to be notified on:

{
  "job": {
    "request": {
      "name": "REBOOT_EQUIPMENT",
      "callback": "http://[your_application_address]/[your_URI]",
      "target": { "append": { "entities": ["device_1"] } }
    }
  }
}
  • The URI follows the RFC 3986 format, and only HTTP transport is supported.
  • OpenGate appends the name of the specific callback to this URI when notifying, so a single base URI serves both notifications.
  • The HTTP method is always POST, with the payload as the request body.
  • An empty value disables callback notification.

Callbacks work for tasks too: configure callback inside task.job.request, and every job the task creates will notify.

The two notifications

sequenceDiagram
    participant App as Your application
    participant OG as OpenGate
    participant Dev as Devices

    App->>OG: POST /v80/operation/jobs
    OG-->>App: 201 Created + location
    Note over OG: target set resolved,<br>operations created,<br>schedule reached
    OG->>App: POST callback — job started
    OG->>Dev: operations dispatched
    Dev-->>OG: results per entity
    Note over OG: all operations finished,<br>cancelled or timed out
    OG->>App: POST callback — job finished
Callback Fired when Payload carries
Started The job begins executing — immediately, or when its schedule says so. id, request, report.execution
Finished The job is over: schedule terminated, job cancelled, or all operations completed. id, request, report.execution, report.summary, result with the first page of per-entity operations

Creating a job is not itself notified: the 201 Created response to your POST already tells you the job exists, and report.summary is available from GET /v80/operation/jobs/{jobId} from that moment on.

Job started callback

Fired when execution actually begins. For a scheduled job this happens when the scheduling parameters say so, which may be long after creation:

{
  "job": {
    "id": "33eb9dfa-7a87-41f7-9bad-7b5a26712fec",
    "request": {
      "name": "REBOOT_EQUIPMENT",
      "parameters": {
        "TYPE": "HARDWARE"
      },
      "notify": true,
      "user": "user@mail.com"
    },
    "report": {
      "execution": {
        "activatedDate": "2010-12-20T10:10:00.00Z",
        "startedDate": "2010-12-20T10:10:00.00Z",
        "finishedDate": ""
      }
    }
  }
}

Job finished callback

The most complete of the three. Besides the summary counters it includes the first page of per-entity results, so a small job needs no follow-up request at all. For larger jobs, page through the remaining results with GET /v80/operation/jobs/{jobId}/operations.

{
  "job": {
    "id": "33eb9dfa-7a87-41f7-9bad-7b5a26712fec",
    "request": {
      "name": "REBOOT_EQUIPMENT",
      "parameters": {
        "TYPE": "HARDWARE"
      },
      "notify": true,
      "user": "user@mail.com"
    },
    "report": {
      "execution": {
        "activatedDate": "2014-03-12T11:43:35Z",
        "startedDate": "2014-03-12T11:43:35Z",
        "finishedDate": "2014-03-12T11:44:52Z"
      },
      "summary": {
        "status": "FINISHED",
        "total": 3,
        "inProgress": {
          "total": 0,
          "scheduled": 0,
          "pendingExecution": 0,
          "waitingForConnection": 0,
          "started": 0
        },
        "finished": {
          "total": 2,
          "successful": 1,
          "error": 0,
          "cancelled": {
            "total": 1,
            "byEngine": 0,
            "byUser": 0,
            "byTimeout": 1,
            "byExternalTimeout": 0,
            "byExternal": 0
          }
        },
        "finishedOutOfTime": {
          "total": 1,
          "successful": 1,
          "error": 0
        }
      }
    },
    "result": {
      "page": {
        "number": 1,
        "of": 50
      },
      "operations": [
        {
          "operationId": "86dd3409-6fcd-49d4-be6b-b2fa497207ec",
          "entityId": "device_1",
          "resourceType": "entity.device",
          "name": "REBOOT_EQUIPMENT",
          "parameters": {
            "TYPE": "HARDWARE"
          },
          "notify": true,
          "execution": {
            "activatedDate": "2014-10-01T09:03:42Z",
            "startedDate": "2014-10-01T09:03:45Z",
            "finishedDate": "2014-10-01T09:04:45Z"
          },
          "user": "user@mail.com",
          "status": "FINISHED",
          "result": "SUCCESSFUL",
          "description": "successful operation",
          "steps": [
            {
              "name": "RESET",
              "result": "SUCCESSFUL",
              "description": "Reset ok",
              "timestamp": "2012-09-27T16:46:02.10Z"
            }
          ]
        },
        {
          "operationId": "29891afd-5f4f-4b23-800e-586bd4ecb0eb",
          "entityId": "device_2",
          "resourceType": "entity.device",
          "name": "REBOOT_EQUIPMENT",
          "parameters": {
            "TYPE": "HARDWARE"
          },
          "notify": true,
          "execution": {
            "activatedDate": "2014-10-01T09:03:42Z",
            "startedDate": "2014-10-01T09:03:45Z",
            "finishedDate": "2014-10-01T09:04:45Z"
          },
          "user": "user@mail.com",
          "status": "FINISHED",
          "result": "SUCCESSFUL",
          "description": "successful operation",
          "steps": [
            {
              "name": "RESET",
              "result": "SUCCESSFUL",
              "description": "Reset ok",
              "timestamp": "2012-09-27T16:46:02.10Z"
            }
          ]
        }
      ]
    }
  }
}

Note that a job reaching the finished callback is not necessarily a job that succeeded: in this example status is FINISHED, but of the three operations one was cancelled by timeout and one finished out of time. Always read the counters, not just the status. See the status reference for what each value means.

Notifications versus callbacks

callback and notify are different mechanisms and can be used together:

Field Recipient Purpose
callback Your application, over HTTP Machine-to-machine job progress notification
notify The platform’s notification channels (email, trap) Human notification of the operation result

Execution flows

Everything on the jobs and tasks pages describes the north side of the service, the API your back-office application talks to. This page explains what happens on the south side, between OpenGate and the device — because that is what determines how long an operation takes, what progress you can observe, and why an operation can sit in WAITING_FOR_CONNECTION for hours.

Every operation has at least a minimum workflow to be fulfilled. Beyond that minimum, the flow depends on what the device is capable of.

Who starts the conversation

Flow Who initiates When it fits
Platform-driven OpenGate contacts the device The device is reachable and exposes an endpoint
Device-driven The device asks OpenGate for pending operations The device sleeps, sits behind NAT, or has no public address

Device-driven operations are why an operation may report WAITING_FOR_CONNECTION: the work is queued and waiting for the device to show up.

Platform-driven flows

Synchronous

The whole operation is resolved in a single HTTP request and response. The device does the work and answers with the final result:

sequenceDiagram
    participant OG as OpenGate
    participant Dev as Device
    OG->>Dev: Operation request (HTTP POST)
    Note over Dev: executes the operation
    Dev-->>OG: Final response with result and steps (HTTP 201)

Simple and cheap, but it holds the connection for the whole execution — unsuitable for anything slow, such as a firmware download.

Asynchronous with a simple response

The device acknowledges the request immediately and reports the result later, in a request of its own:

sequenceDiagram
    participant OG as OpenGate
    participant Dev as Device
    OG->>Dev: Operation request (HTTP POST)
    Dev-->>OG: ACK (HTTP response)
    Note over Dev: executes the operation
    Dev->>OG: Response notification with result (HTTP POST)
    OG-->>Dev: ACK (HTTP 200)

Asynchronous with multiple responses

The device reports partial progress as it goes, and closes with a final response. This is what makes a long operation observable:

sequenceDiagram
    participant OG as OpenGate
    participant Dev as Device
    OG->>Dev: Operation request (HTTP POST)
    Dev-->>OG: ACK (HTTP response)
    Dev->>OG: Partial response — STEP in progress (HTTP POST)
    OG-->>Dev: ACK (HTTP 200)
    Dev->>OG: Partial response — next STEP (HTTP POST)
    OG-->>Dev: ACK (HTTP 200)
    Dev->>OG: Final response — last STEP and result (HTTP POST)
    OG-->>Dev: ACK (HTTP 200)

Each partial response updates the operation’s steps array, so a north API client polling the job — or receiving callbacks — sees the progress accumulate.

Device-driven flow

The device polls OpenGate for work, executes what it gets, and reports back:

sequenceDiagram
    participant Dev as Device
    participant OG as OpenGate
    Dev->>OG: Ask for pending operations (HTTP GET)
    OG-->>Dev: Pending operation request
    Note over Dev: executes the operation
    Dev->>OG: Response notification with result (HTTP POST)
    OG-->>Dev: ACK (HTTP 200)

Single-step versus multi-step operations

The flow strategy above is about transport. Independently of it, an operation is either atomic or composed of steps:

Structure What the device reports Observability
Simple request/response One result, no intermediate stages Success or failure, nothing in between
Multi-step A declared list of steps, each with its own result and timestamp Progress while the operation runs

A multi-step operation can report all its steps in one response, or spread them across partial responses until the final step is reached. The step list belongs to the operation type definition: it is declared once, and every execution reports against it.

Where to go from here

The diagrams above are summaries. The complete south API — endpoints, ports, request and response schemas, security requirements and the full flow diagrams — lives in the device integration section:

For a real multi-step flow end to end, see the update operation example.

Status reference

Every value OpenGate can report about an operation, in one place. Use this page when you are reading a job report, a per-entity result or a callback payload and need to know what a value means.

Three levels report status independently, and they answer different questions:

flowchart LR
    J["Job status<br>how is the whole execution going?"] --> O["Operation status and result<br>what happened on this entity?"]
    O --> S["Step results<br>which stages ran, and how?"]

Job status

The aggregate state of a job, in report.summary.status. See the job life cycle for the transitions between them.

Value Meaning
IDLE The job has been created but not started, because it is not active.
SCHEDULED The job is active and waiting for its scheduled start.
IN_PROGRESS The job has started.
PAUSED The job has been paused by setting active to false while running.
FINISHED All operations in the job have finished.
FINISHED_WITH_ERRORS The job finished with errors. Some operations may have succeeded while others failed or were cancelled, or all of them may have failed. errorCode and errorDescription are present in the summary.
TIMEOUT_CANCELLED The job was cancelled because the maximum timeout defined expired.
CANCELLING_BY_USER A user cancelled the job, and it is still cancelling its operations.
CANCELLING_BY_ENGINE The job’s timeout was reached, and it is still cancelling its operations.
CANCELLED The job and all of its operations have been cancelled.
Cancellation records who caused it

There is no plain CANCELLING: a job in the middle of cancelling always reports which side started it, CANCELLING_BY_USER or CANCELLING_BY_ENGINE. The two differ in cause, not in mechanics — a user asked, or the timeout ran out — and the same distinction appears at operation level in the finished.cancelled counters.

Operation status

The state of the operation on one entity, in each element of the operations list.

Value Meaning
PENDING The operation is pending to be started.
QUEUED The operation has been launched but has not reached the device yet.
WAITING_FOR_ACK The operation is waiting for an acknowledgement from the device to be started.
WAITING_FOR_CONNECTION The operation is waiting for the device to connect, when that option is enabled.
IN_PROGRESS The operation has started and is waiting for completion.
FINISHED The operation has been completed.
FINISHED_OUT_OF_TIME The operation finished and its result was collected, but outside the allowed time.
TIMEOUT_CANCELLED The operation was cancelled because the maximum timeout defined expired.
NOT_ALLOWED The operation cannot be executed over this entity.
CANCELLED The operation has been cancelled.

Operation result

Why an operation ended the way it did, in the result field. A FINISHED status with a non-successful result is normal: the execution completed, the outcome was negative.

Value Meaning
SUCCESSFUL The operation completed with success.
PARTIAL_SUCCESS The operation completed with partial success.
OPERATION_PENDING The operation is queued to be executed.
ERROR_IN_PARAM The operation cannot be executed because of an error in the parameters passed.
NOT_ALLOWED The operation execution is not allowed for this entity.
NOT_SUPPORTED The operation is not supported by the entity.
ALREADY_IN_PROGRESS The operation is already being executed.
ERROR_PROCESSING The operation finished with an unknown error.
ERROR_TIMEOUT The operation could not be completed because the device response timed out.
TIMEOUT_CANCELLED The operation was cancelled because the maximum timeout defined expired.
CANCELLED The operation was cancelled by a user or through the API.
CANCELLED_INTERNAL The operation was cancelled by the internal engine. Consult your platform administrator.
UNKNOWN_RESULT The operation returned a result the platform does not recognize. Consult your platform administrator.
Retry policy

Any of these results can be listed in the job’s operationParameters.retryResultList to trigger a retry. ERROR_TIMEOUT is always part of that list, whether you include it or not.

Step result

Each element of an operation’s steps array carries a name, a timestamp, an optional description, an optional response, and one of:

Value Meaning
SUCCESSFUL The step completed successfully.
ERROR The step failed.
SKIPPED The step was skipped.
NOT_EXECUTED The step did not run.

Not every declared step appears in every execution: a device only reports the steps it actually goes through. See execution flows for how steps are reported.

Task state

The state of a task, in its state field.

Value Meaning
ACTIVE The task is launching jobs according to its schedule.
INACTIVE The task exists but launches no jobs, because active is false.
FINISHED The task reached its stop condition — its end date or its number of executions.
CANCELLING The task has been cancelled and one of its jobs is still finishing.
CANCELLED The task has been cancelled.

Job summary counters

report.summary counts the operations of a job by state. The counters are what tell you whether a FINISHED job actually did what you wanted.

Counter Contains
total Total operations attempted.
inProgress.total Operations not finished yet.
inProgress.scheduled Operations scheduled but not launched.
inProgress.pendingExecution Operations queued for execution.
inProgress.waitingForConnection Operations waiting for the device to appear.
inProgress.started Operations already started.
finished.total Operations that reached a final state.
finished.successful Operations that finished successfully.
finished.error Operations that finished with an error.
finished.cancelled.total Cancelled operations, broken down by cause below.
finished.cancelled.byUser Cancelled by a user or through the API.
finished.cancelled.byEngine Cancelled by the platform engine.
finished.cancelled.byTimeout Cancelled because the operation timeout expired.
finished.cancelled.byExternalTimeout Cancelled because an external system timed out.
finished.cancelled.byExternal Cancelled by an external system.
finished.cancelled.byAlreadyInProgress Cancelled because the same operation was already running on that entity.
finishedOutOfTime.total Operations whose result arrived outside the allowed time.
finishedOutOfTime.successful Of those, the ones that succeeded.
finishedOutOfTime.error Of those, the ones that failed.
errorCode, errorDescription Present only when the job status is FINISHED_WITH_ERRORS.

Every counter above is also available as a search filter field, prefixed with jobs.report.summary. — so you can query, for example, all jobs with jobs.report.summary.finished.cancelled.byTimeout greater than zero. See the API reference for the complete field list.

Operation types

An operation type is the definition of an action: its name, its title and description, the entity types it applies to, its parameter schema and its steps. Nothing can be executed until an operation type for it exists in your organization.

There are two ways to get one:

  • Clone it from the platform catalog, for the operations OpenGate already implements. See the default operations catalog.
  • Create it from scratch, for actions specific to your devices.
Only your organization’s types are executable

Operation types from the platform catalog that have not been cloned into your organization cannot be executed. The catalog is a source to inherit from, not a set of ready-to-run operations.

Resource Contains
/v80/operationTypes/catalog The platform catalog, available to be cloned
/v80/operationTypes/provision/organizations/{organization} Your organization’s own operation types

What the API does

  • Retrieve the list of operations available to be cloned.
  • Create operations for an organization, either by cloning from the catalog or from scratch.
  • Retrieve a single operation from the catalog by name.
  • Update an operation previously created.
  • Delete an operation previously created.
  • Search the operations of an organization using the platform’s filters.
Viewer profile

GET and SEARCH are the only actions available to the viewer profile.

Creating an operation type

The response returns a location header with the URL of the new resource.

When the operation is cloned from the catalog, only name, description and title can be modified — the parameter schema, the steps and the applicability of a catalog operation are fixed. When created from scratch, you define all of it, including the parameter schema.

Restricting execution by profile

The optional profiles list names the user profiles authorized to execute the operation. By default, every profile except viewer can execute custom operations.

Available profile names:

  • advanced
  • admin_domain
  • super_admin_domain
  • admin
  • root

The list can be set at creation time or updated later. If omitted, the default access rules apply. Invalid profiles return 400 Bad Request with error detail; viewer is never permitted and also returns 400 if included.

Updating an operation type

For operations derived from the catalog, only name, description and title can be modified.

Searching operation types

Five filter fields are available, all optional:

Filter Selects by
name Operation name
applicableTo Entity type the operation applies to
models Device models the operation supports
fromCatalog Whether the operation was cloned from the platform catalog
profile Profiles authorized to execute it
Extended operation fields

Any parameter of the ExtendedOperation object can also be used as a filter field in operationTypes searches.

Usage examples

Read the operation types catalog:

curl --request GET \
     --header "X-ApiKey: <your-api-key>" \
     https://www.amplia-iiot.com/v80/operationTypes/catalog

Read a single operation type of your organization by its name:

curl --request GET \
     --header "X-ApiKey: <your-api-key>" \
     https://www.amplia-iiot.com/v80/operationTypes/provision/organizations/{organizationName}/REBOOT_EQUIPMENT

API specification

Default operations catalog

OpenGate ships a catalog of operations covering the actions devices commonly implement: reboots, factory resets, firmware and configuration updates, diagnostics, parameter reads and writes, clock setting, communications control. Each entry below is a definition you can clone into your organization as an operation type.

Name Description Applicable to Steps
ADMINISTRATIVE_STATUS_CHANGE Allows to change the administrative status of an entity
  • entity.device
  • entity.subscription
  • entity.subscriber
CONFIGURE_CONSOLE_PARAMETERS Configure the Console Parameters
  • entity.device
CONFIGURE_SECTIONALIZER_PARAMETERS Configure the Sectionalizer Parameters
  • entity.device
CONFIGURE_SECTIONALIZERS Configure a list of Sectionalizers
  • entity.device
EQUIPMENT_DIAGNOSTIC Equipment auodiagnostic
  • entity.device
FACTORY_RESET Remote factory reset
  • entity.device
GET_DEVICE_PARAMETERS Allows obtain values of a list of variables
  • entity.device
IoTAdeunis_set_parameters Set IoTAdeunis parameter
IoTAtimTM_set_parameters Set IoTAtimTM parameters
POWER_OFF_EQUIPMENT Powers offs equipment on target entity
  • entity.device
POWER_ON_EQUIPMENT Remote turn on
  • entity.device
REBOOT_EQUIPMENT Allows remotely reboot CHs
  • entity.device
REFRESH_INFO On demand retrieving the Info
  • entity.device
  • entity.subscription
  • entity.subscriber
REFRESH_LOCATION On demand retrieving the location
  • entity.device
REFRESH_PRESENCE On demand retrieving the Presence
  • entity.device
  • entity.subscription
RESET_COMMUNICATIONS reset a communications channel
  • entity.device
SEND_COMMAND Send a command to an entity
  • entity.device
SET_CLOCK_EQUIPMENT Allows to set to date the device internal clock
  • entity.device
SET_DEVICE_PARAMETERS Allows set values of a list of variables
  • entity.device
SHUT_DOWN_COMMUNICATIONS disable a specific communications channel
  • entity.device
SIM_REPLACEMENT
  • entity.subscription
STATUS_DIAGNOSTIC Remote factory reset
  • entity.device
  • entity.subscription
UPDATE Device Firmware, Software and Configuration Update
  • entity.device
WAKE_UP_COMMUNICATIONS enable a specific communications channel
  • entity.device

Take into consideration that:

  • Catalog entries must be cloned into your organization before they can be executed. See operation types.
  • The operations available in your organization can differ from the list above. OpenGate administrators can enable more operations or disable some of them.
  • The SMS capability is only available for the on-premise solution, and requires integration with an external service provider.

Besides this list, new operation types can be created from scratch to adapt OpenGate to specific solution needs.

Examples

Worked examples of complete operations. Each one shows the JSON documents exchanged through the north API, used by back-office applications, and through the south API, used by devices — so you can see how a single job request turns into what the device actually receives.

Subsections of Examples

Update operation

Software and firmware update is the most complete operation OpenGate models: it is long-running, multi-step, and its progress matters as much as its outcome. It is therefore a good example of the asynchronous flow with multiple responses.

Flow diagram

OpenGate suggests a complete flow covering all the possible stages of a device update. In the real world a device may implement only part of these steps — any number and kind of steps implemented by your device is supported.

sequenceDiagram
    participant OG as OpenGate connector
    participant Dev as Device

    OG->>Dev: Operation request (HTTP POST)
    Dev-->>OG: Response ACK (HTTP 200 OK)

    Note over OG,Dev: the device reports progress,<br>one notification per step

    Dev->>OG: STEP DOWNLOADFILE (0%)
    OG-->>Dev: ACK (HTTP 200 OK)
    Dev->>OG: STEP DOWNLOADFILE (x%)
    OG-->>Dev: ACK (HTTP 200 OK)
    Dev->>OG: STEP DOWNLOADFILE (100%)
    OG-->>Dev: ACK (HTTP 200 OK)
    Dev->>OG: STEP BEGINPREACTION
    OG-->>Dev: ACK (HTTP 200 OK)
    Dev->>OG: STEP ENDPREACTION
    OG-->>Dev: ACK (HTTP 200 OK)
    Dev->>OG: STEP BEGINPOSTACTION
    OG-->>Dev: ACK (HTTP 200 OK)
    Dev->>OG: STEP ENDPOSTACTION
    OG-->>Dev: ACK (HTTP 200 OK)
    Dev->>OG: STEP BEGININSTALL
    OG-->>Dev: ACK (HTTP 200 OK)
    Dev->>OG: STEP ENDINSTALL
    OG-->>Dev: ACK (HTTP 200 OK)
    Dev->>OG: STEP ENDUPDATE
    OG-->>Dev: ACK (HTTP 200 OK)

Each notification is an HTTP POST from the device carrying the operation response, and each ACK is OpenGate’s HTTP 200 reply. Every notification updates the operation’s steps array, so the north API sees the download percentage advance in real time.

The UPDATE operation type declares the following steps: ACCEPTED, BEGINUPDATE, DOWNLOADFILE, BEGINPREACTION, ENDPREACTION, BEGININSTALL, ENDINSTALL, BEGINPOSTACTION, ENDPOSTACTION and ENDUPDATE. See the status reference for the results a step can report.

North API invocation

Back office applications invoke device update operations through the ordinary jobs API — everything you know about jobs applies. What is specific to updates is the operation name and its parameters:

Device Update Example

{
    "job" :
    {
        "request" : {
            "name" : "UPDATE",
            "parameters": [
                {
                    "name" : "bundleName",
                    "type":"string",
                    "value" : {
                        "string" : "bundle_1"
                    }
                },
                {
                    "name" : "bundleVersion",
                    "type":"string",
                    "value" : {
                        "string" : "1.0"
                    }
                }
            ],
            "active" : true,
            "notify" : true,
            "callback" : "http://[your_application_address]/[your_URI]",

            "schedule" : {
                "start" : {
                  "date" : "2012-09-10T12:33:43Z"
                },
                "stop" : {
                  "delayed" : 300000
                }
            },
            "operationParameters" : {
                "ackTimeout" : 5000,
                "timeout" : 6000,
                "retries" : 0,
                "retriesDelay" : 1000,
                "retryResultList" : ["ERROR_PROCESSING"]
            },
            "target" : {
                "append" : {
                    "entities" : [ "device_1", "device_2" ]
                }
            }
        }
    }
}

South API invocation

This is the document the device receives from the platform. The deploymentElements array is what makes an update different from any other operation: it tells the device what to download, where to put it, in which order, and how to verify it.

See the device integration section for the endpoints and transport details:

Device Update Example

{
    "operation": {
        "request": {
            "timestamp": 1453822201099,
            "name": "UPDATE",
            "parameters": [
                {
                    "name": "bundleName",
                    "value": {
                        "string": "bundle_1"
                    }
                },
                {
                    "name": "bundleVersion",
                    "value": {
                        "string": "version_1"
                    }
                },
                {
                    "name": "deploymentElements",
                    "value": {
                        "array": [
                            {
                                "type": "FIRMWARE",
                                "downloadUrl": "http://[your_opengate_address]/bundles/74427c0c-a28c-4765-92ef-30010adb733d/1002/firmware-1_1.1.bin",
                                "path": "/home",
                                "order": 1,
                                "operation": "INSTALL",
                                "option": "OPTIONAL",
                                "validators": [
                                    {
                                        "type": "SHA-256",
                                        "value": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"
                                    }
                                ],
                                "size": 18
                            }
                        ]
                    }
                }
            ],
            "id": "072b08d1-0fcb-4a0c-a2d8-99773f9b9327"
        }
    }
}

API reference

The complete specification of the operations service: creating, reading, updating and cancelling jobs and tasks, retrieving per-entity operation results, and searching jobs, tasks and operation history.

Endpoint group Purpose
/v80/operation/jobs Create, read, update and cancel jobs
/v80/operation/jobs/{jobId}/operations Per-entity operation results of a job
/v80/operation/tasks Create, read, update and cancel tasks
/v80/operation/tasks/{taskId}/jobs Jobs produced by a task
/v80/search/jobs, /v80/search/tasks Search jobs and tasks, with summary variants
/v80/search/entities/{type}/operations Search operations by entity type
/v80/search/entities/operations/history Search historical operations

Data formats

OpenGate uses JSON as the interchange format in its RESTful interface.

Numbers

A number is an integer or a double-precision float. The property name is a string in double quotes, the value is not quoted:

Example property Value
time 1356695180301
value 299.99
maxValue 1.23e11
minValue -10.5

A number can be prefixed with a minus sign. The exponent portion, denoted by e or E, comes after the value and may carry an optional sign. Leading zeroes, octal and hexadecimal values are not allowed.

Dates

Dates and times follow ISO 8601:2004, and UTC is the time standard for all dates. The full format is YYYY-MM-DDThh:mm:ss.sTZD, for example 2021-07-16T19:20:30.00+01:00, as described in the ISO 8601 standard and in Date and Time Formats of W3C.

Precision Format Example
Year YYYY 2015
Year and month YYYY-MM 2015-10
Complete date YYYY-MM-DD 2015-10-06
Date plus hours and minutes YYYY-MM-DDThh:mm 2015-10-06T17:35
Date plus hours, minutes and seconds YYYY-MM-DDThh:mm:ss 2015-10-06T17:35:21
Date plus fraction of a second YYYY-MM-DDThh:mm:ss.s 2015-10-06T17:35:21.45
  • YYYY — four-digit year
  • MM — two-digit month, 01 for January
  • DD — two-digit day of month, 01 to 31
  • hh — two-digit hour, 00 to 23; am/pm is not allowed
  • mm — two-digit minute, 00 to 59
  • ss — two-digit second, 00 to 59
  • s — one or more digits for the decimal fraction of a second

Specification

Debugging

Two features of OpenGate let you run your own JavaScript inside the platform: connector functions, which translate what devices say, and rules, which react to what arrives. Both run server-side, on events you did not trigger, which makes the usual debugging reflexes useless — there is no console to watch.

This section is that console.

How it works

flowchart LR
    JS["Your JavaScript<br>connector function or rule"] -->|"logger.info(...)"| SVC["Functions logger<br>service"]
    SVC -->|"WebSocket stream"| YOU["Your terminal<br>or application"]

    classDef mine fill:#addcf8,stroke:#2b7cb8,color:#000
    class JS mine

Two halves, one page each:

Half What it is Page
Writing The logger object your script calls: trace, debug, info, warn, error JS Logging API
Reading A WebSocket you open to stream those traces live, filtered by level Functions Logger Service

It covers rules too

The service exposes one endpoint family per subject, and the only difference is the path and the identifier:

Subject Endpoint Identifier
Connector functions .../functions-logger/connectorFunctions/organizations/{org}/channels/{channel}/{cf-id} The connector function id
Rules .../functions-logger/rules/organizations/{org}/channels/{channel}/{rf-id} The rule id

Everything else — the mandatory X-ApiKey parameter, the level filter and the message format — is identical for both. See Functions Logger Service for the complete URIs.

Debugging in practice

A workflow rather than a list of features:

  1. Start with the script disabled. A connector function’s operationalStatus exists precisely so a half-written script never touches production devices: create it DISABLED, move to TEST against a test device, and only then to PRODUCTION.
  2. Log the inputs you did not expect, not the ones you did. The payload your script receives is whatever the device really sent, which is rarely what the datasheet promised.
  3. Subscribe at TRACE while you iterate, then raise the level. Each level includes the ones above it: WARN delivers ERROR and WARN, and nothing below.
  4. Remember the REST API barely parses your JavaScript. A script that was accepted at creation can still fail at runtime, and this is where you find out.
Levels filter delivery, not writing

level controls what the service sends you, not what your script writes. Leaving logger.trace calls in place costs nothing once you stop subscribing at TRACE, so there is no reason to strip them out when you are done debugging.

Subsections of Debugging

Functions Logger Service

Logger Websocket endpoints

Connector functions logger feature is available on this URL: wss://api.opengate.es/north/functions-logger/connectorFunctions/organizations/{organization_name}/channels/{channel_name}/{cf-id}

Rules logger feature is available on this URL: wss://api.opengate.es/north/functions-logger/rules/organizations/{organization_name}/channels/{channel_name}/{rf-id}

Websocket requires mandatory X-ApiKey url parameter to work

Another parameter to be set is logging level, used to define which traces must be sent to the client. This parameter is not mandatory and by default the INFO level will be used.

Here is a complete URI example for the connector functions logger:

wss://api.opengate.es/north/functions-logger/connectorFunctions/organizations/{organization_name}/channels/{channel_name}/{cf-id}?X-ApiKey={your-api-key}&level={logging-level}

Where:

  • organization_name: Organization name.
  • channel_name: Channel name.
  • cf-id: Connector function identifier.
  • your-api-key: API key of a valid user with permissions over the defined function.
  • logging-level: Specify logging granularity. Valid logging levels: ERROR, WARN, INFO, DEBUG, TRACE. If incorrect value is defined, INFO level will be used by Functions Logger service. Same level or higher level messages will be received. For example if WARN is defined in the path, ERROR and WARN traces will be received, but not INFO, DEBUG or TRACE.

After opening Websocket connection, the client will receive log messages with following format:

{
    "message": "message.",
    "level": "INFO",
    "timestamp": 1607108000000
}

Where

  • message: Printed trace in connector function.
  • level: Trace level. Possible values: ERROR, WARN, INFO, DEBUG, TRACE.
  • timestamp: Trace UTC timestamp in milliseconds.

JS Logging API

JS API guide for logging

This file provides methods to write logging traces.

Logger Object

The logger object is the main object for logging functions.

logger.trace(…msg)

Creates TRACE level logging messages. It concatenates msg parameters to compound message to be logged.

Kind: global function
Returns: Void

Param Type Description
…msg any The function takes as parameters a list of elements to be concatenated to generate the string message to be printed.

Example of use:

logger.trace('Operation sent to', host_var, ' and port ', port_var, '. Operation content: ', operation_var);

logger.debug(…msg)

Creates DEBUG level logging messages. It concatenates msg parameters to compound message to be logged.

Kind: global function
Returns: Void

Param Type Description
…msg any The function takes as parameters a list of elements to be concatenated to generate the string message to be printed.

Example of use:

logger.debug('Operation sent to', host_var, ' and port ', port_var, '. Operation content: ', operation_var);

logger.info(…msg)

Creates INFO level logging messages. It concatenates msg parameters to compound message to be logged.

Kind: global function
Returns: Void

Param Type Description
…msg any The function takes as parameters a list of elements to be concatenated to generate the string message to be printed.

Example of use:

logger.info('Operation sent to', host_var, ' and port ', port_var, '. Operation content: ', operation_var);

logger.warn(…msg)

Creates WARN level logging messages. It concatenates msg parameters to compound message to be logged.

Kind: global function
Returns: Void

Param Type Description
…msg any The function takes as parameters a list of elements to be concatenated to generate the string message to be printed.

Example of use:

logger.warn('Operation sent to', host_var, ' and port ', port_var, '. Operation content: ', operation_var);

logger.error(…msg)

Creates ERROR level logging messages. It concatenates msg parameters to compound message to be logged.

Kind: global function
Returns: Void

Param Type Description
…msg any The function takes as parameters a list of elements to be concatenated to generate the string message to be printed.

Example of use:

logger.error('Error connecting to host ', host_var, ' and port ', port_var, '. Stop processing');

Device integration

This is the south side of the platform: everything that happens between OpenGate and the things in the field. Where the north APIs are consumed by your applications, these are spoken by devices, gateways, sensors and machines.

The two conversations

Every integration comes down to two of them, in opposite directions:

flowchart LR
    DEV["Device"] -->|"data collection<br>pushes readings"| OG["OpenGate"]
    OG -->|"operations<br>asks for actions"| DEV
Conversation The device Documented in
Data collection Pushes inventory and business data: serial number, ICC, MSISDN, location, temperature, pressure, consumption HTTP · MQTT
Operations Receives operation requests and answers with the result HTTP · MQTT

The north side of operations — how an application launches them and reads the results — is in Operations.

Eleven protocols, two directions

OpenGate speaks eleven protocols, and the question that decides your architecture is which side opens the conversation:

Protocols The device needs
The device calls OpenGate HTTP · MQTT · WebSocket · CoAP · DLMS Outgoing connectivity only
OpenGate calls the device DLMS · DLMS Gas · IEC102 · SNMP · SSH · Telnet · ICMP To be reachable at an IP address

Plus RADIUS, where the counterpart is the operator’s network rather than a device.

Supported protocols is the full matrix: every protocol, who initiates, what it carries and where its documentation lives. Start there if you are deciding how to connect something.

Where to go For
HTTP · MQTT · WebSocket · CoAP The transports OpenGate listens on
Meter and industrial protocols DLMS, DLMS Gas, IEC102 and SNMP: the polling model
Remote access SSH, Telnet and ICMP
RADIUS accounting Network-side session reporting

When the device does not fit

Real fleets are not uniform. Two mechanisms absorb that:

  • Connector Functions let you run your own JavaScript inside the platform to translate between OpenGate and whatever the device actually speaks. This is the answer to almost every “our devices do it differently” problem.
  • Topology covers devices that are not reachable directly: gateways, mesh networks and the path that addresses a device several hops away.

Also here

Subsections of Device integration

Supported protocols

OpenGate does not ask your devices to change. It speaks eleven protocols, and the first thing to know about any of them is which side opens the conversation, because that decides your network architecture.

Devices that call OpenGate

The platform listens. The device needs outgoing connectivity and nothing else — no public address, no inbound firewall rule. This is what fits sleeping devices, NAT and mobile networks.

Protocol Carries Documented in
HTTP Data collection and operations, in both directions HTTP
MQTT Data collection, operation requests and responses over one persistent connection MQTT
WebSocket A persistent session for low-latency two-way messaging WebSocket
CoAP Data from constrained devices on constrained networks, over UDP or DTLS CoAP
DLMS Meter messages pushed by the device, identified by OBIS code Meter and industrial protocols

OpenGate that calls devices

Here the platform opens the conversation, from a connector function. The device must be reachable at an IP address — directly, through a VPN, or through a gateway.

Protocol Used for Documented in
DLMS Reading and writing meter attributes by OBIS code Meter and industrial protocols
DLMS Gas Smart Gas meters, across manufacturers, on top of DLMS Meter and industrial protocols
IEC102 Electricity meters: load curves, profiles, clock, with IP, VPN, GSM or ATR registration Meter and industrial protocols
SNMP Reading and writing OIDs on network equipment Meter and industrial protocols
SSH Running commands on a device shell Remote access
Telnet The same on legacy equipment without SSH Remote access
ICMP Ping, to prove a device is reachable Remote access

Network nodes that report to OpenGate

Protocol Carries Documented in
RADIUS Accounting packets from GGSN or RAS nodes about M2M network sessions RADIUS accounting

Note that here the counterpart is not the device but the operator’s network, which is why it is provisioned as a mobile-operator concern rather than a device one.

The one that is not a device protocol

Carries Documented in
Kite Querying and changing the status of a mobile subscription, through the operator’s connector Kite JavaScript API

It lives with the protocol APIs because a connector function calls it the same way, but no device is on the other end.

How this maps to the docs

Two kinds of page exist per protocol, and it is worth knowing which you want:

You are asking Read
How does an integration over this protocol work? The pages linked above
Which functions can my script call? The protocol APIs reference
One gap we know about

Modbus and SCADA appear in the product overview but have no technical documentation at all — not even a connector function reference. If you need either, ask your platform contact.

HTTP

The OpenGate Devices API is a REST interface that integrates devices, sensors and machines into the platform. It is the broadest of the south transports: it carries both conversations, in both directions.

The device Over HTTP it can Read
Pushes what it measured POST inventory data (serial number, ICC, MSISDN) and business data as data streams: location, temperature, pressure, consumption Data collection
Receives what to do Accept operation requests from OpenGate, or ask for the ones pending, and report the result Operations

Who calls whom

This is the part worth settling before implementing anything, because it decides which side needs a reachable endpoint:

Flow Who opens the connection The device needs
Data collection The device Outgoing HTTPS only
Operations driven by platform OpenGate To expose an endpoint OpenGate can reach
Operations driven by device The device Outgoing HTTPS only — it polls for pending operations

Devices that sleep, sit behind NAT or have no public address use the device-driven flow, which is the usual case in the field.

Before going to production, read the security tips for operations: HTTPS, X-ApiKey authentication and mutual TLS.

Subsections of HTTP

Data collection

Introduction

API to send raw IoT data to OpenGate.

HTTP data collection

This section shows how to use OpenGate HTTP connector for data collection.

The endpoint allows devices to send raw data to OpenGate.

It can be done by:

  • sending data points with their respective timestamps in different datastreams in a single request
  • sending data points without timestamp in different datastreams in a single request

Note about data streams with special platform processing

Besides the spec info you can find below, it’s worth considering that there are two data streams with special platform processing rules: device.identifier and device.topology.path.

These data streams match fields outside the list of data streams in the collection JSON. Due to this special treatment, these data streams will never be collected from the list of data streams; they will be collected from their fields in the collection JSON.

If you want to collect the data stream device.topology.path you have to fill in the field path of the collection JSON. Or, in case of the device is directly behind a gateway, you can remove the field path and fill in the field device in the collection JSON, OpenGate will collect the data stream device.topology.path with the gateway identifier.

Also, if you want to collect the data stream device.identifier you have to fill in the field device of the collection JSON. If you don’t fill in this field, OpenGate will collect the data stream device.identifier from the device_id (that is, the gateway) in the URI, and all the data in the data streams array will be stored in the gateway collected info.

Usage examples

Send the latest value of each data stream (no timestamp):

curl -X POST 'https://api.opengate.es/south/v80/devices/{device_id}/collect/iot' \
  -H 'X-ApiKey: <your-api-key>' \
  -H 'Content-Type: application/json' \
  -d '{
    "version": "1.0.0",
    "datastreams": [
      { "id": "example", "feed": "feed_1", "datapoints": [{ "value": 333 }] },
      { "id": "key", "feed": "feed_2", "datapoints": [{ "value": "value" }] },
      { "id": "datastream", "datapoints": [{ "value": 1337 }] }
    ]
  }'

Send one data stream with several timestamped data points:

curl -X POST 'https://api.opengate.es/south/v80/devices/{device_id}/collect/iot' \
  -H 'X-ApiKey: <your-api-key>' \
  -H 'Content-Type: application/json' \
  -d '{
    "version": "1.0.0",
    "datastreams": [
      {
        "id": "temperature",
        "feed": "feed_1",
        "datapoints": [
          { "at": 1431602523123, "value": 25 },
          { "at": 1431602523123, "value": 26 }
        ]
      }
    ]
  }'

A valid request returns HTTP 201.

API specification

Operations

Introduction to the Power of OpenGate Operations

OpenGate’s Operations feature is a powerful tool for managing and interacting with remote devices. By leveraging this feature, you can seamlessly integrate and control a wide array of remote devices, enabling unparalleled efficiency and flexibility in your IoT ecosystem.

Key Benefits of OpenGate Operations

  1. Remote Configuration: OpenGate allows you to configure devices remotely, ensuring that settings and updates can be applied without physical access. This feature reduces downtime and operational costs while enhancing device performance and reliability.

  2. Action Requests: With OpenGate, you can issue commands and requests to remote devices in real time, putting you in control and ensuring a responsive system. Whether it’s initiating a firmware update, performing diagnostics, or executing specific tasks, OpenGate ensures that your devices respond promptly and accurately.

  3. Enhanced Integration: The Operations feature seamlessly integrates with your existing systems, respecting and utilizing your current setup. This provides a unified platform for device management, simplifying workflows and enhancing the overall efficiency of your operations.

By utilizing OpenGate’s Operations feature, you can remotely manage, configure, and interact with your devices. This empowers you to maintain optimal performance and achieve greater control over your IoT network. This capability transforms how you manage remote devices, making your operations more agile and responsive to changing needs.

Flexible Operation Control with OpenGate

OpenGate’s Operations feature provides the flexibility to initiate and control operations from both the OpenGate platform and the remote devices themselves. This dual capability ensures that you can maintain optimal control and responsiveness, regardless of your operational needs or the specific scenarios you encounter.

Operation Initiation

  • Platform-Driven Operations: Initiate and manage operations directly from the OpenGate platform, allowing centralized control over device configurations, updates, and actions.
  • Device-Driven Operations: Remote devices can also ask for pending operations, providing a decentralized approach that can be tailored to specific device requirements and conditions.

Additional Resources

For more detailed information on how to utilize these capabilities, please refer to the following links:

These resources offer comprehensive guidance on initiating and managing operations securely, ensuring that your interactions with remote devices are both efficient and safe. By following these guidelines, you can maximize the potential of OpenGate’s Operations feature while maintaining robust security standards.

Subsections of Operations

Operations driven by platform

Introduction

OpenGate initiates communication with the device, requesting the execution of a specific operation. Upon receiving this request, the device can respond in either a synchronous or asynchronous manner, utilising the HTTP protocol.

Devices can expose this endpoint so that OpenGate can request operation executions on them.

Synchronous

The entirety of the operation is driven by a single HTTP request and response: the device executes the operation and returns the result in the response body of the same exchange.

sequenceDiagram
    participant OG as OG Connector
    participant Dev as Device

    rect rgb(240, 246, 255)
    Note over OG,Dev: Platform generated command
    OG->>+Dev: COMMAND (HTTP REQUEST -> POST)<br>Command Info (JSON)
    Note over Dev: executes the operation
    Dev-->>-OG: RESPONSE (HTTP RESPONSE) 201 Ok<br>Response Info (JSON)
    end

Asynchronous

In this instance, OpenGate transmits the operation to the device via an HTTP request, and the device responds with an acknowledgement through the utilisation of an HTTP response. Subsequently, OpenGate is capable of receiving one or multiple HTTP requests transmitted by the device. These HTTP requests can be employed by the device to convey the subsequent steps that the operation necessitates.

For further information on the endpoints exposed by OpenGate for the management of asynchronous operation communications, please refer to the section on operations driven by device.

Simple response

The device transmits a sole response message in order to respond to the request.

sequenceDiagram
    participant OG as OG Connector
    participant Dev as Device

    rect rgb(240, 246, 255)
    Note over OG,Dev: Platform generated command
    OG->>+Dev: COMMAND (HTTP REQUEST -> POST)<br>Command Info (JSON)
    Dev-->>-OG: COMMAND ACK (HTTP RESPONSE) 201 Ok
    end

    Note over Dev: executes the operation

    rect rgb(240, 246, 255)
    Note over OG,Dev: Device generated response
    Dev->>+OG: RESPONSE (HTTP REQUEST -> POST)<br>Response Info (JSON)
    OG-->>-Dev: RESPONSE ACK (HTTP RESPONSE) 201 Ok
    end

Multiple responses

The device can transmit a number of partial responses and a final response at the conclusion of the sequence.

Partial responses carry no resultCode: that is what marks them as intermediate. The final response includes it, closing the operation.

sequenceDiagram
    participant OG as OG Connector
    participant Dev as Device

    rect rgb(240, 246, 255)
    Note over OG,Dev: Platform generated command
    OG->>+Dev: COMMAND (HTTP REQUEST -> POST)<br>Command Info (JSON)
    Dev-->>-OG: COMMAND ACK (HTTP RESPONSE) 201 Ok
    end

    rect rgb(240, 246, 255)
    Note over OG,Dev: Device generated partial response
    Dev->>+OG: PARTIAL RESPONSE (HTTP REQUEST -> POST)<br>Response Info (without resultCode)
    OG-->>-Dev: RESPONSE ACK (HTTP RESPONSE) 201 Ok
    end

    Note over OG,Dev: one exchange per partial response

    rect rgb(240, 246, 255)
    Note over OG,Dev: Device final response
    Dev->>+OG: RESPONSE (HTTP REQUEST -> POST)<br>Response Info (JSON)
    OG-->>-Dev: RESPONSE ACK (HTTP RESPONSE) 201 Ok
    end

Operation structure

Simple request/response

The operation is comprised of a single request and a single response, which together constitute its entirety. There are no intermediate steps. It can be executed in either a synchronous or asynchronous manner, with the latter resulting in a simple response.

Multi-step response

In order to facilitate the monitoring of the operation, it is necessary to define a list of steps. The device is capable of providing information regarding these steps in a single response or in a series of partial responses until the final step is reached. The device can respond using either a synchronous or an asynchronous (simple or multiple responses) flow strategy.

Response structure

In regard to the JSON format, there is no distinction between synchronous and asynchronous responses.

  • Synchronous: The device incorporates the JSON payload into the HTTP response.
  • Asynchronous: The device incorporates the JSON payload into a new HTTP POST, which is initiated by the device itself.

API specification

Device HTTP ports

  • Unsecure (deprecated): 1123
  • Secure: 11235

Usage example

In this flow the device acts as the HTTP server: OpenGate sends the operation request to the endpoint exposed by the device. Request body sent by OpenGate:

{
  "operation": {
    "request": {
      "timestamp": 1614169437035,
      "name": "EQUIPMENT_DIAGNOSTIC",
      "parameters": {},
      "id": "27dfeb18-e13f-45eb-abcc-b8b215c30599"
    }
  }
}

Synchronous response body returned by the device with HTTP 201:

{
  "operation": {
    "response": {
      "id": "e05e4354-ffe0-4cfa-8030-f6b9500b64ab",
      "timestamp": 1432454278000,
      "deviceId": "device_1",
      "name": "EQUIPMENT_DIAGNOSTIC",
      "resultCode": "SUCCESS",
      "resultDescription": "No Error",
      "steps": [
        {
          "name": "MOTHER_BOARD",
          "timestamp": 1432454278000,
          "result": "SUCCESSFUL",
          "description": "Motherboard is Ok"
        }
      ]
    }
  }
}

Operations driven by device

Introduction

The typical use case is when the remote device, having been in a long sleep period, requests the pending operation requests stored in OpenGate.

sequenceDiagram
    participant OG as OG Connector
    participant Dev as Device

    rect rgb(240, 246, 255)
    Note over OG,Dev: Device polls for pending operation
    Dev->>+OG: Retrieve Op. Request (HTTP POST)
    OG-->>-Dev: RESPONSE ACK (HTTP RESPONSE) 201 Ok
    end

    rect rgb(240, 246, 255)
    Note over OG,Dev: Platform generated command
    Dev->>+OG: COMMAND (HTTP REQUEST -> POST)<br>Command Info (JSON)
    OG-->>-Dev: COMMAND ACK (HTTP RESPONSE) 201 Ok
    end

    rect rgb(240, 246, 255)
    Note over OG,Dev: Device generated response
    Dev->>+OG: RESPONSE (HTTP REQUEST -> POST)<br>Response Info (JSON)
    OG-->>-Dev: RESPONSE ACK (HTTP RESPONSE) 201 Ok
    end

Usage examples

Ask for pending operations:

curl -X POST 'https://api.opengate.es/south/v80/devices/{device_id}/operation/pending' \
  -H 'X-ApiKey: <your-api-key>' \
  -H 'Content-Type: application/json' \
  -d '{
    "trustedBoot": "ab2a2ed4-780d-11eb-9439-0242ac130002",
    "operation": {
      "request": {
        "deviceId": "6890af9e-781c-11eb-9439-0242ac130002",
        "path": ["gateway_001"]
      }
    }
  }'

Send an asynchronous operation response:

curl -X POST 'https://api.opengate.es/south/v80/devices/{device_id}/operation/response' \
  -H 'X-ApiKey: <your-api-key>' \
  -H 'Content-Type: application/json' \
  -d '{
    "version": "7.0",
    "operation": {
      "response": {
        "id": "e05e4354-ffe0-4cfa-8030-f6b9500b64ab",
        "timestamp": 1432454278000,
        "deviceId": "device_1",
        "name": "EQUIPMENT_DIAGNOSTIC",
        "resultCode": "SUCCESS",
        "resultDescription": "No Error",
        "steps": [
          {
            "name": "MOTHER_BOARD",
            "timestamp": 1432454278000,
            "result": "SUCCESSFUL",
            "description": "Motherboard is Ok"
          }
        ]
      }
    }
  }'

A valid request returns HTTP 201 with a Location header.

API specification

Security tips for operations

Tips to Ensure Security When Using OpenGate Operations

To ensure the security of your operations with OpenGate, follow these recommended practices:

  1. Use Encrypted Communication: Always use secure HTTP (HTTPS) for communication, utilizing the default TCP port 443. Unsecured HTTP communication (default TCP port 80) is deprecated and will soon be unsupported.

  2. Authentication Mechanisms: OpenGate requires authentication for all operations. There are two mechanisms you can use simultaneously for enhanced security:

    • API Key Authentication: Include the X-ApiKey HTTP header with the API key of a valid user in every request.
    • Mutual Authentication: Implement mutual authentication based on secure HTTP PKI infrastructure for an additional layer of security, ensuring the integrity and confidentiality of your communications.

By following these guidelines, you can enhance the security and reliability of your interactions with the OpenGate platform.

MQTT

OpenGate provides an MQTT connector that lets devices exchange messages with the platform using a single TCP connection: publish collected data, receive operation requests, send operation responses and ask for pending operations. The following sections describe how to connect, the default OpenGate topics, and how to handle data collection and operations over MQTT.

Subsections of MQTT

Data collection

MQTT data collection

This section shows how to use OpenGate MQTT connector for data collection.

Using MQTT, your devices only need one TCP connection to exchange messages with the platform: publish collected data, receive operation requests, send operation responses, ask for pending operations, etc.

How to connect to OpenGate MQTT connector

These are the parameters to establish a MQTT connection with OpenGate:

  • Host: api.opengate.es
  • Port: 1883
  • User: your-device-id
  • Password: your-api-key

Obtaining your API key

  1. Login onto the OpenGate web interface
  2. Click on the cogs that are at the top-right of the OpenGate home page
  3. Click on the User option
  4. Click on the “Click to show” link

Collecting data using mosquitto CLI tool

mosquitto is an open source MQTT client and server. The following example shows how to connect and publish data using OpenGate MQTT connector:

mosquitto_pub \
    -h api.opengate.es -p 1883 \
    -t odm/iot/your-device-id \
    -u your-device-id -P your-api-key \
    -m 'your-datastreams-as-json'

OpenGate default MQTT topics

  • To publish collected data: odm/iot/your-device-id
  • To subscribe to incoming operations from OpenGate: odm/request/your-device-id
  • To publish operation responses: odm/response/your-device-id

You have to replace your-device-id with the OpenGate unique identifier of your device.

Data collection payload

The payload definition in the section HTTP integration to collect data is entirely valid. You only have to add a "device": "your-device-id" field, filled with your OpenGate device unique identifier, at the top level of the JSON document with the collected values.

See the following example:

Publish to odm/iot/your-device-id topic this JSON:

{
  "version": "1.0.0",
  "device": "your-device-id",
  "datastreams": [
    {
      "id": "temperature",
      "datapoints": [{ "value": 24.1 }]
    }
  ]
}

Operations

MQTT operations

OpenGate default MQTT topics for operations

  • To subscribe to incoming operations from OpenGate: odm/request/your-device-id
  • To publish operation responses: odm/response/your-device-id

Replace your-device-id with the OpenGate unique identifier of your device.

Subsections of Operations

Examples

MQTT operation examples

Each example shows the complete flow of an operation over MQTT: the North API request that creates the operation job, the request message the device receives on its odm/request/your-device-id topic, and the response message the device publishes on its odm/response/your-device-id topic.

Subsections of Examples

Refresh info

Send the operation request to OpenGate

The following request creates the operation job that sends the operation to your device.

curl 'https://api.opengate.es/north/v80/operation/jobs' \
  -H 'X-ApiKey: your-api-key' \
  -H 'Content-Type: application/json' \
  -H 'Accept: */*' \
  --data '{
  "job": {
    "request": {
      "operationParameters": {
        "timeout": 90000,
        "retries": 0,
        "retriesDelay": 0
      },
      "name": "REFRESH_INFO",
      "schedule": {
        "stop": {
          "delayed": 120000
        }
      },
      "parameters": {},
      "target": {
        "append": {
          "entities": [
            "your-device-id"
          ]
        }
      },
      "active": true
    }
  }
}'

Receiving operation request into a device

You must be connected to OpenGate MQTT connector as a subscriber to topic odm/request/your-device-id, if so, then you’ll receive an operation request like this:

{
  "operation": {
    "request": {
      "timestamp": 1614239125800,
      "name": "REFRESH_INFO",
      "parameters": {},
      "id": "9ac30d2d-1401-4c2b-996f-e55882b6c5c4"
    }
  }
}

Answering the operation

Your device must publish a message to the topic odm/response/your-device-id to let OpenGate know it’s going to answer the operation:

{
  "operation": {
    "response": {
      "name": "REFRESH_INFO",
      "timestamp": 1614239127235,
      "resultDescription": "Success",
      "steps": [
        {
          "timestamp": 1614239127235,
          "description": "",
          "name": "REFRESH_INFO",
          "result": "SUCCESSFUL"
        }
      ],
      "deviceId": "your-device-id",
      "resultCode": "SUCCESSFUL",
      "id": "9ac30d2d-1401-4c2b-996f-e55882b6c5c4"
    }
  },
  "version": "1.0"
}

Fulfill the operation

Because this operation requests a full info refresh to your device, it must publish a new message with all the requested information to the topic odm/iot/your-device-id the message:

{
  "device": "your-device-id",
  "datastreams": [
    {
      "id": "device.serialNumber",
      "datapoints": [{ "value": "F71SL16NHG9G" }]
    },
    {
      "id": "device.model",
      "datapoints": [
        {
          "value": {
            "name": "OpenGateMqtt",
            "manufacturer": "OpenGate"
          }
        }
      ]
    },
    {
      "id": "device.birthDate",
      "datapoints": [{ "value": "2021-02-25 08:21:32" }]
    },
    {
      "id": "device.operationalStatus",
      "datapoints": [{ "value": "NORMAL" }]
    },
    {
      "id": "device.upTime",
      "datapoints": [{ "value": "1614237191" }]
    },
    {
      "id": "device.clock",
      "datapoints": [
        {
          "value": {
            "date": "2021-02-25",
            "time": "12:32:01"
          }
        }
      ]
    },
    {
      "id": "device.software",
      "datapoints": [
        {
          "value": [
            {
              "type": "FIRMWARE",
              "name": "v1.0.0"
            }
          ]
        }
      ]
    },
    {
      "id": "device.temperature.value",
      "datapoints": [{ "value": 19 }]
    },
    {
      "id": "device.communicationModules[].subscription.identifier",
      "datapoints": [{ "value": "346xxxxxxxx" }]
    },
    {
      "id": "device.communicationModules[].subscription.mobile.signalStrength",
      "datapoints": [{ "value": -80 }]
    },
    {
      "id": "device.communicationModules[].subscription.mobile.signalStrengthStatus",
      "datapoints": [{ "value": "NORMAL" }]
    },
    {
      "id": "device.communicationModules[].subscription.mobile.ratType",
      "datapoints": [{ "value": "LTE" }]
    }
  ],
  "version": "1.0.0"
}

Reboot equipment

Send the operation request to OpenGate

The following request creates the operation job that sends the operation to your device.

curl 'https://api.opengate.es/north/v80/operation/jobs' \
  -H 'X-ApiKey: your-api-key' \
  -H 'Content-Type: application/json' \
  -H 'Accept: */*' \
  --data '{
  "job": {
      "request": {
          "operationParameters": {
              "timeout": 90000,
              "retries": 0,
              "retriesDelay": 0
          },
          "name": "REBOOT_EQUIPMENT",
          "schedule": {
              "stop": {
                  "delayed": 120000
              }
          },
          "parameters": {
              "type": "HARDWARE"
          },
          "target": {
              "append": {
                  "entities": [
                      "649843"
                  ]
              }
          },
          "active": true
      }
  }
}'

Receiving operation request into a device

You must be connected to OpenGate MQTT connector as a subscriber to topic odm/request/your-device-id, if so, then you’ll receive an operation request like this:

{
  "operation": {
    "request": {
      "timestamp": 1614253699108,
      "name": "REBOOT_EQUIPMENT",
      "parameters": {
        "type": "HARDWARE"
      },
      "id": "05d17fb4-b2a8-49d8-8461-cda0d24f852b"
    }
  }
}

Answering the operation

Your device must publish a message to the topic odm/response/your-device-id to let OpenGate know it’s going to answer the operation:

{
  "operation": {
    "response": {
      "name": "REBOOT_EQUIPMENT",
      "timestamp": 1614253700835,
      "resultDescription": "Success",
      "steps": [
        {
          "timestamp": 1614253700835,
          "description": "The system will be rebooted",
          "name": "REBOOT_EQUIPMENT",
          "result": "SUCCESSFUL"
        }
      ],
      "deviceId": "649843",
      "resultCode": "SUCCESSFUL",
      "id": "05d17fb4-b2a8-49d8-8461-cda0d24f852b"
    }
  },
  "version": "1.0"
}

Equipment diagnostic

Send the operation request to OpenGate

The following request creates the operation job that sends the operation to your device.

curl 'https://api.opengate.es/north/v80/operation/jobs' \
  -H 'X-ApiKey: your-api-key' \
  -H 'Content-Type: application/json' \
  -H 'Accept: */*' \
  --data '{
  "job": {
    "request": {
      "operationParameters": {
        "timeout": 90000,
        "retries": 0,
        "retriesDelay": 0,
        "retryResultList" : []
      },
      "name": "EQUIPMENT_DIAGNOSTIC",
      "schedule": {
        "stop": {
          "delayed": 120000
        }
      },
      "parameters": {
        "type": "HARDWARE"
      },
      "target": {
        "append": {
          "entities": [
            "649843"
          ]
        }
      },
      "active": true
    }
  }
}'

Receiving operation request into a device

You must be connected to OpenGate MQTT connector as a subscriber to topic odm/request/your-device-id, if so, then you’ll receive an operation request like this:

{
  "operation": {
    "request": {
      "timestamp": 1614238879802,
      "name": "EQUIPMENT_DIAGNOSTIC",
      "parameters": {
        "type": "HARDWARE"
      },
      "id": "14502149-99f9-4348-93f1-23aea495811b"
    }
  }
}

Answering the operation

Your device must publish a message to the topic odm/response/your-device-id to let OpenGate know it’s going to answer the operation:

{
  "operation": {
    "response": {
      "name": "EQUIPMENT_DIAGNOSTIC",
      "timestamp": 1614238881241,
      "resultDescription": "Success",
      "steps": [
        {
          "timestamp": 1614238881241,
          "description": "System is OK",
          "name": "EQUIPMENT_DIAGNOSTIC",
          "result": "SUCCESSFUL"
        }
      ],
      "deviceId": "649843",
      "resultCode": "SUCCESSFUL",
      "id": "14502149-99f9-4348-93f1-23aea495811b"
    }
  },
  "version": "1.0"
}

Websocket

A WebSocket session keeps one connection open in both directions, which suits devices that need low-latency two-way messaging without re-establishing a connection for every message.

Connecting

wss://api.opengate.es:9955/south/v80/sessions/{device.id}
Port 9955
Path /south/v80/sessions/{device.id}
Authentication X-ApiKey, required

The API key can travel either way, whichever your WebSocket client makes easier:

As a header of the HTTP request that establishes the connection.

As a URL parameter named X-ApiKey:

wss://api.opengate.es:9955/south/v80/sessions/your-device-id?X-ApiKey={your-api-key}

Replace your-device-id and your-api-key with the values of your environment.

What travels over the session

The messages themselves are shaped by a connector function: the URI of the session is matched against the function’s southCriterias with the wss:// scheme, and the function decides what to do with each incoming message. To send a message back down an already open connection, use the WebSocket JavaScript API.

The contextParams your script receives include the session’s uri, its relative path and the sessionIp, which is how a single function can serve several session paths and tell them apart.

CoAP

The Constrained Application Protocol (CoAP) is a lightweight web transfer protocol (RFC 7252) designed for constrained nodes and networks. OpenGate operates exclusively as a CoAP listening server, receiving incoming request messages (e.g. for data collection or operational responses) sent by devices.

Note: OpenGate does not initiate outbound CoAP requests to external CoAP servers running on devices. All CoAP communications must be initiated by the device towards OpenGate.

Endpoints

OpenGate listens for CoAP requests on both unencrypted UDP and secure DTLS ports.

Scheme Port Transport / Security Example URI
coap:// 5683 Unencrypted (UDP) coap://api.opengate.es:5683/{meter_id}/{path}
coaps:// 30013 DTLS (Datagram Transport Layer Security) coaps://api.opengate.es:30013/{meter_id}/{path}

URI structure and south criteria

All CoAP URIs targeted by devices must place the device’s unique identifier ({meter_id}) at the beginning of the URL path:

coap://api.opengate.es:5683/{meter_id}/{path}
coaps://api.opengate.es:30013/{meter_id}/{path}
  • {meter_id}: The unique OpenGate identifier of the device.
  • {path}: The resource path matched against the south criteria in your connector functions.

For example, a connector function configured with south criteria = "coaps://data" will match requests sent to either coap://api.opengate.es:5683/{meter_id}/data or coaps://api.opengate.es:30013/{meter_id}/data.

Each manufacturer or device implementation defines its own specific paths ({path}) and payload formats (JSON, binary, etc.), which are translated into OpenGate data structures by corresponding connector functions.

Authentication

Every CoAP request sent to OpenGate must include API key authentication (X-ApiKey). In CoAP, authentication is delivered as a custom CoAP Option:

Property Value
CoAP Option Number 2502
Value Format A string containing your OpenGate API key
Requirement Required

Requests received without CoAP Option 2502 or with an invalid API key will be rejected by OpenGate as unauthorized.

Message processing and connector functions

Incoming CoAP requests are evaluated against configured connector functions:

  1. Routing: The request scheme (coap:// or coaps://) and URI path are matched against the south criteria defined in your connector functions.
  2. Execution: The matching connector function processes the request payload (such as JSON, binary data, etc).
  3. Response: OpenGate returns a CoAP response to the device. To customize the status code, content format, or body of the response sent back to the device, use the CoAP JavaScript API.

Subsections of CoAP

Data collection

Introduction

This section describes how constrained devices push telemetry, measurements, inventory, or custom data to OpenGate over the CoAP protocol.

Endpoint & URI Structure

Every CoAP data collection request sent by a device must include the unique device identifier ({meter_id}) at the beginning of the URI path:

coap://api.opengate.es:5683/{meter_id}/{path}
coaps://api.opengate.es:30013/{meter_id}/{path}
  • {meter_id}: The device identifier in OpenGate (e.g. device serial number, IMEI, meter ID).
  • {path}: The relative resource path defined by the device integration.

Matching South Criterias

The scheme (coap:// or coaps://) and {path} portion of the URI are evaluated against the southCriterias defined in your platform connector functions.

For example, if a connector function defines a southCriterias of "coaps://data", it will match requests sent to:

  • coap://api.opengate.es:5683/METER-12345/data
  • coaps://api.opengate.es:30013/METER-12345/data

Payload Formats & Manufacturer Flexibility

OpenGate does not enforce a single static payload format for CoAP data collection. Each device manufacturer or integration profile can define its own:

  • URI Resource Paths: e.g., /data, /telemetry, /v1/readings, /sensors.
  • Payload Encoding: JSON, CBOR (Concise Binary Object Representation), or vendor-specific binary formats suited for constrained devices and narrow bands.

The matching connector function parses the raw incoming byte payload and maps the measurements to standard OpenGate data streams.

Authentication

All requests must include API key authentication passed in CoAP Option 2502:

Property Value
CoAP Option Number 2502
Value Format String containing the OpenGate API key
Requirement Required

Example Flow

  1. The device sends a CoAP POST or PUT request:

    • Target URI: coaps://api.opengate.es:30013/METER-12345/data
    • Option 2502: <your-api-key>
    • Payload: Vendor-specific measurement payload.
  2. OpenGate matches the request to the connector function with southCriterias = "coaps://data".

  3. The connector function parses the payload, extracts data points for device METER-12345, and formats the response status using the CoAP JavaScript API:

// Example connector function snippet returning status 2.04 (CHANGED)
coap.server.response.status = 204;
coap.server.response.send();

Operations

Introduction

Because OpenGate operates exclusively as a CoAP listening server, the platform cannot initiate outbound CoAP connections to devices. Operation management over CoAP is therefore device-driven: devices periodically poll OpenGate for pending operation requests and report execution results back to the platform.

URI Structure & Device-Driven Workflow

All CoAP operation URIs must begin with the device unique identifier ({meter_id}):

coap://api.opengate.es:5683/{meter_id}/{path}
coaps://api.opengate.es:30013/{meter_id}/{path}

The operation workflow is typically split into two interaction endpoints defined via southCriterias:

1. Polling for Pending Operations

Devices periodically query OpenGate to check if there are pending operations queued for execution (e.g., firmware update requests, configuration changes, or remote commands).

  • Example Device URI: coaps://api.opengate.es:30013/{meter_id}/askForOperations
  • Matching southCriterias: coaps://askForOperations

Flow:

  1. The device sends a CoAP request (e.g., POST or GET) to /askForOperations with CoAP Option 2502 containing the API key.
  2. The connector function matching coaps://askForOperations retrieves pending operations assigned to {meter_id} from OpenGate.
  3. The connector function formats and returns the pending operations to the device in the CoAP response payload.

2. Reporting Operation Execution Results

Once a device finishes executing an operation, it sends a CoAP request back to OpenGate to report the execution outcome (e.g., SUCCESS, ERROR, or progress status).

  • Example Device URI: coaps://api.opengate.es:30013/{meter_id}/operationResults
  • Matching southCriterias: coaps://operationResults

Flow:

  1. The device sends a CoAP request (e.g., POST or PUT) containing the operation result payload.
  2. The connector function matching coaps://operationResults parses the result payload and updates the operation status in OpenGate.
  3. OpenGate returns a confirmation status (e.g., 2.04 Changed) via the CoAP JavaScript API.

Manufacturer & Payload Flexibility

Specific URIs and payload structures are defined per manufacturer or integration requirement. Different device models may use different relative paths (e.g., /pending-tasks, /report-outcome) and payload formats (JSON, CBOR, or binary).

Custom connector functions bridge the device-specific formats with OpenGate’s operation processing engine.

Authentication

All operation requests must carry API key authentication in CoAP Option 2502:

Property Value
CoAP Option Number 2502
Value Format String containing the OpenGate API key
Requirement Required

Meter and industrial protocols

These are the protocols where OpenGate opens the conversation. There is no south endpoint waiting for the device: a connector function reaches out, talks the protocol, and turns the answer into data points or an operation result.

The polling model

flowchart TB
    JOB["A job or task<br>launches an operation"] --> REQ["REQUEST connector function"]
    REQ -->|"opens the connection"| DEV["Meter or network device"]
    DEV -->|"attribute values"| REQ
    REQ --> OUT["Operation result<br>and collected data points"]

    classDef cf fill:#addcf8,stroke:#2b7cb8,color:#000,font-weight:bold
    class REQ cf

Three consequences worth planning for:

  • The device must be reachable at an IP address: directly, over a VPN, or through a gateway using a path.
  • Reading is an operation. You schedule meter readings with jobs and tasks, which is also how you get retries, timeouts and per-device results.
  • Connection parameters live in your script, taken from the device’s provisioned data. Keep credentials out of the code: read them from the entity object.

DLMS

The only protocol here that works in both directions.

Direction What happens
Device to platform The meter sends a DLMS message. A COLLECTION connector function receives it, with the obisCode and templateId of the message in contextParams and the attribute values in payload
Platform to device dlms.connect() opens a session, then dlms.addAttr() builds a list of attributes by class id, OBIS code and attribute id, and dlms.get() or dlms.set() executes it

Attributes are addressed the DLMS way — a class id, an OBIS code and an attribute id — and values carry explicit DLMS types such as octet-string, which the reference explains how to convert to dates and back.

Reference: DLMS JavaScript API

DLMS Gas

Smart Gas meters differ enough between manufacturers to make a generic DLMS script painful. dlms_gas absorbs that: it carries per-manufacturer behaviours — currently pietro, watertech, honeywell and spark — over a common default, and is designed to be extended with new ones.

A standard function becomes about four calls:

dlms_gas.init();
dlms_gas.decode();
dlms_gas.pendingActions();

Reference: DLMS Gas JavaScript API

IEC102

Electricity meters. iec102.connect(registerType) does more than open a socket:

registerType Meaning
IP Direct IP connection. The default when you do not specify one
VPN Through a VPN
GSM Over a GSM call, sending the commands needed to register
ATR Over ATR, likewise

With GSM or ATR, connecting also collects a presence data point, device.communicationModules[].subscription.mobile.presence.gsm, with OK or NOK — so the attempt itself tells you whether the meter is alive.

Connection properties are set on the object before connecting:

iec102.ip = "127.0.0.1";
iec102.port = "3000";
iec102.linkAddress = "1";
iec102.useMeasurePoint = "1";
Always check the status after connecting

On failure, connect sets the response status to ERROR_PROCESSING with the error description. Check the returned status and return the response object instead of carrying on — otherwise the operation reports something misleading.

Once connected, work is expressed as ASDUs: clock reading, load curves, profiles. They can be executed directly, defined from the operation’s parameters, or declared by hand.

Reference: IEC102 JavaScript API

SNMP

Network equipment. Build a list of OIDs with snmp.addOid(), then run snmp.get() or snmp.set().

To store what you read, hand it to a collection with the snmps:// scheme, which is also what a COLLECTION function matches as its south criteria:

collectCF(result.data, "snmps://<oidValue>");

Reference: SNMP JavaScript API

Where to go next

To Read
See every protocol OpenGate speaks, and which side calls Supported protocols
Write the function that does the talking Connector Functions
Schedule readings across a fleet Jobs and tasks
Reach a meter behind a gateway Topology
Watch a function run Debugging

Remote access

Sometimes the integration is not a protocol the device speaks on your behalf — it is you, on the device, running commands. OpenGate opens these connections from a connector function, so the device must be reachable at an IP address, directly or through a gateway.

SSH and Telnet

Both follow the same three-step shape, and the object properties are set before connecting:

ssh.ip = "10.0.0.7";
ssh.user = "admin";
ssh.identity = "-----BEGIN RSA PRIVATE KEY-----...";
ssh.connect(["$"]);
var out = ssh.send("show version", "#", ["#"]);
ssh.disconnect();
Property SSH Telnet
ip Address of the server Address of the server
port Port of the server Port of the server, default 23
retries Default 3 Default 3
timeout Milliseconds, default 5000 Milliseconds, default 5000
user, password Credentials
identity RSA key content, as an alternative to a password
Set the SSH port explicitly

The SSH reference documents a default port of 23, which is Telnet’s port rather than SSH’s 22. Until that is clarified, set ssh.port explicitly in your script instead of relying on the default.

connect and send both take a waitFor list: the strings that tell the client the device has finished talking. Getting those right is most of the work with a shell integration, because there is no framing to rely on — a prompt is the only end-of-message marker you have.

Prefer identity over password where the device supports it, and read either from the provisioned entity rather than hardcoding it in the script.

References: SSH · Telnet

ICMP

A ping, which answers the one question every other integration depends on: is this device reachable at all?

Property Meaning
ip Address to ping
retries Delivery retries, default 5
timeout Milliseconds per retry, default 2500
async true by default: the request does not block the function

Because async defaults to true, the result usually does not come back in the same execution. It arrives at a separate RESPONSE connector function, which receives the outcome as its payload — that is what the ICMP Response reference documents.

Set async to false when you want the answer inline and are prepared to wait for it.

References: ICMP · ICMP Response

Where to go next

To Read
See every protocol OpenGate speaks Supported protocols
Write the function Connector Functions
Launch this across a fleet Jobs and tasks
Debug a session that hangs Debugging

RADIUS accounting

The other protocols on this section connect OpenGate to a device. RADIUS connects it to the network: the platform can receive RADIUS accounting packets from Remote Access Servers or delegated RADIUS servers, and learn the operational state of M2M communications from the operator side rather than from the device.

That matters because it answers questions the device cannot. A device that stopped reporting looks identical whether it is broken, out of coverage, or its SIM was suspended — network-side accounting tells them apart.

Who sends what

Sender GGSN nodes, Remote Access Servers, or delegated RADIUS servers
Carries RADIUS accounting packets about network sessions
Direction Into OpenGate: the node reports, the platform receives

Gateway GPRS support nodes are part of the mobile operator’s network and are the usual source, which is why this is provisioned as a mobile-operator concern rather than a device one.

Where it is provisioned

RADIUS clients are registered under mobile operators, not per device or channel:

Management › Mobile operators › GGSN

That page holds the API to provision the RADIUS clients allowed to forward accounting to the platform, and its OpenAPI specification.

Limited access

Provisioning RADIUS clients is a restricted feature. See the GGSN page for the profiles required.

Where to go next

To Read
See every protocol OpenGate speaks Supported protocols
Provision the RADIUS clients GGSN
Manage the SIMs behind those sessions Mobile operators

Topology

Device topologies

OpenGate platform supports different device connection strategies. The following sections explain these connection strategies.

Direct connection strategy

Direct connection strategy is the most common connection scenario. Gateways and devices use it.

flowchart BT
    GA["GatewayA"]
    GB["GatewayB"]
    NET(["Internet"])
    OG["OpenGate Platform"]

    GA -.-> NET
    GB -.-> NET
    NET -.-> OG

    classDef platform fill:#fde8c8,stroke:#c98f2b,color:#000
    classDef node fill:#e2e4e8,stroke:#8a8f98,color:#000
    class OG platform
    class GA,GB node

Each device reaches the platform on its own, with no intermediate node to traverse: deviceId alone identifies the destination, and path is empty.

Indirect connection strategy

Devices behind gateways and complex connection scenarios like non-transparent mesh networks use an indirect connection strategy.

OpenGate supports these scenarios using a path. The path is an array of nodes (devices) to be traversed to reach the destination:

flowchart BT
    D11["Device_1_1"]
    D12["Device_1_2"]
    MESH2(["mesh network"])
    D1["Device_1"]
    MESH1(["mesh network"])
    GA["GatewayA"]
    GB["GatewayB"]
    NET(["Internet"])
    OG["OpenGate Platform"]

    D11 -.-> MESH2
    D12 -.-> MESH2
    MESH2 -.-> D1
    D1 -.-> MESH1
    MESH1 -.-> GA
    GA -.-> NET
    GB -.-> NET
    NET -.-> OG

    classDef platform fill:#fde8c8,stroke:#c98f2b,color:#000
    classDef node fill:#e2e4e8,stroke:#8a8f98,color:#000
    class OG platform
    class D11,D12,D1,GA,GB node
  • The endpoint device, in case of operations, diagnostics sent by the platform.
  • The platform, in case of events, responses, etc., sent by the on-field device.

Indirect connection scenarios

Taking an indirect connection scenario, we have:

  • A gateway device with the id: GatewayA
  • An intermediate device connected to the gateway with the id: Device_1
  • Two endpoint devices connected to the intermediate device with the ids: Device_1_1 and Device_1_2 respectively.

From a platform point of view, the path and deviceId parameter values are:

  • To reach the Gateway:
    • "deviceId": "GatewayA"
    • "path": []
  • To reach the intermediate device:
    • "deviceId": "Device_1"
    • "path": ["GatewayA"]
  • To reach an endpoint device:
    • "deviceId": "Device_1_1"
    • "path": ["GatewayA", "Device_1"]

Deployment Elements

Comprehensive API actions

Getting deployment elements

Endpoint to download deployment element files from the platform.

Usage examples

Download a deployment element file (replace {file_path} with the path of the deployment element you want to retrieve):

curl 'https://api.opengate.es/bundles/deploymentElement/{file_path}' \
  -H 'X-ApiKey: <your-api-key>'

A valid request returns HTTP 200 with the file content.

API specification

Connector Functions

Devices rarely speak the protocol you wish they did. A meter answers DLMS, a legacy gateway needs a Telnet command, a sensor posts a binary frame nobody else understands. A connector function is your own JavaScript, running inside the platform, that translates between OpenGate and that reality.

No middleware to deploy, no service to keep alive: you POST the script, and OpenGate runs it at the moment the data or the operation passes through.

What one looks like

A connector function is a JSON document with a javascript field holding the code, plus the metadata that tells OpenGate when to run it:

{
  "name": "CollectionInfoConnectorFunction",
  "description": "Connector function for collected data",
  "operationalStatus": "DISABLED",
  "type": "COLLECTION",
  "southCriterias": [
    "http://collected/data",
    "mqtt://iot/collected"
  ],
  "javascript": "... javascript code ..."
}

Each function belongs to exactly one channel, and its name must be unique within that channel.

The three types

The type answers which direction is this translating?

flowchart TB
    APP["Back-office application"] -->|"launches an operation"| REQ["REQUEST"]
    REQ -->|"speaks the device protocol"| DEV["Device"]
    DEV -->|"answers the operation"| RES["RESPONSE"]
    DEV -->|"pushes data"| COL["COLLECTION"]
    RES -->|"operation result"| OUT["Operation updated"]
    COL -->|"data points"| STO["Platform storage"]

    classDef cf fill:#addcf8,stroke:#2b7cb8,color:#000,font-weight:bold
    class REQ,RES,COL cf

The three blue boxes are the connector functions: your JavaScript, at the point where each translation happens.

Type Runs when Must return
REQUEST The platform has an operation to send to the device Nothing is required. Return null, or omit the return, and the operation stays open until a response arrives. Return the response object and the operation finishes right there
RESPONSE Something arrives from the device at a south URI, answering an operation The OpenGate standard response object. Return nothing and no operation update happens
COLLECTION Something arrives from the device at a south URI, carrying data The OpenGate standard collection object. Return nothing and nothing is collected

The core JavaScript API gives you the response and collection objects to build those returns without assembling JSON by hand.

Criteria: how OpenGate picks your function

Criteria Used by Meaning
northCriterias REQUEST only, mandatory Matches the operation coming from the platform. Two functions cannot share the same list
southCriterias RESPONSE and COLLECTION, mandatory One or more URIs the device talks to. Each URI can belong to only one connector function

A REQUEST function also needs operationName, which must be an operation type you are allowed to use, and must leave southCriterias unset. RESPONSE and COLLECTION functions are the mirror image: south criteria set, northCriteria and operationName unset.

South criteria are URIs carrying the protocol, and the accepted set is configurable:

https://   mqtts://   wss://   snmps://   dlms://   coaps://

When it runs, and on which devices

operationalStatus is what keeps a half-written function from touching your fleet:

Value OpenGate runs the function
DISABLED Never
TEST Only on devices whose operational status is TEST
PRODUCTION Only on devices whose operational status is PRODUCTION

The natural order is therefore: create it DISABLED, move it to TEST against a test device, and only then to PRODUCTION.

Chaining functions

A function can hand over to another when it finishes, using cf.response and cf.collection. Only these hand-offs are honoured — anything else is silently ignored:

From Can invoke
REQUEST RESPONSE, COLLECTION, or both
RESPONSE COLLECTION
COLLECTION Nothing

That is what lets a single device message both close an operation and collect the readings it carried. See Concatenated Connector Functions.

Where to go next

To Read
Write the script: what it receives, what it must return Core JavaScript API
Talk a specific protocol: DLMS, SNMP, SSH, MQTT… Protocol APIs
Clone a ready-made function instead of writing one Catalog API
Debug a function that is already running Debugging

Managing them over REST

/north/v80/connectorFunctions/provision/organizations/{organizationName}/channels/{channelName}
Action Profiles allowed
CREATE, UPDATE, DELETE admin, admin_domain, super_admin_domain, root
GET, list Any profile

Once created, identifier and type are immutable. Everything else can be updated.

Create a COLLECTION function in a channel:

curl -X POST 'https://api.opengate.es/north/v80/connectorFunctions/provision/organizations/{organizationName}/channels/{channelName}' \
  -H 'X-ApiKey: <your-api-key>' \
  -H 'Content-Type: application/json' \
  -d @connector-function.json

A valid request returns 201 with a Location header carrying the identifier of the new function.

List the connector functions of a channel:

curl 'https://api.opengate.es/north/v80/connectorFunctions/provision/organizations/{organizationName}/channels/{channelName}' \
  -H 'X-ApiKey: <your-api-key>'
The REST API barely reads your JavaScript

Creating or updating a connector function performs only minimal JavaScript parsing. A script that is syntactically odd but parseable will be accepted and fail at runtime, which is why TEST status and debugging matter.

API specification

Subsections of Connector Functions

Core JavaScript API

These objects are available to every connector function, whatever protocol the device speaks. Start with the JavaScript API — it explains what your script receives and what it must produce — and come back here for the object you need.

What you get and what you return

Page Object Use it to
JavaScript API Understand the input variables, the expected output per connector function type, and how executions concatenate
Entity entity, gateway Read data stream values, timestamps and source fields of the device
Inner Collections collection Collect data points and set fields from inside the script
Operation Steps response Build operation steps and set result codes

Reaching back into the platform

Page Object Use it to
Operation operation Read and activate the device’s pending operations
Provision provision Retrieve and create entities through the provisioning API
Concatenated Connector Functions cf Chain RESPONSE and COLLECTION executions together

Helpers

Page Object Use it to
Utils utils AT commands, date handling, context, encryption and HTTP helpers
Cryptography Encrypt and decrypt with AES, hash with HMAC

One more global is always there and is documented outside this section, because rules use the very same object: logger, for writing TRACE, DEBUG, INFO, WARN and ERROR traces. It is the way to see what a running function is doing — see Debugging, which covers both the logger API and the WebSocket service that streams the traces live.

Reserved names

Because these helpers are injected as globals, their names are reserved. Do not declare variables called cf, collection, response, snmp, utils, dlms, dlms_gas, provision or operation in your script.

Subsections of Core JavaScript API

JavaScript API

Connector functions JS API guide

In this javascript code, it is possible to use some defined functions to define the connector function. We will explain them below.

Input parameters

The main script will have access to the following main vars:

  • entity: json with flattened operation target device entity representation.
  • gateway: json with flattened gateway entity representation. It can be null.
  • response: json with default response data (device identifier, request id (if known)…)
  • collection: json with default collection data (device identifier if known)
  • payload: it can be of different types: json object, binary content or flat text. It can contain different types of information: request or response information, collected data….
  • contextParams: json object with execution context information. It can have some of this params:
    • apiKey: device or user apikey.
    • remoteIp: remote host when HTTP Rest Resource is invoked.
    • uri: opened Websocket complete uri or invoked HTTP Rest Resource complete uri.
    • path: opened Websocket relative path or invoked HTTP Rest Resource relative path. This is the path used as south criteria to filter CFs.
    • topic: MQTT Topic where the message arrived.
    • sessionIp: device session IP
  • Protocol clients and APIs: clients such as mqtt, ssh, snmp, dlms, dlms_gas, provision, and operation will be available for being used.

Here there is an example of entity or gateway:

entity = {
    "provision.administration.channel": {
        "_value": {
            "_current": {
                "value": "battery_channel",
                "date": "2017-12-01T08:52:37.563Z",
                "at": "2017-12-01T08:52:37.563Z"
            }
        }
    },
    "provision.administration.identifier": {
        "_value": {
            "_current": {
                "value": "device_battery_id",
                "provType": "MONITORING",
                "date": "2017-12-01T08:52:37.57Z",
                "at": "2017-12-01T08:52:37.57Z"
            }
        }
    },
    "provision.administration.organization": {
        "_value": {
            "_current": {
                "value": "battery_organization",
                "provType": "MONITORING",
                "date": "2017-12-01T08:52:37.566Z",
                "at": "2017-12-01T08:52:37.566Z"
            }
        }
    },
    "provision.administration.plan": {
        "_value": {
            "_current": {
                "value": "FLOW_RATE_100",
                "provType": "MONITORING",
                "date": "2017-12-01T08:52:37.565Z",
                "at": "2017-12-01T08:52:37.565Z"
            }
        }
    },
    "provision.administration.serviceGroup": {
        "_value": {
            "_current": {
                "value": "emptyServiceGroup",
                "provType": "MONITORING",
                "date": "2017-12-01T08:52:37.561Z",
                "at": "2017-12-01T08:52:37.561Z"
            }
        }
    },
    "provision.device.communicationModules[].identifier": [
        {
            "_index": {
                "path": "provision.device.communicationModules[].identifier",
                "value": {
                    "_current": {
                        "value": "commsMod_battery_id",
                        "provType": "MONITORING",
                        "date": "2017-12-01T08:52:37.577Z",
                        "at": "2017-12-01T08:52:37.577Z"
                    }
                }
            },
            "_value": {
                "_current": {
                    "value": "commsMod_battery_id",
                    "provType": "MONITORING",
                    "date": "2017-12-01T08:52:37.577Z",
                    "at": "2017-12-01T08:52:37.577Z"
                }
            }
        }
    ],
    "provision.device.communicationModules[].subscription.address": [
        {
            "_index": {
                "path": "provision.device.communicationModules[].identifier",
                "value": {
                    "_current": {
                        "value": "commsMod_battery_id",
                        "provType": "MONITORING",
                        "date": "2017-12-01T08:52:37.577Z",
                        "at": "2017-12-01T08:52:37.577Z"
                    }
                }
            },
            "_value": {
                "_current": {
                    "value": {
                        "type": "IPV4",
                        "value": "99.1.1.71",
                        "apn": "myapnprov.es"
                    },
                    "provType": "REFERENCE",
                    "date": "2017-12-01T08:52:37.624Z",
                    "at": "2017-12-01T08:52:37.624Z"
                }
            }
        }
    ],
    "provision.device.communicationModules[].subscription.identifier": [
        {
            "_index": {
                "path": "provision.device.communicationModules[].identifier",
                "value": {
                    "_current": {
                        "value": "commsMod_battery_id",
                        "provType": "MONITORING",
                        "date": "2017-12-01T08:52:37.577Z",
                        "at": "2017-12-01T08:52:37.577Z"
                    }
                }
            },
            "_value": {
                "_current": {
                    "value": "subscription_battery_id",
                    "provType": "MONITORING",
                    "date": "2017-12-01T08:52:37.626Z",
                    "at": "2017-12-01T08:52:37.626Z"
                }
            }
        }
    ],
    "provision.device.identifier": {
        "_value": {
            "_current": {
                "value": "device_battery_id",
                "provType": "MONITORING",
                "date": "2017-12-01T08:52:37.636Z",
                "at": "2017-12-01T08:52:37.636Z"
            }
        }
    },
    "provision.device.location": {
        "_value": {
            "_current": {
                "value": {
                    "position": {
                        "type": "Point",
                        "coordinates": [
                            -3.7028,
                            40.41675
                        ]
                    },
                    "postal": "28013"
                },
                "provType": "MONITORING",
                "date": "2017-12-01T08:52:37.64Z",
                "at": "2017-12-01T08:52:37.64Z"
            }
        }
    },
    "resourceType": {
        "_value": {
            "_current": {
                "value": "entity.device",
                "provType": "IDENTIFIER",
                "date": "2017-12-01T08:52:37.643Z",
                "at": "2017-12-01T08:52:37.643Z"
            }
        }
    },
    "device.communicationModules[].identifier": [
        {
            "_index": {
                "path": "device.communicationModules[].identifier",
                "value": {
                    "_current": {
                        "value": "commsMod_battery_id",
                        "date": "2017-12-01T08:52:37.577Z",
                        "at": "2017-12-01T08:52:37.577Z"
                    }
                }
            },
            "_value": {
                "_current": {
                    "value": "commsMod_battery_id",
                    "date": "2017-12-01T08:52:37.577Z",
                    "at": "2017-12-01T08:52:37.577Z"
                }
            }
        }
    ],
    "device.communicationModules[].subscription.address": [
        {
            "_index": {
                "path": "device.communicationModules[].identifier",
                "value": {
                    "_current": {
                        "value": "commsMod_battery_id",
                        "date": "2017-12-01T08:52:37.577Z",
                        "at": "2017-12-01T08:52:37.577Z"
                    }
                }
            },
            "_value": {
                "_current": {
                    "value": {
                        "type": "IPV4",
                        "value": "99.1.1.71",
                        "apn": "myapn.es"
                    },
                    "date": "2017-12-01T08:52:37.624Z",
                    "at": "2017-12-01T08:52:37.624Z",
                    "source": "DEVICE_OPENGATE_HTTP",
                    "sourceInfo": "IoT Data Message Received"
                }
            }
        }
    ],
    "device.communicationModules[].subscription.identifier": [
        {
            "_index": {
                "path": "device.communicationModules[].identifier",
                "value": {
                    "_current": {
                        "value": "commsMod_battery_id",
                        "date": "2017-12-01T08:52:37.577Z",
                        "at": "2017-12-01T08:52:37.577Z"
                    }
                }
            },
            "_value": {
                "_current": {
                    "value": "subscription_battery_id",
                    "date": "2017-12-01T08:52:37.626Z",
                    "at": "2017-12-01T08:52:37.626Z",
                    "source": "DEVICE_OPENGATE_HTTP",
                    "sourceInfo": "IoT Data Message Received"
                }
            }
        }
    ],
    "device.identifier": {
        "_value": {
            "_current": {
                "value": "device_battery_id",
                "date": "2017-12-01T08:52:37.636Z",
                "at": "2017-12-01T08:52:37.636Z",
                "source": "DEVICE_OPENGATE_HTTP",
                "sourceInfo": "IoT Data Message Received"
            }
        }
    },
    "device.temperature.value": {
        "_value": {
            "_current": {
                "value": 25.3,
                "date": "2017-12-01T08:52:37.64Z",
                "at": "2017-12-01T08:52:37.64Z",
                "source": "DEVICE_OPENGATE_HTTP",
                "sourceInfo": "IoT Data Message Received"
            }
        }
    }
}

contextParams some examples:

REQUEST Connector function:

{
  "apiKey": "97c9ceae-c4ee-49ea-ad50-e499bb55ac63",
  "sessionIp": "127.0.0.1"
}

COLLECTION or RESPONSE Connector function for MQTT connector:

{
  "apiKey": "97c9ceae-c4ee-49ea-ad50-e499bb55ac63",
  "topic": "some/topic"
}

COLLECTION or RESPONSE Connector function for HTTP Rest endpoints:

{
  "apiKey": "97c9ceae-c4ee-49ea-ad50-e499bb55ac63",
  "path": "context/path",
  "uri": "http://http_url/device_id/context/path",
  "remoteIp": "remote_device_ip"
}

COLLECTION or RESPONSE Connector function for Websocket connection:

{
  "apiKey": "97c9ceae-c4ee-49ea-ad50-e499bb55ac63",
  "path": "context/path",
  "uri": "ws://ws_url/device/context/path"
}

COLLECTION or RESPONSE Connector function for SNMP connector:

{
  "apiKey": "97c9ceae-c4ee-49ea-ad50-e499bb55ac63",
  "uri": "snmp://oid"
}

COLLECTION Connector function for DLMS connection:

{
  "apiKey": "97c9ceae-c4ee-49ea-ad50-e499bb55ac63",
  "obisCode": "0.1.2.3.3.5"
}

Connector function script output

Depending on the type of CF, the script must have different outputs (regardless of whether other calls are concatenated).

REQUEST CF

No output is mandatory, so return null; can be used, or no return statement defined at all. In this case the operation will not be finished until the response event is processed.

Although the return statement is not mandatory, it is possible to return the response object. If returned, it will be processed and the operation can be finalized directly.

RESPONSE CF

In this case, OpenGate Standard Response object must be returned. If nothing or null is returned, then no operation update will be done.

response object functions can be used to complete full data.

COLLECTION CF

In this case, OpenGate Standard Iot Data Collection object must be returned. If nothing or null is returned, then no collection will be done.

collection object functions can be used to complete full data.

Connector function execution concatenation

In some cases, it is possible to invoke the execution of other CFs once the current CF execution is finished.

These are allowed cases:

  • From REQUEST CF:
    • Invoke RESPONSE CF
    • Invoke COLLECTION CF
    • Invoke RESPONSE CF and COLLECTION CF
  • From RESPONSE CF:
    • Invoke COLLECTION CF

Other invocations will be ignored (for example, invoke RESPONSE CF from COLLECTION CF).

There are two help functions for this:

  • cf.response
  • cf.collection

JS API

cf.operationParameters(operationObj)

Extract from operationObj parameters field. This function could be used in REQUEST CFs, when the payload is Operation Request json.

Kind: global function
Returns: * - Returns parameters field. It can be a complex object. If operationObj is not a correct Request object, null will be returned.

Param Type
operationObj Object

Example of use:

var operationParameters = cf.operationParameters(operationObj);

cf.operationTimestamp(operationObj)

Extract from operationObj timestamp field. This function could be used in REQUEST CFs, when the payload is Operation Request json.

Kind: global function
Returns: number - Returns timestamp field. If operationObj is not correct Request object, null will be returned.

Param Type
operationObj Object

cf.operationName(operationObj) String

Extract from operationObj name field. This function could be used in REQUEST CFs, when the payload is Operation Request json.

Kind: global function
Returns: String - Returns name field. If operationObj is not correct Request object, null will be returned.

Param Type
operationObj Object

cf.operationId(operationObj) String

Extract from operationObj id field. This function could be used in REQUEST CFs, when the payload is Operation Request json.

Kind: global function
Returns: String - Returns id field. If operationObj is not correct Request object, null will be returned.

Param Type
operationObj Object

cf.operationDeviceId(operationObj) String

Extract from operationObj deviceId field. This function could be used in REQUEST CFs, when the payload is Operation Request json.

Kind: global function
Returns: String - Returns deviceId field. If operationObj is not correct Request object, null will be returned.

Param Type
operationObj Object

JS API - Deprecated functions

responseCF(responseData, responseFunctionCriteria)

Used in Request connector functions to define a concatenated Response action.

Kind: global function

Param Type Description
responseData * data to be used as payload in Response Connector Function.
responseFunctionCriteria String the criteria to be used to search response connector function.

collectCF(collectionData, collectionFunctionCriteria)

Used in Request or Response connector functions to define a concatenated Collection action.

Kind: global function

Param Type Description
collectionData * data to be used as payload in Collection Connector Function.
collectionFunctionCriteria String the criteria to be used to search collection connector function.

publishOnTopic(payload, topic, deviceId)

Publish specified payload for specified topic and device.

Kind: global function

Param Type Description
payload * Data to be published. It will be converted to string.
topic String topic uri.
deviceId String device id.

ogCollection(datastreams, device, version)

Creates OG collection main object.

Kind: global function
Returns: Object - Json with Opengate Data Collection object.

Param Type Description
datastreams Array Array of datastreams objects. If not specified empty array will be set.
device String String with deviceId. If not defined null will be set.
version String String with version. If not specified, “1.0.0” value will be used.

ogCollectionDs(datastreamId, feed, datapoints)

Creates OG collection datastream object.

Kind: global function
Returns: Object - Json with Opengate Data Collection Datastream object.

Param Type Description
datastreamId String String with datastreamid. If not provided null will be set.
feed String String with feed name. If not provided null will be set.
datapoints Array Array of datapoints objects. If not provided empty array will be set.

ogCollectionDp(value, at, source, sourceInfo)

Creates OG collection datapoint object.

Kind: global function

Param Type Description
value * collected value. If not provided null will be set.
at number Number with collection timestamp. If not provided null will be set.
source String String with source name. If not provided null will be set.
sourceInfo String String with source description. If not provided null will be set.

addOgCollectionDp(datapoint, ogCollection, datastreamId, feed)

Adds datapoint to specified datastream in the collection object, if datastream does not exist, it creates the datastream.

Kind: global function

Param Type Description
datapoint Object Datapoint object to be added.
ogCollection Object Opengate collection object with current collection data.
datastreamId String Datastream object identifier in collection object. If not exist, it will be created.
feed String feed name, only used if the datastream must be created.

ogResponse(id, name, deviceId, resultCode, resultDescription, steps, timestamp, trustedBoot, version)

Creates OG response object

Kind: global function
Returns: Object - OG response object

Param Type Description
id String operation request id. If not provided null will be set.
name String launched operation name. If not provided null will be set.
deviceId String operation request device id. If not provided null will be set.
resultCode String operation result code. If not provided null will be set.
resultDescription String operation result description. If not provided null will be set.
steps Array If not defined, empty array will be defined.
timestamp String Operation response timestamp. If not provided current timestamp will be set.
trustedBoot String Trusted boot value. If not provided null will be set.
version String If not specified “8.0” will be set.

ogStep(name, result, description, stepResponseList)

Creates OG step object used in opengate response object.

Kind: global function
Returns: OG step object

Param Type Description
name String step name. If not provided null will be set.
result String step result. If not provided null will be set.
description String description string. If not provided, null will be assigned.
stepResponseList String array of stepResponse objects. If not provided, empty array will be assigned.

ogStepResponse(name, value)

Creates OG step response object, used in step object.

Kind: global function
Returns: OG step response object

Param Type Description
name * step name. If not provided null will be set.
value Object object with value. If not provided empty object will be assigned.

httpRequest(request, payload)

Executes specified request with specified payload.

Kind: global function
Returns: Object - JSON with response. It will have two fields: ‘statusCode’ with http result code and ‘body’ with response body content.

Param Type Description
request Object Object with requests parameters: ‘method’, ‘uri’ and ‘headers’. - ‘method’: GET, POST, PUT, DELETE. - ‘uri’: request uri. - ‘headers’: json with http request headers.
payload * data to be sent. It can be null.

webSocketMsg(payload, deviceId)

Send message to opened websocket

Kind: global function

Param Type Description
payload * data to be published. It will be converted to string.
deviceId String Device identifier with the opened websocket

entityValue(entity, datastream, index)

Extract from entity specified datastream “value” field value.

Kind: global function
Returns: * - Specified datastream “value” field. It can be complex object. null if datastream does not exist.

Param Type Description
entity Object entity Object with flattened entity.
datastream String Datastream name, for example: ‘provision.device.identifier’.
index number Array Index. If provided datastream is an array (i.e. comm module), element index must be specified.

entitiesValue(entities, datastream, index)

Extract from the first entity of entities array specified datastream “value” field value.

Kind: global function
Returns: * - Specified datastream “value” field. It can be complex object. null if datastream does not exist.

Param Type Description
entities Array Array of objects with flattened entity.
datastream String Datastream name, for example: ‘provision.device.identifier’.
index number Array Index. If provided datastream is an array (i.e. comm module), element index must be specified.

entityAt(entity, datastream, index)

Extract from entity specified datastream “at” field value.

Kind: global function
Returns: Specified datastream “at” field. It can be complex object. null if datastream does not exist.

Param Type Description
entity Object entity Object with flattened entity.
datastream String Datastream name, for example: ‘provision.device.identifier’.
index number Array Index. If provided datastream is an array (i.e. comm module), element index must be specified.

entityDate(entity, datastream, index)

Extract from entity specified datastream “date” field value.

Kind: global function
Returns: Specified datastream “date” field. It can be complex object. null if datastream does not exist.

Param Type Description
entity Object entity Object with flattened entity.
datastream String Datastream name, for example: ‘provision.device.identifier’.
index number Array Index. If provided datastream is an array (i.e. comm module), element index must be specified.

entitySource(entity, datastream, index)

Extract from entity specified datastream “source” field value.

Kind: global function
Returns: Specified datastream “source” field. It can be complex object. null if datastream does not exist.

Param Type Description
entity Object entity Object with flattened entity.
datastream String Datastream name, for example: ‘provision.device.identifier’.
index number Array Index. If provided datastream is an array (i.e. comm module), element index must be specified.

entitySourceInfo(entity, datastream, index)

Extract from entity specified datastream “sourceInfo” field value.

Kind: global function
Returns: Specified datastream “sourceInfo” field. It can be complex object. null if datastream does not exist.

Param Type Description
entity Object entity Object with flattened entity.
datastream String Datastream name, for example: ‘provision.device.identifier’.
index number Array Index. If provided datastream is an array (i.e. comm module), element index must be specified.

log(…msg)

Creates Info level logging messages. It concatenates msg parameters in the final string to be logged.

Kind: global function

Param Type Description
…msg any The function takes as parameters a list of elements to be concatenated to generate the string message to be printed.

encryptString(originalValue, datastreamConfiguration, organizationName)

Encrypt an original string with the configuration established by the datastream of the organization

Kind: global function
Returns: The originalValue encrypted

Param Type Description
originalValue string The value to encrypt.
datastreamConfiguration string The datastream of provision type, of the datamodel that define this value. This datastream has the configuration of encryption.
organizationName string The organization name to which the datamodel belongs.

decryptString(encryptedValue, datastreamConfiguration, organizationName)

Decrypt an encrypted string with the configuration established by the datastream of the organization

Kind: global function
Returns: The encryptedValue decrypted

Param Type Description
encryptedValue string The encrypted value to decrypt.
datastreamConfiguration string The datastream of provision type, of the datamodel that define this value. This datastream has the configuration of encryption.
organizationName string The organization name to which the datamodel belongs.

getAddressTypeFromAddress(address)

Calculates the address type from a given address

Kind: global function
Returns: The address type

Param Type Description
address string The address which the type will be calculated for.

Entity JavaScript API

Connector functions entity JS API guide

This API allows users to extract data from entity object.

Entity Object Methods

The following methods also work with the gateway object since it has the same structure as entity.

entity._value (datastream, index)

Extract from entity specified datastream “value” field value using parameters

Returns: * - Specified datastream “value” field. It can be complex object. null if datastream does not exist.

Param Type Description
datastream string The datastream name.
index any Element index of datastream array.

Example of use:

var value = entity._value('provision.device.identifier');

entity._at (datastream, index)

Extract from entity specified datastream “at” field value using parameters

Returns: Specified datastream “at” field. It can be complex object. null if datastream does not exist.

Param Type Description
datastream string The datastream name.
index any Element index of datastream array.

Example of use:

var at = entity._at('provision.device.identifier');

entity._date (datastream, index)

Extract from entity specified datastream date field value using parameters

Returns: Specified datastream “date” field. It can be complex object. null if datastream does not exist.

Param Type Description
datastream string The datastream name.
index any Element index of datastream array.

Example of use:

var date = entity._date('provision.device.identifier');

entity._source (datastream, index)

Extract from entity specified datastream “source” field value using parameters

Returns: Specified datastream “source” field. It can be complex object. null if datastream does not exist.

Param Type Description
datastream string The datastream name.
index any Element index of datastream array.

Example of use:

var source = entity._source('provision.device.identifier');

entity._sourceInfo(datastream, index)

Extract from entity specified datastream “sourceInfo” field value using parameters

Returns: Specified datastream “sourceInfo” field. It can be complex object. null if datastream does not exist.

Param Type Description
datastream string The datastream name.
index any Element index of datastream array.

Example of use:

var sourceInfo = entity._sourceInfo('provision.device.identifier');

Inner Collections API

Connector functions JS API guide for inner collections

This file provides methods to collect data inside a connector function script execution. These methods belong to collection global object.

JS API

collection.addDatapoint(datastreamId, value, at, source, sourceInfo)

Builds a datapoint object and adds it to the specified datastream in the datastreams list in the collection global object.

Kind: global function
Returns: Void

Param Type Description
datastreamId string Datastream identifier by which the datapoint will be identified.
value any Collected value. If not provided null will be set.
at number Number with collection timestamp in seconds. If not provided null will be set.
source string String with source name. If not provided null will be set.
sourceInfo string String with source description. If not provided null will be set.

Example of use:

var now = Date.now() / 1000;
collection.addDatapoint('device.name', 'collected name from cf', now,'mySource','mySourceInfo');

collection.setFeed(datastreamId, feed)

Sets the feed name to a specific datastream in the datastreams list in the collection global object.

Kind: global function
Returns: Void

Param Type Description
datastreamId string Datastream identifier by which the datapoint will be identified.
feed string The feed name to set to the specified datastream.

Example of use:

collection.setFeed('device.name', 'myFeed');

collection.send()

Sends a collection message to the OpenGate’s collection messages flow using the datastreams list in the collection global object, after that this list is cleaned.

Kind: global function
Returns: Void

Example of use:

collection.send();

collection.getValue(datastream, dpIndex)

Searches for a datapoint value for the specified datastreamId. It is possible to specify the datapoint index inside the datastream. If not found, a null value will be returned.

Kind: global function
Returns: *

Param Type Description
datastream string Datastream identifier which value must be returned
dpIndex number Datapoint index. If not defined first datapoint will be returned

Example of use:

var dpValue = collection.getValue('device.name');
// dpValue will be 'collected name from cf'

Operation Steps API

Connector functions JS API guide for the response object and immediate operation steps notification

This API provides methods on the response global object to build operation step results, notify them immediately, and set the operation result code.

JS API

response.addStep(name, result, description, stepResponseList)

Builds a step result object and adds it to the steps list in the response global object.

Kind: global function
Returns: Void

Param Type Description
name string Step name. If not provided null will be set.
result string Step result. If not provided null will be set.
description string Step result description. If not provided null will be set.
stepResponseList string StepResponse objects array. If not provided, empty array will be assigned.

Example of use:

response.addStep('FACTORY_RESET', 'SUCCESSFUL', 'direct step from CF');

response.sendSteps()

Sends a step response message to the OpenGate’s operation messages flow using the steps list in the response object, after that this list is cleaned.

Kind: global function
Returns: Void

Example of use:

response.sendSteps();

response.successful(statusDescription)

This method sets the SUCCESSFUL statusCode with the provided description.

Kind: global function
Returns: Void

Param Type Description
statusDescription string Descriptive text for result.

Example of use:

response.successful("CF finished correctly");

response will contain the following data:

{
    "operation": {
        "response": {
            //...
            "resultCode": "SUCCESSFUL",
            "resultDescription": "CF finished correctly",
            //...
        }
    }
}

response.errorProcessing(statusDescription)

This method sets the ERROR_PROCESSING statusCode with the provided description.

Kind: global function
Returns: Void

Param Type Description
statusDescription string Descriptive text for result.

Example of use:

response.errorProcessing("Error executing CF");

response will contain the following data:

{
    "operation": {
        "response": {
            //...
            "resultCode": "ERROR_PROCESSING",
            "resultDescription": "Error executing CF",
            //...
        }
    }
}

response.errorInParam(statusDescription)

This method sets the ERROR_IN_PARAM statusCode with the provided description.

Kind: global function
Returns: Void

Param Type Description
statusDescription string Descriptive text for result.

Example of use:

response.errorInParam("Incorrect param from CF");

response will contain the following data:

{
    "operation": {
        "response": {
            //...
            "resultCode": "ERROR_IN_PARAM",
            "resultDescription": "Incorrect param from CF",
            //...
        }
    }
}

response.notSupported(statusDescription)

This method sets the NOT_SUPPORTED statusCode with the provided description.

Kind: global function
Returns: Void

Param Type Description
statusDescription string Descriptive text for result.

Example of use:

response.notSupported("Not supported from CF");

response will contain the following data:

{
    "operation": {
        "response": {
            //...
            "resultCode": "NOT_SUPPORTED",
            "resultDescription": "Not supported from CF",
            //...
        }
    }
}

response.errorTimeout(statusDescription)

This method sets the ERROR_TIMEOUT statusCode with the provided description.

Kind: global function
Returns: Void

Param Type Description
statusDescription string Descriptive text for result.

Example of use:

response.errorTimeout("Timeout error from CF");

response will contain the following data:

{
    "operation": {
        "response": {
            //...
            "resultCode": "ERROR_TIMEOUT",
            "resultDescription": "Timeout error from CF",
            //...
        }
    }
}

response.unknownResult(statusDescription)

This method sets the UNKNOWN_RESULT statusCode with the provided description.

Kind: global function
Returns: Void

Param Type Description
statusDescription string Descriptive text for result.

Example of use:

response.unknownResult("Unknow result from CF");

response will contain the following data:

{
    "operation": {
        "response": {
            //...
            "resultCode": "UNKNOWN_RESULT",
            "resultDescription": "Unknow result from CF",
            //...
        }
    }
}

Operation JavaScript API

Connector functions - Active Operation JS API guide

This API allows users to read and activate operations from a connector function.

operation – Main Object

The operation object is the main object. It allows making requests to the Operations API.

To do the request, the object operation use the HTTP-Client API, you can use all attribute of this interface, for example, to add a certificate http.client.certificate=XXX

operation – Object Properties

Property Type Description
deviceId string Target device id of the operation pending
apiKey string Api-Key to use in the request to the Operations-API
host string Host to use in the request to the Operations-API

By default, the attributes will be set with the value of the context.

operation – Functions

operation.getAllPending()

Read and return the selected device operations pending (with status WAITING_FOR_CONNECTION) of the user to execute the CFx

This function does not require parameters.

The operation.getAllPending function returns an object, described as follows:

Property Type Attributes Description
error null or string Message Description of the exception error caught, or error sent by the request. It will be null when the request contains no errors
opResult Object statusCode, Object Contains statusCode, and the result list object of the request, when it’s OK

Example of use with default values:

var opResult = operation.getAllPending();

operation.getNotFinished()

Read and return the selected device operations that are not finished

This function does not require parameters.

Function operation.getNotFinished return object, descript like:

Property Type Attributes Description
error null or string Message Description of the exception error caught, or error sent by the request. will be null, when the request no contains errors
opResult Object statusCode, Object Contains statusCode, and the result list object of the request, when it’s OK

Example of use:

var opResult = operation.getNotFinished();

operation.getByCustomCondition(customCondition)

Read and return the selected device operations that match a custom filter condition

Param Type Description
customCondition Object Filter condition to apply (e.g., { 'eq': { 'operationStatus': 'IN_PROGRESS' } })

Function operation.getNotFinished return object, descript like:

Property Type Attributes Description
error null or string Message Description of the exception error caught, or error sent by the request. will be null, when the request no contains errors
opResult Object statusCode, Object Contains statusCode, and the result list object of the request, when it’s OK

Example of use:

var opResult = operation.getByCustomCondition({ 'eq': { 'operationStatus': 'IN_PROGRESS' } });
opResult – Object Functions

opResult is a JSON List Object returned by the operation.getAllPending function. You can use the following functions:

Function Return Description
activate null or string Activates the target operation. Returns null when the activation is OK, otherwise returns the error cause message
getRequest Object Builds and returns the request the device must send to respond to the operation

The object -opResult- contains all attributes and functions of the response (operation) object.

activate()

Activate the target operation selected with parameters of the context (Update to IN_PROGRESS the operation)

This function does not require parameters.

Example of use with default values:

var opResult = operation.getAllPending();
if (opResult.error) {
    return error;
}
opResult.forEach(op => op.activate());
getRequest()

Builds and returns the request the device must send to respond to the operation

This function does not require parameters.

reqRes – Object return the getRequest function

reqRes is a JSON Object returned by the getRequest function, described as follows:

Property Return Description
operation Object Main object to do the request

– Attributes of operation

Property Return Description
request Object Secondary main object to do the request

– Attributes of request

Property Return Description
name Object Operation name target of the request
id Object Operation identifier target of the request
parameters Object Parameters to use in the request
timestamp Object Operation time on do the request

By default, the attributes will be set with the value of the target operation.

Example getRequest object return:

{ 
    'operation': {
        'request': {
            'name': 'opName',
            'id': 'ce02792a-3a37-11f0-a48d-52540044ee01',
            'parameters': {},
            'timestamp': Date.now()
        }
    }
}

Example of use getRequest function:

var opResult = operation.getAllPending();
if (opResult.error) {
    return error;
}
opResult.forEach(op => {
        op.activate();
        http.client.body = op.getRequest();
        var httpResp = http.client.post();
        if (httpResp.statusCode != 201) {
            throw Error('Unexpected response:', httpResp);
        }
    }
);

Provision JavaScript API

Connector functions - Provision JS API guide

This API allows users to manage entity provisioning (creation and retrieval) from a connector function.

provision – Main Object

The provision global object provides properties and methods to interact with the Provisioning API.

provision – Object Properties

Property Type Default Description
apiKey string If available, current connection’s apikey API Key for the request.
host string Frontend’s default endpoint Host for the Provisioning API.
identifier string null Identifier of the entity to act upon.
organization string Device`s organization Organization to which the entity belongs.
serviceGroup string "emptyServiceGroup" Service Group for the entity.
defaultChannel string "defaultChannel" Channel to which the entity belongs.
plan string null Provisioning plan to apply.
extraDatastreams Array [] Extra data as an array of objects like {datastreamId:value} pairs.

provision – Functions

provision.get(id)

Retrieves an existing entity from the database with specified identifier.

Kind: global function
Returns: Object - If entity is found, entity data will be returned in result. If it is not found, result field will be null. If some error happened, it will be returned in error field.

Param Type Default Description
id string this.identifier (Optional) Entity identifier. If not defined identifier field will be used.

Example with provision.identifier:

provision.identifier = "device_123";
const resp = provision.get();
if (!resp.error && resp.result) {
    logger.info("Entity identifier:", resp.result._value("provision.administration.identifier"));
}

Example with parameter:

const resp = provision.get("device_123");
if (!resp.error && resp.result) {
    logger.info("Entity identifier:", resp.result._value("provision.administration.identifier"));
}

Example with unexepected error:

const resp = provision.get("device_123");
if (resp.error) {
    logger.error("Some error:", resp.error);
}

The object resp.result contains then same functions than entity object.

provision.create(fullBody)

Creates a new entity in the platform.

Kind: global function

Param Type Description
fullBody Object (Optional) Complete JSON body for the creation request. If not provided, it is generated from the object properties.

Returns: Object - An object containing either result (201 status) or error.

Example using properties:

provision.identifier = "new_device_001";
provision.plan = "TEST_PLAN";
provision.extraDatastreams = [{ "provision.device.name": "cellName" }, { "provision.device.administrativeState": "ACTIVE" }, { "provision.device.specificType": "COMHUB" }, { "provision.tec": "NBIoT Cell" }];
const resp = provision.create();
if(!resp.error && resp.result == 201) {
    logger.info('Created');
} else {
    logger.error('Error creating entity:', resp.error);
}

Previous example will create with following body:

{
    "provision.administration.channel": {
        "_value": {
            "_current": {
                "value": "defaultChannel"
            }
        }
    },
    "provision.administration.identifier": {
        "_value": {
            "_current": {
                "value": "new_device_001"
            }
        }
    },
    "provision.administration.organization": {
        "_value": {
            "_current": {
                "value": "deviceOrg"
            }
        }
    },
    "provision.administration.serviceGroup": {
        "_value": {
            "_current": {
                "value": "emptyServiceGroup"
            }
        }
    },
    "provision.administration.plan": {
        "_value": {
            "_current": {
                "value": "TEST_PLAN"
            }
        }
    },
    "provision.device.name": {
        "_value": {
            "_current": {
                "value": "cellName"
            }
        }
    },
    "provision.device.administrativeState": {
        "_value": {
            "_current": {
                "value": "ACTIVE"
            }
        }
    },
    "provision.device.specificType": {
        "_value": {
            "_current": {
                "value": "COMHUB"
            }
        }
    },
    "provision.tec": {
        "_value": {
            "_current": {
                "value": "NBIoT Cell"
            }
        }
    }
}

If fullBody is provided, it will be used as the request body instead of building it from the object properties.

Example:

const body = {
    "provision.administration.channel": {
        "_value": {
            "_current": {
                "value": "defaultChannel"
            }
        }
    },
    "provision.administration.identifier": {
        "_value": {
            "_current": {
                "value": "new_device_001"
            }
        }
    },
    "provision.administration.organization": {
        "_value": {
            "_current": {
                "value": "deviceOrg"
            }
        }
    },
    "provision.administration.serviceGroup": {
        "_value": {
            "_current": {
                "value": "emptyServiceGroup"
            }
        }
    }
};
const resp = provision.create(body);
if(!resp.error && resp.result == 201) {
    logger.info('Created');
} else {
    logger.error('Error creating entity:', resp.error);
}

Concatenated Connector Functions API

Concatenated connector functions JS API guide

This file provides methods to build concatenated function executions. These methods belong to cf global object.

JS API

cf.response(responseFunctionCriteria, responsePayload)

Sets a call for a RESPONSE connector function, if there is one that matches the south criteria indicated in responseFunctionCriteria, setting its input payload to the value of responsePayload.

Kind: global function
Returns: Void

Param Type Description
responseFunctionCriteria string The south criteria that will be used to find a RESPONSE connector function.
responsePayload any It can be a String or a JSON object. In case it is null or not provided, the current connector function response object will be used instead. It is the in payload for the concatenated RESPONSE connector function.

Example of use:

var resp = {
    'result': {
        'code': 'SUCCESSFUL',
        'description': 'Operation finished successful'
    },
    'data': {}
};

cf.response('snmps://1.0.1.4.5.123456.1.7', resp);

cf.collection(collectionFunctionCriteria, collectionPayload)

Sets a call for a COLLECTION connector function, if there is one that matches the south criteria indicated in collectionFunctionCriteria, setting its input payload to the value of collectionPayload.

Kind: global function
Returns: Void

Param Type Description
collectionFunctionCriteria string The south criteria that will be used to find a COLLECTION connector function.
collectionPayload any It can be a String or a JSON object. In case it is null or not provided, the current connector function response object will be used instead. It is the in payload for the concatenated COLLECTION connector function.

Example of use:

var colMsg = {
    '1.0.1.4.5.123456.1.7.1': 'device name',
    '1.0.1.4.5.123456.1.7.2': 'device description',
};

cf.collection('snmps://1.0.1.4.5.123456.1.7', colMsg);

UTILS JavaScript API

Connector functions UTILS JS API guide

In this javascript code, there are helper operations available to help users who are building their own functions. We will explain them below.

JS UTILS API

These operations are grouped by their topic, at this time the available areas are:

  • AT commands
  • Endesa commands
  • ODM commands
  • Time commands

utils.atcmd.toDBm(value)

Translates the response got by the ‘AT+CSQ’ command, which is the GSM signal strength and a numerical value, to its corresponding dBm value.

Kind: global function
Returns: The translation to dBm value

Param Type Description
value number The GSM signal strength.

Example of use:

var dbVal = utils.atcmd.toDBm(1234);

utils.endesa.torscp(value)

Param Type Description
value string value to be converted

Example of use:

var val = utils.endesa.torscp("1234");

utils.endesa.toDbmPlusQuality(value)

Param Type Description
value string value to be converted

Example of use:

var val = utils.endesa.toDbmPlusQuality("1234");

utils.endesa.prepareMsisdn(msisdn)

If msisdn starts with “34”, then returns the value without “34”. Kind: global function
Returns: returns msisdn parameter without format

Param Type Description
msisdn string msisdn to be converted

Example of use:

var newMsisdn = utils.endesa.prepareMsisdn("341234567890");
//newMsisdn will be: 1234567890

utils.endesa.commandFrom(command)

Depending on the command value, specific translation will be returned.

Kind: global function
Returns: returns msisdn parameter without format

Param Type Description
command string command to be translated

Example of use:

var newCommand = utils.endesa.commandFrom("9600;8E1");
//newCommand will be: ATS37=9S13=1\r\n

utils.odm.addValueToContext(key,value)

Kind: global function

Param Type Description
key string key to be added to context
value string value to be added to context

Example of use:

utils.odm.addValueToContext("key", "value");

utils.odm.sleep(time)

Sleeps for specified time

Param Type Description
time number time to sleep in milliseconds

Example of use:

utils.odm.sleep(1000);

utils.odm.encryptString(originalValue, datastreamConfiguration, organizationName)

Encrypt an original string with the configuration established by the datastream of the organization

Kind: global function
Returns: The originalValue encrypted

Param Type Description
originalValue string The value to encrypt.
datastreamConfiguration string The datastream of provision type, of the datamodel that define this value. This datastream has the configuration of encryption.
organizationName string The organization name to which the datamodel belongs.

Example of use:

var encryptedValue = utils.odm.encryptString("originalValue", "datastreamConfiguration", "organizationName");

utils.odm.decryptString(encryptedValue, datastreamConfiguration, organizationName)

Decrypt an encrypted string with the configuration established by the datastream of the organization

Kind: global function
Returns: The encryptedValue decrypted

Param Type Description
encryptedValue string The encrypted value to decrypt.
datastreamConfiguration string The datastream of provision type, of the datamodel that define this value. This datastream has the configuration of encryption.
organizationName string The organization name to which the datamodel belongs.

Example of use:

var decryptedValue = utils.odm.decryptString("encryptedValue", "datastreamConfiguration", "organizationName");

utils.odm.getAddressTypeFromAddress(address)

Calculates the address type from a given address

Kind: global function
Returns: The address type

Param Type Description
address string The address which the type will be calculated for.

Example of use:

var addressType = utils.odm.getAddressTypeFromAddress("[IP_ADDRESS]");
//addressType will be: ipv4

var addressType = utils.odm.getAddressTypeFromAddress("2001:0db8:85a3:0000:0000:8a2e:0370:7334");
//addressType will be: ipv6

utils.odm.entitiesValue(entities, datastream, index)

Extract from the first entity of entities array specified datastream “value” field value.

Kind: global function
Returns: * - Specified datastream “value” field. It can be complex object. null if datastream does not exist.

Param Type Description
entities Array Array of objects with flattened entity.
datastream String Datastream name, for example: ‘provision.device.identifier’.
index number Array Index. If provided datastream is an array (i.e. comm module), element index must be specified.

Example of use:

var value = utils.odm.entitiesValue(entities, "provision.device.identifier", 0);

utils.odm.httpRequest(request, payload)

Executes specified request with specified payload.

Kind: global function
Returns: Object - JSON with response. It will have two fields: ‘statusCode’ with http result code and ‘body’ with response body content.

Param Type Description
request Object Object with requests parameters: ‘method’, ‘uri’ and ‘headers’. - ‘method’: GET, POST, PUT, DELETE. - ‘uri’: request uri. - ‘headers’: json with http request headers.
payload * data to be sent. It can be null.

Example of use:

var response = utils.odm.httpRequest({method: "GET", uri: "http://example.com", headers: {}}, null);

utils.date.period.previousQuarter(referenceTimeMillis)

Calculates previous quarter from specified time in milliseconds.

Kind: global function
Returns: return an object with initial and final times of defined period

Param Type Description
referenceTimeMillis number reference time in milliseconds

Example of use:

var period = utils.date.period.previousQuarter(1698841200000);//2023-11-01 12:20:00

It will return:

{
    "initial": 1698840000000, //2023-11-01 12:00:00:000
    "final": 1698840899000, //2023-11-01 12:14:59:999
    "type": "previousQuarter" 
}

utils.date.period.previousDay(referenceTimeMillis)

Calculates previous day from specified time in milliseconds.

Kind: global function
Returns: return an object with initial and final times of defined period

Param Type Description
referenceTimeMillis number reference time in milliseconds

Example of use:

var period = utils.date.period.previousDay(1698841200000);//2023-11-01 12:20:00

It will return:

{
    "initial": 1698840000000, //2023-10-31 00:00:00:000
    "final": 1698840899000, //2023-10-31 23:59:59:999
    "type": "previousDay" 
}

utils.date.period.previousWeek(referenceTimeMillis)

Calculates previous week from specified time in milliseconds.

Kind: global function
Returns: return an object with initial and final times of defined period

Param Type Description
referenceTimeMillis number reference time in milliseconds

Example of use:

var period = utils.date.period.previousWeek(1698841200000);//2023-11-01 12:20:00 (Wednesday)

It will return:

{
    "initial": 1698840000000, //2023-10-23 00:00:00:000 (Monday)
    "final": 1698840899000, //2023-10-29 23:59:59:999 (Sunday)
    "type": "previousWeek" 
}

utils.date.period.previousMonth(referenceTimeMillis)

Calculates previous month from specified time in milliseconds.

Kind: global function
Returns: return an object with initial and final times of defined period

Param Type Description
referenceTimeMillis number reference time in milliseconds

Example of use:

var period = utils.date.period.previousMonth(1698841200000);//2023-11-01 12:20:00

It will return:

{
    "initial": 1698840000000, //2023-10-01 00:00:00:000
    "final": 1698840899000, //2023-10-31 23:59:59:999
    "type": "previousMonth" 
}

utils.date.period.customPeriodUtc(initialTimeStr, finalTimeStr)

Calculates specified period in utc times in milliseconds.

Kind: global function
Returns: return an object with initial and final times of defined period

Param Type Description
referenceTimeMillis number reference time in milliseconds

Example of use:

var period = utils.date.period.customPeriodUtc("2011-11-01T14:20:00.000+0100","2011-11-01T14:25:00.000+0100");

It will return:

{
    "initial": 1698844800000, //2011-11-01T13:20:00.000
    "final": 1698845100000, //2011-11-01T13:25:00.000
    "type": "custom" 
}

utils.date.period.lastMinutes(minutes, referenceTimeMillis)

Calculates a period of defined minutes until reference time. If referenceTimeMillis is not defined, current time will be used as reference

Kind: global function
Returns: return an object with initial and final times of defined period

Param Type Description
minutes number number of minutes of period
referenceTimeMillis number reference time in milliseconds

Example of use:

var period = utils.date.period.lastMinutes(15, 1698841200000);//2023-11-01 12:20:00

It will return:

{
    "initial": 1698840000000, //2023-11-01 12:05:00:000
    "final": 1698841200000, //2023-11-01 12:20:00:000
    "type": "lastMinutes" 
}

utils.date.period.lastHours(hours, referenceTimeMillis)

Calculates a period of defined hours until reference time. If referenceTimeMillis is not defined, current time will be used as reference

Kind: global function
Returns: return an object with initial and final times of defined period

Param Type Description
hours number number of hours of period
referenceTimeMillis number reference time in milliseconds

Example of use:

var period = utils.date.period.lastHours(24, 1698841200000);//2023-11-01 12:20:00

It will return:

{
    "initial": 1698840000000, //2023-10-31 12:20:00:000
    "final": 1698841200000, //2023-11-01 12:20:00:000
    "type": "lastHours" 
}

utils.date.period.lastDays(days, referenceTimeMillis)

Calculates a period of defined days until reference time. If referenceTimeMillis is not defined, current time will be used as reference

Kind: global function
Returns: return an object with initial and final times of defined period

Param Type Description
days number number of hours of period
referenceTimeMillis number reference time in milliseconds

Example of use:

var period = utils.date.period.lastDays(7, 1698841200000);//2023-11-01 12:20:00

It will return:

{
    "initial": 1698840000000, //2023-10-25 12:20:00:000
    "final": 1698841200000, //2023-11-01 12:20:00:000
    "type": "lastDays" 
}

utils.bytes.fromHexString(hexString)

Kind: global function
Returns: return an Uint8Array object equivalent to de hexadecimal String

Param Type Description
hexString string String in hexadecimal format

Example of use:

var bytes = utils.bytes.fromHexString("09 4A 48")

It will return:

[09, 74, 72]

utils.bytes.toHexString(array)

Kind: global function
Returns: return the hexadecimal string representation.

Param Type Description
array Array of bytes hexadecimal string representation

Example of use:

var hexStr = utils.bytes.toHexString([09, 74, 72])

It will return:

"094A48"

utils.bytes.fromText(str)

Kind: global function
Returns: return the Uint8Array representation of the string with UTF encoding.

Param Type Description
str string any text

Example of use:

var bytes = utils.bytes.fromText("Hello!")

It will return:

[72, 101, 108, 108, 111, 33]

utils.bytes.toText(bytes)

Kind: global function
Returns: return the string representation of array of bytes in UTF.

Param Type Description
bytes Array of bytes bytes representing a text in UTF

Example of use:

var text = utils.bytes.toText([72, 101, 108, 108, 111, 33])

It will return:

"Hello!"

Cryptography API

Connector functions JS API guide for crypto utility

This file provides methods for different crypto utilities using crypt global object.

Encrypt and decrypt messages with AES algorithms

The crypt.aes global object provides all the functions for encryption and decryption using the AES algorithm.

These JavaScript functions use the cipher algorithm identifier required by the Java method javax.crypto.Cipher.getInstance(algorithm), composed of {CipherName}/{cipherMode}/{CipherPadding}. Some examples are:

  • AES/CBC/NoPadding
  • AES/CBC/PKCS5Padding
  • AES/ECB/NoPadding
  • AES/ECB/PKCS5Padding
  • AES/GCM/NoPadding

Data hashing

The crypt.hmac global object provides functions for hashing data.

AES JS API

crypt.aes.encrypt(algorithm, key, ivParameterSpec, data)

Encrypt the data using the selected AES algorithm with the provided shared key.

Kind: global function
Returns: Uint8Array

Param Type Description
algorithm string algorithm identifier, as required in java javax.crypto.Cipher.getInstance(algorithm). For example: AES/CBC/PKCS5Padding
key Uint8Array key used to encrypt the data. In AES algorithms. The key size must match the selected algorithm. For example, AES algorithms support keys of 16 bytes (AES-128), 24 bytes (AES-192), or 32 bytes (AES-256).
ivParam Uint8Array Initialization vector (IV) used in encryption. Only allowed or required depending on the selected algorithm.
data Uint8Array data to be encoded
var key128 = utils.bytes.fromText('012345678902345a'); /* 128 bits for AES-128 */
var ivParam = utils.bytes.fromText('0123456789023452');

var inputData = [104, 111, 108, 97, 32, 99, 97, 114, 97, 108, 99, 111, 108, 52, 53, 54];
var encriptedData = crypt.aes.encrypt("AES/CBC/NoPadding", key128, ivParam, inputData); 

log(encriptedData) // Expected output: [178,19,136,33,80,100,25,183,126,178,19,125,139,24,212,253]

crypt.aes.decrypt(algorithm, key, ivParameterSpec, data)

Decrypt the data using the selected AES algorithm with the provided shared key.

Kind: global function
Returns: Uint8Array

Param Type Description
algorithm string algorithm identifier, as required in java javax.crypto.Cipher.getInstance(algorithm). For example: AES/CBC/PKCS5Padding
key Uint8Array key used to decrypt the data. In AES algorithms. The key size must match the selected algorithm. For example, AES algorithms support keys of 16 bytes (AES-128), 24 bytes (AES-192), or 32 bytes (AES-256).
ivParam Uint8Array Initialization vector (IV) used in encryption. Only allowed or required depending on the selected algorithm.
data Uint8Array encoded data to be decrypted
var key128 = utils.bytes.fromText('012345678902345a'); /* 128 bits for AES-128 */
var ivParam = utils.bytes.fromText('0123456789023452');

var inputEncrypted = [178,19,136,33,80,100,25,183,126,178,19,125,139,24,212,253]
var data = crypt.aes.decrypt("AES/CBC/NoPadding", key128, ivParam, inputEncrypted);

log(data) // Expected output: [104, 111, 108, 97, 32, 99, 97, 114, 97, 108, 99, 111, 108, 52, 53, 54] 

HMAC JS API

Following functions apply some hashing function with specified key to specified data. In all cases, the result is a JSON with following structure:

Param Type Description
error string It will be null if hashing finishes correctly. If hashing fails, exception message will be indicated.
result Uint8Array Obtained hash. If the hash function is applied correctly, byte array with hashed data will be returned. If some error occurs, null will be returned

Correct hashing result:

{
 "error": null,
 "result": [-102, 54, -66, -103, -25, 112, 1, 118, -65, 122, -22, 27, 88, 106, -54, 122, -11, -109, -63, 99, -127, -23, -15, -43, 28, 109, -22, -65, 25, 45, -85, 9, 39, 44, 39, 75, -95, -47, -61, -103, 101, -80, -62, -35, -102, 74, -76, 45, 94, -7, -35, 8, -80, -80, -65, -103, 127, 104, 75, -65, -89, 111, -34, 109]
}

Result with some error

{
 "error": "Algorithm HmacSHA999 not available",
 "result": null
}

crypt.hmac.sha256(data, key)

Create a hash from provided string using sha256.

Kind: global function
Returns: Object

Param Type Description
data string Data to be hashed
key Uint8Array key to be used for hashing
var hashResult = crypt.hmac.sha256("Some data to be hashed", "hashingKey");
log(hashResult) 
/* Expected output: 
{
 "error": null,
 "result": [-56, -6, 82, -104, -74, -100, -103, 112, 80, -89, -61, 85, -63, 58, -102, -54, -68, 15, 70, 60, 44, 85, 110, -100, -108, -95, -48, -3, 8, -25, 33, -4]
}
*/

crypt.hmac.sha512(data, key)

Create a hash from provided string using sha512.

Kind: global function
Returns: Object

Param Type Description
data string Data to be hashed
key Uint8Array key to be used for hashing
var hashResult = crypt.hmac.sha512("Some data to be hashed", "hashingKey");
log(hashResult) ;
/* Expected output: 
{
 "error": null,
 "result": [-102, 54, -66, -103, -25, 112, 1, 118, -65, 122, -22, 27, 88, 106, -54, 122, -11, -109, -63, 99, -127, -23, -15, -43, 28, 109, -22, -65, 25, 45, -85, 9, 39, 44, 39, 75, -95, -47, -61, -103, 101, -80, -62, -35, -102, 74, -76, 45, 94, -7, -35, 8, -80, -80, -65, -103, 127, 104, 75, -65, -89, 111, -34, 109]
}
*/

Protocol APIs

You only need the page for the protocol your device actually speaks. Each of these injects one global object into your script, on top of the core API that is always there.

This is the reference, not the guide

These pages document which functions you can call. For how an integration over that protocol works — who opens the conversation, what the device must be, how to schedule the work — read Supported protocols, and then the page for your transport: HTTP, MQTT, WebSocket, CoAP, Meter and industrial protocols or Remote access.

Transports OpenGate already speaks

The device arrived over one of these, and the API lets you read the incoming message and shape the reply.

Protocol Object Gives you
HTTP http The received request, the response you return, and an HTTP client for outgoing calls
MQTT mqtt Publish messages to a topic
WebSocket Send a message down an already open connection
CoAP coap.server.response Set the status code, content format and body of the CoAP response. Integration: CoAP

Meter and industrial protocols

Here the connector function is the one that opens the conversation, usually to poll a meter.

Protocol Object Gives you
DLMS dlms Open a DLMS connection and run get, set and action requests
DLMS Gas dlms_gas Smart Gas meters across manufacturers, on top of DLMS
IEC102 Connect over IEC102 and execute ASDUs: login, time, load curves, profiles
SNMP snmp SNMP get and set against a device

Shell and network access

Protocol Object Gives you
SSH ssh Open a session, send commands, read the answer
Telnet The same over Telnet
ICMP Send a ping and process the result
ICMP Response payload The payload a RESPONSE function receives with the ping result

Subscriptions

Protocol Object Gives you
Kite kite Query and change a subscription’s status through the Kite connector

Subsections of Protocol APIs

HTTP JavaScript API

Connector functions HTTP JS API guide

This API allows users to execute HTTP related actions from a connector function.

HTTP Object

The http object is the main object of the HTTP client. It allows perform different actions such as do http request or define http response for Operation Response or Iot Collections requests through http protocol.

http object is divided in two objects:

  • server: Only for CFs called from http requests. Gives access to received request and allows to specify http response to be sent.
  • client: Configure and make http requests.

server Object Properties

Read only properties with received HTTP request and response object to define HTTP response to be sent.

Property Type Default Description
headers JSON Received http request headers
uri string Received http request uri (without host)
body * Received http request body (the same content as the payload property)
response JSON {} Object to be used to define http response to be sent when CF finishes

server.response Object Properties

Property Type Default Description
status integer 201 Response HTTP code
body * null Response body
headers JSON null Response HTTP headers

server.response Object Methods

server.response.send()

Creates HTTP Response with defined properties. The response will be sent once the CF is finished correctly.

Example:

http.server.response.status=200;
http.server.response.body={'msg': 'OK'};
http.server.response.send();
//continue CF execution
return collection;

In this case, after CF execution, the Http response to be generated will have 200 status code with specified body ({'msg': 'OK'}) and no specific headers.

client Object Properties

Property Type Default Description
method string null One of http methods: POST, GET, …
uri string null Request uri
headers JSON null Request headers in json format
body * null Response body
alias string null Used to set custom https context, alias to be used for keystore
certificate string null Used to set custom https context, certificate content
privateKey string null Used to set custom https context, private key content
redirectPolicy string null Overrides default redirection policy
clientVersion string null Overrides default client version configured
timeOut integer null Overrides default timeout configured. Defined in seconds

client Object Methods

Following methods return Http Request result JSON with these fields:

Field Description
statusCode Received response HTTP code
body Received response body
headers Received response headers

client.post()

Performs POST using defined configuration. Overrides defined method.

Example of use with default values:

http.client.uri = "https://remotehost/uri";
http.client.headers = {'X-Api-Key':'apikey'};
http.client.body = {'operation_name':'custom_operation_request'};
var httpResp = http.client.post();

client.put()

Performs PUT using defined configuration. Overrides defined method.

Example of use with default values:

http.client.uri = "https://remotehost/uri";
http.client.headers = {'X-Api-Key':'apikey'};
http.client.body = {'operation_name':'custom_operation_request'};
var httpResp = http.client.put();

client.get()

Performs GET using defined configuration. Overrides defined method.

Example of use with default values:

http.client.uri = "https://remotehost/uri";
http.client.headers = {'X-Api-Key':'apikey'};
var httpResp = http.client.get();

client.delete()

Performs DELETE using defined configuration. Overrides defined method.

Example of use with default values:

http.client.uri = "https://remotehost/uri";
http.client.headers = {'X-Api-Key':'apikey'};
var httpResp = http.client.delete();

client.patch()

Performs PATCH using defined configuration. Overrides defined method.

Example of use with default values:

http.client.uri = "https://remotehost/uri";
http.client.headers = {'X-Api-Key':'apikey'};
http.client.body = {'operation_name':'custom_operation_request'};
var httpResp = http.client.patch();

client.request()

Performs configured http request. method property must be defined.

Example of use with default values:

http.client.method = "GET";
http.client.uri = "https://remotehost/uri";
http.client.headers = {'X-Api-Key':'apikey'};
http.client.body = {'operation_name':'custom_operation_request'};
var httpResp = http.client.request();

MQTT JavaScript API

Connector functions MQTT JS API guide

This API allows users to execute operations in the MQTT client from a connector function.

MQTT Object

The mqtt object is the main object of the MQTT client. It allows publishing messages to an MQTT topic.

mqtt Object Properties

Property Type Default Description
device string entity id Target device id
topic string odm/request Topic uri where to publish the message

mqtt Object Methods

mqtt.publish(payload)

Publish a message on mqtt topic

Property Type Default Description
payload * Message to be sent. It can be string or a json object

Example of use with default values:

mqtt.publish({'operation_name':'custom_operation_request'});

Example of use with overriden values

mqtt.device='other_device';
mqtt.topic = 'destination/topic';
mqtt.publish('Message to be sent');

Websocket JavaScript API

Connector functions websocket JS API guide

This API allows users to send message to opened websocket.

Websocket Object Properties

Property Type Description
payload * Data to be published. It will be converted to string.
deviceId String Device identifier with the opened websocket

Websocket Object Methods

websocket.sendMsg()

Executes specified request using the properties of the websocket object

Returns: Object

Example of use:

websocket.payload = {someField:someValue};
websocket.deviceId = 'someDeviceId'
websocket.sendMsg();

CoAP API

Connector functions JS API guide for the CoAP protocol

This file provides methods and properties to specify a custom return code and a custom body in the CoAP response that is sent from the OpenGate platform to the device.

coap.server.response Object: Specifying a custom CoAP response to the device.

The coap.server.response global object provides all the necessary functionality to be able to specify both the state and the body of the CoAP response to return to the device.

coap.server.response Object Properties

Property Type Default Description
status number 204 The returned status, as a three digits number without dots
body Uint8Array [] The body of the returned CoAP response, as array of bytes
contentFormat number Indicates the representation format of the response body

coap.server.response Object Methods

coap.server.response.send()

The status, body and contentFormat are saved for inclusion in the CoAP response.

Example of use

// sending CHANGED status (2.04), and a number 1 as body (two bytes unsigned integer - little endian)
coap.server.response.status = 204; 
coap.server.response.body = new Uint8Array([01, 00]); 
coap.server.response.send();

DLMS JavaScript API

Connector functions DLMS JS API guide

This JavaScript code provides predefined functions to execute DLMS requests from the connector function. They are explained below.

Tip

For Smart Gas devices, there is a specialized extension of this API called DLMS Gas API which simplifies many common operations.

Types of south criteria for your DLMS connector function:

Description Format Example
Identification via OBIS code for notifications that contain a description element dlms://obis/<obis-code> dlms://obis/0.0.66.0.48.255
Identification via template ID for notifications containing only 1 or more octet-string values and taking first byte of each octet-string as template ID dlms://template/<template-id> dlms://template/48
Warning

The OBIS Code needs to be specified using only dots as separator, don’t use the complex form 0-0:66.0.48.255 or the Connector Function will not be called.

Input parameters in Collection Connector Function

The main script will have access to three main vars:

  • entity: json with flattened operation target device entity representation.
  • gateway: json with flattened gateway entity representation. It can be null.
  • payload: json that represents the DLMS message received from the device.
  • contextParams: json object with execution context information. It can have some of this params:
    • apiKey: device or user apikey.
    • remoteIp: remote host where DLMS message is invoked.
    • obisCode: OBIS code of the message arrived.
    • templateId: Template identifier of the message arrived.

ContextParams for COLLECTION Connector function for DLMS connection:

{
  "apiKey": "97c9ceae-c4ee-49ea-ad50-e499bb55ac63",
  "obisCode": "0.1.2.3.3.5",
}

Here is a payload example:

payload = [
	{
	    "obisCode": "0.0.49.0.75.254",
	    "attrId": 2,
	    "classId": 1,
	    "type": "octet-string",
	    "value": [2, 3, 215, 0]
	},
	{
	    "obisCode": "0.0.49.0.77.254",
	    "attrId": 4,
	    "classId": 1,
	    "type": "unsigned",
	    "value": 1
	}
]

JS DLMS API

For REQUEST Connector Functions we will use the functions described below. You have an object, named dlms, with all the functions described. You must use dlms.<function>.

If you want to collect data after executing any of these function you can call collectCF and you can set various obis code in the URL provided as you can see in the next example:

collectCF(result.data, "dlms://obis/0.1.2.3.4.5");

dlms.connect()

Opens DLMS connection (default via TCP transport).

Kind: global function

The connection parameters need to be set before calling connect:

dlms.ip = "127.0.0.1"
dlms.connect()
Config name Type Default value Description
ip string null IP address of the device you want to connect to.
port number 4059 Port of the device you want to connect to.
connectionType string ("TCP", "UDP") "TCP" Protocol of the device you want to connect to.
cwport number 16 Client WPort.
swport number 1 Server WPort.
refMethod string ("LN", "SN") "LN" Server WPort.
securityLevel string ("MANUFACTURER", "HIGH", "LOW", "SHA1, "SHA256", "MD5", "GMAC", "ECDSA", "NONE") "NONE" Authentication mechanism to use in the connection.
password string null Password to use with the authentication mechanism.
timeout number 5000 Timeout of the connection.
security string (NONE, AUTHENTICATION, ENCRYPTION, AUTHENTICATION_ENCRYPTION) null Security used in every message. null value will be treated as NONE
securitySuite string (SUITE_0, SUITE_1, SUITE_2) null Authentication, encryption and key wrapping algorithm. null value will be treated as SUITE_0
authenticationKey byte[] as hexadecimal string null Key used for message authentication. The length of the key in bytes must match the securitySuite used
blockCipherKey byte[] as hexadecimal string null Key used for message encryption. The length of the key in bytes must match the securitySuite used
hesSystemTitle byte[] as hexadecimal string null Overrides default System Title to be sent in requests to client
ignoreSystemTitleInCiphering boolean false Whether the optional hesSystemTitle should be ignored (not sent) when sending ciphered messages
forceGetWithoutList boolean false Whether to force get() by default to request elements one by one instead of using a list when MULTIPLE_REFERENCES conformance is enabled
forceSetWithoutList boolean false Whether to force set() by default to request elements one by one instead of using a list when MULTIPLE_REFERENCES conformance is enabled
conformance string[] ("MULTIPLE_REFERENCES", "GENERAL_PROTECTION") [] Communication conformance values. For example, ‘MULTIPLE_REFERENCES’ specifies it is possible to send to device multiple obis in unique request
Warning

In case of security parameter is not NONE, next default values will be set:

  • blockCipherKey: 000102030405060708090A0B0C0D0E0F
  • authenticationKey: D0D1D2D3D4D5D6D7D8D9DADBDCDDDEDF

Add attributes

addAttr() is used both for get() and set() methods and has multiple signatures:

dlms.addAttr(classId, obisCode, attrId)

Applicable for normal gets.

Param Type Description
classId Array The class ID of the object to access
obisCode string The name of the object to access
attrId number The attribute index of the object
// After connection has been established
dlms.addAttr(1, "1.2.3.4.5.6", 2)
var getResult = dlms.get() // More details on get() next

dlms.addAttr(classId, obisCode, attrId, type, value)

Applicable for normal sets.

Param Type Description
classId Array The class ID of the object to access
obisCode string The name of the object to access
attrId number The attribute index of the object
type string The data type of the value to set
value see data types The data value to set
// After connection has been established
dlms.addAttr(1, "1.2.3.4.5.6", 2, "unsigned", 254)
var setResult = dlms.set() // More details on set next

dlms.addAttr(classId, obisCode, attrId, data)

Applicable for normal sets.

Param Type Description
classId Array The class ID of the object to access
obisCode string The name of the object to access
attrId number The attribute index of the object
data object (with type and value) The data with both type and value to set

where:

data attribute Type Description
type string The data type of the value to set
value see data types The data value to set

This is an alternate way of using addAttr(classId, obisCode, attrId, type, value) with the data parameters in an object.

// After connection has been established
//dlms.addAttr(1, "1.2.3.4.5.6", 2, "unsigned", 254)
dlms.addAttr(1, "1.2.3.4.5.6", 2, {"type": "unsigned", "value": 254}) // This is similar to the previous addAttr (commented)
var setResult = dlms.set() // More details on set next

It’s helpful when used in combination with get().

// After connection has been established
dlms.addAttr(1, "1.2.3.4.5.6", 2)
var getResult = dlms.get() // More details on get next
dlms.addAttr(1, "1.2.3.4.5.255", 2, getResult[0]) // Set on object 1.2.3.4.5.255 the value (and data type) retrieved from object 1.2.3.4.5.6
var setResult = dlms.set() // More details on set next

dlms.addAttr(classId, obisCode, attrId, selectiveAccess)

Applicable for gets with selective access.

Param Type Description
classId Array The class ID of the object to access
obisCode string The name of the object to access
attrId number The attribute index of the object
selectiveAccess object (with accessSelector and accessParameters) The selective access descriptor

where:

selectiveAccess attribute Type Description
accessSelector number The access selector
accessParameters object with type and value The access parameters

and

accessParameters attribute Type Description
type string The data type of access parameters
value see data types The data value of the access parameters
dlms.addAttr(1, "1.2.3.4.5.6", 2, {"accessSelector": 1, "accessParameters": {"type": "unsigned", "value": 254}})
Info

The proper access selector and parameters depend on the manufacturer and object type. Some may implement by range and by entry defined in the DLMS Blue Book - Parameters for selective access to the buffer attribute (section 4.3.6 in Blue Book 12).

// Example by range
dlms.addAttr(7, '7.0.99.99.3.255', 2, {
	accessSelector: 1,
	accessParameters: {
		type: 'structure',
		value: [{
			type: 'structure',
			value: [{
				type: 'long-unsigned',
				value: 1
			}, {
				type: 'octet-string',
				value: [0, 0, 1, 1, 0, 255]
			}, {
				type: 'integer',
				value: 2
			}, {
				type: 'long-unsigned',
				value: 0
			}]
		}, {
			type: 'double-long-unsigned',
			value: 1735884000
		}, {
			type: 'double-long-unsigned',
			value: 1736229600
		}, {
			type: 'array',
			value: []
		}]
	}
})

dlms.addAttr(attribute)

Generic signature applicable for all cases.

Attribute Type Mandatory Description
classId Array The class ID of the object to access
obisCode string The name of the object to access
attrId number The attribute index of the object
type string only on set() The data type of the value to set
value see data types only on set() The data value to set
accessSelector number only on get() with selective access The access selector
accessParameters object with type and value only on get() with selective access The access parameters

where:

accessParameters attribute Type Description
type string The data type of access parameters
value see data types The data value of the access parameters
// For normal get
dlms.addAttr({classId: 1, obisCode: "1.2.3.4.5.6", attrId: 2})
// For normal set
dlms.addAttr({classId: 1, obisCode: "1.2.3.4.5.6", attrId: 2, type: "unsigned", value: 254})
// For get with selective access
dlms.addAttr({classId: 1, obisCode: "1.2.3.4.5.6", attrId: 2, accessSelector: 1, accessParameters: {type: "unsigned", value: 254}})
data types
Name Value type Compatible type in set Description Example
null-data null null
array Array of object Complex data, all elements must be of the same type [{"type":"unsigned","value":1},{"type":"unsigned","value":2}]
structure Array of object Complex data, different elements possible [{"type":"unsigned","value":1},{"type":"visible-string","value":"two"}]
boolean boolean true
bit-string Array of boolean string An ordered sequence of boolean values. In set() an string may be used instead of array of boolean as bit-string representation [true,false,true] ("101" as string representation in set())
double-long number Integer32 (-21474836482147483647) 0
double-long-unsigned number Unsigned32 (04294967295 0
octet-string Array of number string An ordered sequence of octets (8 bit bytes). May contain a dateTime value, see getDateTime() and getDate() [116,101,115,116] (or "test" in set())
visible-string string An ordered sequence of ASCII characters "test"
utf8-string string An ordered sequence of characters encoded as UTF-8 "test"
bcd number Binary Coded Decimal (099) 0
integer number Integer8 (-128127) 0
long number Integer16 (-3276832767) 0
unsigned number Unsigned8 (0255) 0
long-unsigned number Unsigned16 (065535) 0
compact-array Array of object Provides an alternative, compact encoding of complex data, all elements must be of the same type [{"type":"unsigned","value":1},{"type":"unsigned","value":2}]
long64 number Integer64 (-90071992547409919007199254740991) 1 0
long64-unsigned number Unsigned64 (09007199254740991) 1 0
enum number The elements of the enumeration type are defined in the Attribute description or Method description section of a COSEM IC specification (0255) 0
float32 number Floating point number in 4 bytes 0
float64 number Floating point number in 8 bytes 0
date-time object Object containing all fields in a dateTime object {"year":2023,"month":11,"dayOfMonth":28,"dayOfWeek":2,"hour":10,"minute":26,"second":55,"hundredthsOfSecond":0,"deviation":-60,"status":0}
date object Object containing year, month, dayOfMonth and dayOfWeek fields in a dateTime object {"year":2023,"month":11,"dayOfMonth":28,"dayOfWeek":2}
time object Object containing hour, minute, second and hundredthsOfSecond fields in a dateTime object {"hour":16,"minute":1,"second":2,"hundredthsOfSecond":20}
Warning

JavaScript does not support the whole range of DLMS numbers, see footnotes.

dateTime objects

A dateTime object is used to specify all possible values for date-time, date and time DLMS types. It may define the following attributes:

Name Normal values Additional values
year 0..65534 65535 means unspecified
month 1..12 (jan-dec) 253 = daylight savings end, 254 daylight savings begin, 255 not specified
dayOfMonth 1..31 224..252 reserved, 253 2nd last day of month, 254 last day of month, 255 not specified
dayOfWeek 1..7 (mon-sun) 255 not specified
hour 0..23 255 not specified
minute 0..59 255 not specified
second 0..59 255 not specified
hundredthsOfSecond 0..99 255 not specified
deviation -720..720 (in minutes of local time to UTC) 32768 not specified
status 8 bit flags 255 not specified
Info

For more information see DLMS Blue Book - Date and time formats (section 4.1.6.1 in Blue Book 12)

To transform this object to a Date see getDate(). Keep in mind that sets of date-time, date, time and octet-string do not accept a Date object. To transform it to a dateTime object use getDateTime().

dlms.get(descriptive, forceWithoutList)

Executes a multi DLMS get attribute request with the previously specified payload (addAttr(classId, obisCode, attrId)).

Kind: global function
Returns: Array - Array of JSONs with responses. Each JSON will have six fields: result of the get operation, the requested classId, obisCode and attrId, type with the data type of the received value and the value received from the device. An optional error field may be returned for any error that happened during the get.

Param Type Mandatory Default Description
descriptive boolean true Descriptive mode returns complex data as Array of object containing type and value for each object, non descriptive mode flattens the returned array
forceWithoutList boolean false Whether to force the get to request elements one by one instead of using a list when MULTIPLE_REFERENCES conformance is enabled (if it’s not set the global forceGetWithoutList will be used)

Example for descriptive get:

// After connection has been established
dlms.addAttr(1, "0.0.0.0.0.0", 2) // Example for null-data
dlms.addAttr(1, "0.0.0.0.0.1", 2) // Example for array
dlms.addAttr(1, "0.0.0.0.0.2", 2) // Example for structure
dlms.addAttr(1, "0.0.0.0.0.3", 2) // Example for boolean
dlms.addAttr(1, "0.0.0.0.0.4", 2) // Example for bit-string
dlms.addAttr(1, "0.0.0.0.0.5", 2) // Example for double-long
// Rest on number examples are omitted because they are similar to double-long
dlms.addAttr(1, "0.0.0.0.0.6", 2) // Example for octet-string
dlms.addAttr(1, "0.0.0.0.0.7", 2) // Example for visible-string
// utf8-string example is omitted because it's similar to visible-string

var result = dlms.get() // Descriptive (true can also be passed)
log(result[0]) // Expected output: {"result":"success","classId":1,"obisCode":"0.0.0.0.0.0","attrId":2,"type":"null-data","value":null}]
log(result[1]) // Expected output: {"result":"success","classId":1,"obisCode":"0.0.0.0.0.1","attrId":2,"type":"array","value":[{"type":"long-unsigned","value":1},{"type":"long-unsigned","value":2},{"type":"long-unsigned","value":3}]}
log(result[2]) // Expected output: {"result":"success","classId":1,"obisCode":"0.0.0.0.0.2","attrId":2,"type":"structure","value":[{"type":"unsigned","value":1},{"type":"long-unsigned","value":2},{"type":"array","value":[{"type":"visible-string","value":"one"},{"type":"visible-string","value":"two"}]}]}
log(result[3]) // Expected output: {"result":"success","classId":1,"obisCode":"0.0.0.0.0.3","attrId":2,"type":"boolean","value":true}
log(result[4]) // Expected output: {"result":"success","classId":1,"obisCode":"0.0.0.0.0.4","attrId":2,"type":"bit-string","value":[true,false,true]}
log(result[5]) // Expected output: {"result":"success","classId":1,"obisCode":"0.0.0.0.0.5","attrId":2,"type":"double-long","value":1}
log(result[6]) // Expected output: {"result":"success","classId":1,"obisCode":"0.0.0.0.0.6","attrId":2,"type":"octet-string","value":[116,101,115,116]}
log(result[7]) // Expected output: {"result":"success","classId":1,"obisCode":"0.0.0.0.0.7","attrId":2,"type":"visible-string","value":"test"}

Example for non descriptive get

// After connection has been established
// Simple value types are returned exactly the same as descriptive mode, null-data is included to viasually see this
dlms.addAttr(1, "0.0.0.0.0.0", 2) // Example for null-data
// Simple value types are returned exactly the same as descriptive mode, null-data is included to viasually see this
dlms.addAttr(1, "0.0.0.0.0.1", 2) // Example for array
dlms.addAttr(1, "0.0.0.0.0.2", 2) // Example for structure

var result = dlms.get(false) // Non descriptive
log(result[0]) // Expected output: {"result":"success","classId":1,"obisCode":"0.0.0.0.0.0","attrId":2,"type":"null-data","value":null}]
log(result[1]) // Expected output: {"result":"success","classId":1,"obisCode":"0.0.0.0.0.1","attrId":2,"type":"array","value":[1,2,3]}
log(result[2]) // Expected output: {"result":"success","classId":1,"obisCode":"0.0.0.0.0.2","attrId":2,"type":"structure","value":[1,2,["one","two"]]}
Non descriptive get

Complex values returned in a non-descriptive get cannot be passed as value in a set.

get results
  • success
  • hardware-fault
  • temporary-failure
  • read-write-denied
  • object-undefined
  • object-class-inconsistent
  • object-unavailable
  • type-unmatched
  • scope-of-access-violated
  • data-block-unavailable
  • long-get-aborted
  • no-long-get-in-progress
  • long-set-aborted
  • no-long-set-in-progress
  • data-block-number-invalid
  • other-reason

dlms.set(descriptive)

Executes a multi DLMS set attribute request with the previously specified payload (addAttr(classId, obisCode, attrId, type, value)).

Kind: global function
Returns: Array - Array of JSONs with responses. Each JSON will have six fields: result of the set operation, the requested classId, obisCode and attrId, type with the data type of the received value and the value received from the device. An optional error field may be returned for any error that happened during the set.

Param Type Mandatory Default Description
descriptive boolean true Does not matter on set(). It’s included to have the same signature as get() and in case a device returns something in a set.
forceWithoutList boolean false Whether to force the set to request elements one by one instead of using a list when MULTIPLE_REFERENCES conformance is enabled (if it’s not set the global forceSetWithoutList will be used)
Info

Normally, a set request should always return a null-data as type and null as value.

Warning

A set request for complex data must always specify the value in a descriptive manner (as Array of Object containing both type and value for each and all elements and sub-elements in case of more nested complex elements).

// After connection has been established
dlms.addAttr(1, "0.0.0.0.0.0", 2, "null-data", null) // Example for null-data
dlms.addAttr(1, "0.0.0.0.0.1", 2, "array", [{"type":"long-unsigned","value":1},{"type":"long-unsigned","value":2},{"type":"long-unsigned","value":3}]) // Example for array
dlms.addAttr(1, "0.0.0.0.0.2", 2, "structure", [{"type":"unsigned","value":1},{"type":"long-unsigned","value":2},{"type":"array","value":[{"type":"visible-string","value":"one"},{"type":"visible-string","value":"two"}]}]) // Example for structure
dlms.addAttr(1, "0.0.0.0.0.3", 2, "boolean", false) // Example for boolean
dlms.addAttr(1, "0.0.0.0.0.4", 2, "bit-string", [true, false, true, false]) // Example for bit-string as boolean array (default type)
dlms.addAttr(1, "0.0.0.0.0.4", 2, "bit-string", "1010") // Example for bit-string as string with the bit-string representation (alternative set value type, a get will always return it as boolean array)
dlms.addAttr(1, "0.0.0.0.0.5", 2, "double-long", 1) // Example for double-long
// Rest on number examples are omitted because they are similar to double-long
dlms.addAttr(1, "0.0.0.0.0.6", 2, "octet-string", [116, 101, 115, 116]) // Example for octet-string as byte array (default type)
dlms.addAttr(1, "0.0.0.0.0.6", 2, "octet-string", "test") // Example for octet-string as string (alternative set value type, a get will always return it as byte array)
dlms.addAttr(1, "0.0.0.0.0.7", 2, "visible-string", "test") // Example for visible-string
// utf8-string example is omitted because it's similar to visible-string

var result = dlms.set() // Descriptive mode does not really matter, because return should always be null-data.
log(result[0]) // Expected output: {"result":"success","classId":1,"obisCode":"0.0.0.0.0.0","attrId":2,"type":"null-data","value":null}]
// All remaining results are similar, including returning null-data.
set results

They are the same as get results.

dlms.addMethod(classId, obisCode, methodId, type, value)

addMethod() is used for method() function.

Param Type Mandatory Description
classId Array The class ID of the object to access
obisCode string The name of the object to access
methodId string The method index in the object
type string when needed The data type of the value to pass to the method
value string when needed The data value to pass to the method

dlms.method(descriptive)

Executes a multi DLMS method (or action) request with the previously specified payload (addMethod(classId, obisCode, methodId, type, value)).

Kind: global function
Returns: Array - Array of JSONs with responses. Each JSON will have six fields: result of the method operation, the requested classId, obisCode and methodId, type with the data type of the received value and the value received from the device. An optional error field may be returned for any error that happened during the method (for example an error decoding the optional return parameters).

Param Type Mandatory Default Description
descriptive boolean true Descriptive mode returns complex data as Array of object containing type and value for each object, non descriptive mode flattens the returned array
Info

A method request may need and/or return whatever type and value it’s needed. Check Method description section of a COSEM IC specification.

// After connection has been established
dlms.addMethod(7, "1.0.99.1.0.255", 2) // Example for method needing null-data as parameter (default type and value)
dlms.addMethod(7, "1.0.99.1.0.254", 2, "unsigned", 0) // Example for method needing 0 (unsigned) as parameter

var result = dlms.method()
log(result[0]) // Expected output: {"result":"success","classId":1,"obisCode":"1.0.99.1.0.255","methodId":2,"type":"null-data","value":null}]
log(result[1]) // Expected output: {"result":"success","classId":1,"obisCode":"1.0.99.1.0.254","methodId":2,"type":"boolean","value":true}
action results
  • success
  • hardware-fault
  • temporary-failure
  • read-write-denied
  • object-undefined
  • object-class-inconsistent
  • object-unavailable
  • type-unmatched
  • scope-of-access-violated
  • data-block-unavailable
  • long-action-aborted
  • no-long-action-in-progress
  • other-reason

dlms.initializeNextFrameCounter(currentFrameCounter)

Sets the invocation counter of the ciphering to the next value of the received frame counter. This is used for devices that maintain two separate frame counters (one for transmit and one for receive). Usually the current Management Frame Counter - On-line is received in a CompactFrame notification and that value is the one that needs to be passed to this function for that device.

Kind: global function

Param Type Mandatory Description
currentFrameCounter number The current frame counter sent by the device.

dlms.getInvocationCounter()

Returns the current invocation counter of the ciphering.

Kind: global function Returns: number (integer).

dlms.disconnect()

Close the DLMS connection.

Kind: global function

dlms.getCompactData(typeDescription, value, descriptive, italianMode)

Extract the compact data serialized in a byte array according to the description given.

Kind: global function
Returns: Object - Object containing result and/or error. On success, result contains the parsed compact data (either in descriptive (with type in each value) or non-descriptive (direct values) format depending on the descriptive parameter). On error, the error will contain the error description and result may be null or contain a best-effort decoding of the compact data that may be incorrect.

Param Type Mandatory Default Description
typeDescription Object Object with the description of the data. The attributes of the object will be different according to the data expected’
value Array of number (or Object containing an octet-string type with its value) Array of bytes with the compact data (for example the DLMS notification data or element received)
descriptive boolean true Descriptive mode returns complex data as Array of object containing type and value for each object, non descriptive mode flattens the returned array
italianMode boolean false Determines if the compact data decoding of arrays must be in italian mode or not (explicitArrayLengthInContent)

Here is a description example:

var typeDescription = {"type": "structure", "items": [
		{"type": "long-unsigned"},
		{"type": "unsigned"},
		{"type": "array", "length": 1, "subtype": {"type": "long-unsigned"}},
		{"type": "array", "length": 1, "subtype": {"type": "double-long-unsigned"}},
		{"type": "structure", "items": [
			{"type": "unsigned"}, {"type": "long-unsigned"}
		]},
		{"type": "octet-string"}
	]
}
Info
  • Simple data types just need to define the type as seen in data types.
  • array type description must define a subtype, which is a typeDescription, and a length when not using italianMode. italianMode (or explicitArrayLengthInContent) does not need the length because it’s encoded in the received data.
  • structure type description must define an array of items, which are each a typeDescription.
  • compact-array is not supported inside a compact data.

Here is an example of the function result in descriptive and non descriptive modes:

var {result: data, error} = dlms.getCompactData(typeDescription, payload);
if (error) {
    log("Error: " + error);
} else {
    log(data) // Expected output: {"type":"structure","value":[{"type":"long-unsigned","value":1},{"type":"unsigned","value":2},{"type":"array","value":[{"type":"long-unsigned","value":3}]},{"type":"array","value":[{"type":"double-long-unsigned","value":4}]},{"type":"structure","value":[{"type":"unsigned","value":5},{"type":"long-unsigned","value":6}]},{"type":"octet-string","value":[83,112,97,114,101,32,79,98,106,101,99,116]}]}
}

var {result: data, error} = dlms.getCompactData(typeDescription, payload, false);
if (error) {
    log("Error: " + error);
} else {
    log(data) // Expected output: [1,2,[3],[4],[5,6],[83, 112, 97, 114, 101, 32, 79, 98, 106, 101, 99, 116]]
}

dlms.getDate(value) ⇒ Date

Extract the Date of a dateTime object or an octet-string. Some dateTime objects or octet-string may not contain a complete date and this method will return a date that may not be as accurate as you expect. You should check the dateTime object for unspecified value.

Kind: global function Returns: Date

Param Type Mandatory Default Description
value dateTime object or Array of number (or Object having type date-time, date, time or octet-string with its value) The best-effort Date possible
// compact-data containing all 

var dateTime = data[0]
log(dateTime) // Expected output: {"type":"date-time","value":{"year":2023,"month":11,"dayOfMonth":28,"dayOfWeek":2,"hour":10,"minute":26,"second":55,"hundredthsOfSecond":0,"deviation":-60,"status":0}}
log(dlms.getDate(dateTime).toISOString()) // Expected output: 2023-11-28T11:26:55.000Z
log(dlms.getDate(dateTime.value).toISOString()) // Expected output: 2023-11-28T11:26:55.000Z

var date = data[1]
log(date) // Expected output: {"type":"date","value":{"year":2023,"month":11,"dayOfMonth":28,"dayOfWeek":2}}
log(dlms.getDate(date).toISOString()) // Expected output: 2023-11-28T00:00:00.000Z
log(dlms.getDate(date.value).toISOString()) // Expected output: 2023-11-28T00:00:00.000Z

var time = data[2]
log(time) // Expected output: {"type":"date","value":{"hour":16,"minute":1,"second":2,"hundredthsOfSecond":20}}
log(dlms.getDate(time).toISOString()) // Expected output: 0000-01-01T16:01:02.200Z
log(dlms.getDate(time.value).toISOString()) // Expected output: 0000-01-01T16:01:02.200Z

var octet = data[3]
log(octet) // Expected output: {"type":"octet-string","value":[7, 231, 11, 28, 2, 10, 26, 55, 0, -1, -60, 0]}
log(dlms.getDate(octet).toISOString()) // Expected output: 2023-11-28T11:26:55.000Z
log(dlms.getDate(octet.value).toISOString()) // Expected output: 2023-11-28T11:26:55.000Z

var undefinedDateTimeInOctet = data[4]
log(undefinedDateTimeInOctet) // Expected output: {"type":"octet-string","value":[-1, -1, -1, -1, -1, -1, -1, -1, -1, -128, 0, -1]}
log(dlms.getDate(undefinedDateTimeInOctet).toISOString()) // Expected output: 0000-01-01T00:00:00.000Z
log(dlms.getDate(undefinedDateTimeInOctet.value).toISOString()) // Expected output: 0000-01-01T00:00:00.000Z

log(dlms.getDate(dlms.unspecifiedDateTime()).toISOString()) // Expected output: 0000-01-01T00:00:00.000Z

dlms.getDateTime(value)

Extract the dateTime object of a Date or an octet-string. The resulting dateTime objects generated from a Date will use UTC time specifying a deviation of 0. If you need something else construct the dateTime object manually.

Kind: global function Returns: Object

Param Type Mandatory Default Description
value Date or Array of number (or Object having type of octet-string with its value) Value containing a dateTime compatible value
log(dlms.getDateTime(new Date('2023-11-28T10:24:00.000Z'))) // Expected output: {"year":2023,"month":11,"dayOfMonth":28,"dayOfWeek":2,"hour":10,"minute":24,"second":0,"hundredthsOfSecond":0,"deviation":0,"status":0}
log(dlms.getDateTime(new Date('2023-11-28T10:24:00.299Z'))) // Expected output: {"year":2023,"month":11,"dayOfMonth":28,"dayOfWeek":2,"hour":10,"minute":24,"second":0,"hundredthsOfSecond":29,"deviation":0,"status":0}
log(dlms.getDateTime(new Date('Tue Nov 28 2023 11:24:00 GMT+0100'))) // Expected output: {"year":2023,"month":11,"dayOfMonth":28,"dayOfWeek":2,"hour":10,"minute":24,"second":0,"hundredthsOfSecond":0,"deviation":0,"status":0}

// compact-data containing all values

var octet = data[0]
log(octet) // Expected output: {"type":"octet-string","value":[7, 231, 11, 28, 2, 10, 26, 55, 0, -1, -60, 0]}
log(dlms.getDateTime(octet)) // Expected output: {"year":2023,"month":11,"dayOfMonth":28,"dayOfWeek":2,"hour":10,"minute":26,"second":55,"hundredthsOfSecond":0,"deviation":-60,"status":0}
log(dlms.getDateTime(octet)) // Expected output: {"year":2023,"month":11,"dayOfMonth":28,"dayOfWeek":2,"hour":10,"minute":26,"second":55,"hundredthsOfSecond":0,"deviation":-60,"status":0}

var undefinedDateTimeInOctet = data[1]
log(undefinedDateTimeInOctet) // Expected output: {'type': 'octet-string', 'value': [-1, -1, -1, -1, -1, -1, -1, -1, -1, -128, 0, -1]}
log(dlms.getDateTime(undefinedDateTimeInOctet)) // Expected output: {"year":65535,"month":255,"dayOfMonth":255,"dayOfWeek":255,"hour":255,"minute":255,"second":255,"hundredthsOfSecond":255,"deviation":32768,"status":255}
log(dlms.getDateTime(undefinedDateTimeInOctet.value)) // Expected output: {"year":65535,"month":255,"dayOfMonth":255,"dayOfWeek":255,"hour":255,"minute":255,"second":255,"hundredthsOfSecond":255,"deviation":32768,"status":255}

dlms.undefinedDateTime()

Get dateTime object with all its fields set to not specified.

You can also use unspecifiedDateTime().

Kind: global function Returns: Object

dlms.addAttr(1, '0.0.0.0.0.0', 2, 'octet-string', dlms.undefinedDateTime())
log(dlms.getDate(dlms.undefinedDateTime()).toISOString()) // Expected output: 0000-01-01T00:00:00.000Z

dlms.unspecifiedDateTime()

Get dateTime object with all its fields set to not specified.

You can also use undefinedDateTime().

Kind: global function Returns: Object

dlms.addAttr(1, '0.0.0.0.0.0', 2, 'octet-string', dlms.unspecifiedDateTime())
log(dlms.getDate(dlms.unspecifiedDateTime()).toISOString()) // Expected output: 0000-01-01T00:00:00.000Z

DLMS Gas JavaScript API

Connector functions DLMS Gas JS API guide

The dlms_gas API provides a unified framework for managing Smart Gas meters from various manufacturers.

Manufacturer-based behavior

This API is designed to abstract behavior based on different manufacturers. Currently, the following behaviors have been specified:

  • pietro
  • watertech
  • honeywell
  • spark

There is a common or default behavior that serves as a basis for all manufacturers and that they overwrite when they need to. In addition, the API is designed to be extended and customized with new behaviors in the development of new CFs.

Connector Functions Implementation

Some use cases for how to implement a CF are explained below.

Standard connector function implementation with already defined behaviors

dlms_gas.init();
dlms_gas.decode();
dlms_gas.pendingActions();
dlms_gas.collect();

In this case, the call to dlms_gas.init() will initialize the initial parameters based on the device information and the configuration specified in the organization’s default entity. For more details on the behavior of dlms_gas.init(), see the dlms_gas.config properties and dlms_gas.init() function.

Next, when executing dlms_gas.decode(), the received Compact Frame will be decoded based on the standard specification of the already known compact frames (47, 48, 49, 51, 97). For more details on the behavior of dlms_gas.decode(), see the dlms_gas.decode section.

The next step is to execute the actions corresponding to the session (OpenGate operations, information requests, time change…). For more details on the actions performed, see the dlms_gas.pendingActions section.

Finally, dlms_gas.collect() is invoked, which is responsible for collecting data from the three entities involved in gas device communications: meter, network cell, and organizational unit. For more details on the behavior of dlms_gas.collect(), see the dlms_gas.collect section.

Configuration initialization

The following examples show some cases of how to vary the initial configuration.

The first case shows how to initialize the session using a configuration entity different from the organization’s. In this case, it starts from the idea that the entity representing the organization contains a suffix.

const orgName = entity._value('provision.administration.organization') + '_dev';
dlms_gas.init(orgName);

Another option is to modify the configuration once initialized. In this example, we see how the maxClockSkewAllowedSec and italianMode parameters are overwritten. The dlms_gas.config parameters are explained in the dlms_gas.config section.

dlms_gas.init();
dlms_gas.config.maxClockSkewAllowedSec = 10;
dlms_gas.config.italianMode = false;

Finally, it may be necessary to overwrite the API key. This case is not recommended, but if necessary, it is done as follows:

dlms_gas.config.__initApiKey('different-api-key');

Configuration of actions to be performed in the session

Without changing the order of the actions to be performed, it is possible to force or avoid certain actions being performed.

The following example shows how to avoid attempting to change the meter’s time.

dlms_gas.actions.setClock = false;
dlms_gas.pendingActions();

It is also possible to force some of the actions to be performed even if the conditions for their normal behavior are not met. For example, the request for certain information is only made when a device connects for the first time to the platform in order to collect some of its initial configuration. However, it is possible to force this request every time it connects:

dlms_gas.actions.forceInitialData = true;
dlms_gas.pendingActions();

For all options, see the dlms_gas.actions section. Although initially with this configuration the order of the actions cannot be changed (see the dlms_gas.pendingActions section), it is possible to overwrite the order or even change the actions to be performed with more advanced programming that we will see later.

Customization of compact frames decoding

Currently, the following Compact Frames are considered: 47, 48, 49, 51, and 97.

Tip

CF 22 is also considered, but only as part of the FOTA process and it is not expected to be used as push notification compact frame.

The specification for decoding a CF is based on objects with the following specification:

{
  "template":{},
  "initAndCollect": function(data){}
}

The template property is a JSON following what is specified in the DLMS API documentation for the dlms.getCompactData function and the typeDescription parameter. The dlms_gas.decode function calls the getCompactData function with the specified template.

The initAndCollect method is responsible for loading the decoded values of the compact frame into the devCollection object. It is not mandatory to implement this method if it is not necessary to collect the decoded CF. This method can also be used to initialize other variables of interest for the session. For example, it is common to initialize the variables dlms_gas.recUnixTime, dlms_gas.recMetEventsCounter, and dlms_gas.recNonMetEventsCounter.

The dlms_gas.decode function internally uses the corresponding template specification object (see default properties) to decode the received template, but it is possible to pass a specific object as a parameter in which to specify a different specification.

In this example, we will see what the (made-up) decoding of a compact frame identified with number 32 could look like:

const customTemplate = {
  "template": {
        'attrId': 2, 'template': 32, 'type': 'structure',
        'items': [
          { 'type': 'unsigned' },
          { 'type': 'double-long-unsigned' },
          { 'type': 'long-unsigned' },
          { 'type': 'long-unsigned' },
        ]
      },
  "initAndCollect": function (data) { 
      logger.trace(`Collecting data from cf 32`);
      dlms_gas.recUnixTime = data[1];
      dlms_gas.recMetEventsCounter = data[2];
      dlms_gas.recNonMetEventsCounter = data[3];
      dlms_gas.devCollection.addDatapoint('mType', data[0], dlms_gas.recUnixTime);
      dlms_gas.devCollection.addDatapoint('metCount', dlms_gas.recMetEventsCounter, dlms_gas.recUnixTime);
      dlms_gas.devCollection.addDatapoint('nonMetCount', dlms_gas.recNonMetEventsCounter, dlms_gas.recUnixTime);
      dlms_gas.devCollection.addDatapoint('contSinLect', false, dlms_gas.now);
  }
};
const decodeResult = dlms_gas.decode(customTemplate);

Another possibility is simply to change the decoding behavior of an already specified compact frame (47, 48, 49, 51, 97). In this case, there are several options to carry this out.

The first one is to create a completely new specification using the original template and defining the initAndCollect function:

const custom48 = {
  "template": dlms_gas.default["48"].template,
  "initAndCollect": function (data) { 
      logger.trace(`Collecting data from cf 48 with custom behavior`);
      dlms_gas.devCollection.addDatapoint(...);
      dlms_gas.devCollection.addDatapoint(...);
      dlms_gas.devCollection.addDatapoint(...);
      dlms_gas.devCollection.addDatapoint(...);
      dlms_gas.devCollection.addDatapoint(...);
      ...
  }
};
const decodeResult = dlms_gas.decode(custom48);

Following this line, it is also possible to implement the initAndCollect method using the default behavior but extending or altering that behavior as much as possible. An example could be the following, where the default behavior is used but then additional actions are performed:

const custom48 = {
  "template": dlms_gas.default["48"].template,
  "initAndCollect": function (data) { 
      logger.trace(`Collecting data from cf 48 extending default behavior`);
      dlms_gas.default["48"].initAndCollect(data);
      // extra actions: for example, adjust received time.
      dlms_gas.recUnixTime = dlms_gas.recUnixTime - (60 * 60 * 1000);
  }
};
const decodeResult = dlms_gas.decode(custom48);

Fully customized behaviors

The dlms_gas API includes objects responsible for encapsulating the functions and properties of different behaviors:

  • dlms_gas.default: contains all the properties and functions used to perform all actions.
  • dlms_gas.pietro: overwrites the functions and properties necessary to support the behavior of Pietro-type meters.
  • dlms_gas.honeywell: overwrites the functions and properties necessary to support the behavior of Honeywell-type meters.
  • dlms_gas.watertech: overwrites the functions and properties necessary to support the behavior of Watertech-type meters.
  • dlms_gas.spark: overwrites the functions and properties necessary to support the behavior of Spark-type meters.

Each behavior is specified at initilization time according to device manufacturer. If the device manufacturer is unknown, the dlms_gas.default behavior will be used.

Info

Check dlms_gas.behavior object’s properties and functions to understand how internally works behaviors management.

A simple way to test different behaviors is to overwrite the dlms_gas.behavior property. In the following example, the behavior is forced to be honeywell regardless of the manufacturer:

dlms_gas.behavior = 'honeywell';
dlms_gas.init();
dlms_gas.decode();
dlms_gas.pendingActions();
dlms_gas.collect();

Once dlms_gas.behavior is specified as honeywell, the rest of the logic is executed with the Honeywell behavior.

Finally, it is possible to define or extend the complete behavior of the API. It may be that with the configurations or specifications seen so far, it is not possible to adapt to a particular case. In this case, it will be necessary to define a new behavior to be used in the rest of the connector function. This is done as follows:

const newBehavior = {/*actions and properties*/};
dlms_gas.customBehavior(newBehavior);
dlms_gas.init();
dlms_gas.decode();
dlms_gas.pendingActions();
dlms_gas.collection();

When calling dlms_gas.customBehavior(newBehavior), the dlms_gas.behavior variable is initialized with the value 'custom' and the dlms_gas.custom object is initialized with the specified parameter. From here on, all other actions will be done based on what is specified in newBehavior. See dlms_gas.customBehavior for more information.

It is possible to specify “base” behavior for a custom one using the baseBehavior property. In this case, it will try to look for defined functions and properties in newBehavior and if not found, it will try to find them in baseBehavior. Finally if it is not found in baseBehavior it will try to find it in dlms_gas.default.

In next example, when looking for a function or property, it will follow next order to find it: newBehavior -> honeywell -> default.

const newBehavior = {
  "baseBehavior": "honeywell",
  /*actions and properties*/
};
dlms_gas.customBehavior(newBehavior);
dlms_gas.init();
dlms_gas.decode();
dlms_gas.pendingActions();
dlms_gas.collect();

Reviewing the decoding examples from the previous section, they could be incorporated using the concept of customBehavior.

The following example shows how to define a new compact frame specification, while maintaining the possibility for the connector function to support other compact frames because the decode method is not forced to use the specification passed as a parameter.

const newBehavior = {
  "32": {
    "template": {
        'attrId': 2, 'template': 32, 'type': 'structure',
        'items': [
          { 'type': 'unsigned' },
          { 'type': 'double-long-unsigned' },
          { 'type': 'long-unsigned' },
          { 'type': 'long-unsigned' },
        ]
      },
    "initAndCollect": function (data) { 
        logger.trace(`Collecting data from cf 32`);
        dlms_gas.recUnixTime = data[1];
        dlms_gas.recMetEventsCounter = data[2];
        dlms_gas.recNonMetEventsCounter = data[3];
        dlms_gas.devCollection.addDatapoint('mType', data[0], dlms_gas.recUnixTime);
        dlms_gas.devCollection.addDatapoint('metCount', dlms_gas.recMetEventsCounter, dlms_gas.recUnixTime);
        dlms_gas.devCollection.addDatapoint('nonMetCount', dlms_gas.recNonMetEventsCounter, dlms_gas.recUnixTime);
        dlms_gas.devCollection.addDatapoint('contSinLect', false, dlms_gas.now);
    }
  }
};
dlms_gas.customBehavior(newBehavior);
dlms_gas.init();
dlms_gas.decode();
dlms_gas.pendingActions();
dlms_gas.collect();

If you want to modify the behavior of initAndCollect of some known compact frame (47, 48, 49, 51, and 97), it is even simpler, as they internally have an overridable collection method, so you only need to define that method in the custom behavior.

const newBehavior = {
  "initAndCollectCf48": function (data) { 
    //custom behavior
  }     
};
dlms_gas.customBehavior(newBehavior);
dlms_gas.init();
dlms_gas.decode();
dlms_gas.pendingActions();
dlms_gas.collect();

The initAndCollect function of the predefined compact frames 47, 48, 49, 51, and 97 internally calls the corresponding initAndCollectCfxx method. Therefore, you only need to overwrite that method to alter its behavior.

The same concept applies to the dlms_gas.pendingActions and dlms_gas.collect functions. Internally, they call methods defined in default. Therefore, they can be easily modified. For example, the order in which actions are performed could be modified or even new actions could be added as in the following example, where the default actions are invoked first and then a custom action is invoked.

const newBehavior = {
    "pendingActions": function () {
      dlms_gas.default.pendingActions();
      dlms_gas.custom.customPendingAction();
    },
    "customPendingAction": function() {
        // custom action
    }
};
dlms_gas.customBehavior(newBehavior);
dlms_gas.init();
dlms_gas.decode();
dlms_gas.pendingActions();
dlms_gas.collect();

The previous example shows several important concepts:

  • The pendingActions function is overwritten for the new behavior, so when the main dlms_gas.pendingActions() method is invoked, the new custom function will be executed.
  • A new function customPendingAction is defined and will be executed when dlms_gas.pendingActions() is invoked.
  • To call to the default pendingActions function, it is done through the default object (dlms_gas.default.pendingActions();) since we want to execute all the default pending actions.
  • To invoke the new customPendingAction function, we do it through custom (dlms_gas.custom.customPendingAction();), which is the object containing the new behavior.

To learn about the existing functions and properties defined for the behaviors, see the specifications for each of them in the following sections.


dlms_gas api specification

The dlms_gas object is the main entry point for Smart Gas operations.

It has several properties used to keep session status. See dlm_gas properties section and it also has some main basic functions. See dlm_gas functions section.

Finally it has complex properties to specifiy Connector Functions behavior:

dlms_gas properties

Following properties represent session state.

Property Type Default Description
now number null Current session timestamp in milliseconds. It is calculated in init method.
now_seconds number null Current session timestamp in seconds. It is calculated in init method.
behaviorName string "default" Active behavior name. It is calculated from device manufacturer in init method.
devCollection Object null Main device collection object. It is initialized automatically with normal collection object in init method.
cellCollection Object null Cellular network collection object. It is initialized automatically in init method.
uoCollection Object null Organization collection object. It is initialized automatically in init method.
recUnixTime number null Initiailized from received push notification.
EOGDTime number null End of Gas Day Time. Initiailized from received push notification.
recMetEventsCounter number null Metrological events counter. Initiailized from received push notification.
recNonMetEventsCounter number null Non-metrological events counter. Initiailized from received push notification.
messagesCounter number 0 Count of messages in current session.
numBlockErrorSession number 0 Used to manage fota blocks transfer.
numBlockTransfSession number 0 Used to manage fota blocks transfer.
restoreDefaultSchedule boolean false Used to manage restoring the default schedule.
onlineMngFrmCntr number null Online management frame counter. It is initialized from received push notification if available, otherwise is initialized from meter previously collected data.
messagesPerECL number null Count of messages per ECL. It is initialized in init method from used behavior

dlms_gas functions

dlms_gas.init(confEntityName)

Initializes the DLMS Gas API context. It loads provisioned and collected data from meter entity and provisioned configuration data from configuratiion entity if it is found. By default it uses the meter’s organization name to find created configuration entity, if it was created with different name it must be passed as argument.

See dlms_gas.config for more information about configuration data.

Property Type Default Description
confEntityName string null Optional organization name.

Examples:

dlms_gas.init();
dlms_gas.init(entity._value("provision.administration.organiaztion)+"_dev");

dlms_gas.decode(customTemplate, descriptive)

Decodes received payload after identifying the template and collects data. Internally it calls to behavior specific decode method. See DLMS Manufacturer Behavior section below for full specification of that method.

Parameter Type Default Description
customTemplate Object null Template to force.
descriptive boolean false Enable descriptive format.

Example:

var res = dlms_gas.decode();

dlms_gas.pendingActions()

Executes the full session flow. Internally it calls to behavior specific pendingActions method. See DLMS Manufacturer Behavior section below for full specification of that method.

By default it executes the following actions:

  1. sync clock: check and sync device clock
  2. retrieve initial data: used to retrieve data that is expected only once on device onboarding like firmware, apn configuration, etc. This data will be asked if it is not collected already.
  3. retrieve push events configurations: like initial data retrieving but for push events configurations, it will be asked if it is not collected already.
  4. periodic actions: used to retrieve data that must be retrieved periodically like statistics.
  5. automatic actions: used to retrieve data depending on previously collected data and received data in push notification.
  6. opengate operations: used to execute operations requested from opengate.

Previous actions execution can be controlled by dlms_gas.actions object properties. If the action is not enabled, it will not be executed. If it is forced it will ignore previous checks like statistics age or if initial data was already collected.

Examples:

//standard behavior
dlms_gas.pendingActions();
//skip statistics and force push events configuration retrieval
dlms_gas.actions.retrieveStatistics = false;
dlms_gas.actions.retrievePushEventsConfigurations = true;
dlms_gas.actions.forcePushConf = true;
dlms_gas.pendingActions();

dlms_gas.collect()

Used at the end of the script to send collected data for meter entity, cell enity and organization entity. Internally it calls to specific behavior collect method.

Example:

dlms_gas.collect();
Warning

It must used at the end of the Connector function to ensure that data collected during the execution is raised to opengate.

dlms_gas.customBehavior(behavior)

Changes the default behavior to a custom one. Internall it set dlms_gas.behaviorName property to "custom" and dlms_gas.custom property with the behavior provided as argument.

See DLMS Manufacturer Behavior section below for full specification of this method.

Property Type Default Description
behavior Object {} The behavior to use. If empty, is like using default behavior.

Example:

const customBehavior = {/*behavior specification*/};
dlms_gas.customBehavior(customBehavior);

dlms_gas._exec(callType, dType, uType)

It executes specified standard dlms call (get, set, method). It will use the dType and uType for msRaw collection. It will return an object with the result from dlms standard function or with the error message. This method is just utility and is not intended to be used directly. Instead it must be used dlms_gas.get, dlms_gas.set, dlms_gas.method or dlms_gas.getByRange.

Internally this method will do several actions:

  • Call collectMsRaw before and after the dlms standard function call.
  • Increase dlms_gas.messagesCounter property before the dlms call.
  • Increase and collect onlineMngFrmCntr if the dlms call was successful.
  • At the end, cleans dlms.attrList and dlms.methodList arrays.
Property Type Default Description
callType string Type of call to execute.
dType number mtype for messages sent to device.
uType number mtype for messages received from device.

Returned object will contain an object with the following properties:

  • error: Error message if some error occurs.
  • result: Return result from dlms standard function call. The result depends on the dlms method called (get, set, method).

dlms_gas.get(dType, uType)

It wrapes dlms.get calls adding extra behavior. dType and uType will be used for msRaw collection. The dlms.get response will be flattened in order to store the values in a single object. See examples below.

Property Type Default Description
dType number mtype for messages sent to device.
uType number mtype for messages received from device.

Returned object will contain.

object with the following properties:

  • error: Error message if some error occurs.
  • [classid_obis_attrid]: Values for the requested attributes, if attribute request was successful.

Example:

dlms.addAttr(1, '0.0.94.39.58.255', 2);
dlms.addAttr(45, '0.1.25.4.0.255', 2);
dlms.addAttr(3, '0.0.96.6.6.255', 2);
const res = dlms_gas.get(-8, 4);

Some return examples:

{
  "1_0.94.39.58.255_2": ...returned value from dlms.get... ,
  "45_0.1.25.4.0.255_2": ...returned value from dlms.get... ,
  "3_0.96.6.6.255_2": ...returned value from dlms.get...
}

If some attribute request fails, the error will be added to the error property.

{
  "error": "...errors specification separated by ';'",
  "1_0.0.94.39.58.255_2": ...returned value from dlms.get...
}

If the dlms.get request fails, the error property will be set and no attribute values will be returned.

{
  "error": "... error message ..."
}

dlms_gas.set(dType, uType)

It wrapes dlms.set calls adding extra behavior. dType and uType will be used for msRaw collection. The dlms.set response will be flattened in order to store the values in a single object. See examples below.

Property Type Default Description
dType number mtype for messages sent to device.
uType number mtype for messages received from device.

Returned object will contain an object with the following properties:

  • error: Error message if some error occurs.
  • [classid_obis_attrid]: Results for the modified attributes.

Example:

dlms.addAttr(22, '0.0.15.0.1.255', 2, 'structure', [{ 'type': 'octet-string', 'value': [0, 0, 10, 0, 106, -1] }, { 'type': 'long-unsigned', 'value': vst }]);
dlms.addAttr(22, '0.0.15.0.1.255', 4, 'array', [{ 'type': 'structure', 'value': [{ 'type': 'octet-string', 'value': timeOctet }, { 'type': 'octet-string', 'value': dateOctet }] }]);
const dlmsResp = dlms_gas.set(-13, 6);

Some return examples:

{
  "22_0.0.15.0.1.255_2": "success",
  "22_0.0.15.0.1.255_4": "success"
}

If some attribute modification returns an error, the error will be added to the error property and the response will be “success” for the rest of the attributes.

{
  "error": "...errors specification...",
  "22_0.0.15.0.1.255_2": "error message",
  "22_0.0.15.0.1.255_4": "success"
}

If the dlms.set request fails, the error property will be set and no attribute values will be returned.

{
  "error": "... error message ..."
}

dlms_gas.method(dType, uType)

It wrapes dlms.method calls adding extra behavior. dType and uType will be used for msRaw collection. The dlms.method response will be flattened in order to store the values in a single object. See examples below.

Property Type Default Description
dType number mtype for messages sent to device.
uType number mtype for messages received from device.

Returned object will contain.

object with the following properties:

  • error: Error message if some error occurs.
  • [classid_obis_attrid]: Results for the modified attributes, if attribute modification was successful.

Example:

dlms.addMethod(3, '7.0.96.5.1.255', 1, 'integer', 0);
const dlmsResp = dlms_gas.method(-18, 18);

Some return examples:

{
  "3_7.0.96.5.1.255_1": "success"
}

If some method execution returns an error, the error will be added to the error property and the response will be “success” for the rest of the attributes.

{
  "error": "...errors specification...",
  "3_7.0.96.5.1.255_1": "error message"
}

If the dlms.method request fails, the error property will be set and no attribute values will be returned.

{
  "error": "... error message ..."
}

dlms_gas.getByRange(classId, obis, attrId, accessSelector, paramClassID, paramObis, paramAttrId, rangeType, rangeFrom, rangeTo, maxRangePerPage, dType, uType)

It retrieves values by range using dlms.get with selective access. It retrieves all the values within the range, even if the device returns values in multiple pages. In case of any page retrieval fails, the error will be added to the error property and the response will be “success” for the rest of the pages.

Property Type Default Description
classId number Class ID of the object.
obis string OBIS code.
attrId number Attribute ID.
accessSelector number Access selector (e.g., 1 for range).
paramClassID number Selector’s parameter Class ID.
paramObis string Selector’s parameter OBIS code.
paramAttrId number Selector’s parameter Attribute ID.
rangeType string Data type for range values (e.g., ‘double-long-unsigned’).
rangeFrom number Start of range.
rangeTo number End of range.
maxRangePerPage number Maximum range size. For event buffer ranges, the number of elements per page. For temporal ranges max period for page.
dType number mtype for messages sent to device.
uType number mtype for messages received from device.

It returns an object with the following properties:

  • result: Array of all values retrieved.
  • error: Error message if any error occurs.

Example:

const res = dlms_gas.getByRange(7, '0.0.99.1.0.255', 2, 1, 8, '0.0.1.0.0.255', 2, 'double-long-unsigned', lastIndex, currentIndex, 10, -8, 4);
Tip

There some objects to make easier the call to this method. Check the [Range retrieval configuration object section][#range-retrieval-configuration-object]

dlms_gas.config Object Properties

Following properties are loaded from device entity and from “configuration entity” when executing dlms_gas.init method. Some of them contain connected meter status and data and other contain configuration values from configuration entity.

Property Type Default Description
orgName string null Name of the organization that the meter belongs to.
confEntityName string null Name of the entity that contins configuration parameters. See dlms_gas.init method to see how it is initialized
systemTitle string null Meter System title.
cellPrefix string null Prefix for the cell identification. It can be defined in the configuration entity.
apiKey string null API Key for the platform. It must be defined in the configuration entity.
periodicDataAgeMillis number null Maximum age of periodic data in milliseconds. It can be calculated from data in configuration entity.
maxSecondsWithoutCom number null Maximum seconds without communication. It can be calculated from data in configuration entity.
cellPlanName string null Name of the cell plan. It can be defined in the configuration entity.
maxClockSkewAllowedSec number null Maximum difference in time for clock sync in seconds. It can be defined in the configuration entity.
maxClockCorrection number null Maximum clock correction allowed. In this case it is filled for specified behavior
numBlockError number null It contains meter’s FOTA process blocks number with transfer error.
numBlockTransf number null It contains meter’s FOTA process successufully transferred blocks number.
badSessionsCounter number null It contains meter’s FOTA process failed sessions counter
maxSessionsErrorsRate number null It contains FOTA process maximum block errors rate allowed in a session. It can be defined in the configuration entity.
maxBadSessions number null It contains FOTA process maximum bad sessions before FOTA abort. It can be defined in the configuration entity
manufacturer string null Meter manufacturer.
italianMode boolean false Enable Italian specific mode. Calculated from manufacturer.
deviceId string null Meter identifier.
cellId string null Cell identifier. It is filled from device collected cell identifier.
fotaBlockSize number null FOTA block size for current meter. It is filled from collected data.
fotaEnabled boolean false Indicates if the meter has FOTA enabled. It is filled from collected data.
fotaNumberOfBlocks number null FOTA total number of blocks for current meter. It is calculated and collected at the begining of FOTA process
lastEventCounter number null Counter for the last event. It is filled from meter’s previously collected data.
lastCommunication number null Timestamp for the last communication. It is filled from meter’s previous last notification.

Next table indicates which datastreams are used to init these properties:

Property Entity Datastream Default value
orgName Meter provision.administration.organization null
manufacturer Meter provision.device.model null
deviceId Meter provision.device.serialNumber null
systemTitle Meter provision.administration.identifier null
lastEventCounter Meter metCount null
cellId Meter NBcellID null
fotaBlockSize Meter fotaBlockSize null
fotaNumberOfBlocks Meter firmwareTotalBlock null
fotaEnabled Meter fotaEnabled null
numBlockError Meter numBlockError 0
numBlockTransf Meter numBlockTransf 0
badSessionsCounter Meter badSessionsCounter 0
lastCommunication Meter mType null
cellPrefix Configuration provision.ACR orgName_
periodicDataAgeMillis Configuration provision.periodicDataAgeDays 1296000000 (15 days in milliseconds)
maxSecondsWithoutCom Configuration provision.maxDaysWithoutCom 259200 (3 days in seconds)
maxClockSkewAllowedSec Configuration provision.maxClockSkewAllowedSec 120
maxSessionsErrorsRate Configuration provision.maxSessionsErrorsRate 0.2
maxBadSessions Configuration provision.maxBadSessions 3
cellPlanName Configuration provision.cellPlanName null
apiKey Configuration provision.administration.apiKey null
Warning

Datastream used to initialize periodicDataAgeMillis and maxSecondsWithoutCom contains time in days and they are converted to milliseconds and seconds respectively.

It is possible to override this values after init calling to dlms_gas.init():

dlms_gas.init();
dlms_gas.config.maxClockSkewAllowedSec = 60;

dlms_gas.config Object Functions

config.__initApiKey(apiKey)

Internal utility used to initialize the API key.

Parameter Type Description
apiKey string The API key to be forced into the session context.

If it is necessary to specify manually the apikey from Connector Function it must be called after dlms_gas.init call. Example:

dlms_gas.init();
dlms_gas.config.__initApiKey('your-api-key');

dlms_gas.behavior Object properties

Property Type Default Description
chain Set<string> null It contains the behavior chain used to resolve function or property call. It is initilized in dlms_gas.init

dlms_gas.behavior Object Functions

behavior.getName(manufacturer)

Calculates and returns behavior name from manufacturer parameter (Not case session). This method is called from dlms_gas.init function only if dlms_gas.behaviorName is null.

Parameter Type Default Description
manufacturer string null Meter provisioned manufacturer name.

Next table explains current behaviors:

Behavior name Manufacturer
pietro If manufacturer contains ‘pietro’
honeywell If manufacturer contains ‘honeywell’
spark If manufacturer contains ‘spark’
watertech If manufacturer contains ‘watertech’
default If manufacturer is null or contains none of the above

behavior.calculateChain(behaviorName, visited)

Internall utility to calculate recursively the behavior chain. It is called from dlms_gas.init and it will return a Set with all behaviors to be checked when a function or property is called. It will take into account that specified behavior exists, if not it will return default behavior as last element of the chain. Something similiar will happen if there is a circular baseBehavior reference.

Parameter Type Default Description
behaviorName string null The name of the behavior to calculate the chain for. If null, it uses dlms_gas.behaviorName
visited Set<string> new Set() A set of behavior names that have already been visited. Used to detect circular references

For example, if custom behavior is defined with pietro as baseBehavior:

const chain = dlms_gas.behavior.calculateChain('custom');
//it will return following chain: ['custom', 'pietro', 'default']

In case that custom behavior has invalid baseBehavior (it doesn’t exist), it will return following chain:

//having custom behavior with invalid baseBehavior, for example 'nonExistentBehavior'
const chain = dlms_gas.behavior.calculateChain('custom');
//it will return following chain: ['custom', 'default']

behavior.property(propertyName)

Returns property value from behavior chain in order to call it. It will return the property value if exists in any behavior in the chain, if not it will return null.

Warning

This method should be used when specifying a custom behavior to ensure that the value returned is the best match for the current behavior chain.

Parameter Type Default Description
propertyName string null The name of the property to retrieve

behavior.function(functionName)

Returns function from behavior chain in order to call it. It will return the function if exists in any behavior in the chain, if not it will empty function.

Warning

This method should be used when specifying a custom behavior to ensure that the function returned is the best match for the current behavior chain.

Parameter Type Default Description
functionName string null The name of the function to retrieve

Example of function calling using behavior management:

    const address = dlms_gas.behavior.function("encodeIpPort")(pConf.platform.ip, pConf.platform.port);
Warning

When overriding one function in custom behavior take care to not call itselsf using this method because it will throw exception due to infinite recursion

Example of bad use of function method and how to override correctly the function:

const cb = {
  "retrieveStatistics": function(data){
    dlms_gas.behavior.function('retrieveStatistics')(); //Bad practice: Infinite recursion
    dlms_gas.default.retrieveStatistics(); //the correct way to do it
    dlms_gas.honeywell.retrieveStatistics(); //the correct way to do it
    //... extra code ...
  }
}

dlms_gas.actions Object Properties

Control flags to enable or disable specific automated tasks.

Property Type Default Description
setClock boolean true Enable automated clock synchronization.
retrieveInitialData `boolean" true Enable FW and static config retrieval.
retrievePushEventsConfigurations boolean `true" Enable PUSH event config retrieval.
periodicActions boolean `true" Enable statistics and diagnostic retrieval.
automaticActions boolean `true" Enable logs and profile retrieval.
operations boolean `true" Enable pending operation execution.
forceInitialData boolean false Force retrieval of initial data.
forcePushConf boolean false Force retrieval of push configuration.
forceStatistics boolean false Force retrieval of statistics.

dlms_gas.default object Properties

Following properties are defined in dlms_gas.default and used when no manufacturer specific property is defined.

Property Type Value Description
47 Object Specification for Compact Frame 47. Includes template and initAndCollect. See decoding section.
48 Object Specification for Compact Frame 48. Includes template and initAndCollect. See decoding section.
49 Object Specification for Compact Frame 49. Includes template and initAndCollect. See decoding section.
51 Object Specification for Compact Frame 51. Includes template and initAndCollect. See decoding section.
97 Object Specification for Compact Frame 97. Includes template and initAndCollect. See decoding section.
22 Object Specification for Compact Frame 22. Used in FOTA process.
cwport number 1 Used to define dlms.cwport when initializing client
swport number 1 Used to define dlms.swport when initializing client
hesSystemTitle string 5341435341435341 Used to define dlms.hesSystemTitle when initializing client
conformance string ['MULTIPLE_REFERENCES', 'GENERAL_PROTECTION', 'SELECTIVE_ACCESS'] Used to define dlms.conformance when initializing client
forceGetWithoutList boolean false Used to define dlms.forceGetWithoutList when initializing client
forceSetWithoutList boolean false Used to define dlms.forceSetWithoutList when initializing client
ignoreSystemTitleInCiphering boolean true Used to define dlms.ignoreSystemTitleInCiphering when initializing client
onlineFramCounterRetryInc number 5 Used to synchronize meters counter with collected frame counter.
onlineFramCounterRetryMax number 3 Used to synchronize meters counter with collected frame counter.
maxClockCorrection number 900 Default maximum clock correction allowed.
messagesPerECL object { "0": 20, "1": 20, "2": 0 } To limit fota blocks depending on ECL value.
isItalianModeManufacturer boolean true Indicates if manufacturer follows Italian mode by default.
eclAttribute number 3 Attribute ID for ECL retrieval.
errorIfWrongFotaBlockMapSize boolean true Specify if fota operation must finish immediately with error if block map length retrieved in CF22 does not match with calculated number of blocks. If false, block map array will be resized to the calculated number of blocks.
statisticsRefDs string "MetBattRemUseTime" Data stream reference for statistics retrieval.
supportedOps Array List of supported operations and their priority for execution. see operations spec.

Range retrieval configuration object

To simplify metrological events, non-metrological events, daily profiles and hourly profiles retrieval customization following object is used to define range selection parameters. It is used internally when calling getByRange function.

Property Type Description
classId number Data to be retrieved class id.
obis string Data to be retrieved obis.
attrId number Data to be retrieved attribute id.
accessSelector number Data to be retrieved attribute id.
paramClassID number Range parameter specification classID.
paramObis string Range parameter specification obis.
paramAttrId number Range parameter specification attrId.
rangeType string Range parameter specification rangeType.
maxRangePerPage number Used to specify pagination

Next are default configurations for specified retrievals:

{
    "metEventsRangeSelection": {
      "classId": 7,
      "obis": '7.0.99.98.1.255',
      "attrId": 2,
      "accessSelector": 1,
      "paramClassID": 1,
      "paramObis": [0, 0, 96, 15, 1, -1],
      "paramAttrId": 2,
      "rangeType": "long-unsigned",
      "maxRangePerPage": 7
    },
    "nonMetEventsRangeSelection": {
      "classId": 7,
      "obis": '7.0.99.98.0.255',
      "attrId": 2,
      "accessSelector": 1,
      "paramClassID": 1,
      "paramObis": [0, 0, 96, 15, 2, -1],
      "paramAttrId": 2,
      "rangeType": "long-unsigned",
      "maxRangePerPage": 8
    },
    "dailyProfilesRangeSelection": {
      "classId": 7,
      "obis": '7.0.99.99.3.255',
      "attrId": 2,
      "accessSelector": 1,
      "paramClassID": 1,
      "paramObis": [0, 0, 1, 1, 0, -1],
      "paramAttrId": 2,
      "rangeType": "double-long-unsigned",
      "maxRangePerPage": 10 * 24 * 3600
    },
    "hourlyRangeSelection": {
      "classId": 7,
      "obis": '7.0.99.99.2.255',
      "attrId": 2,
      "accessSelector": 1,
      "paramClassID": 1,
      "paramObis": [0, 0, 1, 1, 0, -1],
      "paramAttrId": 2,
      "rangeType": "double-long-unsigned",
      "maxRangePerPage": 20 * 3600
    }
}

Operations specification

supportedOps is used to specify Opengate operations execution. This property is an array of objects that contains operation name and function to be called. Operations will be executed following the order they are defined in the array.

Property Type Description
name string Opengate operation name.
funcName string Function to be called when specified operation is executed.

Default value:

{
    "supportedOps":
      [{
        "name": "ValveManagement",
        "funcName": "valveManagement"
      }, {
        "name": "ResetDiagnostic",
        "funcName": "resetDiagnostic"
      }, {
        "name": "RequestNonMetroLogs",
        "funcName": "requestNonMetroLogs"
      }, {
        "name": "HourlyValues",
        "funcName": "hourlyValues"
      }, {
        "name": "CommsBatStatus",
        "funcName": "commsBatStatus"
      }, {
        "name": "APNConfig",
        "funcName": "apnConfig"
      }, {
        "name": "PushStrategy",
        "funcName": "pushStrategy"
      }, {
        "name": "FOTA",
        "funcName": "fota"
      }]
}

On one hand it is possible to specify custom array with custom functions. On the other hand it is possible just to override specified function (for example "valveManagement" function) just to customize specific operation behavior.

dlms_gas.default object Functions

default.apnConfig(op)

Apn configuration operation logic. Configures the SIM APN and PLMN code on the device and processes the operation response.

Parameter Type Description
op Object Object returned by operation api.

default.automaticActions()

Orchestrates automatic data retrieval functions. These functions retrieve data from the device depending on last collected data and new received data. Following functions are called in order:

default.closeConnection()

Called at then end of pendingActions function. In this case (default behavior) it is empty.

default.collect()

Sends the gathered datapoints for the device, cell, and organizational unit. It takes into account if dls_gas.devCollection, dls_gas.cellCollection or dls_gas.uoCollection are defined and they have identifier field is defined.

Warning

In the case of cellCollection it will check if cell entity exists and create if necessary.

default.collectBillingPeriodSnapshotData(billingPeriodData)

Collects the billing period data snapshot. Receives an with the values of decoded billing period snapshot:

Parameter Type Description
billingPeriodData object Object containing the billing period data.

default.collectDiagnostic(diagnostic, at, source, sourceInfo)

Decodes a 16-bit diagnostic value into individual status flags that are collected with specified at, source and sourceInfo.

Parameter Type Description
diagnostic number Diagnostic value to be decoded.
at number Timestamp to be used for collection. If not defined current time will be used.
source string If defined it will be used as datapoint source.
sourceInfo object If defined it will be used as datapoint sourceInfo.

default.collectHourlyDiagnostics(diagnosticsArray, unixTime)

Collects an array of hourly diagnostics values with at time as reference.

Parameter Type Description
diagnosticsArray Array Array with hourly diagnostics values
at number Timestamp to be used as reference.

default.collectHourlyVolumes(incsArray, at)

Collects an array of hourly volume increments with at time as reference.

Parameter Type Description
incsArray Array Array with hourly volume increments
at number Timestamp to be used as reference.

default.collectMsRaw(mType, payload, payloadSize)

Internal utility to collect raw messages. It adds msRaw datapoint to device, cell and organizational unit collections. Datapoint is composed by provided arguments.

Parameter Type Description
mType number Message type.
payload string Raw hex payload.
payloadSize number Payload size in bytes.

Examples:

// For received compact frame
dlms_gas.manufacturer.function("collectMsRaw")(contextParams.templateId, utils.bytes.toHexString(payload.value), payload.value.length);
// For dlms request sent to device
dlms_gas.manufacturer.function("collectMsRaw")(-22);
// For dlms response received from device
dlms_gas.manufacturer.function("collectMsRaw")(22);

default.collectNetworkStatus(networkStatus, at)

Decodes an 8-bit network status integer value into individual flags and adds it to the device collection.

Parameter Type Description
networkStatus number Status to be decoded.
at number Timestamp to be used for collection. If not defined current time will be used.

default.collectTarifPlan(tariffPlann, at)

Transforms and collects received array of two numbers into an array of two bytes hexadecimal string.

Parameter Type Description
tariffPlann array Array of bytes representing the tariff plan.
at number Timestamp to be used for collection. If not defined current time will be used.

default.collectDailyLoadProfilesArray(loadProfiles, source, sourceInfo)

Collects from received daily profiles with specified source and sourceInfo. Each element of array must be an object with the following fields:

Parameter Type Description
loadProfiles Array Array of daily profiles to collect.
source string Optional source identifier.
sourceInfo object Optional source information.

Each element of the array is an array with 4 elements:

Element Index Type Description
0 number End of Gas day timestamp.
1 number End of Gas day cumulative diagnostic
2 number End of Gas day volume
3 number End of Gas day volume under alarm.

default.commsBatStatus(op)

Comms bat status retrieval operation logic. Retrieves battery status and communication statistics from the device and processes the operation response.

Parameter Type Description
op Object Object returned by operation api.

default.configClient()

Initializes the dlms client parameters for sending requests to the device. This method is called from dlms_gas.init function.

default.createCellIfNecessary()

Automatically provisions a new NBIoT Cell entity in Opengate if it doesn’t exist. It uses NBcellID as entity name.

default.dateToDateOctet(date)

Converts a JavaScript Date object into DLMS octet-string format for date (5 bytes).

Parameter Type Description
date Date Date to convert.

Returns an object with following fields:

Field Type Description
result Array<number> DLMS octet-string format for date (5 bytes).
error string Error message.

Example:

const date = new Date("2026-04-23T05:30:00.000Z");
const dateOctet = dlms_gas.manufacturer.function("dateToDateOctet")(date);
// Example: dateOctet = { result: [ 7, 234, 4, 23, 4 ] }

default.dateToTimeOctet(date)

Converts a JavaScript Date object into DLMS octet-string format for time (4 bytes).

Parameter Type Description
date Date Date to convert.

Returns an object with following fields:

Field Type Description
result Array<number> DLMS octet-string format for time (4 bytes).
error string Error message.

Example:

const date = new Date("2026-04-23T05:30:00.000Z");
const dateOctet = dlms_gas.manufacturer.function("dateToTimeOctet")(date);
// Example: dateOctet = { result: [ 5, 30, 0, 0 ] }

default.decode(customTemplate, descriptive)

The main entry point for Compact Frame decoding. It identifies the correct template based on the templateId in the context (or it uses the provided customTemplate), performs the decoding, and triggers the collection logic.

If customTemplate is provided, it is used to decode the compact frame, otherwise predefined templates will be used.

For compact frame decoding see dlms api documentation .

Parameter Type Description
customTemplate object Template to be used for compact frame decoding.
descriptive boolean If true, the decoded values will be in a more descriptive format.

Returns an object with following fields:

Field Type Description
result object Decoded data.
error string Error message.
const decodedData = dlms_gas.manufacturer.function("decode")();
// Correct result: decodedData = { result: [22, 225, 37, 203, 0, 15, 225, 233, 128, 255, 123, 32, 241, 71, 57, 187, 177, 79, 2, 48] }
// some error case: decodedData = { error: "error description" }

default.decodeFw(fwBytes)

Decodes a 6-byte array into a descriptive firmware version string including version numbers, build commit (hex), and date.

Returned version will be something like this: Version:${major}.${minor}.${patch};Build:0x${commitField.toString(16).toUpperCase().padStart(4, "0")};Fecha:${year}-${String(month).padStart(2, "0")}-${String(day).padStart(2, "0")}

Parameter Type Description
fwBytes Array<number> Array of 6 bytes representing the firmware version.

Returns an object with following fields:

Field Type Description
result string Decoded firmware version string. It is returned with next template:
error string Error message.
const fwBytes = [0x01, 0x02, 0x03, 0x04, 0x05, 0x06];
const fwVersion = dlms_gas.manufacturer.function("decodeFw")(fwBytes);
// Example: fwVersion = { result: "Version:1.2.3;Build:0x4506;Fecha:2026-04-23" }

default.doPushEventConfiguration(event, conf)

Internal function that executes the actual DLMS set operations to apply push event configurations.

Parameter Type Description
event number Event number (1, 2, 3, 4).
conf object Configuration for the event.

conf object has the following properties:

Property Type Description
cf number Compact frame to be configured
addressOctStr byte[] Ip:port string coded as byte array
randomTime number Random time to be used in communications
schedule Object[] Schedulation specification.

schedule is an array of four objects. Each object has the following properties:

Property Type Description
dateOctet byte[] Communication periodicity expression following DLMS standard.
timeOctet byte[] Communication time specification: [Hour, Minute, Second, Hundredths]

default.encodeIpPort(ip, port)

Encodes an IP address and port into a 22-byte octet-string for push configuration.

Parameter Type Description
ip string IP address to encode.
port number Port to encode.

Returns an byte array

Example:

const ip = "127.0.0.1";
const port = 8080;
const ipPort = dlms_gas.manufacturer.function("encodeIpPort")(ip, port);
// Example: ipPort = [ 49, 50, 55, 46, 48, 46, 48, 46, 49, 58, 56, 48, 56, 48];

default.eventScheduleArray(scheduleData)

Event DLMS schedule array generation logic. Generates the event schedule array for push events configuration. Adds the 4 events with corresponding periodicity and hour specification including disabled events.

Parameter Type Description
scheduleData Object Object with event’s day periodicty value and hour specification value from operation paraemeters.

Returns an array of objects with date and time octet. Example:

[
  {
    "dateOctet": "[-1, -1, -1, 3, -40]",
    "timeOctet": "[0, 5, 0, 0]"
  },
  {
    "dateOctet": "[-1, -1, -1, 3, -40]",
    "timeOctet": "[3, 5, 0, 0]"
  },
  {
    "dateOctet": "[-1, -1, -1, -1, -1]",
    "timeOctet": "[-1, -1, -1, -1]"
  },
  {
    "dateOctet": "[-1, -1, -1, -1, -1]",
    "timeOctet": "[-1, -1, -1, -1]"
  }
]

default.fota(op)

FOTA configuration operation logic. It manages specific scheduling, fota process initialization, blocks transfers by sessions and different process status management. It manage the operation status allong all the process.

Parameter Type Description
op Object Object returned by operation api.

default.fotaAdjustBlocks(imageTransferBlocksMap, expectedNumberOfBlocks)

Recalculates and returns blocks map according to the expectedNumberOfBlocks calculated at the FOTA operation beginig. If received array shorter than expected it is filled with false values. If it is larger, it is truncated to the expected number of blocks.

Parameter Type Description
imageTransferBlocksMap Array List of blocks retrieved in CF22
expectedNumberOfBlocks number Expected number of blocks calculated in FOTA process initialization.

Returns an array with the adjusted blocks status map.

default.fotaBlocksTransfer(op, blocksStatusMap)

Orchestrates the transmission of multiple firmware blocks in a single session, respecting the maximum messages allowed for the current ECL. It manages specially first and last block sent to update operation status. It also manages errors per session.

Parameter Type Description
op Object Object returned by operation api.

default.fotaBlockTransfer(blockIndex, bundleName, bundleVersion, deploymentName, deploymentVersion)

Executes the actual transmission of a single firmware block calling dlms.sendFotaPage method. It increase success and error counters.

Parameter Type Description
op Object Object returned by operation api.

default.fotaCalculateIdentifier(op)

Calculates the unique image identifier based on KDL, hashtag, and activation date. It adds at the beginning of the identifier follwing bytes 014D.

Parameter Type Description
op Object Object returned by operation api.

Returns an object with following properties:

Property Type Description
result Array<number> Array with the calculated image identifier.
error string Error message.

Example:

{
  "result": "[1, 77, 14, 50, 145, 16, 132, 16, 233, 67, 18, 99, 235, 189,...]"
}

default.fotaCheckAllowed(op)

Verifies if the device is correctly configured for FOTA (valid block size and FOTA enabled). It updates operation status according to the validation.

Parameter Type Description
op Object Object returned by operation api.

default.fotaCheckBadSessions()

Aborts the FOTA process if the number of consecutive bad sessions reaches the maximum allowed threshold and throws an error. It uses badSessionsCounter and maxBadSessions from dlms_gas.config.

default.fotaCheckSessionBlocksErrors()

Just checks session errors rate and updates bad sessions counter.

default.fotaContinueProcess(op)

Internal function used to continue FOTA operation from different sessions: it manage different process status, sends blocks and finalizes operation according to final status (including device default scheduling).

It updates operation status using op parameter.

Parameter Type Description
op Object Object returned by operation api.

default.fotaImgActivate(op)

Function intended to invoke image activation DLMS method, but actually is empty function in default behavior. It can be implemented in specific behaviors.

Parameter Type Description
op Object Object returned by operation api.

default.fotaImgVerify(op)

Function intended to invoke image verification DLMS method, but actually is empty function in default behavior. It can be implemented in specific behaviors.

Parameter Type Description
op Object Object returned by operation api.

default.fotaImgTransferInitiate(op)

Invokes image transfer process initiation DLMS method and calculates the total number of blocks based on the firmware size and configured block size. It updates operation status.

Parameter Type Description
op Object Object returned by operation api.

default.fotaRestoreDefaultSchedule(op)

Restores the default push strategy schedule after the FOTA process is finished or cancelled. It updates operation status.

Parameter Type Description
op Object Object returned by operation api.

default.fotaScheduleForFota(op)

Temporary updates the push strategy schedule to a more aggressive frequency (every hour) during the FOTA process to speed up block transmission. It updates operation status.

Parameter Type Description
op Object Object returned by operation api.

default.fotaStartProcess(op)

Internal function used to complete first steps of FOTA operation: device status validation, device special scheduling and fota process initialization in the meter.

It updates operation status using op parameter.

Parameter Type Description
op Object Object returned by operation api.

default.fotaStateFromCf22(op)

It retrieves CF22 and updates session data to continue with FOTA proess.

Parameter Type Description
op Object Object returned by operation api.

It returns an object with transfer status and transfered blocks map. Example:

{
  "transferStatus": 1,
  "blocksMap": "[true, true, false, false]"
}

default.fotaStatus0(op, fotaState)

Executed when the devices Compact Frame 22 retrieve status 0. Actually it calls fotaStatusUnknown function because this function is not supposed to be executed.

Parameter Type Description
op Object Object returned by operation api.
fotaState object FOTA status object with returned by fotaStateFromCf22 function.

default.fotaStatus1(op, fotaState)

Executed when the devices Compact Frame 22 retrieve status 1. Try to send pending blocks or call image verification function.

Parameter Type Description
op Object Object returned by operation api.
fotaState object FOTA status object with returned by fotaStateFromCf22 function.

default.fotaStatus2(op, fotaState)

Executed when the devices Compact Frame 22 retrieve status 2. In default behavior it does nothing.

Parameter Type Description
op Object Object returned by operation api.
fotaState object FOTA status object with returned by fotaStateFromCf22 function.

default.fotaStatus3(op, fotaState)

Executed when the devices Compact Frame 22 retrieve status 3. It just calls to fotaImgActivate function.

Parameter Type Description
op Object Object returned by operation api.
fotaState object FOTA status object with returned by fotaStateFromCf22 function.

default.fotaStatus4(op, fotaState)

Executed when the devices Compact Frame 22 retrieve status 4. It finishes the FOTA process with image verification error.

Parameter Type Description
op Object Object returned by operation api.
fotaState object FOTA status object with returned by fotaStateFromCf22 function.

default.fotaStatus5(op, fotaState)

Executed when the devices Compact Frame 22 retrieve status 5. In default behavior it does nothing.

Parameter Type Description
op Object Object returned by operation api.
fotaState object FOTA status object with returned by fotaStateFromCf22 function.

default.fotaStatus6(op, fotaState)

Executed when the devices Compact Frame 22 retrieve status 6. Asks to device for new firmware data, restores default scheduling and finlizes FOTA operation.

Parameter Type Description
op Object Object returned by operation api.
fotaState object FOTA status object with returned by fotaStateFromCf22 function.

default.fotaStatus7(op, fotaState)

Executed when the devices Compact Frame 22 retrieve status 7. It finishes the FOTA process with image activation error.

Parameter Type Description
op Object Object returned by operation api.
fotaState object FOTA status object with returned by fotaStateFromCf22 function.

default.fotaStatusUnknown(op, fotaState)

Executed when the devices Compact Frame 22 retrieve an unexpected status. In default behavior it just incresaes bad sessions counter.

Parameter Type Description
op Object Object returned by operation api.
fotaState object FOTA status object with returned by fotaStateFromCf22 function.

default.fotaUpdateLostSteps(fotaState, op)

Function that depending on fotaState (process status and blocks maps) updates operation lost steps.

Parameter Type Description
fotaState object FOTA status object with returned by fotaStateFromCf22 function.
op Object Object returned by operation api.

default.fotaUpdateSuccessBlocksFromDevice(imageTransferBlocksMap)

Updates the internal block transmission counter based on the blocks retrieved form CF 22.

Parameter Type Description
imageTransferBlocksMap Array Array with boolean values representing the status of each block.

default.getHourlyArrayWithAt(hourlyArray, refTime)

From an array with hourly data (volumes, diagnostics…) and with refTime as reference, build an array with the at time of each increment.

Parameter Type Description
hourlyArray Array Array with hourly data (volumes, diagnostics…)
refTime number Timestamp to be used as reference

Returns an array with following objects:

[
  {
    "value": "120",
    "at": "1783051200"
  },
  {
    "value": "125",
    "at": "1783054800"
  },
  {
    "value": "150",
    "at": "1783058400"
  },
  {
    "value": "200",
    "at": "1783062000"
  }
  ....
]

default.getPeriodictyOctet(period, time)

Returns the DLMS date octet-string representing the periodicity for push event schedulation. It takes into account both period and time.

Parameter Type Description
period string Name of periodicty. Check table below for supported values.
time string Time value. It is used just to check if it is null and then return Disabled octet

These are codification rules for periodicity:

Periodicty name Returned octet
Disabled [-1, -1, -1, -1, -1]
every1Day [-1, -1, -1, 1, -40]
every2Day [-1, -1, -1, 2, -40]
every3Day [-1, -1, -1, 3, -40]
endOfBilling [-1, -1, -1, -1, -36]
everyMonday [-1, -1, -1, -1, 1]
everyTuesday [-1, -1, -1, -1, 2]
everyWednesday [-1, -1, -1, -1, 3]
everyThursday [-1, -1, -1, -1, 4]
everyFriday [-1, -1, -1, -1, 5]
everySaturday [-1, -1, -1, -1, 6]
everySunday [-1, -1, -1, -1, 7]

If invalid periodicty is used, an exception will be thrown.

default.getTimeOctet(period, time)

Returns the DLMS time octet for push event schedulation. It takes into account both period and time.

Parameter Type Description
period string Name of periodicty. If it is null or Disabled, then “Disabled” time octet ([-1, -1, -1, -1]) will be returned
time string Time value. It is parsed into time octet. If it si null, then “Disabled” ([-1, -1, -1, -1]) octet will be returned

default.getStepByName(op, stepName, checkInCurrentResponse)

Search in passed operation object if the step is already completed. If checkInCurrentResponse is not specified, it will check only in steps completed in the operation. If checkInCurrentResponse is specified and it is true, it will check also in the steps added in current execution.

Parameter Type Description
op Object Object returned by operation api.
stepName string Name of the step to search.
checkInCurrentResponse boolean Whether to check in the current step response. Default value is false

default.hourlyValues(op)

Horly values retrieval operation logic. Retrieves hourly incremental volume values from the device by range and processes the operation response.

Parameter Type Description
op Object Object returned by operation api.

default.initAndCollectCf47(data)

Function called from dlms_gas.decode after decoding 47 compact frame from received notification. Initialize parameters to be used later and collects received fields.

Parameter Type Description
data Object Object with decoded compact frame data return from dlms.getCompactData() method.

default.initAndCollectCf48(data)

Function called from dlms_gas.decode after decoding 48 compact frame from received notification. Initialize parameters to be used later and collects received fields.

Parameter Type Description
data Object Object with decoded compact frame data return from dlms.getCompactData() method.

default.initAndCollectCf49(data)

Function called from dlms_gas.decode after decoding 49 compact frame from received notification. Initialize parameters to be used later and collects received fields.

Parameter Type Description
data Object Object with decoded compact frame data return from dlms.getCompactData() method.

default.initAndCollectCf51(data)

Function called from dlms_gas.decode after decoding 51 compact frame from received notification. Initialize parameters to be used later and collects received fields.

Parameter Type Description
data Object Object with decoded compact frame data return from dlms.getCompactData() method.

default.initAndCollectCf97(data)

Function called from dlms_gas.decode() after decoding 97 compact frame from received notification. Initialize parameters to be used later and collects received fields.

Parameter Type Description
data Object Object with decoded compact frame data return from dlms.getCompactData() method.
Warning

In this case, because received compact frame does not contain onlineFrameCounter it will try to recovery from the device using previously collected frame counter to initilialize client. See default.restoreOnlineFrameCounter() function

default.operations()

Dispatches and executes active operations from the Opengate platform. Retrieves all alive operations for the device using Operations JS Api. It iterates through supportedOps and executes the process for any matching active operation.

default.pendingActions()

The main entry point for a standard communication session. It orchestrates the actions to be performed in a session. It uses dlms_gas.actions object to determine which actions to perform.

The order of actions are:

default.periodicActions()

Orchestrates periodic data retrieval functions. These functions retrieve data from the device periodically:

default.pushStrategy(op)

Push configuration operation logic. Configures the push communication strategy (Compact Frame selection, platform address/port, and scheduling) for the four supported push events and process the operation response.

Parameter Type Description
op Object Object returned by operation api.

default.requestNonMetroLogs(op)

Non metrological logs retrieval operation logic. Retrieves non-metrological event logs from the device by range and processes the operation response.

Parameter Type Description
op Object Object returned by operation api.

default.resetDiagnostic(op)

Reset diagnostic operation logic. Resets the device’s diagnostic status flags by executing the corresponding DLMS method and process the operation response.

Parameter Type Description
op Object Object returned by operation api.

default.restoreOnlineFrameCounter()

This method is used when received compact frame does not contain onlineFrameCounter and it is necessary to request it to the device in order to set correct values for next requests.

In uses previously collected online onlineFrameCounter to initilialize the client’s online frame counter and then it requests the device to retrieve its actual value. If the device does not response it tries again increasing used frames counter with the value specified in onlineFramCounterRetryInc property. It will try to request onlineFrameCounter to the device up to onlineFramCounterRetryMax times.

default.retrieveDailyProfiles()

If the device does not communicate in last days it will ask for all missing daily profiles.

default.retrieveInitialData(force)

Retrieves one-time device information. It will check if device.software datastream is not collected or force parameter is true. If so it will retrieve following data:

  • Metrological and Non-metrological Firmware versions.
  • APN configuration.
  • FOTA block configuration.
Parameter Type Description
force boolean If true, retrieves the data even if it was previously collected.

default.retrieveMetrologicalEvents()

Retrieves missing metrological events from the device by range, starting from the last collected counter.

default.retrievePushEventsConfigurations(force)

Retrieves configuration for all push events (1-4) configuration. It will check for each event if confCFx datastream is not collected or force parameter is true. If so it will retrieve push event configuration.

default.retrieveStatistics(force)

Retrieves periodically communication statistics (Signal Power, RSRQ, RSRP, ECL, Battery remaining time….). It will check statisticsRefDs datastreams at value and if the data is too old (using periodicDataAgeMillis as reference). Statistics retrieval can be forced using force parameter.

Parameter Type Description
force boolean If true, retrieves the data even if the data is not too old.

default.rsrqFromRaw(raw)

Returns converted raw RSRQ to dB/dBm following standard dlms specfication.

default.rsrpFromRaw(raw)

Returns converted raw RSRQ to dB/dBm following standard dlms specfication.

default.setClock()

Checks drift and synchronizes device time.

default.signalQualityFromRaw(raw)

Converts raw CSQ value to dBm following DLMS specification.

Parameter Type Description
raw number Raw signal quality value (0-31).

default.strategy(b1, b0)

Decodes the communication strategy from two bits.

Parameter Type Description
b1 number First bit.
b0 number Second bit.

Return a string with composed strategy.

default.tauInSecondsFromRaw(raw)

Decodes TAU timer to seconds following DLMS specification.

Parameter Type Description
`raw" number 8-bit timer value.

Example:

var s = dlms_gas.manufacturer.function("tauInSecondsFromRaw")(0x21);

default.tmrInSecondsFromRaw(raw)

Decodes raw TMR to seconds following dlms specfication.

Parameter Type Description
`raw" number 8-bit timer value.

default.valveManagement(op)

Valve managment operation logic. Executes valve Open/Close commands and process the operation response.

Property Type Default Description
op Object Operation request object.

dlms_gas.pietro object Properties

There are no specific properties for dlms_gas.pietro.

dlms_gas.pietro object Functions

pietro.decodeFw(fwBytes)

Specific firmware decoding for Pietro devices. It returns a simplified version string.

dlms_gas.honeywell object Properties

Property Type Value Description
conformance string ['GENERAL_PROTECTION', 'SELECTIVE_ACCESS'] Used to define dlms.conformance when initializing client
ignoreSystemTitleInCiphering boolean false Used to define dlms.ignoreSystemTitleInCiphering when initializing client

dlms_gas.honeywell object Functions

honeywell.closeConnection()

Graceful disconnect via DLMS method specific for Honeywell devices.

honeywell.retrieveStatistics(force)

Specific statistics retrieval for Honeywell devices, excluding some attributes not supported by these devices.

honeywell.tauInSecondsFromRaw(raw)

Overrides the default TAU conversion to return directlty the raw value.

honeywell.tmrInSecondsFromRaw(raw)

Overrides the default TMR conversion to return directlty the raw value.

honeywell.eventScheduleArray(scheduleData)

Event DLMS schedule array generation logic. Generates the event schedule array for push events configuration. Adds just the events not disabledwith corresponding periodicity and hour specification.

Parameter Type Description
scheduleData Object Object with event’s day periodicty value and hour specification value from operation paraemeters.

Returns an array of objects with date and time octet. Example:

[
  {
    "dateOctet": "[-1, -1, -1, 3, -40]",
    "timeOctet": "[0, 5, 0, 0]"
  },
  {
    "dateOctet": "[-1, -1, -1, 3, -40]",
    "timeOctet": "[3, 5, 0, 0]"
  }
]

dlms_gas.spark object Properties

Property Type Value Description
forceSetWithoutList boolean true Used to define dlms.forceSetWithoutList when initializing client
eclAttribute number 253 Attribute ID for ECL retrieval.

dlms_gas.spark object Functions

spark.fotaImgVerify(op)

Invokes FOTA image verify DLMS method. It updates the operation status accordingly to the response

Property Type Default Description
op Object Operation request object.

spark.fotaCalculateIdentifier(op)

Calculates the unique image identifier based on KDL, hashtag, and activation date.

Parameter Type Description
op Object Object returned by operation api.

Returns an object with following properties:

Property Type Description
result Array<number> Array with the calculated image identifier.
error string Error message.

Example:

{
  "result": "[14, 50, 145, 16, 132, 16, 233, 67, 18, 99, 235, 189,...]"
}

dlms_gas.watertech object Properties

Property Type Value Description
conformance string ['GENERAL_PROTECTION', 'SELECTIVE_ACCESS'] Used to define dlms.conformance when initializing client
ignoreSystemTitleInCiphering boolean false Used to define dlms.ignoreSystemTitleInCiphering when initializing client

dlms_gas.watertech object Functions

There are no specific properties for dlms_gas.watertech.

IEC102 JavaScript API

Connector functions IEC102 JS API guide

This API allows users to execute operations in the IEC102 client from a connector function.

iec102 Object

The iec object is the main object of the IEC102 client. It allows to connect to communicate with devices using IEC102 protocol.

Establish connection

iec102.connect(registerType)

There is a connect method used to establish the connection with the device. When this method is called, it internally completes several actions:

  • Depending on the registerType parameter (IP, VPN, GSM, ATR), not only will the connection be made, but it may also be necessary to send some commands to establish the connection correctly. If not defined, the IP registration type will be used.
  • Once connection and registration is completed, connection status datapoints will be collected:
    • If ATR or GSM connection types are used, device.communicationModules[].subscription.mobile.presence.gsm with OK or NOK status.
  • In case of error, response status will be set to ERROR_PROCESSING and obtained error description will be added.

After connect method call, returned status must be checked to know if it is possible to continue. If not, response object should be returned.

Connection example:

iec102.ip="127.0.0.1";
iec102.port="3000";
iec102.linkAddress="1";
iec102.useMeasurePoint="1";
iec102.usePasswordAccess="1";

iec102.source="DEVICE_GSM_DATACALL";
iec102.sourcesInfo="Accessing Register through GSM data call to Device";

iec102.msisdn = "123412341324";
iec102.userName = "userName";
iec102.password = "password";
iec102.portConfig = "portConfig";

var connectionStatus = iec102.connect("GSM");
if(!connectionStatus.connected) {
    /* Connection not established. 
    At this point response object is fulfilled 
    with error code and description and skipped steps. 
    */
    return response;
}

In previous example, in case of error, there will be an implicit data collection with some data similar to this:

{
    "datastreams": [
        {
            "id": "device.communicationModules[].subscription.mobile.presence.gsm",
            "datapoints": [
                {
                    "value": "NOK",
                    "at": 1698793200000,
                    "source": "DEVICE_GSM_DATACALL",
                    "sourceInfo": "Accessing Register through GSM data call to Device"
                }
            ]
        }
    ]
}

And the response will be something similar to this:

{
    "version": "8.0",
    "trustedBoot": null,
    "operation": {
        "response": {
            "id": "request_id",
            "name": "GET_METER_INFO",
            "deviceId": "device_id",
            "resultCode": "ERROR_PROCESSING",
            "resultDescription": "Called meter responded an ERROR",
            "steps": [
                {
                    "name": "timeRequest",
                    "result": "SKIPPED",
                    "description": "Unable to make a data call"
                }
            ],
            "timestamp": 1698793200000
        }
    }
}

ASDUs definition and execution.

Once the connection is established, it is possible to execute the desired ASDUs. There are three ways to execute ASDUs:

  1. Execute directly one ASDU.
  2. Define one by one all iec102.asdus and then execute.
  3. Define iec102.asdus to be executed from operation params and then execute.

ASDUs execution behavior specification

Each ASDU to be executed must be defined with some extra params to specify correctly its behavior. For this configuration a JSON object will be used:

Field Type Description
period json Depending on the ASDU, it is necessary to specify a PERIOD
sleepTimeBeforeExec number Wait time in milliseconds before ASDU is executed. If not defined or 0 value, no wait will be done.
step json Specify if related step must added and sent to response object. If not defined, no step will be added to response object
collection json Specify if related collection must added and sent to collection object. If not defined, no datastream will be added to collection object. If defined, default datastreams will be added.

period format:

Field Type Description
initial number Initial instant of the period in milliseconds
final boolean Final instant of the period in milliseconds
type string Period type. This type can be one of: previousQuarter, previousDay, previousWeek, previousMonth, custom, lastMinutes, lastHours, lastDays

There are several utils methods to calculate this period. See date utils

step format:

Field Type Description
name string Step’s name, if not defined default step will be added.
sent boolean If added step must be sent directly after ASDU execution

collection format:

Field Type Description
sent boolean If added datastreams must be sent directly after ASDU execution

An example of ASDU execution configuration:

{
    "period": {
        "initial": 1698840000000,
        "final": 1698840899000,
        "type": "previousQuarter"
    }, 
    "sleepTimeBeforeExec": 1000,
    "step": {
        "name": "custom_name",
        "send": true
    },
    "step": {
        "send": true
    }
}

ASDUs direct execution

iec102.asdus.timeRequest()

It is possible to execute one asdu directly. For example:

var asduResult = iec102.asdus.timeRequest();

Execution result will be an object with following parameters:

Returned value will have following format:

Parameter Type Description
status boolean true if ASDU finished correctly.
description string Descriptive message with execution result
readingState string Parameter used to communicate all iec102.asdus execution status
data object Json with ASDU execution result data. Each ASDU will have specific data

In the previous example, the result could be:

{
    "status": false,
    "description": "Success",
    "readingState": "READ",
    "data":{
        "Datetime": {
            "date": "2023-11-01",
            "time": "12:00:00",
            "timezone": "GMT+1",
            "dst": 0
        }
    }
}

In this case, response steps and collected data must defined and sent manually. For example:

var asduResult = iec102.asdus.timeRequest();
if(asduResult.result){
    response.addStep("TIME_REQUEST", "SUCCESSFUL", asduResult.description);
    response.send();
    collection.addDatapoint("device.clock", asduResult.data.Datetime);
    collection.send();
}

An alternative to previous code:

var execConfig = {
    "step": {
        "sent": true
    },
    "collection": {
        "sent": true
    }
}
var asduResult = iec102.asdus.timeRequest(execConfig);

ASDUs definition from operations parameters

If launched operation has specific parameters and steps, it will be possible to calculate ASDUs from these parameters using iec102.asdus.addFromParams().

Expected parameters are:

  • Booleans with following names to know which iec102.asdus to execute.
    • doTimeRequest
    • doParameters
    • doDeviceAndManufacturer
    • doLoadCurveAbsolut
    • doLoadCurveIncremental
    • doStoredPricing
    • doConfiguration
    • doCurrentPricing
  • dataPeriod.period[0].tipo that is a string with one of following values:
    • previousQuarter
    • previousDay
    • previousWeek
    • previousMonth
    • custom
  • If dataPeriod is custom, following parameters must be defined with dates ISO string:
    • dataPeriod.period[0].parameters[0].startDate
    • dataPeriod.period[0].parameters[0].finishDate

If operation params do not match previous content, no ASDUs will be calculated.

Taking previous operation parameters specification and taking entities datastreams status into account, ASDUS to be executed will be calculated based on some predefined conditions to avoid losing data and avoid unnecessary retries.

By default, login and logout ASDUs will be added to the list.

An example of thi method usage:

/*
    Operation params:
    {
      "doTimeRequest": true,
      "doParameters": true,
      "doDeviceAndManufacturer": false,
      "doLoadCurveAbsolut": false,
      "doLoadCurveIncremental": false,
      "doStoredPricing": false,
      "doConfiguration": false,
      "doCurrentPricing": false,
      "dataPeriod": {
        "period": [
            "tipo": previousQuarter
        ]
      }
    }
*/

iec102.asdus.addFromParams();
var executionResult = iec102.asdus.execute();

/*
    iec102.asdus to be executed:
    [
        {
            "name": "login"
        },{
            "name": "timeRequest",
            "execConfig": {
                "period":{
                    "initial": 1698840000000,
                    "final": 1698840899000,
                    "type": "previousQuarter"
                },
                "sleepTimeBeforeExec": 5000
                "step": {
                    "send": true
                },
                "collection": {
                    "sent": true
                }
            }
        },{
            "name": "parameters",
            "execConfig": {
                "period":{
                    "initial": 1698840000000,
                    "final": 1698840899000,
                    "type": "previousQuarter"
                },
                "sleepTimeBeforeExec": 5000
                "step": {
                    "send": true
                },
                "collection": {
                    "sent": true
                }
            }
        },{
            "name": "logout",
            "execConfig": {
                "sleepTimeBeforeExec": 5000
            }
        }
    ]
*/

In this case, when executing all ASDUS, depending on executed ASDU, default steps could be sent directly and default collection could be done.

As explained, this method implements default behavior for ASDUs executions. If this behaviour is no valid, ASDUs to be executed must be defined manually. See ASDUs manual definition.

ASDUs manual definition:

iec102.asdus.add(name, execConfig)

It is possible to add manually using iec102.asdus.add method. This method expect following parameters to define ASDU execution correctly:

  • name: ASDU to be executed name. One of:
    • login
    • logout
    • dayLightSavingTime
    • timeRequest
    • parameters
    • deviceManufacturer
    • loadCurve
    • loadCurveQuarter
    • loadCurveIncremental
    • loadCurveIncrementalQuarter
    • storedPricing
    • currentPricing
    • configuration
  • execConfig: Json defined ASDU execution configuration

For example to define ’timeRequest’ ASDU this call must be done:

var execConfig = {
    "period":{
        "initial": 1698840000000,
        "final": 1698840899000,
        "type": "previousQuarter"
    },
    "sleepTimeBeforeExec": 5000
    "step": {
        "send": true
    },
    "collection": {
        "sent": true
    }
}
iec102.asdus.add("timeRequest", execConfig);

Previous code will add to asdus.asdusToExec array following object:

{
    "name": "timeRequest",
    "execConfig": {
            "period":{
                "initial": 1698840000000,
                "final": 1698840899000,
                "type": "previousQuarter"
            },
            "sleepTimeBeforeExec": 5000,
            "step": {
                "send": true
            },
            "collection": {
                "sent": true
            }
        }
}

In this case, after executing this ASDU default step will be sent with execution result and default datastream will be collected:

// Step to be sent
{
    "version": "8.0",
    "trustedBoot": null,
    "operation": {
        "response": {
            "steps": [
                {
                    "name": "TIME_REQUEST",
                    "result": "SUCCESS",
                    "description": "Success."
                }
            ],
        }
    }
}
// Collection to be sent
{
    "datastreams": [
        "id": "device.clock",
        "datapoints":[
            {
                "value": {
                    "date": "2023-11-01",
                    "time": "12:00:00",
                    "timezone": "GMT+1",
                    "dst": 0
                },
                "at": 1698793200000
            }
        ]
    ]
}

Defined ASDUs execution

If ASDUs are not executed one by one, but they are added from operation params or defining them one by one, iec102.asdus.execute() method must be used to execute all defined ASDUs.

iec102.asdus.execute() method will execute all added ASDUs one by one, and depending ASDU specification related steps and collection will be send.

For example, first we define manually following ASDUs and then we do execution:

var period = utils.date.period.previousQuarter(iec102.referenceTime); 

iec102.asdus.add("login");

iec102.asdus.add("loadCurveIncremental", {
    "period": period,
    "sleepTimeBeforeExec": 1000,
    "step": {
        "sent": true,
    },
    "collection":{
        "sent": false
    }
});

iec102.asdus.add("loadCurve", 
    "period": period,
    "sleepTimeBeforeExec": 1000,
    "step": {
        "name": "CUSTOM_LOAD_CURVE_STEP",
        "sent": false,
    }
});

iec102.asdus.add("logout",{
    "sleepTimeBeforeExec": 1000
});

var executionResult = iec102.asdus.execute();

/* ASDUs to be executed
[
    {
        "name": "login"
    },{
        "name": "timeRequest",
        "execConfig": {
                "sleepTimeBeforeExec": 1000
                "step": {
                    "send": true
                },
                "collection": {
                    "sent": true
                }
            }
    },{
        "name": "loadCurve",
        "execConfig": {
                "period":{
                    "initial": 1698840000000,
                    "final": 1698840899000
                },
                "sleepTimeBeforeExec": 1000
                "step": {
                    "name": "CUSTOM_LOAD_CURVE_STEP",
                    "send": false
                }
            }
    },{
        "name": "logout",
        "execConfig": {
            "sleepTimeBeforeExec": 5000 
        }
    }
]
*/

In this example, we will suppose that timeRequest ASDU finish correctly:

  1. First, login ASDU will be executed. After execution, no step or collection will be sent.

  2. Before executing timeRequest, 1000 milliseconds wait will be done.

  3. After timeRequest execution, default TIME_REQUEST step will be added because no name has been specified and it will be sent because step.send has been defined to true. This is the step to be sent directly:

    {
        "operation": {
            "response" :{
                //...
                "steps": [
                    {
                        "name": "TIME_REQUEST",
                        "result": "SUCCESSFUL",
                        "description": "Step completed successfully"
                    }
                ]
                //...
            }
        }
    }
  1. After timeRequest execution, following datastream will be added to collection object because collection is defined and it will be sent directly because collection.send is true. Datastream to be collected:
{
    "datastreams": [
        {
            "id": "device.clock",
            "datapoints":[
                {
                    "value": {
                        "date": "2023-11-01",
                        "time": "12:00:00",
                        "timezone": "GMT+1",
                        "dst": 0
                    },
                    "at": 1698793200000
                }
            ]
        }
    ]
}
  1. Before executing loadCurve, 1000 milliseconds wait will be done.

  2. After loadCurve execution, instead of adding default STEP_NAME_LOAD_CURVE_ABSOLUT step, a step with name CUSTOM_LOAD_CURVE_STEP will be added because name parameter has been specified. In this case, the step will be added to response, but not sent send has been defined to false. This is the step added to response object:

    {
        "operation": {
            "response" :{
                //...
                "steps": [
                    {
                        "name": "CUSTOM_LOAD_CURVE_STEP",
                        "result": "SUCCESSFUL",
                        "description": "Step completed successfully"
                    }
                ]
                //...
            }
        }
    }
  1. After loadCurve execution no datastream will be added to collection object because no collection field has been defined in execConfig.

  2. Finally, after 1000 milliseconds wait logout ASDU will be executed.

  3. Final executionResult will contain all ASDUs execution result.

Returned value will have following format:

Parameter Type Description
status boolean true if all ASDUs finished correctly.
iec102.asdus object Json with each ASDU execution result object.

Execution result could be something similar to this

{
    "status": false,
    "asdus": {
        "login": {
            "status": true,
            "description": "Success"
            "readingState": null,
        },
        "timeRequest": {
            "status": true,
            "description": "Success",
            "readingState": "READ",
            "data":{
                "Datetime": {
                    "date": "2023-11-01",
                    "time": "12:00:00",
                    "timezone": "GMT+1",
                    "dst": 0
                }
            }
        },
        "loadCurve": {
            "status": true,
            "description": "Success",
            "readingState": "READ",
            "data":{
                "frames": [
                    {
                        "ImportedActive": 10,
                        "Quadrant4Reactive": 10,
                        "Quadrant2Reactive": 333,
                        "Quadrant3Reactive": 334,
                        "ExportedActive": 1000,
                        "Quadrant1Reactive": 333,
                        "Timestamp": 1705536000000
                    }
                ]
            }
        },
        "logout": {
            "status": false,
            "description": "Error in logout"
            "readingState": null,
        }
    }
}

Although, login, timeRequest, and loadCurve finished correctly, because logout ASDU failed, status is failed. timeRequest, loadCurve ASDUs finished correctly and returns obtained data. Returned data depends on each ASDU.

Default steps for ASDUs

These are defined default steps for each ASDU:

ASDU STEP
login
logout
timeRequest TIME_REQUEST
configuration CONFIGURATION
parameters PARAMETERS
dayLightSavingTime
loadCurve LOAD_CURVE_ABSOLUT
loadCurveQuarter LOAD_CURVE_ABSOLUT
loadCurveIncremental LOAD_CURVE_INCREMENTAL
loadCurveIncrementalQuarter LOAD_CURVE_INCREMENTAL
deviceManufacturer DEVICE_AND_MANUFACTURER
currentPricing CURRENT_PRICING
storedPricing STORED_PRICING

Default datastreams for ASDUs

ASDU Field Datastream
login
logout
timeRequest DateTime device.clock
configuration ManufacturerCode manufacturerCode
configuration Model device.model
configuration Firmware device.software
configuration SerialNumber device.serialNumber
configuration StandardDate protocolRevDate
configuration Datetime protocolDate
configuration BatteryPercentage device.powersupply
configuration SerialPort1Baudrate serialPort1Speed
configuration SerialPort1Codification serialPort1Conf
configuration SerialPort1Mode serialPort1ShipMode
configuration SerialPort1StartingAsciiString serialPort1AsciiString
configuration SerialPort2Baudrate serialPort2Speed
configuration SerialPort2Codification serialPort2Conf
configuration VoltagePrimary voltPrim
configuration VoltageSecondary voltSec
configuration IntensityPrimary intenPrim
configuration IntensitySecondary intenSec
configuration IntegrationPeriod1 IntPerLoadCurve1
configuration IntegrationPeriod2 IntPerLoadCurve2
configuration IntegrationPeriod3 IntPerLoadCurve3
configuration ContractType contractType
configuration Contract1 contractState
parameters LinkAddressCollected elinkAddress
parameters MeasurePointsQuantity measurePointsQuantity
parameters MeasurePoint measurePoint
parameters AccessPassword accessPass
parameters IntegrationPeriod intPeriod
parameters RegistryDepth regDepth
deviceManufacturer ManufacturerCode manufacturerCode
deviceManufacturer DeviceId contIdentifier
dayLightSavingTime ToDaylightSavingTime
dayLightSavingTime ToStandardTime
loadCurve Timestamp
loadCurve ImportedActive eImpActTotDia
loadCurve ExportedActive eExpActTotDia
loadCurve Quadrant1Reactive eImpReQ1TotDia
loadCurve Quadrant2Reactive eImpReQ2TotDia
loadCurve Quadrant3Reactive eImpReQ3TotDia
loadCurve Quadrant4Reactive eImpReQ4TotDia
loadCurveQuarter frames[].Timestamp
loadCurveQuarter frames[].ImportedActive eImpActTot
loadCurveQuarter frames[].ExportedActive eExpActTot
loadCurveQuarter frames[].Quadrant1Reactive eImpReQ1Tot
loadCurveQuarter frames[].Quadrant2Reactive eImpReQ2Tot
loadCurveQuarter frames[].Quadrant3Reactive eImpReQ3Tot
loadCurveQuarter frames[].Quadrant4Reactive eImpReQ4Tot
loadCurveIncremental frames[].Timestamp
loadCurveIncremental frames[].ImportedActive eImpActIncDia
loadCurveIncremental frames[].ExportedActive eExpActIncDia
loadCurveIncremental frames[].Quadrant1Reactive eImpReQ1IncDia
loadCurveIncremental frames[].Quadrant2Reactive eImpReQ2IncDia
loadCurveIncremental frames[].Quadrant3Reactive eImpReQ3IncDia
loadCurveIncremental frames[].Quadrant4Reactive eImpReQ4IncDia
loadCurveIncrementalQuarter frames[].Timestamp
loadCurveIncrementalQuarter frames[].ImportedActive eImpActInc
loadCurveIncrementalQuarter frames[].ExportedActive eExpActInc
loadCurveIncrementalQuarter frames[].Quadrant1Reactive eImpReQ1Inc
loadCurveIncrementalQuarter frames[].Quadrant2Reactive eImpReQ2Inc
loadCurveIncrementalQuarter frames[].Quadrant3Reactive eImpReQ3Inc
loadCurveIncrementalQuarter frames[].Quadrant4Reactive eImpReQ4Inc
currentPricing frames[].Timestamp
currentPricing frames[].RateIndex ({ri})
currentPricing frames[].Memory ({m})
currentPricing frames[].AbsoluteActive eRate{ri}ActTot{m}
currentPricing frames[].IncrementalActive eRate{ri}ActInc{m}
currentPricing frames[].AbsoluteInductiveReactive eRate{ri}ReIndTot{m}
currentPricing frames[].IncrementalInductiveReactive eRate{ri}ReIndInc{m}
currentPricing frames[].AbsoluteCapacitiveReactive eRate{ri}ReCapTot{m}
currentPricing frames[].IncrementalCapacitiveReactive eRate{ri}ReCapInc{m}
currentPricing frames[].MaximumPower eRate{ri}PowerMaxVal{m}
currentPricing frames[].ExcessPower eRate{ri}PowerExVal{m}
currentPricing frames[].InitPeriodDateAsDatetime eRate{ri}PricInitPeri{m}
currentPricing frames[].EndPeriodDateAsDatetime eRate{ri}PricEndPeri{m}
storedPricing frames[].Timestamp
storedPricing frames[].RateIndex ({ri})
storedPricing frames[].Memory ({m})
storedPricing frames[].AbsoluteActive eRate{ri}ActTot{m}
storedPricing frames[].IncrementalActive eRate{ri}ActInc{m}
storedPricing frames[].AbsoluteInductiveReactive eRate{ri}ReIndTot{m}
storedPricing frames[].IncrementalInductiveReactive eRate{ri}ReIndInc{m}
storedPricing frames[].AbsoluteCapacitiveReactive eRate{ri}ReCapTot{m}
storedPricing frames[].IncrementalCapacitiveReactive eRate{ri}ReCapInc{m}
storedPricing frames[].MaximumPower eRate{ri}PowerMaxVal{m}
storedPricing frames[].ExcessPower eRate{ri}PowerExVal{m}
storedPricing frames[].InitPeriodDateAsDatetime eRate{ri}PricInitPeri{m}
storedPricing frames[].EndPeriodDateAsDatetime eRate{ri}PricEndPeri{m}

iec102 Object Properties

Property Type Default Description
ip string IP address to connect.
port number Port to connect
isTls boolean false Specifies if secure protocol must be used
retries number 5 Number of retries.
timeout number 30000 Timeout in milliseconds.
linkAddress number Mandatory parameter used as part of IEC102 protocol
useMeasurePoint number Mandatory parameter used as part of IEC102 protocol
usePasswordAccess number Mandatory parameter used as part of IEC102 protocol
msisdn string Parameter used when connection is done with a data call through some caller
userName string Parameter used when connection is done with a data call through some caller
password string Parameter used when connection is done with a data call through some caller
referenceTime number Current It will be used as reference time for period calculation and as datapoints ‘at’ value
readingState string Current Internally used parameter to keep ASDUs execution status
portConfig string Parameter used when connection is done with a data call through some caller
source string It will be used as datapoints ‘source’ value
sourcesInfo string It will be used as datapoints ‘sourcesInfo’ value
manufacturerCodeName object Manufacturer code->name map
asdus.asdusToExec array Internal array with the list of ASDUs to be executed. It must be initialized before connecting

iec102 Object Methods

connect (registerType, waitFor) ⇒ Object

Establish connection with specified device. Before using this method connection parameters such as ip, port, timeout, etc. must be specified (some of them can have default values).

See Establish connection

Parameter Type Description
registerType string Specify connection procedure.
waitFor array Strings to wait for in the response.

This method will return an object with following format:

{
    "status": true,
    "description": "Success"
}

connectWithIpAndPorts (ports, waitFor) ⇒ Object

Establish connection with specified device trying different ports. Before using this method connection parameters such as ip, timeout, etc. must be specified (some of them can have default values). In this case, a list of ports will be passed as parameters. For each port of the list, the connect method will be called until the connection is established correctly.

See Establish connection

Parameter Type Description
ports array List of ports to be used
waitFor array Strings to wait for in the response.

This method will return an object with following format:

{
    "status": true,
    "description": "Success"
}

connectWithEndpoints (endpoints) ⇒ Object

This method is special case for GSM connection.

Establish connection with specified device trying different endpoints. Each endpoint is an object with following information:

  • ip
  • port
  • userName
  • password

For example:

var endpoints = [
    {
        "ip": "127.0.0.1",
        "port": "3000",
        "userName": "userName",
        "password": "password"
    },
    {
        "ip": "127.0.0.2",
        "port": "3001",
        "userName": "userName2",
        "password": "password2"
    }
];
iec102.connectWithEndpoints(endpoints);

In this case, GSM register type will be used.

See Establish connection

Parameter Type Description
endpoints array List of objects with endpoints spec

This method will return an object with following format:

{
    "status": true,
    "description": "Success"
}

disconnect ()

Closes IEC102 connection

send (command, waitFor, pattern) ⇒ Object

Sends a command.

Parameter Type Description
command string Command to send.
waitFor List Strings to wait for in the response.
pattern string Pattern to extract response from sent command.

Returns a json with status and description properties:

{
    "status": true,
    "description": "Success"
}

iec102.asdus.add(name, execConfig)

Define an ASDU to be executed and add to asdus.asdusToExec array.

See ASDUs Definition and Execution

Parameter Type Description
name string ASDU name
execConfig object Execution configuration

iec102.asdus.addFromParameters()

Calculates all ASDUs to be executed from operations parameters adding them to asdus.asdusToExec array. This method only works if parameters object has specific properties.

See ASDUs Definition and Execution

iec102.asdus.login(execConfig)

Execute directly login ASDU.

See ASDUs Definition and Execution

Parameter Type Description
execConfig object Execution configuration

Return a json with following format:

{
    "status": true,
    "description": "Success",
    "readingState": null,
}

iec102.asdus.logout(execConfig)

Execute directly logout ASDU.

See ASDUs Definition and Execution

Parameter Type Description
execConfig object Execution configuration

Return a json with following format:

{
    "status": true,
    "description": "Success",
    "readingState": null,
}

iec102.asdus.timeRequest(execConfig)

Execute directly timeRequest ASDU.

See ASDUs Definition and Execution

Parameter Type Description
execConfig object Execution configuration

Return a json with following format:

{
    "status": true,
    "description": "Success",
    "readingState": "READ",
    "data": {
        "Datetime": {
            "date": "2024-01-19",
            "time": "09:36:58",
            "timezone": "GMT+1",
            "dst": 0
        }
    }
}

data object will contain data retrieved from executed ASDU.

iec102.asdus.configuration(execConfig)

Execute directly configuration ASDU.

See ASDUs Definition and Execution

Parameter Type Description
execConfig object Execution configuration

Return a json with following format:

{
    "status": true,
    "description": "Success",
    "readingState": "READ",
    "data": {
        "Contract1": "unknown",
        "VoltageSecondary": 0,
        "ManufacturerCode": "1",
        "BatteryPercentage": 44,
        "SerialPort1StartingAsciiString": "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000",
        "IntensityPrimary": 0,
        "IntegrationPeriod3": 0,
        "VoltagePrimary": 0,
        "IntegrationPeriod1": 60,
        "IntegrationPeriod2": 15,
        "SerialPort1Mode": 0,
        "IntensitySecondary": 0,
        "SerialNumber": 333,
        "Model": {
            "name": "AQ",
            "version": "",
            "manufacturer": "",
            "manufacturerOUI": ""
        },
        "SerialPort1Codification": "8/No/2",
        "ContractType": "Contract I",
        "StandardDate": "2002-05-01",
        "Firmware": [
            {
                "name": "Firmware version",
                "version": "2",
                "type": "FIRMWARE"
            }
        ],
        "SerialPort1Baudrate": 9600,
        "SerialPort2Baudrate": 0,
        "SerialPort2Codification": "8/No/2",
        "Datetime": {
            "date": "2002-04-10",
            "time": "00:00:00",
            "timezone": "GMT+1",
            "dst": 0
        }
    }
}

data object will contain data retrieved from executed ASDU.

iec102.asdus.parameters(execConfig)

Execute directly parameters ASDU.

See ASDUs Definition and Execution

Parameter Type Description
execConfig object Execution configuration

Return a json with following format:

{
    "status": true,
    "description": "Success",
    "readingState": "READ",
    "data": {
        "RegistryDepth": 4000,
        "LinkAddressCollected": 1,
        "IntegrationPeriod": 60,
        "AccessPassword": 1,
        "MeasurePoint": 1,
        "MeasurePointsQuantity": 1
    }
}

data object will contain data retrieved from executed ASDU.

iec102.asdus.deviceManufacturer(execConfig)

Execute directly deviceManufacturer ASDU.

See ASDUs Definition and Execution

Parameter Type Description
execConfig object Execution configuration

Return a json with following format:

{
    "status": true,
    "description": "Success",
    "readingState": "READ",
    "data": {
        "ManufacturerCode": "81",
        "DeviceId": "501606407"
    }
}

data object will contain data retrieved from executed ASDU.

iec102.asdus.dayLightSavingTime(execConfig)

Execute directly dayLightSavingTime ASDU.

See ASDUs Definition and Execution

Parameter Type Description
execConfig object Execution configuration

Return a json with following format:

{
    "status": true,
    "description": "Success",
    "readingState": "READ",
    "data": {
        "ToDaylightSavingTime": {
            "date": "2002-04-10",
            "time": "00:00:00",
            "timezone": "GMT+1",
            "dst": 0
        },
        "ToStandardTime": {
            "date": "2002-04-10",
            "time": "00:00:00",
            "timezone": "GMT+1",
            "dst": 0
        }      
    }
}

data object will contain data retrieved from executed ASDU.

iec102.asdus.loadCurve(execConfig)

Execute directly loadCurve ASDU.

See ASDUs Definition and Execution

Parameter Type Description
execConfig object Execution configuration

Return a json with following format:

{
    "status": true,
    "description": "Success",
    "readingState": "READ",
    "data": {
        "frames": [
            {
                "ImportedActive": 10,
                "Quadrant4Reactive": 10,
                "Quadrant2Reactive": 333,
                "Quadrant3Reactive": 334,
                "ExportedActive": 1000,
                "Quadrant1Reactive": 333,
                "Timestamp": 1705536000000
            },
            //...
        ]
    }
}

data object will contain a field named frames that is an array. Each array element is an object with the data retrieved.

iec102.asdus.loadCurveQuarter(execConfig)

Execute directly loadCurveQuarter ASDU.

See ASDUs Definition and Execution

Parameter Type Description
execConfig object Execution configuration

Return a json with following format:

{
    "status": true,
    "description": "Success",
    "readingState": "READ",
    "data": {
        "frames": [
            {
                "ImportedActive": 10,
                "Quadrant4Reactive": 10,
                "Quadrant2Reactive": 333,
                "Quadrant3Reactive": 334,
                "ExportedActive": 1000,
                "Quadrant1Reactive": 333,
                "Timestamp": 1705536000000
            },
            {
                "ImportedActive": 0,
                "Quadrant4Reactive": 125,
                "Quadrant2Reactive": 125,
                "Quadrant3Reactive": 125,
                "ExportedActive": 500,
                "Quadrant1Reactive": 125,
                "Timestamp": 1705536900000
            }
            //...
        ]
    }
}

data object will contain a field named frames that is an array. Each array element is an object with the data retrieved.

iec102.asdus.loadCurveIncremental(execConfig)

Execute directly loadCurveIncremental ASDU.

See ASDUs Definition and Execution

Parameter Type Description
execConfig object Execution configuration

Return a json with following format:

{
    "status": true,
    "description": "Success",
    "readingState": "READ",
    "data": {
        "frames": [
            {
                "ImportedActive": 10,
                "Quadrant4Reactive": 10,
                "Quadrant2Reactive": 333,
                "Quadrant3Reactive": 334,
                "ExportedActive": 1000,
                "Quadrant1Reactive": 333,
                "Timestamp": 1705536000000
            }
            //...
        ]
    }
}

data object will contain a field named frames that is an array. Each array element is an object with the data retrieved.

iec102.asdus.loadCurveIncrementalQuarter(execConfig)

Execute directly loadCurveIncrementalQuarter ASDU.

See ASDUs Definition and Execution

Parameter Type Description
execConfig object Execution configuration

Return a json with following format:

{
    "status": true,
    "description": "Success",
    "readingState": "READ",
    "data": {
        "frames": [
            {
                "ImportedActive": 2,
                "Quadrant4Reactive": 0,
                "Quadrant2Reactive": 1,
                "Quadrant3Reactive": 1,
                "ExportedActive": 1,
                "Quadrant1Reactive": 2,
                "Timestamp": 1705536000000
            },
            {
                "ImportedActive": 0,
                "Quadrant4Reactive": 0,
                "Quadrant2Reactive": 0,
                "Quadrant3Reactive": 0,
                "ExportedActive": 2,
                "Quadrant1Reactive": 0,
                "Timestamp": 1705536900000
            }
            //...
        ]
    }
}

data object will contain a field named frames that is an array. Each array element is an object with the data retrieved.

iec102.asdus.currentPricing(execConfig)

Execute directly currentPricing ASDU.

See ASDUs Definition and Execution

Parameter Type Description
execConfig object Execution configuration

Return a json with following format:

{
    "status": true,
    "description": "Success",
    "readingState": "READ",
    "data": {
        "frames": [
            {
                "IncrementalActive": 5060,
                "IncrementalCapacitiveReactive": 54,
                "Memory": "Cur",
                "AbsoluteCapacitiveReactive": 4564,
                "Timestamp": 1705653489884,
                "MaximumPower": 19,
                "EndPeriodDateAsDatetime": {
                    "date": "2024-02-29",
                    "time": "23:59:00",
                    "timezone": "GMT+1",
                    "dst": 0
                },
                "RateIndex": "Tot",
                "InitPeriodDateAsDatetime": {
                    "date": "2024-02-01",
                    "time": "00:00:00",
                    "timezone": "GMT+1",
                    "dst": 0
                },
                "ExcessPower": 0,
                "AbsoluteActive": 595452,
                "AbsoluteInductiveReactive": 1207,
                "IncrementalInductiveReactive": 6
            },
            //...
        ]
    }
}

data object will contain a field named frames that is an array. Each array element is an object with the data retrieved.

iec102.asdus.storedPricing(execConfig)

Execute directly storedPricing ASDU.

See ASDUs Definition and Execution

Parameter Type Description
execConfig object Execution configuration

Return a json with following format:

{
    "status": true,
    "description": "Success",
    "readingState": "READ",
    "data": {
        "frames": [
            {
                "IncrementalActive": 5060,
                "IncrementalCapacitiveReactive": 54,
                "Memory": "Mem",
                "AbsoluteCapacitiveReactive": 4564,
                "Timestamp": 1705653478357,
                "MaximumPower": 19,
                "EndPeriodDateAsDatetime": {
                    "date": "2024-02-29",
                    "time": "23:59:00",
                    "timezone": "GMT+1",
                    "dst": 0
                },
                "RateIndex": "Tot",
                "InitPeriodDateAsDatetime": {
                    "date": "2024-02-01",
                    "time": "00:00:00",
                    "timezone": "GMT+1",
                    "dst": 0
                },
                "ExcessPower": 0,
                "AbsoluteActive": 595452,
                "AbsoluteInductiveReactive": 1207,
                "IncrementalInductiveReactive": 6
            }
            //...
        ]
    }
}

data object will contain a field named frames that is an array. Each array element is an object with the data retrieved.

iec102.asdus.execute()

Execute one by one all the ASDUs defined in asdus.asdusToExec.

See ASDUs Definition and Execution

Returns an object with following format:

{
    "status": true,
    "asdus": {
        "login": {
            "data": null,
            "description": "Success",
            "readingState": null,
            "status": true
        },
        "timeRequest": {
            "data": {
                "Datetime": {
                    "date": "2024-01-19",
                    "time": "09:36:58",
                    "timezone": "GMT+1",
                    "dst": 0
                }
            },
            "description": "Success",
            "readingState": "READ",
            "status": true
        },
        "parameters": {
            "data": {
                "RegistryDepth": 4000,
                "LinkAddressCollected": 1,
                "IntegrationPeriod": 60,
                "AccessPassword": 1,
                "MeasurePoint": 1,
                "MeasurePointsQuantity": 1
            },
            "description": "Success",
            "readingState": "READ",
            "status": true
        },
        "deviceManufacturer": {
            "data": {
                "ManufacturerCode": "81",
                "DeviceId": "501606407"
            },
            "description": "Success",
            "readingState": "READ",
            "status": true
        },
        "loadCurve": {
            "data": {
                "frames": [
                    {
                        "ImportedActive": 10,
                        "Quadrant4Reactive": 10,
                        "Quadrant2Reactive": 333,
                        "Quadrant3Reactive": 334,
                        "ExportedActive": 1000,
                        "Quadrant1Reactive": 333,
                        "Timestamp": 1705536000000
                    }
                ]
            },
            "description": "Success",
            "readingState": "READ",
            "status": true
        },
        "loadCurveQuarter": {
            "data": {
                "frames": [
                    {
                        "ImportedActive": 10,
                        "Quadrant4Reactive": 10,
                        "Quadrant2Reactive": 333,
                        "Quadrant3Reactive": 334,
                        "ExportedActive": 1000,
                        "Quadrant1Reactive": 333,
                        "Timestamp": 1705536000000
                    }
                    //...
                ]
            },
            "description": "Success",
            "readingState": "READ",
            "status": true
        },
        "loadCurveIncremental": {
            "data": {
                "frames": [
                    {
                        "ImportedActive": 10,
                        "Quadrant4Reactive": 10,
                        "Quadrant2Reactive": 333,
                        "Quadrant3Reactive": 334,
                        "ExportedActive": 1000,
                        "Quadrant1Reactive": 333,
                        "Timestamp": 1705536000000
                    }
                ]
            },
            "description": "Success",
            "readingState": "READ",
            "status": true
        },
        "loadCurveIncrementalQuarter": {
            "data": {
                "frames": [
                    {
                        "ImportedActive": 2,
                        "Quadrant4Reactive": 0,
                        "Quadrant2Reactive": 1,
                        "Quadrant3Reactive": 1,
                        "ExportedActive": 1,
                        "Quadrant1Reactive": 2,
                        "Timestamp": 1705536000000
                    }
                    //...
                ]
            },
            "description": "Success",
            "readingState": "READ",
            "status": true
        },
        "storedPricing": {
            "data": {
                "frames": [
                    {
                        "IncrementalActive": 5060,
                        "IncrementalCapacitiveReactive": 54,
                        "Memory": "Mem",
                        "AbsoluteCapacitiveReactive": 4564,
                        "Timestamp": 1705653478357,
                        "MaximumPower": 19,
                        "EndPeriodDateAsDatetime": {
                            "date": "2024-02-29",
                            "time": "23:59:00",
                            "timezone": "GMT+1",
                            "dst": 0
                        },
                        "RateIndex": "Tot",
                        "InitPeriodDateAsDatetime": {
                            "date": "2024-02-01",
                            "time": "00:00:00",
                            "timezone": "GMT+1",
                            "dst": 0
                        },
                        "ExcessPower": 0,
                        "AbsoluteActive": 595452,
                        "AbsoluteInductiveReactive": 1207,
                        "IncrementalInductiveReactive": 6
                    }
                    //...
                ]
            },
            "description": "Success",
            "readingState": "READ",
            "status": true
        },
        "configuration": {
            "data": {
                "Contract1": "unknown",
                "VoltageSecondary": 0,
                "ManufacturerCode": "1",
                "BatteryPercentage": 44,
                "SerialPort1StartingAsciiString": "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000",
                "IntensityPrimary": 0,
                "IntegrationPeriod3": 0,
                "VoltagePrimary": 0,
                "IntegrationPeriod1": 60,
                "IntegrationPeriod2": 15,
                "SerialPort1Mode": 0,
                "IntensitySecondary": 0,
                "SerialNumber": 333,
                "Model": {
                    "name": "AQ",
                    "version": "",
                    "manufacturer": "",
                    "manufacturerOUI": ""
                },
                "SerialPort1Codification": "8/No/2",
                "ContractType": "Contract I",
                "StandardDate": "2002-05-01",
                "Firmware": [
                    {
                        "name": "Firmware version",
                        "version": "2",
                        "type": "FIRMWARE"
                    }
                ],
                "SerialPort1Baudrate": 9600,
                "SerialPort2Baudrate": 0,
                "SerialPort2Codification": "8/No/2",
                "Datetime": {
                    "date": "2002-04-10",
                    "time": "00:00:00",
                    "timezone": "GMT+1",
                    "dst": 0
                }
            },
            "description": "Success",
            "readingState": "READ",
            "status": true
        },
        "currentPricing": {
            "data": {
                "frames": [
                    {
                        "IncrementalActive": 5060,
                        "IncrementalCapacitiveReactive": 54,
                        "Memory": "Cur",
                        "AbsoluteCapacitiveReactive": 4564,
                        "Timestamp": 1705653489884,
                        "MaximumPower": 19,
                        "EndPeriodDateAsDatetime": {
                            "date": "2024-02-29",
                            "time": "23:59:00",
                            "timezone": "GMT+1",
                            "dst": 0
                        },
                        "RateIndex": "Tot",
                        "InitPeriodDateAsDatetime": {
                            "date": "2024-02-01",
                            "time": "00:00:00",
                            "timezone": "GMT+1",
                            "dst": 0
                        },
                        "ExcessPower": 0,
                        "AbsoluteActive": 595452,
                        "AbsoluteInductiveReactive": 1207,
                        "IncrementalInductiveReactive": 6
                    }
                    //...
                ]
            },
            "description": "Success",
            "readingState": "READ",
            "status": true
        },
        "logout": {
            "data": null,
            "description": "Success",
            "readingState": null,
            "status": true
        }
    }
}

Catalog GetMeterInfo operation example

Following code shows the catalog connector function for GetMeterInfo operation

var registerType = entityValue(entity, 'provision.type');

iec102.ip = entityValue(entity, 'provision.ip');
iec102.port = entityValue(entity, 'provision.port');

iec102.linkAddress = Number(entityValue(entity, 'provision.linkAddress'));
iec102.useMeasurePoint = Number( entityValue(entity, 'provision.measurePoint'));
iec102.usePasswordAccess = Number( entityValue(entity, 'provision.passwordAccess'));

iec102.msisdn =  entityValue(entity, 'provision.device.communicationModules[].subscription.mobile.msisdn', 0);
iec102.userName =  entityValue(entity, 'provision.user');
iec102.password =  entityValue(entity, 'provision.password');
iec102.portConfig =  entityValue(entity, 'provision.portConfig');

if (!registerType) {
    response.errorProcessing('Meter type was not specified');
    return response;
}

var connectionStatus = iec102.connect(registerType);
collection.addDatapoint('atd.response', connectionStatus.description, iec102.referenceTime, iec102.source, iec102.sourceInfo);
if (!connectionStatus.status) {
    collection.addDatapoint('readingState', iec102.readingState, iec102.referenceTime, iec102.source, iec102.sourceInfo);
    collection.send();
    return response;
}

iec102.asdus.addFromParams();
var asdusResult = iec102.asdus.execute();

iec102.disconnect();

collection.addDatapoint('readingState', iec102.readingState, iec102.referenceTime, iec102.source, iec102.sourceInfo);
collection.send();
if (asdusResult.status) {
    response.successful('Finished Correctly');
}

log('Final response: ', response);
return response;

Kite Javascript API

Connector functions Kite JS API guide

This API allows users to execute operations in the Kite connector from a connector function.

Kite Object

The Kite object is the main object of the Kite connector. It allows to connect to the Kite server and execute operations.

Kite Object Properties

Property Type Default Description
uriHost string Host of the Kite server.
uriService string Service of the Kite server.
proxyEnabled boolean false Enable proxy.
proxyHost string Host of the proxy (if the proxy is enabled).
proxyPort number Port of the proxy (if the proxy is enabled).
proxyProtocol string Protocol of the proxy (if proxy is enabled).

It should be noted that these properties will be used in all communication methods with Kite Service.

Specific datastreams to use Kite

Datastream Type Description
provision.administration.connection.kite.certificate String Certificate to communication with Kite
provision.administration.connection.kite.privateKey String Private Key to communication with Kite

These data streams can be specified:

  • To a chosen device.
  • To a chosen channel. Please use these values for all the entities in the selected channel.
  • To a chosen organization. This set of values should be used in the same way in every part of the organization.

Kite Object Methods

kite.requestChangeTerminalStatus(status)

Changes the subscription status using the specified parameter and completes the collection object with a new administrative status.

Parameter Type Description
status string Status of the subscription.

Returns an object with the following properties:

  • isOk (boolean): true if the request is ok
  • description: Result description of the operation.

This method also triggers the collection of the following data stream:

  • device.communicationModules[].subscription.administrativeState

This data stream is automatically populated after calling the method.

Example of use:

let result = kite.requestChangeTerminalStatus()
if (result.isOk) {
    collection.send()
    response.successful(result.description)
} else {
    response.errorProcessing(result.description)
}

return response

kite.requestTerminalDetails()

Gets the details of the subscription and complete collection object with result.

Returns an object with the following properties:

  • isOk (boolean): true if the request is ok
  • description: Description of the operation’s result.

This method also triggers the collection of the following data streams:

  • device.communicationModules[].mobile.imei
  • device.communicationModules[].model
  • device.communicationModules[].subscription.address
  • device.communicationModules[].subscription.administrativeState
  • device.communicationModules[].subscription.counters.totalBytesLastDay
  • device.communicationModules[].subscription.counters.totalBytesLastMonth
  • device.communicationModules[].subscription.identifier
  • device.communicationModules[].subscription.mobile.ggsn.ipAddress
  • device.communicationModules[].subscription.mobile.icc
  • device.communicationModules[].subscription.mobile.imsi
  • device.communicationModules[].subscription.mobile.msisdn
  • device.communicationModules[].subscription.mobile.ratType
  • device.communicationModules[].subscription.mobile.sgsn.countryCode
  • device.communicationModules[].subscription.mobile.sgsn.ipAddress
  • device.communicationModules[].subscription.mobile.sgsn.operatorName
  • device.communicationModules[].subscription.mobile.uli.cgi
  • entity.location

These data streams are automatically populated after calling the method.

Example of use:

let result = kite.requestTerminalDetails()
if (result.isOk) {
    collection.send()
    response.successful(result.description)
} else {
    response.errorProcessing(result.description)
}
return response

SNMP JavaScript API

Connector functions SNMP JS API guide

This JavaScript code provides predefined functions to execute SNMP requests from the connector function. They are explained below.

JS SNMP API

For REQUEST Connector Functions we will use the functions get and set described below. You have an object, named snmp, with those functions described. You must use snmp.get or snmp.set.

If you want to collect data after executing any of these function you can call collectCF and you can set various oids in the URL provided as you can see in the next example:

collectCF(result.data, "snmps://<oidValue>");

snmp.addOid()

Adds an OID to the list of OIDs to be retrieved/setted.

Param Type Description
oid string OID to add.
type string Type of the value.
value string Value to set.

Example of use:

// Example for get
snmp.addOid('1.3.6.1.4.1.2007.4.1.2.2.2.18.3.2.1.10.3');
snmp.get()

//Example for set
snmp.addOid('1.0.1.4.5.123456.1.6', 'INTEGER', '3');
snmp.set()

snmp.get()

Executes a multi SNMP get attribute request with specified payload. You must have previously given value to the properties snmp.ip, snmp.port (161 by default), snmp.community (in case of snmp version 1), snmp.version (3 by default), snmp.retries (3 by default), snmp.timeout (5000 by default) and security info in case of snmpv3 version (snmp.securityName, snmp.authentication, snmp.privacy, snmp.authPassphrase and snmp.privPassphrase). In addition, you have to add the oids you want to get using the snmp.addOid function with the oid string as many times as you want.

Kind: global function
Returns: String - A JSON with response. This JSON will have two fields: ‘result’ of the get operation and ‘data’ with response of the device.

SNMP Field Type Description
ip string IP address of the device you want to connect to.
port number Port of the device you want to connect to. By default is 161.
oids Array Array of strings with the list of wanted oids. To add items to the list, you must call the function ‘snmp.addOid’ with the oid as parameter as many times as you want oids.
community string The community octet string. This is a convenience method to set the security name for community based SNMP (v1 and v2c).
securityName string The security name of the user (typically the user name).
authentication string The authentication protocol ID to be associated with this user. If set to null, this user only supports unauthenticated messages.
authPassphrase string The authentication passphrase. If not null, authentication must also be not null.
privacy string The privacy protocol ID to be associated with this user. If set to null, this user only supports unencrypted messages.
privPassphrase string The privacy passphrase. If not null, privacy must also be not null.
version number Version number of the SNMP. By default is 3.
retries number Number of retries for the request. By default is 3.
timeout number Timeout of the request in millis. By default is 5000.

Here is an example of use for the snmp.addOid function for snmp.get:

snmp.addOid('1.3.6.1.4.1.2007.4.1.2.2.2.18.3.2.1.10.3');
snmp.addOid('1.3.6.1.4.1.2007.4.1.2.2.2.18.3.2.1.11.3');
snmp.get();

snmp.set()

Executes a multi SNMP set attribute request with specified payload. You must have previously given value to the properties snmp.ip, snmp.port (161 by default), snmp.community (in case of snmp version 1), snmp.version (3 by default), snmp.retries (3 by default), snmp.timeout (5000 by default) and security info in case of snmpv3 version (snmp.securityName, snmp.authentication, snmp.privacy, snmp.authPassphrase and snmp.privPassphrase). In addition, you have to add the oids you want to set using the snmp.addOid function with the oid string, the type of the value and the value you want to set to as many times as you want.

Kind: global function
Returns: String - A JSON with response. This JSON will have two fields: ‘result’ of the get operation and ‘data’ with response of the device. This ‘data’ contains pairs of (oid, value).

SNMP Field Type Description
ip string IP address of the device you want to connect to.
port number Port of the device you want to connect to. By default is 161.
oids Array Array of items with the list of oids you want to set. To add items to the list, you must call the function ‘snmp.addOid’ with the oid you want to set, the type of the value for that oid and the value you want to set as parameters as many times as you want oids.
community string The community octet string. This is a convenience method to set the security name for community based SNMP (v1 and v2c).
securityName string The security name of the user (typically the user name).
authentication string The authentication protocol ID to be associated with this user. If set to null, this user only supports unauthenticated messages.
authPassphrase string The authentication passphrase. If not null, authentication must also be not null.
privacy string The privacy protocol ID to be associated with this user. If set to null, this user only supports unencrypted messages.
privPassphrase string The privacy passphrase. If not null, privacy must also be not null.
version number Version number of the SNMP. By default is 3.
retries number Number of retries for the request. By default is 3.
timeout number Timeout of the request in millis. By default is 5000.

Here is an example of use for the snmp.addOid function for snmp.set:

snmp.addOid('1.0.1.4.5.123456.1.5', 'OCTET_STRING', params.variableList[0].value);
snmp.addOid('1.0.1.4.5.123456.1.6', 'INTEGER', '3');
snmp.set();

The allowed values for type are: OBJECT_IDENTIFIER, INTEGER, BIT_STRING, OCTET_STRING, GAUGE32, COUNTER32, COUNTER64, TIMETICKS, OPAQUE and IPADDRESS.

Here is a successful response example:

{
  "result": {
    "code": "SUCCESSFUL",
    "description": "Operation executed successfully"
  },
  "data": {
    "oid":"value",
    "oid1":"value1",
    ....
    "oidN":"valueN"
  }
}

And here an error response example:

{
  "result": {
    "code": "ERROR_PROCESSING",
    "description": "Error getting data"
  },
  "data": {}
}

SSH JavaScript API

Connector functions SSH JS API guide

This API allows users to execute operations in the SSH client from a connector function.

Ssh Object

The ssh object is the main object of the SSH client. It allows to connect to an SSH server, send commands and receive responses and disconnect from the SSH server.

Ssh Object Properties

Property Type Default Description
ip string IP address of the SSH server.
port number 23 Port of the SSH server.
retries number 3 Number of retries.
timeout number 5000 Timeout in milliseconds.
user string SSH user.
password string SSH password.
identity string Rsa key content.

Ssh Object Methods

ssh.connect(waitFor)

Establish a connection with the SSH server.

Property Type Default Description
waitFor List Strings to wait for in the response.

Connects to the SSH server using the properties of the ssh object:

  • ip: IP address of the SSH server.
  • port: Port of the SSH server.
  • retries: Number of retries.
  • timeout: Timeout in milliseconds.
  • user: SSH user.
  • password: SSH password.
  • identity: Rsa key content.

Returns an object with the following properties:

  • result: true if the connection was successful, false otherwise.
  • message: Empty if the connection was successful, error message otherwise.

Example of use:

ssh.ip = "[IP_ADDRESS]";
ssh.port = 22;
ssh.user = "sshuser";
ssh.password = "password";

// this example shows how to connect to an SSH server and wait for the "Connection established" string.
var connectResult = ssh.connect(["Connection established"]);

if (connectResult.result) {
    // Connection was successful
} else {
    // Connection failed
}

ssh.send(command, pattern, waitFor)

Sends a command to the SSH server and waits for the response.

Parameter Type Description
command string Command to send to the SSH server.
pattern string Pattern to extract response from sent command.
waitFor List Strings to wait for in the response.
  • retries: Number of retries.
  • timeout: Timeout in milliseconds.

Returns the response of the SSH server in string format.

Example of use:

// this example shows how to send a command to an SSH server and wait for the "/home/sshuser" string.
var sendResult = ssh.send("ls -la", "*", ["/home/sshuser"]);

ssh.disconnect()

Disconnects from the SSH server.

Example of use:

ssh.disconnect();

Telnet Javascript API

Connector functions Telnet JS API guide

This API allows users to execute operations in the Telnet connector from a connector function.

Telnet Object

The Telnet object is the main object of the Telnet connector. It allows to connect to a Telnet server, send commands and receive responses, and disconnect from the Telnet server.

Telnet Object Properties

Property Type Default Description
ip string IP address of the Telnet server.
port number 23 Port of the Telnet server.
retries number 3 Number of retries.
timeout number 5000 Timeout in milliseconds.

Telnet Object Methods

telnet.connect (waitFor)

Connects to the Telnet server using the properties of the Telnet object and the specified parameters.

Parameter Type Description
waitFor string String to wait for in the response.
  • ip: IP address of the Telnet server.
  • port: Port of the Telnet server.
  • retries: Number of retries.
  • timeout: Timeout in milliseconds.

Returns an object with the following properties:

  • result: true if the connection was successful, false otherwise.
  • message: Empty if the connection was successful, error message otherwise.

Example of use:

telnet.ip = "[IP_ADDRESS]";
telnet.port = 23;

var connectResult = telnet.connect(">");

if (connectResult.result) {
    // Connection was successful
} else {
    // Connection failed
}

telnet.send (command, pattern, waitFor)

Sends a command to the Telnet server and waits for the response with the specified parameters:

Parameter Type Description
command string Command to send to the Telnet server.
pattern string String to pattern match in the response. In RegExp format.
waitFor string String to wait for in the response. If not specified, the default is >.
  • retries: Number of retries.
  • timeout: Timeout in milliseconds.

Returns the response of the Telnet server in an array of strings.

Example of use:

var sendResult = telnet.send("ls -la", "*", ">");

telnet.disconnect ()

Disconnects from the Telnet server.

Example of use:

telnet.disconnect();

ICMP JavaScript API

Introduction

This API allows users to send PING operations to an IP address.

Icmp Object

The icmp object is the main object of the ICMP client. It allows sending a PING operation to an IP address, and receiving the response (in synchronous or asynchronous mode).

Icmp Object Properties

Property Type Default Description
ip string (*) IP address to send PING.
retries number 5 Number of PING delivery retries.
timeout number 2500 Timeout in milliseconds of retry.
async boolean true Decide if the request is asynchronous (true) or synchronous (false).

(*) By default, select the IP of the device or the provisioned subscription.

Icmp Object Methods

icmp.send()

Send PING using the properties of the icmp object:

  • ip: IP address to send PING.
  • retries: Number of PING delivery retries.
  • timeout: Timeout in milliseconds of retry.
  • async: Decide if the request is asynchronous or synchronous.
  • RETURN: If the async property is false, then returns an object with the following properties:

    • result: String. The value will be “OK” when the result is successfull or “NOK” when the result of the request had error, for example, timeout.
    • deviceId: String. Entity receiving the ping.
    • datastreams: An array with the information of the request result.

Example of use:

icmp.ip = "10.10.10.174";
icmp.send();

Result:

  • SUCESSFULL:
{
  "result": "OK",
  "datastreams": [
    {
        "id":"device.communicationModules[].subscription.address",
        "datapoints":[
            {
                "value":{
                    "value": "10.10.10.174"
                }
            }
        ]
    },
    {
        "id":"device.communicationModules[].subscription.presence.ip",
        "datapoints":[
            {
                "value": "OK"
            }
        ]
    },
    {
        "id":"device.communicationModules[].subscription.presence.ipRtt",
        "datapoints":[
            {
                "value": 6
            }
        ]
    }
  ]
}
  • ERROR:
{
  "result": "NOK",
  "deviceId": "deviceId",
  "datastreams": [
    {
      "datastreamId": "collected.device.communicationModules.subscription.address",
      "value": "172.19.18.95"
    },
    {
      "datastreamId": "collected.device.communicationModules.subscription.presence.ip",
      "value": "NOK"
    }
  ]
}

ICMP Response Javascript

Connector function ICMP-Response JS API guide

This API allows users to receive response of another ICMP-Request Connector Function. You can process the data as necessary.

Response Object

The response object is the main object of the response, it is the payload.

The object received has the following properties:

  • operationResult: Parent object of the result.
    • version: String. Version of the response message received.
    • trustedboot: Boolean. Trusted boot value.
    • operation: Object with the operation properties:
      • response: Object with the response operation properties:
        • id: String. Request Id of the launched operation.
        • name: String. The name of the launched operation.
        • deviceId: String. Entity identifier that receives the operation.
        • resultCode: String. Result code of the launched operation.
        • resultDescription: String. Result description of the launched operation.
        • additionalDescription: String. Additional result description of the launched operation.
        • path: String. Device usage URL.
        • variables: Array with the device usage variables.
        • entityType: Enum. Type of entity that receives the operation. Possible values: “DEVICE”, “SUBSCRIPTION”, “SUBSCRIBER”, “COMMS_MODULE”
        • steps: Array with the steps of the launched operation.
          • name: String. Result step name.
            • result: String. Result step code.
            • description: String. Result step description
            • response: Json. Json information of the step.
            • timestamp: Number. Timestamp of the step.
        • timestamp: Number. Timestamp of the launched operation.
        • iotData: Collection object with the following properties:
          • version: String. Version of the message IoT received.
          • datastreams: Array with information about the launched operation. (IoT message)
            • id: String. Identifier of the datastream collected.
            • datapoints: Array with the information of the datastream.

Example:

{
  "operationResult": {
    "operation": {
      "response": {
      	"id": "86a52ffe-9f4f-427b-8154-aef7bc2935a0",
      	"name": "REFRESH_PRESENCE",
        "resultCode": "SUCCESSFUL",
      	"resultDescription": "RESULT OK",
      	"additionalDescription": "",
      	"deviceId": "devicedId",
      	"timestamp": 1701288987,
      	"path": [ "/deviceId/request" ],
      	"steps": [{
      	  "name": "Step Name",
        	"result": "Step Result",
        	"description": "Step description",
        	"response": {},
        	"timestamp": 1701288960
      	}],
      	"variables": [ "address", "" ],
      	"replacements": {
      	},
      	"entityType": {
      	  "enum": ["DEVICE", "SUBSCRIPTION", "SUBSCRIBER", "COMMS_MODULE"]
      	},
      	"iotData": {
          "version": "1.0",
          "datastreams":[
            {
              "id":"device.communicationModules[].subscription.address",
              "datapoints":[
                {
                   "value":{
                       "value": "10.10.10.174",
                       "type": "IPV4",
                       "apn": "movistar.es"
                   }
                }
              ]
            }
          ]
        }
      }
    }
  }
}

Catalog API

Connector Functions Catalog API guide

The Connector Functions Catalog API enables users to perform CRUD operations on the Connector Functions Catalog, which comprises a default set of Connector Functions.

A new field, cloneable, has been introduced in this Connector Functions Catalog to indicate whether a Connector Function can be replicated for a specific organization and channel.

Comprehensive API actions

Permissions
  • CREATE, UPDATE, DELETE: users with root profile.
  • GET and GET List: users with admin, admin_domain, super_admin_domain or root profiles.

API specification

Security

OpenGate security

This section describes how access to the OpenGate REST APIs is secured. It covers the two supported authentication mechanisms, JWT and API keys, and the user password reset procedure.

Subsections of Security

Authentication

OpenGate authentication

The OpenGate REST APIs, and device integration mechanisms are enabled by default on all accounts. You don’t have to do anything to turn on these features. However, JWT (JSON Web Token) and API keys are mandatory and are used to control the access to the resources via the REST APIs and connectors.

The OpenGate REST APIs allow third-party applications or back-office systems to communicate with OpenGate. All users in your organization can use third-party applications to access your entity’s data, such as iPhone apps, Android apps, or network-based communication built onto your server. The OpenGate authentication mechanisms ensure the proper access to the information.

Subsections of Authentication

JWT

Authenticating using JWT

What is JWT (JSON Web Token)?

JSON Web Token (JWT) is an open standard RFC 7519 that defines a compact and self-contained way for securely transmitting information between parties as a JSON object. This information can be verified and trusted because it is digitally signed. JWTs can be signed using a secret (with the HMAC algorithm) or a public/private key pair using RSA or ECDSA.

A JWT consists of three strings separated by dots: the header, the payload and the signature as shown in the following text.

eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.
eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.
SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c
Part Name Value
Header eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9
Payload eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ
Signature SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c

Token structure

The header typically consists of two parts: the type of the token, which is JWT, and the signing algorithm being used, such as HMAC SHA256 or RSA.

Payload

The second part of the token is the payload, which contains the claims. Claims are statements about an entity (typically, the user) and additional data. There are three types of claims: registered, public, and private claims.

  • Registered claims: These are a set of predefined claims which are not mandatory but recommended, to provide a set of useful, interoperable claims. Some of them are: iss (issuer), exp (expiration time), sub (subject), aud (audience), and others.
  • Public claims: These can be defined at will by those using JWTs. But to avoid collisions they should be defined in the IANA JSON Web Token Registry or be defined as a URI that contains a collision resistant namespace.
  • Private claims: These are the custom claims created to share information between parties that agree on using them and are neither registered nor public claims.

Signature

To create the signature part you have to take the encoded header, the encoded payload, a secret, the algorithm specified in the header, and sign that.

Obtain a JWT with OpenGate

To obtain a JWT token with OpenGate platform, you should do login with the resource /provision/users/login in the next link JWT.

The JWT (JSON Web Token) can be sent using as a request header.

POST /north/v80/provision/organizations/{organizationId}
Host: [api.opengate.es]
Authorization: Bearer YOUR-JWT-HERE

It is sent using the Authorization HTTP header. An example of POST request may look like this:

curl --request POST \
     --verbose \
     --header "Authorization: Bearer YOUR-JWT-HERE" \
     --header "Content-type: application/json" \
     --data-binary @device.json \
     https://[your_opengate_address]/north/v80/provision/organizations/{organizationId}

API key

Authenticating using API keys

This option can be disabled through configuration in all interfaces, with the exception of those used for device integration. The API keys can be sent using one of the following methods:

  • As a request header
  • As a parameter in the request URL (with the former preferred for security reasons). This option is only available for device integration

Using an HTTP header

This is the recommended method of sending your API key. While it is not secure if sent over an unencrypted connection, it is less likely to be logged as part of the URL:

API Key in HTTP header example:

POST /south/v80/devices/YOUR-DEVICE-ID/collect/dmm
Host: [api.opengate.es]
X-ApiKey: YOUR-API-KEY-HERE

The API key is sent using the X-ApiKey HTTP header. An example of POST request may look like this:

curl --request POST \
     --verbose \
     --header "X-ApiKey: YOUR-API-KEY-HERE" \
     --header "Content-type: application/json" \
     --data-binary @device.json \
     https://api.opengate.es/north/v80/provision/organizations/{organizationName}/devices

As a request parameter

Parameter Name Value
X-ApiKey YOUR_API_KEY_HERE
https://api.opengate.es/south/v80/devices/{device.id}/collect/dmm?X-ApiKey=YOUR-API-KEY-HERE

API key as URL parameter example:

POST /south/v80/devices/{device.id}/collect/dmm?X-ApiKey=YOUR-API-KEY-HERE
Host: [api.opengate.es]

User password reset

Introduction

This API provides a secure procedure to change a user’s password when it has been lost or forgotten. The process has two steps: first, request a password reset for the user’s email, which sends a recovery email with a reset identifier; then, set the new password using that reset identifier.

Usage examples

Request a password reset for a user (the platform generates a token and sends a password recovery email):

curl --request POST \
     https://api.opengate.es/north/v80/provision/users/{userEmail}/reset

Set the new password using the reset identifier received by email:

curl --request POST \
     --header "Content-Type: application/json" \
     --data '{"password": "<new-password>"}' \
     https://api.opengate.es/north/v80/provision/users/{userEmail}/reset/{resetId}

API specification

Catalogs

This section gathers the reference catalogs used across the OpenGate API: the mobile network operators search endpoint, the HTTP response status codes and error messages returned by the API, and the list of supported time zones.

Subsections of Catalogs

Operators

Introduction

Endpoint for operators searching.

Usage examples

Search the operators catalog:

curl --request POST \
     --header "X-ApiKey: <your-api-key>" \
     --header "Content-Type: application/json" \
     https://www.amplia-iiot.com/north/v80/search/catalog/operators

API specification

Response status and error messages

HTTP Status Codes

The OpenGate OSS API attempts to return appropriate HTTP status codes for every request.

Time zones

OpenGate supported time zones

  • ACT
  • AET
  • Africa/Abidjan
  • Africa/Accra
  • Africa/Addis_Ababa
  • Africa/Algiers
  • Africa/Asmara
  • Africa/Asmera
  • Africa/Bamako
  • Africa/Bangui
  • Africa/Banjul
  • Africa/Bissau
  • Africa/Blantyre
  • Africa/Brazzaville
  • Africa/Bujumbura
  • Africa/Cairo
  • Africa/Casablanca
  • Africa/Ceuta
  • Africa/Dar_es_Salaam
  • Africa/Djibouti
  • Africa/Douala
  • Africa/El_Aaiun
  • Africa/Freetown
  • Africa/Gaborone
  • Africa/Harare
  • Africa/Johannesburg
  • Africa/Juba
  • Africa/Kampala
  • Africa/Khartoum
  • Africa/Kigali
  • Africa/Kinshasa
  • Africa/Lagos
  • Africa/Libreville
  • Africa/Lome
  • Africa/Luanda
  • Africa/Lubumbashi
  • Africa/Lusaka
  • Africa/Malabo
  • Africa/Maputo
  • Africa/Maseru
  • Africa/Mbabane
  • Africa/Mogadishu
  • Africa/Monrovia
  • Africa/Nairobi
  • Africa/Ndjamena
  • Africa/Niamey
  • Africa/Nouakchott
  • Africa/Ouagadougou
  • Africa/Porto-Novo
  • Africa/Sao_Tome
  • Africa/Timbuktu
  • Africa/Tripoli
  • Africa/Tunis
  • Africa/Windhoek
  • AGT
  • America/Adak
  • America/Anchorage
  • America/Anguilla
  • America/Antigua
  • America/Araguaina
  • America/Argentina/Buenos_Aires
  • America/Argentina/Catamarca
  • America/Argentina/ComodRivadavia
  • America/Argentina/Cordoba
  • America/Argentina/Jujuy
  • America/Argentina/La_Rioja
  • America/Argentina/Mendoza
  • America/Argentina/Rio_Gallegos
  • America/Argentina/Salta
  • America/Argentina/San_Juan
  • America/Argentina/San_Luis
  • America/Argentina/Tucuman
  • America/Argentina/Ushuaia
  • America/Aruba
  • America/Asuncion
  • America/Atikokan
  • America/Atka
  • America/Bahia
  • America/Bahia_Banderas
  • America/Barbados
  • America/Belem
  • America/Belize
  • America/Blanc-Sablon
  • America/Boa_Vista
  • America/Bogota
  • America/Boise
  • America/Buenos_Aires
  • America/Cambridge_Bay
  • America/Campo_Grande
  • America/Cancun
  • America/Caracas
  • America/Catamarca
  • America/Cayenne
  • America/Cayman
  • America/Chicago
  • America/Chihuahua
  • America/Coral_Harbour
  • America/Cordoba
  • America/Costa_Rica
  • America/Creston
  • America/Cuiaba
  • America/Curacao
  • America/Danmarkshavn
  • America/Dawson
  • America/Dawson_Creek
  • America/Denver
  • America/Detroit
  • America/Dominica
  • America/Edmonton
  • America/Eirunepe
  • America/El_Salvador
  • America/Ensenada
  • America/Fort_Nelson
  • America/Fort_Wayne
  • America/Fortaleza
  • America/Glace_Bay
  • America/Godthab
  • America/Goose_Bay
  • America/Grand_Turk
  • America/Grenada
  • America/Guadeloupe
  • America/Guatemala
  • America/Guayaquil
  • America/Guyana
  • America/Halifax
  • America/Havana
  • America/Hermosillo
  • America/Indiana/Indianapolis
  • America/Indiana/Knox
  • America/Indiana/Marengo
  • America/Indiana/Petersburg
  • America/Indiana/Tell_City
  • America/Indiana/Vevay
  • America/Indiana/Vincennes
  • America/Indiana/Winamac
  • America/Indianapolis
  • America/Inuvik
  • America/Iqaluit
  • America/Jamaica
  • America/Jujuy
  • America/Juneau
  • America/Kentucky/Louisville
  • America/Kentucky/Monticello
  • America/Knox_IN
  • America/Kralendijk
  • America/La_Paz
  • America/Lima
  • America/Los_Angeles
  • America/Louisville
  • America/Lower_Princes
  • America/Maceio
  • America/Managua
  • America/Manaus
  • America/Marigot
  • America/Martinique
  • America/Matamoros
  • America/Mazatlan
  • America/Mendoza
  • America/Menominee
  • America/Merida
  • America/Metlakatla
  • America/Mexico_City
  • America/Miquelon
  • America/Moncton
  • America/Monterrey
  • America/Montevideo
  • America/Montreal
  • America/Montserrat
  • America/Nassau
  • America/New_York
  • America/Nipigon
  • America/Nome
  • America/Noronha
  • America/North_Dakota/Beulah
  • America/North_Dakota/Center
  • America/North_Dakota/New_Salem
  • America/Ojinaga
  • America/Panama
  • America/Pangnirtung
  • America/Paramaribo
  • America/Phoenix
  • America/Port_of_Spain
  • America/Port-au-Prince
  • America/Porto_Acre
  • America/Porto_Velho
  • America/Puerto_Rico
  • America/Rainy_River
  • America/Rankin_Inlet
  • America/Recife
  • America/Regina
  • America/Resolute
  • America/Rio_Branco
  • America/Rosario
  • America/Santa_Isabel
  • America/Santarem
  • America/Santiago
  • America/Santo_Domingo
  • America/Sao_Paulo
  • America/Scoresbysund
  • America/Shiprock
  • America/Sitka
  • America/St_Barthelemy
  • America/St_Johns
  • America/St_Kitts
  • America/St_Lucia
  • America/St_Thomas
  • America/St_Vincent
  • America/Swift_Current
  • America/Tegucigalpa
  • America/Thule
  • America/Thunder_Bay
  • America/Tijuana
  • America/Toronto
  • America/Tortola
  • America/Vancouver
  • America/Virgin
  • America/Whitehorse
  • America/Winnipeg
  • America/Yakutat
  • America/Yellowknife
  • Antarctica/Casey
  • Antarctica/Davis
  • Antarctica/DumontDUrville
  • Antarctica/Macquarie
  • Antarctica/Mawson
  • Antarctica/McMurdo
  • Antarctica/Palmer
  • Antarctica/Rothera
  • Antarctica/South_Pole
  • Antarctica/Syowa
  • Antarctica/Troll
  • Antarctica/Vostok
  • Arctic/Longyearbyen
  • ART
  • Asia/Aden
  • Asia/Almaty
  • Asia/Amman
  • Asia/Anadyr
  • Asia/Aqtau
  • Asia/Aqtobe
  • Asia/Ashgabat
  • Asia/Ashkhabad
  • Asia/Baghdad
  • Asia/Bahrain
  • Asia/Baku
  • Asia/Bangkok
  • Asia/Barnaul
  • Asia/Beirut
  • Asia/Bishkek
  • Asia/Brunei
  • Asia/Calcutta
  • Asia/Chita
  • Asia/Choibalsan
  • Asia/Chongqing
  • Asia/Chungking
  • Asia/Colombo
  • Asia/Dacca
  • Asia/Damascus
  • Asia/Dhaka
  • Asia/Dili
  • Asia/Dubai
  • Asia/Dushanbe
  • Asia/Gaza
  • Asia/Harbin
  • Asia/Hebron
  • Asia/Ho_Chi_Minh
  • Asia/Hong_Kong
  • Asia/Hovd
  • Asia/Irkutsk
  • Asia/Istanbul
  • Asia/Jakarta
  • Asia/Jayapura
  • Asia/Jerusalem
  • Asia/Kabul
  • Asia/Kamchatka
  • Asia/Karachi
  • Asia/Kashgar
  • Asia/Kathmandu
  • Asia/Katmandu
  • Asia/Khandyga
  • Asia/Kolkata
  • Asia/Krasnoyarsk
  • Asia/Kuala_Lumpur
  • Asia/Kuching
  • Asia/Kuwait
  • Asia/Macao
  • Asia/Macau
  • Asia/Magadan
  • Asia/Makassar
  • Asia/Manila
  • Asia/Muscat
  • Asia/Nicosia
  • Asia/Novokuznetsk
  • Asia/Novosibirsk
  • Asia/Omsk
  • Asia/Oral
  • Asia/Phnom_Penh
  • Asia/Pontianak
  • Asia/Pyongyang
  • Asia/Qatar
  • Asia/Qyzylorda
  • Asia/Rangoon
  • Asia/Riyadh
  • Asia/Saigon
  • Asia/Sakhalin
  • Asia/Samarkand
  • Asia/Seoul
  • Asia/Shanghai
  • Asia/Singapore
  • Asia/Srednekolymsk
  • Asia/Taipei
  • Asia/Tashkent
  • Asia/Tbilisi
  • Asia/Tehran
  • Asia/Tel_Aviv
  • Asia/Thimbu
  • Asia/Thimphu
  • Asia/Tokyo
  • Asia/Tomsk
  • Asia/Ujung_Pandang
  • Asia/Ulaanbaatar
  • Asia/Ulan_Bator
  • Asia/Urumqi
  • Asia/Ust-Nera
  • Asia/Vientiane
  • Asia/Vladivostok
  • Asia/Yakutsk
  • Asia/Yekaterinburg
  • Asia/Yerevan
  • AST
  • Atlantic/Azores
  • Atlantic/Bermuda
  • Atlantic/Canary
  • Atlantic/Cape_Verde
  • Atlantic/Faeroe
  • Atlantic/Faroe
  • Atlantic/Jan_Mayen
  • Atlantic/Madeira
  • Atlantic/Reykjavik
  • Atlantic/South_Georgia
  • Atlantic/St_Helena
  • Atlantic/Stanley
  • Australia/ACT
  • Australia/Adelaide
  • Australia/Brisbane
  • Australia/Broken_Hill
  • Australia/Canberra
  • Australia/Currie
  • Australia/Darwin
  • Australia/Eucla
  • Australia/Hobart
  • Australia/LHI
  • Australia/Lindeman
  • Australia/Lord_Howe
  • Australia/Melbourne
  • Australia/North
  • Australia/NSW
  • Australia/Perth
  • Australia/Queensland
  • Australia/South
  • Australia/Sydney
  • Australia/Tasmania
  • Australia/Victoria
  • Australia/West
  • Australia/Yancowinna
  • BET
  • Brazil/Acre
  • Brazil/DeNoronha
  • Brazil/East
  • Brazil/West
  • BST
  • Canada/Atlantic
  • Canada/Central
  • Canada/East-Saskatchewan
  • Canada/Eastern
  • Canada/Mountain
  • Canada/Newfoundland
  • Canada/Pacific
  • Canada/Saskatchewan
  • Canada/Yukon
  • CAT
  • CET
  • Chile/Continental
  • Chile/EasterIsland
  • CNT
  • CST
  • CST6CDT
  • CTT
  • Cuba
  • EAT
  • ECT
  • EET
  • Egypt
  • Eire
  • EST
  • EST5EDT
  • Etc/GMT
  • Etc/GMT-0
  • Etc/GMT-1
  • Etc/GMT-10
  • Etc/GMT-11
  • Etc/GMT-12
  • Etc/GMT-13
  • Etc/GMT-14
  • Etc/GMT-2
  • Etc/GMT-3
  • Etc/GMT-4
  • Etc/GMT-5
  • Etc/GMT-6
  • Etc/GMT-7
  • Etc/GMT-8
  • Etc/GMT-9
  • Etc/GMT+0
  • Etc/GMT+1
  • Etc/GMT+10
  • Etc/GMT+11
  • Etc/GMT+12
  • Etc/GMT+2
  • Etc/GMT+3
  • Etc/GMT+4
  • Etc/GMT+5
  • Etc/GMT+6
  • Etc/GMT+7
  • Etc/GMT+8
  • Etc/GMT+9
  • Etc/GMT0
  • Etc/Greenwich
  • Etc/UCT
  • Etc/Universal
  • Etc/UTC
  • Etc/Zulu
  • Europe/Amsterdam
  • Europe/Andorra
  • Europe/Astrakhan
  • Europe/Athens
  • Europe/Belfast
  • Europe/Belgrade
  • Europe/Berlin
  • Europe/Bratislava
  • Europe/Brussels
  • Europe/Bucharest
  • Europe/Budapest
  • Europe/Busingen
  • Europe/Chisinau
  • Europe/Copenhagen
  • Europe/Dublin
  • Europe/Gibraltar
  • Europe/Guernsey
  • Europe/Helsinki
  • Europe/Isle_of_Man
  • Europe/Istanbul
  • Europe/Jersey
  • Europe/Kaliningrad
  • Europe/Kiev
  • Europe/Kirov
  • Europe/Lisbon
  • Europe/Ljubljana
  • Europe/London
  • Europe/Luxembourg
  • Europe/Madrid
  • Europe/Malta
  • Europe/Mariehamn
  • Europe/Minsk
  • Europe/Monaco
  • Europe/Moscow
  • Europe/Nicosia
  • Europe/Oslo
  • Europe/Paris
  • Europe/Podgorica
  • Europe/Prague
  • Europe/Riga
  • Europe/Rome
  • Europe/Samara
  • Europe/San_Marino
  • Europe/Sarajevo
  • Europe/Simferopol
  • Europe/Skopje
  • Europe/Sofia
  • Europe/Stockholm
  • Europe/Tallinn
  • Europe/Tirane
  • Europe/Tiraspol
  • Europe/Ulyanovsk
  • Europe/Uzhgorod
  • Europe/Vaduz
  • Europe/Vatican
  • Europe/Vienna
  • Europe/Vilnius
  • Europe/Volgograd
  • Europe/Warsaw
  • Europe/Zagreb
  • Europe/Zaporozhye
  • Europe/Zurich
  • GB
  • GB-Eire
  • GMT
  • GMT0
  • Greenwich
  • Hongkong
  • HST
  • Iceland
  • IET
  • Indian/Antananarivo
  • Indian/Chagos
  • Indian/Christmas
  • Indian/Cocos
  • Indian/Comoro
  • Indian/Kerguelen
  • Indian/Mahe
  • Indian/Maldives
  • Indian/Mauritius
  • Indian/Mayotte
  • Indian/Reunion
  • Iran
  • Israel
  • IST
  • Jamaica
  • Japan
  • JST
  • Kwajalein
  • Libya
  • MET
  • Mexico/BajaNorte
  • Mexico/BajaSur
  • Mexico/General
  • MIT
  • MST
  • MST7MDT
  • Navajo
  • NET
  • NST
  • NZ
  • NZ-CHAT
  • Pacific/Apia
  • Pacific/Auckland
  • Pacific/Bougainville
  • Pacific/Chatham
  • Pacific/Chuuk
  • Pacific/Easter
  • Pacific/Efate
  • Pacific/Enderbury
  • Pacific/Fakaofo
  • Pacific/Fiji
  • Pacific/Funafuti
  • Pacific/Galapagos
  • Pacific/Gambier
  • Pacific/Guadalcanal
  • Pacific/Guam
  • Pacific/Honolulu
  • Pacific/Johnston
  • Pacific/Kiritimati
  • Pacific/Kosrae
  • Pacific/Kwajalein
  • Pacific/Majuro
  • Pacific/Marquesas
  • Pacific/Midway
  • Pacific/Nauru
  • Pacific/Niue
  • Pacific/Norfolk
  • Pacific/Noumea
  • Pacific/Pago_Pago
  • Pacific/Palau
  • Pacific/Pitcairn
  • Pacific/Pohnpei
  • Pacific/Ponape
  • Pacific/Port_Moresby
  • Pacific/Rarotonga
  • Pacific/Saipan
  • Pacific/Samoa
  • Pacific/Tahiti
  • Pacific/Tarawa
  • Pacific/Tongatapu
  • Pacific/Truk
  • Pacific/Wake
  • Pacific/Wallis
  • Pacific/Yap
  • PLT
  • PNT
  • Poland
  • Portugal
  • PRC
  • PRT
  • PST
  • PST8PDT
  • ROK
  • Singapore
  • SST
  • SystemV/AST4
  • SystemV/AST4ADT
  • SystemV/CST6
  • SystemV/CST6CDT
  • SystemV/EST5
  • SystemV/EST5EDT
  • SystemV/HST10
  • SystemV/MST7
  • SystemV/MST7MDT
  • SystemV/PST8
  • SystemV/PST8PDT
  • SystemV/YST9
  • SystemV/YST9YDT
  • Turkey
  • UCT
  • Universal
  • US/Alaska
  • US/Aleutian
  • US/Arizona
  • US/Central
  • US/East-Indiana
  • US/Eastern
  • US/Hawaii
  • US/Indiana-Starke
  • US/Michigan
  • US/Mountain
  • US/Pacific
  • US/Pacific-New
  • US/Samoa
  • UTC
  • VST
  • W-SU
  • WET
  • Zulu

OpenGate Libraries

Introduction to OpenGate Libraries

The OpenGate Libraries are a set of tools and utilities that provide a wide range of functionality for working with OpenGate data in different programming languages. These libraries are built on top of the OpenGate API and provide a simple and efficient way to access and manipulate data in your applications.

Index

Language Link
Javascript Javascript OGAPI.js
Python Python OGAPI.py

Subsections of OpenGate Libraries

OpenGate JS

Installation and Usage

Instalation

First of all you must install the library in your project. You can use npm or yarn to install the package.

If you use npm, you can install the package as follows:

npm install opengate-js

If you use yarn, you can install the package as follows:

yarn add opengate-js

Node.js (NPM)

To use the API in a Node.js environment, install the package and instantiate it as follows:

var OpengateAPI = require('opengate-js');

var ogapi = new OpengateAPI({
    url: 'your-api-url',
    port: 'your-port',
    version: 'your-version',
    apiKey: 'your-api-key',
    jwt: 'your-jwt',
    south: {
        url: 'your-south-api-url'
    }
});

Web (Bower)

To use the API in a web environment, include the script and instantiate it as follows:

import { } from 'opengate-js/dist/opengate-api-bower-15.4.0'

var ogapi = new window.OpenGateAPI({
    url: 'your-api-url',
    port: 'your-port',
    version: 'your-version',
    apiKey: 'your-api-key',
    jwt: 'your-jwt',
    south: {
        url: 'your-south-api-url'
    }
});

Note that opengate-api-bower uses babel to transpile the code to ES5 code.

API Reference

Subsections of OpenGate JS

JS Reference

Subsections of JS Reference

Subsections of alarms

Subsections of actions

Alarm Action Builder

Defines the builder to execute alarm actions

constructor

Parámetros

Nombre Tipo Opcional Descripción
ogapi InternalOpenGateAPI this is configuration about Opengate North API.
action string This action can be ATTEND or CLOSE

addAlarmId(alarmId)

Add alarmId to operation

Parámetros

Nombre Tipo Opcional Descripción
alarmId string AlarmId of Alarm

Retorna

Tip

Tipo: AlarmActionBuilder

Ejemplos

ogapi.alarms.builderFactory.newAlarmCloseBuilder().addAlarmId("")

build()

Build a instance of Operation

Retorna

Tip

Tipo: Operation

Ejemplos

ogapi.operations.builderFactory.newAlarmCloseBuilder().build()

withNotes(notes)

Add notes to operation

Parámetros

Nombre Tipo Opcional Descripción
notes string Notes about operation

Retorna

Tip

Tipo: AlarmActionBuilder

Ejemplos

ogapi.operations.builderFactory.newAlarmCloseBuilder().withNotes("")

Alarm Attend Builder

Defines the builder to execute alarm attend operation

constructor

Parámetros

Nombre Tipo Opcional Descripción
ogapi InternalOpenGateAPI this is configuration about Opengate North API.

Alarm Close Builder

Defines the builder to execute alarm close operation

constructor

Parámetros

Nombre Tipo Opcional Descripción
ogapi InternalOpenGateAPI this is configuration about Opengate North API.

Operation

This is a abstract class, it must be extended to another class that defined the specific search. This class is responsible to manage execute operations request to OpenGate North API

constructor

Constructor

Parámetros

Nombre Tipo Opcional Descripción
ogapi InternalOpenGateAPI this is ogapi instance
resource string this is a base url resource
postObj object it will be sent as a data on post action

execute()

This invoke a request to OpenGate North API and the callback is managed by promises

Retorna

Tip

Tipo: Promise


Alarm Actions

This class contains all alarms actions builders

constructor

Constructor

Parámetros

Nombre Tipo Opcional Descripción
ogapi InternalOpenGateAPI this is configuration about Opengate North API.

newAttendBuilder()

Create alarm attend action builder

Retorna

Tip

Tipo: AlarmAttendBuilder

Ejemplos

ogapi.alarms.newAttendBuilder()

newCloseBuilder()

Create alarm close action builder

Retorna

Tip

Tipo: AlarmCloseBuilder

Ejemplos

ogapi.alarms.newCloseBuilder()

Subsections of areas

Area Finder

This class allow make get request to area resource into Opengate North API.

constructor

Constructor

Parámetros

Nombre Tipo Opcional Descripción
ogapi InternalOpenGateAPI Reference to the API object.

findByOrganizationAndIdentifier(organization, identifier)

Download a specific area by its organization and identifier. This execute a GET http method

Parámetros

Nombre Tipo Opcional Descripción
organization string area organization .
identifier string area name.

Retorna

Tip

Tipo: Promise


Areas

This is a base object that contains all you can do about Areas.

constructor

Constructor

Parámetros

Nombre Tipo Opcional Descripción
Reference InternalOpenGateAPI to the API object.

withColor(color)

Set the color attribute

Parámetros

Nombre Tipo Opcional Descripción
color string required field

Retorna

Tip

Tipo: Areas


withDescription(description)

Set the description attribute

Parámetros

Nombre Tipo Opcional Descripción
description string required field

Retorna

Tip

Tipo: Areas


withEntities(entities)

Set the entities attribute

Parámetros

Nombre Tipo Opcional Descripción
entities array required field

Retorna

Tip

Tipo: Areas


withGeometry(type, coordinates)

Set the geometry attribute

Parámetros

Nombre Tipo Opcional Descripción
type string required field
coordinates array required field

Retorna

Tip

Tipo: Areas


withIdentifier(identifier)

Set the identifier attribute

Parámetros

Nombre Tipo Opcional Descripción
identifier string required field

Retorna

Tip

Tipo: Areas


withName(name)

Set the name attribute

Parámetros

Nombre Tipo Opcional Descripción
name string required field

Retorna

Tip

Tipo: Areas


withOrder(order)

Set the order attribute

Parámetros

Nombre Tipo Opcional Descripción
order number required field

Retorna

Tip

Tipo: Areas


withOrganization(organization)

Set the organization attribute

Parámetros

Nombre Tipo Opcional Descripción
organization string required field

Retorna

Tip

Tipo: Areas


Subsections of bulk

Bulk Execution Finder

This class allow make get request to bulk executions resource into Opengate North API.

constructor

Constructor

Parámetros

Nombre Tipo Opcional Descripción
Reference InternalOpenGateAPI to the API object.

findByOrganizationAndId(organization, id, mimetype)

Download a specific entity by its organization and id. This execute a GET http method

Parámetros

Nombre Tipo Opcional Descripción
organization string organization.
id string bulk id.
mimetype string Format of file when get the result details of previously created bulk process.

Retorna

Tip

Tipo: Promise


Bulk Finder

This class allow make get request to bulk resource into Opengate North API.

constructor

Constructor

Parámetros

Nombre Tipo Opcional Descripción
Reference InternalOpenGateAPI to the API object.

findByOrganizationAndId(organization, id, format, accept)

Download a specific entity by its organization and id. This execute a GET http method

Parámetros

Nombre Tipo Opcional Descripción
organization string entity organization .
id string entity id.
format string format response flag.
accept string accept.

Retorna

Tip

Tipo: Promise


Subsections of bundles

Bundle Finder

This class allow make get request to certificate resource into Opengate North API.

constructor

Constructor

Parámetros

Nombre Tipo Opcional Descripción
Reference InternalOpenGateAPI to the API object.

findByNameAndVersion(name, version)

Download a specific bundle by its name and version. This execute a GET http method

Parámetros

Nombre Tipo Opcional Descripción
name string bundle name .
version string bundle version.

Retorna

Tip

Tipo: Promise


Bundles

This is a base object that contains all you can do about Bundles.

constructor

Constructor

Parámetros

Nombre Tipo Opcional Descripción
Reference InternalOpenGateAPI to the API object.

activate()

This invoke a request to OpenGate North API and the callback is managed by promises This function activates a bundle

Retorna

Tip

Tipo: Promise

Ejemplos

 ogapi.bundlesBuilder().activate()

addDeploymentElement(progressEvent)

Create deployment element that is asociated to the Bundle

Parámetros

Nombre Tipo Opcional Descripción
progressEvent *

Retorna

Tip

Tipo: DeploymentElement

Ejemplos

 ogapi.bundlesBuilder().newDeploymentElement()

create()

Creates a new bundle

Retorna

Tip

Tipo: Promise

Ejemplos

 ogapi.bundlesBuilder().create()

deactivate()

This invoke a request to OpenGate North API and the callback is managed by promises This function deactivates a bundle

Retorna

Tip

Tipo: Promise

Ejemplos

 ogapi.bundlesBuilder().deactivate()

deployAndActivate()

Deploy all elements of a bundle in only one method

Retorna

Tip

Tipo: DeploymentElement

Ejemplos

 ogapi.bundlesBuilder().deployAndActivate()

update()

Updates a bundle

Retorna

Tip

Tipo: Promise

Ejemplos

 ogapi.bundlesBuilder().update()

withActive(active)

Set the active attribute

Parámetros

Nombre Tipo Opcional Descripción
active string

Retorna

Tip

Tipo: Bundles


withDescription(description)

Set the description attribute

Parámetros

Nombre Tipo Opcional Descripción
description string

Retorna

Tip

Tipo: Bundles


withHardware(hardware)

Set the hardware attribute

Parámetros

Nombre Tipo Opcional Descripción
hardware string

Retorna

Tip

Tipo: Bundles


withName(name)

Set the name attribute

Parámetros

Nombre Tipo Opcional Descripción
name string required field

Retorna

Tip

Tipo: Bundles


withPostaction(postactions)

Set the postactions attribute

Parámetros

Nombre Tipo Opcional Descripción
postactions string

Retorna

Tip

Tipo: Bundles


withPreaction(preaction)

Set the preaction attribute

Parámetros

Nombre Tipo Opcional Descripción
preaction string

Retorna

Tip

Tipo: Bundles


withTimeout(ms)

The request will have a specific time out if it will be exceeded then the promise throw an exception

Parámetros

Nombre Tipo Opcional Descripción
ms number timeout in milliseconds

Retorna

Tip

Tipo: Bundles


withUserNotes(userNotes)

Set the userNotes attribute

Parámetros

Nombre Tipo Opcional Descripción
userNotes string

Retorna

Tip

Tipo: Bundles


withVersion(version)

Set the version attribute

Parámetros

Nombre Tipo Opcional Descripción
version string

Retorna

Tip

Tipo: Bundles


withWorkgroup(workgroup)

Set the workgroup attribute

Parámetros

Nombre Tipo Opcional Descripción
workgroup string

Retorna

Tip

Tipo: Bundles


Subsections of deployment

Deployment Element

This is a base object that contains all you can do about Deployment Element.

createWithFile(rawFile)

This invoke a request to OpenGate North API and the callback is managed by promises This method create an element deploymentElement

Parámetros

Nombre Tipo Opcional Descripción
rawFile File this File is the deployment element

Retorna

Tip

Tipo: Promise


deploy()

This invoke a request to OpenGate North API and the callback is managed by promises This method create an element deploymentElement with previously assignated file

Retorna

Tip

Tipo: Promise


update()

This method invalidates the update option


withDownloadUrl(downloadUrl)

Set the downloadUrl attribute

Parámetros

Nombre Tipo Opcional Descripción
downloadUrl string

Retorna

Tip

Tipo: DeploymentElement


withFile(rawFile)

Sets the file to upload

Parámetros

Nombre Tipo Opcional Descripción
rawFile object

Retorna

Tip

Tipo: DeploymentElement


withFileName(fileName)

Set the fileName attribute

Parámetros

Nombre Tipo Opcional Descripción
fileName string

Retorna

Tip

Tipo: DeploymentElement


withName(name)

Set the name attribute

Parámetros

Nombre Tipo Opcional Descripción
name string required field

Retorna

Tip

Tipo: DeploymentElement


withOldName(name)

Sets the old name attribute

Parámetros

Nombre Tipo Opcional Descripción
name string

Retorna

Tip

Tipo: DeploymentElement


withOldPath(path)

Sets the old path attribute

Parámetros

Nombre Tipo Opcional Descripción
path string

Retorna

Tip

Tipo: DeploymentElement


withOldVersion(version)

Sets the old version attribute

Parámetros

Nombre Tipo Opcional Descripción
version string

Retorna

Tip

Tipo: DeploymentElement


withOperation(operation)

Set the operation attribute

Parámetros

Nombre Tipo Opcional Descripción
operation string required field

Retorna

Tip

Tipo: DeploymentElement


withOption(option)

Set the option attribute

Parámetros

Nombre Tipo Opcional Descripción
option string

Retorna

Tip

Tipo: DeploymentElement


withOrder(order)

Set the order attribute

Parámetros

Nombre Tipo Opcional Descripción
order string required field

Retorna

Tip

Tipo: DeploymentElement


withPath(path)

Set the path attribute

Parámetros

Nombre Tipo Opcional Descripción
path string required field

Retorna

Tip

Tipo: DeploymentElement


withTimeout(ms)

The request will have a specific time out if it will be exceeded then the promise throw an exception

Parámetros

Nombre Tipo Opcional Descripción
ms number timeout in milliseconds

Retorna

Tip

Tipo: Bundles


withType(type)

Set the type attribute

Parámetros

Nombre Tipo Opcional Descripción
type string required field

Retorna

Tip

Tipo: DeploymentElement


withValidation(validation)

Set the validation attribute

Parámetros

Nombre Tipo Opcional Descripción
validation string

Retorna

Tip

Tipo: DeploymentElement


withValidators(validators)

Set the validators attribute

Parámetros

Nombre Tipo Opcional Descripción
validators Array

Retorna

Tip

Tipo: DeploymentElement


withVersion(version)

Set the version attribute

Parámetros

Nombre Tipo Opcional Descripción
version string required field

Retorna

Tip

Tipo: DeploymentElement


Subsections of channels

Channel Finder

This class allow make get request to channel resource into Opengate North API.

constructor

Constructor

Parámetros

Nombre Tipo Opcional Descripción
ogapi InternalOpenGateAPI Reference to the API object.

findByDomainAndWorkgroup(domain, workgroup)

Performs a get that returns channels related

Parámetros

Nombre Tipo Opcional Descripción
domain string domain
workgroup string workgroup.

Retorna

Tip

Tipo: Promise


findByDomainAndWorkgroupAndOrganization(domain, workgroup, organization)

Performs a get that returns channels related

Parámetros

Nombre Tipo Opcional Descripción
domain string domain
workgroup string workgroup.
organization string organization.

Retorna

Tip

Tipo: Promise


findByOrganizationAndName(organization, name)

Download a specific channel by its organization and id. This execute a GET http method

Parámetros

Nombre Tipo Opcional Descripción
organization string channel organization .
name string channel name.

Retorna

Tip

Tipo: Promise


Channels

This is a base object that contains all you can do about Bundles.

constructor

Constructor

Parámetros

Nombre Tipo Opcional Descripción
Reference InternalOpenGateAPI to the API object.

withCertificate(certificate)

Set the certificate attribute

Parámetros

Nombre Tipo Opcional Descripción
certificate string

Retorna

Tip

Tipo: Channels


withDescription(description)

Set the description attribute

Parámetros

Nombre Tipo Opcional Descripción
description string required field

Retorna

Tip

Tipo: Channels


withName(name)

Set the name attribute

Parámetros

Nombre Tipo Opcional Descripción
name string required field

Retorna

Tip

Tipo: Channels


withOrganization(organization)

Set the organization attribute

Parámetros

Nombre Tipo Opcional Descripción
organization string

Retorna

Tip

Tipo: Channels


Subsections of collection

Subsections of devices

Subsections of collect

Comms Module Message

This is a base object that allows the user to create a CommsModule.

withAntennaStatus(antennaStatus)

Set the antennaStatus attribute

Parámetros

Nombre Tipo Opcional Descripción
antennaStatus string optional field

Retorna

Tip

Tipo: CommsModule


withHardware(hardware)

Set the hardware attribute

Parámetros

Nombre Tipo Opcional Descripción
hardware Hardware optionals field

Retorna

Tip

Tipo: CommsModule


withId(id)

Set the id attribute

Parámetros

Nombre Tipo Opcional Descripción
id string optional field

Retorna

Tip

Tipo: CommsModule


withMobile(mobile)

Set the mobile attribute

Parámetros

Nombre Tipo Opcional Descripción
mobile *

Retorna

Tip

Tipo: CommsModule


withName(name)

Set the name attribute

Parámetros

Nombre Tipo Opcional Descripción
name string optional field

Retorna

Tip

Tipo: CommsModule


withOperationalStatus(operationalStatus)

Set the operationalStatus attribute

Parámetros

Nombre Tipo Opcional Descripción
operationalStatus string

Retorna

Tip

Tipo: CommsModule


withSoftware(software)

Set the software attribute

Parámetros

Nombre Tipo Opcional Descripción
software *

Retorna

Tip

Tipo: CommsModule


withSubscriber(subscriber)

Set the subscriber attribute

Parámetros

Nombre Tipo Opcional Descripción
subscriber *

Retorna

Tip

Tipo: CommsModule


withSubscription(subscription)

Set the subscription attribute

Parámetros

Nombre Tipo Opcional Descripción
subscription *

Retorna

Tip

Tipo: CommsModule


withType(type)

Set the type attribute

Parámetros

Nombre Tipo Opcional Descripción
type string optional field

Retorna

Tip

Tipo: CommsModule


Datapoint

This is a base object that allows the user to create a Datapoint.

withAt(at)

Sets the at attribute

Parámetros

Nombre Tipo Opcional Descripción
at number optional field

Retorna

Tip

Tipo: Datapoint


withFrom(from)

Sets the from attribute

Parámetros

Nombre Tipo Opcional Descripción
from number optional field

Retorna

Tip

Tipo: Datapoint


withSource(value)

Sets the source attribute

Parámetros

Nombre Tipo Opcional Descripción
value string optional field

Retorna

Tip

Tipo: Datapoint


withSourceInfo(value)

Sets the source attribute

Parámetros

Nombre Tipo Opcional Descripción
value string optional field

Retorna

Tip

Tipo: Datapoint


withTags(tags)

Sets the tags attribute

Parámetros

Nombre Tipo Opcional Descripción
tags Array

Retorna

Tip

Tipo: Datapoint


withValue(value)

Sets the value attribute

Parámetros

Nombre Tipo Opcional Descripción
value string required field

Retorna

Tip

Tipo: Datapoint


Datastream

This is a base object that allows the user to create a Datastream.

withDatapoint(datapoint)

Add a datapoint in datapoints

Parámetros

Nombre Tipo Opcional Descripción
datapoint Datapoint required field

Retorna

Tip

Tipo: Datastream


withFeed(feed)

Set the feed attribute

Parámetros

Nombre Tipo Opcional Descripción
feed string optionals field

Retorna

Tip

Tipo: Datastream


withId(id)

Set the id attribute

Parámetros

Nombre Tipo Opcional Descripción
id string required field

Retorna

Tip

Tipo: Datastream


Event

This is a base object that allows the user to create a Event.

withCommsModule(communicationsModules)

Set the powerSupply attribute

Parámetros

Nombre Tipo Opcional Descripción
communicationsModules *

Retorna

Tip

Tipo: Event


withCpuUsage(cpuUsage)

Set the cpuUsage attribute

Parámetros

Nombre Tipo Opcional Descripción
cpuUsage *

Retorna

Tip

Tipo: Event


withCurrentTemperature(currentTemperature)

Set the currentTemperature attribute

Parámetros

Nombre Tipo Opcional Descripción
currentTemperature string optionals field

Retorna

Tip

Tipo: Event


withDateLocation(date)

Set the date attribute

Parámetros

Nombre Tipo Opcional Descripción
date string optionals field

Retorna

Tip

Tipo: Event


withDeviceId(deviceId)

Set the deviceId attribute

Parámetros

Nombre Tipo Opcional Descripción
deviceId string optionals field

Retorna

Tip

Tipo: Event


withEventDescription(description)

Set the description attribute

Parámetros

Nombre Tipo Opcional Descripción
description string optionals field

Retorna

Tip

Tipo: Event


withEventId(id)

Set the id attribute

Parámetros

Nombre Tipo Opcional Descripción
id string optionals field

Retorna

Tip

Tipo: Event


withEventName(name)

Set the name attribute

Parámetros

Nombre Tipo Opcional Descripción
name string optionals field

Retorna

Tip

Tipo: Event


withHardware(hardware)

Set the hardware attribute

Parámetros

Nombre Tipo Opcional Descripción
hardware Hardware optionals field

Retorna

Tip

Tipo: Event


withLatitude(latitude)

Set the latitude attribute

Parámetros

Nombre Tipo Opcional Descripción
latitude number optionals field

Retorna

Tip

Tipo: Event


withLongitude(longitude)

Set the longitude attribute

Parámetros

Nombre Tipo Opcional Descripción
longitude number optionals field

Retorna

Tip

Tipo: Event


withMaximumTemperature(maximumTemperature)

Set the maximum attribute

Parámetros

Nombre Tipo Opcional Descripción
maximumTemperature string optionals field

Retorna

Tip

Tipo: Event


withMinimumTemperature(minimumTemperature)

Set the minimum attribute

Parámetros

Nombre Tipo Opcional Descripción
minimumTemperature string optionals field

Retorna

Tip

Tipo: Event


withNonVolatilStorage(nonVolatilStorage)

Set the nonVolatilStorage attribute

Parámetros

Nombre Tipo Opcional Descripción
nonVolatilStorage *

Retorna

Tip

Tipo: Event


withOperationalStatus(operationalStatus)

Set the operationalStatus attribute

Parámetros

Nombre Tipo Opcional Descripción
operationalStatus string

Retorna

Tip

Tipo: Event


withPath(path)

Set the path attribute

Parámetros

Nombre Tipo Opcional Descripción
path string optionals field

Retorna

Tip

Tipo: Event


withPowerSupply(powerSupply)

Set the powerSupply attribute

Parámetros

Nombre Tipo Opcional Descripción
powerSupply *

Retorna

Tip

Tipo: Event


withRam(ram)

Set the Ram attribute

Parámetros

Nombre Tipo Opcional Descripción
ram *

Retorna

Tip

Tipo: Event


withSoftware(software)

Set the software attribute

Parámetros

Nombre Tipo Opcional Descripción
software software optionals field

Retorna

Tip

Tipo: Event


withStatusTemperature(unitTemperature)

Set the unitTemperature attribute

Parámetros

Nombre Tipo Opcional Descripción
unitTemperature string optionals field

Retorna

Tip

Tipo: Event


withTemperatureAverage(averageTemperature)

Set the average attribute

Parámetros

Nombre Tipo Opcional Descripción
averageTemperature string optionals field

Retorna

Tip

Tipo: Event


withTrendTemperature(unitTemperature)

Set the unitTemperature attribute

Parámetros

Nombre Tipo Opcional Descripción
unitTemperature string optionals field

Retorna

Tip

Tipo: Event


withUnitTemperature(unitTemperature)

Set the unitTemperature attribute

Parámetros

Nombre Tipo Opcional Descripción
unitTemperature string optionals field

Retorna

Tip

Tipo: Event


withUpTime(upTime)

Set the upTime attribute

Parámetros

Nombre Tipo Opcional Descripción
upTime number

Retorna

Tip

Tipo: Event


withVolatilStorage(volatilStorage)

Set the volatilStorage attribute

Parámetros

Nombre Tipo Opcional Descripción
volatilStorage *

Retorna

Tip

Tipo: Event


Hardware

This is a base object that allows the user to create a Datapoint.

withClockDate(clockDate)

Set the clockDate attribute

Parámetros

Nombre Tipo Opcional Descripción
clockDate string

Retorna

Tip

Tipo: Hardware


withManufacturerName(manufacturerName)

Set the manufacturerName attribute

Parámetros

Nombre Tipo Opcional Descripción
manufacturerName string

Retorna

Tip

Tipo: Hardware


withManufacturerOui(manufacturerOui)

Set the manufacturerOui attribute

Parámetros

Nombre Tipo Opcional Descripción
manufacturerOui string

Retorna

Tip

Tipo: Hardware


withModelName(modelName)

Set the modelName attribute

Parámetros

Nombre Tipo Opcional Descripción
modelName string

Retorna

Tip

Tipo: Hardware


withModelVersion(modelVersion)

Set the modelVersion attribute

Parámetros

Nombre Tipo Opcional Descripción
modelVersion string

Retorna

Tip

Tipo: Hardware


withSerialnumber(serialnumber)

Set the serialnumber attribute

Parámetros

Nombre Tipo Opcional Descripción
serialnumber string

Retorna

Tip

Tipo: Hardware


Location

This is a base object that allows the user to create a Datapoint.

withDateLocation(date)

Set the date attribute

Parámetros

Nombre Tipo Opcional Descripción
date string optionals field

Retorna

Tip

Tipo: Location


withLatitude(latitude)

Set the latitude attribute

Parámetros

Nombre Tipo Opcional Descripción
latitude number optionals field

Retorna

Tip

Tipo: Location


withLongitude(longitude)

Set the longitude attribute

Parámetros

Nombre Tipo Opcional Descripción
longitude number optionals field

Retorna

Tip

Tipo: Location


Mobile

This is a base object that allows the user to create a Datapoint.

withApn(apn)

Set the apn attribute

Parámetros

Nombre Tipo Opcional Descripción
apn string optionals field

Retorna

Tip

Tipo: Mobile


withBcch(bcch)

Set the bcch attribute

Parámetros

Nombre Tipo Opcional Descripción
bcch string optionals field

Retorna

Tip

Tipo: Mobile


withCellId(cellId)

Set the cellId attribute

Parámetros

Nombre Tipo Opcional Descripción
cellId string optionals field

Retorna

Tip

Tipo: Mobile


withCgi(cgi)

Set the cgi attribute

Parámetros

Nombre Tipo Opcional Descripción
cgi string optionals field

Retorna

Tip

Tipo: Mobile


withLac(lac)

Set the lac attribute

Parámetros

Nombre Tipo Opcional Descripción
lac string optionals field

Retorna

Tip

Tipo: Mobile


withMr(mr)

Set the mr attribute

Parámetros

Nombre Tipo Opcional Descripción
mr string optionals field

Retorna

Tip

Tipo: Mobile


withPlmn(plmn)

Set the plmn attribute

Parámetros

Nombre Tipo Opcional Descripción
plmn string optionals field

Retorna

Tip

Tipo: Mobile


withRatType(ratType)

Set the ratType attribute

Parámetros

Nombre Tipo Opcional Descripción
ratType string optionals field

Retorna

Tip

Tipo: Mobile


withsignalQuality(signalQuality)

Set the signalQuality attribute

Parámetros

Nombre Tipo Opcional Descripción
signalQuality string optionals field

Retorna

Tip

Tipo: Mobile


withsignalQualityMax(signalQualityMax)

Set the signalQualityMax attribute

Parámetros

Nombre Tipo Opcional Descripción
signalQualityMax string optionals field

Retorna

Tip

Tipo: Mobile


withsignalQualityMin(signalQualityMin)

Set the signalQualityMin attribute

Parámetros

Nombre Tipo Opcional Descripción
signalQualityMin string optionals field

Retorna

Tip

Tipo: Mobile


withSignalStrength(signalStrength)

Set the signalStrength attribute

Parámetros

Nombre Tipo Opcional Descripción
signalStrength string optionals field

Retorna

Tip

Tipo: Mobile


withSignalStrengthMax(signalStrengthMax)

Set the signalStrengthMax attribute

Parámetros

Nombre Tipo Opcional Descripción
signalStrengthMax string optionals field

Retorna

Tip

Tipo: Mobile


withsignalStrengthMin(signalStrengthMin)

Set the signalStrengthMin attribute

Parámetros

Nombre Tipo Opcional Descripción
signalStrengthMin string optionals field

Retorna

Tip

Tipo: Mobile


withTimingAdvance(timingAdvance)

Set the timingAdvance attribute

Parámetros

Nombre Tipo Opcional Descripción
timingAdvance string optionals field

Retorna

Tip

Tipo: Mobile


Power Supply

This is a base object that allows the user to create a Datapoint.

withBatteryChargeLevelPercentage(percentage)

Set the BatteryChargeLevel percentage attribute

Parámetros

Nombre Tipo Opcional Descripción
percentage string optionals field

Retorna

Tip

Tipo: PowerSupply


withBatteryChargeLevelStatus(status)

Set the battery status attribute

Parámetros

Nombre Tipo Opcional Descripción
status string optionals field

Retorna

Tip

Tipo: PowerSupply


withBatteryChargeLevelTrend(trend)

Set the trend attribute

Parámetros

Nombre Tipo Opcional Descripción
trend string optionals field

Retorna

Tip

Tipo: PowerSupply


withOutageDate(outageDate)

Set the OutageDate attribute

Parámetros

Nombre Tipo Opcional Descripción
outageDate string optionals field

Retorna

Tip

Tipo: PowerSupply


withOutageDuration(duration)

Set the duration attribute

Parámetros

Nombre Tipo Opcional Descripción
duration number optionals field

Retorna

Tip

Tipo: PowerSupply


withSource(source)

Set the source attribute

Parámetros

Nombre Tipo Opcional Descripción
source string optionals field

Retorna

Tip

Tipo: PowerSupply


withStatus(status)

Set the status attribute

Parámetros

Nombre Tipo Opcional Descripción
status string optionals field

Retorna

Tip

Tipo: PowerSupply


Software

This is a base object that allows the user to create a Datapoint.

withDate(date)

Set the date attribute

Parámetros

Nombre Tipo Opcional Descripción
date string

Retorna

Tip

Tipo: Software


withName(name)

Set the name attribute

Parámetros

Nombre Tipo Opcional Descripción
name string

Retorna

Tip

Tipo: Software


withType(type)

Set the type attribute

Parámetros

Nombre Tipo Opcional Descripción
type string

Retorna

Tip

Tipo: Software


withVersion(version)

Set the version attribute

Parámetros

Nombre Tipo Opcional Descripción
version string

Retorna

Tip

Tipo: Software


Storage

This is a base object that allows the user to create a Datapoint.

withTotal(total)

Set the total attribute

Parámetros

Nombre Tipo Opcional Descripción
total string optionals field

Retorna

Tip

Tipo: Storage


withUnit(unit)

Set the unit attribute

Parámetros

Nombre Tipo Opcional Descripción
unit string optionals field

Retorna

Tip

Tipo: Storage


Subscriber

This is a base object that allows the user to create a Subscription.

withHardware(hardware)

Set the hardware attribute

Parámetros

Nombre Tipo Opcional Descripción
hardware Hardware optionals field

Retorna

Tip

Tipo: Subscriber


withId(id)

Set the id attribute

Parámetros

Nombre Tipo Opcional Descripción
id string optional field

Retorna

Tip

Tipo: Subscriber


withName(name)

Set the name attribute

Parámetros

Nombre Tipo Opcional Descripción
name string optional field

Retorna

Tip

Tipo: Subscriber


withType(type)

Set the type attribute

Parámetros

Nombre Tipo Opcional Descripción
type string optional field

Retorna

Tip

Tipo: Subscriber


Subscription

This is a base object that allows the user to create a Subscription.

withAddressApn(addressApn)

Set the addressApn attribute

Parámetros

Nombre Tipo Opcional Descripción
addressApn string optional field

Retorna

Tip

Tipo: Subscription


withAddressType(addressType)

Set the addressType attribute

Parámetros

Nombre Tipo Opcional Descripción
addressType string optional field

Retorna

Tip

Tipo: Subscription


withAddressValue(addressValue)

Set the addressValue attribute

Parámetros

Nombre Tipo Opcional Descripción
addressValue string optional field

Retorna

Tip

Tipo: Subscription


withDescription(description)

Set the description attribute

Parámetros

Nombre Tipo Opcional Descripción
description string optional field

Retorna

Tip

Tipo: Subscription


withId(id)

Set the id attribute

Parámetros

Nombre Tipo Opcional Descripción
id string optional field

Retorna

Tip

Tipo: Subscription


withImsi(imsi)

Set the imsi attribute

Parámetros

Nombre Tipo Opcional Descripción
imsi string optional field

Retorna

Tip

Tipo: Subscription


withMsisdn(msisdn)

Set the msisdn attribute

Parámetros

Nombre Tipo Opcional Descripción
msisdn string optional field

Retorna

Tip

Tipo: Subscription


withName(name)

Set the name attribute

Parámetros

Nombre Tipo Opcional Descripción
name string optional field

Retorna

Tip

Tipo: Subscription


withOperator(operator)

Set the operator attribute

Parámetros

Nombre Tipo Opcional Descripción
operator string optional field

Retorna

Tip

Tipo: Subscription


withType(type)

Set the type attribute

Parámetros

Nombre Tipo Opcional Descripción
type string optional field

Retorna

Tip

Tipo: Subscription


Temperature

This is a base object that allows the user to create a Datapoint.

withCurrentTemperature(currentTemperature)

Set the currentTemperature attribute

Parámetros

Nombre Tipo Opcional Descripción
currentTemperature string optionals field

Retorna

Tip

Tipo: Temperature


withMaximumTemperature(maximumTemperature)

Set the maximum attribute

Parámetros

Nombre Tipo Opcional Descripción
maximumTemperature string optionals field

Retorna

Tip

Tipo: Temperature


withMinimumTemperature(minimumTemperature)

Set the minimumTemperature attribute

Parámetros

Nombre Tipo Opcional Descripción
minimumTemperature string optionals field

Retorna

Tip

Tipo: Temperature


withStatusTemperature(statusTemperature)

Set the statusTemperature attribute

Parámetros

Nombre Tipo Opcional Descripción
statusTemperature string optionals field

Retorna

Tip

Tipo: Temperature


withTemperatureAverage(averageTemperature)

Set the averageTemperature attribute

Parámetros

Nombre Tipo Opcional Descripción
averageTemperature string optionals field

Retorna

Tip

Tipo: Temperature


withTrendTemperature(trendTemperature)

Set the trendTemperature attribute

Parámetros

Nombre Tipo Opcional Descripción
trendTemperature string optionals field

Retorna

Tip

Tipo: Temperature


withUnitTemperature(unitTemperature)

Set the unitTemperature attribute

Parámetros

Nombre Tipo Opcional Descripción
unitTemperature string optionals field

Retorna

Tip

Tipo: Temperature


Usage

This is a base object that allows the user to create a Datapoint.

withAverage(average)

Set the average attribute

Parámetros

Nombre Tipo Opcional Descripción
average string optionals field

Retorna

Tip

Tipo: Usage


withCurrent(current)

Set the current attribute

Parámetros

Nombre Tipo Opcional Descripción
current string optionals field

Retorna

Tip

Tipo: Usage


withMaximum(maximum)

Set the maximum attribute

Parámetros

Nombre Tipo Opcional Descripción
maximum string optionals field

Retorna

Tip

Tipo: Usage


withMinimum(minimum)

Set the minimum attribute

Parámetros

Nombre Tipo Opcional Descripción
minimum string optionals field

Retorna

Tip

Tipo: Usage


withUsageUnit(unit)

Set the unit attribute

Parámetros

Nombre Tipo Opcional Descripción
unit string optionals field

Retorna

Tip

Tipo: Usage


Device Message

This is a base object contains methods to send unstructured IoT information to be processed & collected by the platform.

constructor

Constructor

Parámetros

Nombre Tipo Opcional Descripción
Reference InternalOpenGateAPI to the API object.

withDataStream(datastream)

Set the datastream attribute

Parámetros

Nombre Tipo Opcional Descripción
datastream Datastream required field

Retorna

Tip

Tipo: deviceMessages


withDataStreamVersion(version)

Set the dataStream version attribute

Parámetros

Nombre Tipo Opcional Descripción
version string required field

Retorna

Tip

Tipo: deviceMessages


withDeviceId(deviceId)

Set the deviceId attribute

Parámetros

Nombre Tipo Opcional Descripción
deviceId string optional field

Retorna

Tip

Tipo: deviceMessages


withDmmVersion(version)

Set the version attribute

Parámetros

Nombre Tipo Opcional Descripción
version string required field

Retorna

Tip

Tipo: deviceMessages


withId(id)

Set the id attribute

Parámetros

Nombre Tipo Opcional Descripción
id string required field

Retorna

Tip

Tipo: deviceMessages


Subsections of connectorsFunctions

Subsections of catalog

Connector Functions

This is a base object than contains all you can about connector functions catalog

constructor

Constructor

Parámetros

Nombre Tipo Opcional Descripción
ogapi InternalOpenGateAPI
identifier String
connectorFunction Object

addNorthCriteria(northCriteria)

Add northCriteria to parameter northCriterias. Each element is defined by path and value

Parámetros

Nombre Tipo Opcional Descripción
northCriteria Object

Retorna

Tip

Tipo: ConnectorFunctionsCatalog


addSouthCriteria(southCriteria)

Add southCriteria to parameter southCriterias. Each string can represent an URI, topic, OID…

Parámetros

Nombre Tipo Opcional Descripción
southCriteria String

Retorna

Tip

Tipo: *


create()

Create a new connector function catalog

Retorna

Tip

Tipo: Promise


withCloneable(cloneable)

Indicates whether or not the Connector Function is cloneable.

Parámetros

Nombre Tipo Opcional Descripción
cloneable Boolean

Retorna

Tip

Tipo: ConnectorFunctionsCatalog


withDescription(description)

Description of the connector function. This field is optional.

Parámetros

Nombre Tipo Opcional Descripción
description String

Retorna

Tip

Tipo: ConnectorFunctionsCatalog


withIdentifier(identifier)

Set the identifier

Parámetros

Nombre Tipo Opcional Descripción
identifier String

Retorna

Tip

Tipo: ConnectorFunctionsCatalog


withJavascript(javascript)

Connector function javascript code

Parámetros

Nombre Tipo Opcional Descripción
javascript String

Retorna

Tip

Tipo: ConnectorFunctionsCatalog


withName(name)

Descriptive and unique name

Parámetros

Nombre Tipo Opcional Descripción
name String

Retorna

Tip

Tipo: ConnectorFunctionsCatalog


withNorthCriterias(northCriterias)

Connector Function selection criteria for operation requests. This field is mandatory if Connector Function type is REQUEST. ⮕ [ each element is defined by path and value ]

Parámetros

Nombre Tipo Opcional Descripción
northCriterias Array

Retorna

Tip

Tipo: ConnectorFunctionsCatalog


withOperationalStatus(operationalStatus)

Connector Function status Allowed: DISABLED┃PRODUCTION┃TEST

Parámetros

Nombre Tipo Opcional Descripción
operationalStatus String

Retorna

Tip

Tipo: ConnectorFunctionsCatalog


withOperationName(operationName)

Used to filter connector functions by operation name. If Connector Function type is REQUEST, this field is mandatory and defined name must be an operation name available for specified Api Key. If the type is COLLECTION or RESPONSE, this field must be null.

Parámetros

Nombre Tipo Opcional Descripción
operationName String

Retorna

Tip

Tipo: ConnectorFunctionsCatalog


withPayloadType(payloadType)

Enum of allowed types for connector function's payload data. Request Connector Functions only accept JSON. Allowed: TEXT┃JSON┃BINARY

Parámetros

Nombre Tipo Opcional Descripción
payloadType String

Retorna

Tip

Tipo: ConnectorFunctionsCatalog


withSouthCriterias(southCriterias)

Connector Function selection criteria for operation responses and data collection. This field is mandatory if Connector Function type is COLLECTION or RESPONSE. ⮕ [ each string can represent an URI, topic, OID… ]. Each string can represent an URI, topic, OID…

Parámetros

Nombre Tipo Opcional Descripción
southCriterias Array

Retorna

Tip

Tipo: ConnectorFunctionsCatalog


withType(type)

Type of connector function, this is mandatory. Keep in mind that you will be not allowed to modify it. Allowed: COLLECTION┃REQUEST┃RESPONSE

Parámetros

Nombre Tipo Opcional Descripción
type String

Retorna

Tip

Tipo: ConnectorFunctionsCatalog


Connector Functions Catalog

This class allow make get request to connector functions catalog resource into Opengate North API.

getConnectorFunctionsCatalog()

Get connector functions catalog

Retorna

Tip

Tipo: Promise


Connector Functions Catalog Finder

This class allow make get request to a connector functions catalog resource into Opengate North API.

findByConnectorFunctionsId(connectorFunctionId)

Reading a Connector Function from catalog

Parámetros

Nombre Tipo Opcional Descripción
connectorFunctionId String

Retorna

Tip

Tipo: Promise


Subsections of configuration

Connector Functions

This is a base object that contains all you can do about ConnectorFunctions.

constructor

Constructor

Parámetros

Nombre Tipo Opcional Descripción
Reference InternalOpenGateAPI to the API object.

create()

Create a new Connector Function

Retorna

Tip

Tipo: Promise


delete()

Deletes the selected connector function

Retorna

Tip

Tipo: Promise


update()

Updates a connector function

Retorna

Tip

Tipo: Promise


withChannel(channel)

Set the channel attribute

Parámetros

Nombre Tipo Opcional Descripción
channel string required field

Retorna

Tip

Tipo: ConnectorFunctions


withDescription(description)

Set the description attribute

Parámetros

Nombre Tipo Opcional Descripción
description string

Retorna

Tip

Tipo: ConnectorFunctions


withIdentifier(identifier)

Set the identifier attribute

Parámetros

Nombre Tipo Opcional Descripción
identifier string required field

Retorna

Tip

Tipo: ConnectorFunctions


withJavascript(javascript)

Set the javascript attribute

Parámetros

Nombre Tipo Opcional Descripción
javascript string

Retorna

Tip

Tipo: ConnectorFunctions


withName(name)

Set the name attribute

Parámetros

Nombre Tipo Opcional Descripción
name string required field

Retorna

Tip

Tipo: ConnectorFunctions


withNorthCriterias(criterias)

Set the north criterias attribute

Parámetros

Nombre Tipo Opcional Descripción
criterias array

Retorna

Tip

Tipo: ConnectorFunctions


withOperationalStatus(operationalStatus)

Set the operational status attribute

Parámetros

Nombre Tipo Opcional Descripción
operationalStatus boolean

Retorna

Tip

Tipo: ConnectorFunctions


withOperationName(operationName)

Set the operation name attribute

Parámetros

Nombre Tipo Opcional Descripción
operationName string required field

Retorna

Tip

Tipo: ConnectorFunctions


withOrganization(organization)

Set the organization attribute

Parámetros

Nombre Tipo Opcional Descripción
organization string required field

Retorna

Tip

Tipo: ConnectorFunctions


withPayloadType(payloadType)

Set the payload type attribute

Parámetros

Nombre Tipo Opcional Descripción
payloadType string

Retorna

Tip

Tipo: ConnectorFunctions


withSouthCriterias(criterias)

Set the south criterias attribute

Parámetros

Nombre Tipo Opcional Descripción
criterias array

Retorna

Tip

Tipo: ConnectorFunctions


withType(type)

Set the type attribute

Parámetros

Nombre Tipo Opcional Descripción
type string

Retorna

Tip

Tipo: ConnectorFunctions


Connector Functions Finder

This class allow make get request to ConnectorFunctions resource into Opengate North API.

constructor

Constructor

Parámetros

Nombre Tipo Opcional Descripción
ogapi InternalOpenGateAPI Reference to the API object.

findByOrganizationAndChannel(organization, channel)

Performs a get that returns connectors functions related

Parámetros

Nombre Tipo Opcional Descripción
organization string organization
channel string channel.

Retorna

Tip

Tipo: Promise


findByOrganizationAndChannelAndName(organization, channel, name)

Performs a get that returns connectors functions related

Parámetros

Nombre Tipo Opcional Descripción
organization string organization
channel string channel.
name string Connector function name

Retorna

Tip

Tipo: Promise


Connector Functions Helper

This class allow make get request to RuleConfigurationsHelper resource into Opengate North API.

constructor

Constructor

Parámetros

Nombre Tipo Opcional Descripción
ogapi InternalOpenGateAPI Reference to the API object.

getDocJavascriptFunctions()

Performs a get that returns documentation of javascript functions from rules service

Retorna

Tip

Tipo: Promise


getDocPrivateJavascriptFunctions()

Performs a get that returns documentation private of javascript functions from rules service

Retorna

Tip

Tipo: Promise


Subsections of datasets

Datasets

This is a base object that contains all you can do about Datasets.

constructor

Constructor

Parámetros

Nombre Tipo Opcional Descripción
Reference InternalOpenGateAPI to the API object.

optimizationPlan()

Request optimization plan

Retorna

Tip

Tipo: Promise


withColumns(columns)

Set the columns attribute

Parámetros

Nombre Tipo Opcional Descripción
columns array required field

Retorna

Tip

Tipo: Datasets


withDescription(description)

Set the description attribute

Parámetros

Nombre Tipo Opcional Descripción
description string

Retorna

Tip

Tipo: Datasets


withIdentifier(identifier)

Set the identifier attribute

Parámetros

Nombre Tipo Opcional Descripción
identifier string required field

Retorna

Tip

Tipo: Datasets


withIdentifierColumn(identifierColumn)

Set the identifierColumn attribute

Parámetros

Nombre Tipo Opcional Descripción
identifierColumn string required field

Retorna

Tip

Tipo: Datasets


withName(name)

Set the name attribute

Parámetros

Nombre Tipo Opcional Descripción
name string required field

Retorna

Tip

Tipo: Datasets


withOrganization(organization)

Set the organization attribute

Parámetros

Nombre Tipo Opcional Descripción
organization string required field

Retorna

Tip

Tipo: Datasets


withSorts(sorts)

List of sorting fields

Parámetros

Nombre Tipo Opcional Descripción
sorts array required field

Retorna

Tip

Tipo: Datasets


Subsections of entities

Device Finder

This class allow make get request to device provisioned resource into Opengate North API.

constructor

Constructor

Parámetros

Nombre Tipo Opcional Descripción
Reference InternalOpenGateAPI to the API object.

Entity Finder

  • This class allow make get request to entity provisioned resource into Opengate North API.

constructor

Constructor

Parámetros

Nombre Tipo Opcional Descripción
Reference InternalOpenGateAPI to the API object.

findByOrganizationAndId(organization, id, flattened)

Download a specific entity by its organization and id. This execute a GET http method

Parámetros

Nombre Tipo Opcional Descripción
organization string entity organization .
id string entity id.
flattened string flattened response flag.

Retorna

Tip

Tipo: Promise


Subscribers Finder

This class allow make get request to subscribers provisioned resource into Opengate North API.

constructor

Constructor

Parámetros

Nombre Tipo Opcional Descripción
Reference InternalOpenGateAPI to the API object.

Subscriptions Finder

This class allow make get request to subscription provisioned resource into Opengate North API.

constructor

Constructor

Parámetros

Nombre Tipo Opcional Descripción
Reference InternalOpenGateAPI to the API object.

Ticket Finder

This class allow make get request to ticket provisioned resource into Opengate North API.

constructor

Constructor

Parámetros

Nombre Tipo Opcional Descripción
Reference InternalOpenGateAPI to the API object.

Generic Finder

This class allow make get request to user resource into Opengate North API.

constructor

Constructor

Parámetros

Nombre Tipo Opcional Descripción
ogapi InternalOpenGateAPI Reference to the API object.
source string Relative url where is located the resource.
reponseJsonData string Relative url where is located the resource. Can be null
error_not_found string String error which will be thrown on not_found error.
serviceBaseURL string base of the uri petition

Subsections of geocluster

Geocluster

This is a base object that contains all you can do about geocluster.

constructor

Constructor

Parámetros

Nombre Tipo Opcional Descripción
Reference InternalOpenGateAPI to the API object.

withIdentifier(identifier)

Set the identifier attribute

Parámetros

Nombre Tipo Opcional Descripción
identifier string required field

Retorna

Tip

Tipo: Geocluster


Geocluster Finder

This class allow make get request to user resource into Opengate North API.

constructor

Constructor

Parámetros

Nombre Tipo Opcional Descripción
Reference InternalOpenGateAPI to the API object.

findAll()

Find all available geocluster. This execute a GET http method

Retorna

Tip

Tipo: Promise


findById(id)

Find a specify geocluster by an identifier. This execute a GET http method

Parámetros

Nombre Tipo Opcional Descripción
id string Identifier of the geocluster.

Retorna

Tip

Tipo: Promise


findFeatures(id, coordinates)

Find features inside the coordinates. This execute a GET http method

Parámetros

Nombre Tipo Opcional Descripción
id string Identifier of the geocluster.
coordinates Object square defined by the coordinates and the zoom used to find the inside features .

Retorna

Tip

Tipo: Promise


Internal Open Gate API

This is a abstract class, it must be extended to another class that defined the backend, it will be used on request to Opengate North API by browser or nodejs server

constructor

Constructor

Parámetros

Nombre Tipo Opcional Descripción
_options { url: string,port: string,version: string,apiKey: string} this is configuration about Opengate North API.
ampliaREST AmpliaREST this is a backend selected to manage a request to Opengate North API.

administrativeStateSearchBuilder()

This return a AdministrativeStateSearchBuilder to build a specific AdministrativeStateSearchBuilder

Retorna

Tip

alarmsSearchBuilder()

This return a AlarmsSearchBuilder to build a specific AlarmsSearch

Retorna

Tip

allowedResourceTypeSearchBuilder()

This return a AllowedResourceTypeSearchBuilder to build a specific AllowedResourceTypeSearchBuilder

Retorna

Tip

areasBuilder()

This return a AreasBuilder to build a specific area

Retorna

Tip

Tipo: Areas


areasSearchBuilder()

This return a AreasSearchBuilder to build a specific AreasSearch

Retorna

Tip

assetsSearchBuilder()

This return a AssetsSearchBuilder to build a specific AssetSearch

Retorna

Tip

basicTypesSearchBuilder()

Retorna

Tip

Tipo: *


bulkExecutionBuilder(organization, processorId, timeout)

This return a util to create a bulk execution

Parámetros

Nombre Tipo Opcional Descripción
organization *
processorId *
timeout *

Retorna

Tip

bulkExecutionSearchBuilder()

This return a BulkExecutionSearchBuilder to build a specific bulk

Retorna

Tip

bulkSearchBuilder()

This return a BulkSearchBuilder to build a specific BulkSearchBuilder

Retorna

Tip

bundlesBuilder()

This return a BundlesBuilder to build a specific BundlesBuilder

Retorna

Tip

Tipo: Bundles


bundlesSearchBuilder()

This return a BundlesSearchBuilder to build a specific BundlesSearchBuilder

Retorna

Tip

certificatesBuilder()

This return a util to create a certificate

Retorna

Tip

Tipo: Certificates


certificatesSearchBuilder()

This return a CertificatesSearchBuilder to build a specific CertificatesSearchBuilder

Retorna

Tip

channelsBuilder()

This return a ChannelsBuilder to build a specific WorkgroupsSearch

Retorna

Tip

Tipo: Channels


channelsSearchBuilder()

This return a ChannelsSearchBuilder to build a specific ChannelsSearch

Retorna

Tip

commsModuleMessageMessageBuilder()

Retorna

Tip

communicationsModuleTypeSearchBuilder()

This return a CommunicationsModuleTypeSearchBuilder to build a specific CommunicationsModuleTypeSearch

Retorna

Tip

connectorFunctionsBuilder(organization, channel, identifier, connectorFunctionData)

This return a ConnectorFunctions

Parámetros

Nombre Tipo Opcional Descripción
organization *
channel *
identifier *
connectorFunctionData *

Retorna

Tip

connectorFunctionsCatalogBuilder(identifier, connectorFunctionsCatalog)

Parámetros

Nombre Tipo Opcional Descripción
identifier String only update or delete
connectorFunctionsCatalog Object

Retorna

Tip

countryCodesSearchBuilder()

This return a CountryCodesSearchBuilder to build a specific CountryCodesSearchBuilder

Retorna

Tip

datamodelsBuilder(organization)

This return a Datamodels to build a specific Datamodels

Parámetros

Nombre Tipo Opcional Descripción
organization *

Retorna

Tip

Tipo: Datamodels


datamodelsHelper(organization, datamodel)

This return a DatamodelsHelper to build a specific DatamodelsHelper

Parámetros

Nombre Tipo Opcional Descripción
organization *
datamodel *

Retorna

Tip

datamodelsSearchBuilder()

This return a DatamodelsSearchBuilder to build a specific DatamodelsSearchBuilder

Retorna

Tip

datapointsBuilder()

This return a datapointsBuilder to build a specific Datapoint

Retorna

Tip

Tipo: Datapoint


datapointsSearchBuilder()

This return a DatapointsSearchBuilder to build a specific DatapointsSearchBuilder

Retorna

Tip

datasetEntitiesSearchBuilder(organization, dataset)

This return a DatasetEntitiesSearchBuilder to build a specific DatasetEntitiesSearch

Parámetros

Nombre Tipo Opcional Descripción
organization *
dataset *

Retorna

Tip

datasetsBuilder()

This return a DatasetBuilder to build a specific dataset

Retorna

Tip

Tipo: Datasets


datasetsCatalogSearchBuilder()

This return a DatasetsCatalogSearchBuilder to build a specific DatasetsCatalogSearc

Retorna

Tip

datasetSearchBuilder(organization, dataset)

This return a DatasetSearchBuilder to build a specific DatasetSearch

Parámetros

Nombre Tipo Opcional Descripción
organization *
dataset *

Retorna

Tip

datastreamBuilder()

This return a datastreamBuilder to build a specific Datastream

Retorna

Tip

Tipo: Datastream


datastreamsBuilder()

This return a datastream to build a specific Datastream

Retorna

Tip

Tipo: DatastreamsBuilder


datastreamsSearchBuilder()

This return a DatastreamsSearchBuilder to build a specific DatastreamsSearchBuilder

Retorna

Tip

deviceMessageBuilder()

This return a DevicesSouth to build a specific DevicesSouth

Retorna

Tip

devicePlansBuilder(organization)

This return a DevicePlans to build a specific device plan

Parámetros

Nombre Tipo Opcional Descripción
organization *

Retorna

Tip

devicesSearchBuilder()

This return a DevicesSearchBuilder to build a specific DeviceSearch

Retorna

Tip

entitiesSearchBuilder()

This return a EntitiesSearchBuilder to build a specific EntitiesSearch

Retorna

Tip

executionsHistorySearchBuilder()

This return a ExecutionsHistorySearchBuilder to build a specific ExecutionsSearch

Retorna

Tip

executionsSearchBuilder()

This return a ExecutionsSearchBuilder to build a specific ExecutionsSearch

Retorna

Tip

feedsSearchBuilder()

This return a FeedsSearchBuilder to build a specific FeedsSearchBuilder

Retorna

Tip

fieldsDefinitionSearchBuilder()

This return a FieldsDefinitionSearchBuilder to build a specific FieldsDefinitionSearchBuilder

Retorna

Tip

geoclusterBuilder()

This return a util to regenerate geloclouster

Retorna

Tip

Tipo: Geocluster


hardwareMessageBuilder()

Retorna

Tip

Tipo: Hardware


ioTDatastreamAccessSearchBuilder()

This return a IoTDatastreamAccessSearchBuilder to build a specific IoTDatastreamAccessSearchBuilder

Retorna

Tip

ioTDatastreamPeriodSearchBuilder()

This return a IoTDatastreamPeriodSearchBuilder to build a specific IoTDatastreamPeriodSearchBuilder

Retorna

Tip

ioTDatastreamStoragePeriodSearchBuilder()

This return a IoTDatastreamStoragePeriodSearchBuilder to build a specific IoTDatastreamStoragePeriodSearchBuilder

Retorna

Tip

manufacturerModelsBuilder(manufacturerIdentifier)

This return a ManufacturerModelsBuilder to build a specific ManufacturerModelsBuilder

Parámetros

Nombre Tipo Opcional Descripción
manufacturerIdentifier *

Retorna

Tip

Tipo: ManufacturerModelsBuilder


manufacturersBuilder()

This return a ManufacturersBuilder to build a specific ManufacturersBuilder

Retorna

Tip

Tipo: ManufacturersBuilder


mobileMessageMessageBuilder()

Retorna

Tip

Tipo: Mobile


mobilePhoneProviderSearchBuilder()

This return a MobilePhoneProviderSearchBuilder to build a specific MobilePhoneProviderTypeSearch

Retorna

Tip

newAreaFinder()

This return a util to find a area

Retorna

Tip

Tipo: AreaFinder


newBulkExecutionFinder()

This return a util to find summary and download a bulk executions

Retorna

Tip

Tipo: BulkFinder


newBulkFinder()

This return a util to find and download a bulk

Retorna

Tip

Tipo: BulkFinder


newBundleFinder()

This return a util to find a bundle

Retorna

Tip

Tipo: BundleFinder


newCertificateFinder()

This return a util to find a certificate

Retorna

Tip

newChannelFinder()

This return a util to find a channel

Retorna

Tip

newConnectorFunctionsCatalog()

This return a ConnectorFunctionsCatalog

Retorna

Tip

newConnectorFunctionsCatalogFinder()

This return a ConnectorFunctionsCatalogFinder

Retorna

Tip

newConnectorFunctionsFinder()

This return a ConnectorFunctionsFinder

Retorna

Tip

newConnectorFunctionsHelper()

This return a ConnectorFunctionsHelper

Retorna

Tip

newCountriesCatalog()

This return a util to find countries catalog

Retorna

Tip

newDatamodelsFinder()

This return a util to find a datamodel

Retorna

Tip

newDatasetFinder()

This return a to find Dataset configuration

Retorna

Tip

Tipo: DatasetFinder


newDeviceFinder()

This return a util to find a device

Retorna

Tip

Tipo: DeviceFinder


newDevicePlansFinder()

This return a util to find device plans

Retorna

Tip

newDomainsFinder()

This return a util to find a domains hierarchy

Retorna

Tip

Tipo: DomainsFinder


newFilterBuilder()

This return a util to create your own filter to make searching

Retorna

Tip

newGeoclusterFinder()

This return a util to find a user

Retorna

Tip

newManufacturersFinder()

This return a util to find a hardware manufacturer

Retorna

Tip

newModelFinder()

This return a util to find a hardware model

Retorna

Tip

Tipo: ModelFinder


newNotebookFinder()

This return a util to find notebooks

Retorna

Tip

newNotebookSchedulerFinder()

This return a util to find notebooks schedulers

Retorna

Tip

Tipo: NotebookSchedulerFinder


newOperationActions(operationId)

This return a util to operation actions on an operation

Parámetros

Nombre Tipo Opcional Descripción
operationId string identifier of operation

Retorna

Tip

newOperationFinder()

This return a util to find a operation

Retorna

Tip

newOperationTypeCatalog()

This return a util to find Operation Types Templates

Retorna

Tip

Tipo: OperationTypeCatalog


newOperationTypeFinder()

This return a util to find Operation Types

Retorna

Tip

newOrganizationFinder()

This return a util to find a organization

Retorna

Tip

newOrganizationManufacturersFinder()

This return a util to find a hardware manufacturer

Retorna

Tip

Tipo: OrganizationManufacturerFinder


newOrganizationModelFinder()

This return a util to find a hardware model

Retorna

Tip

Tipo: OrganizationModelFinder


newOrganizationPlansFinder()

This return a util to find organization plans

Retorna

Tip

newPeriodicityActions(taskId)

This return a util to manage actions over periodicities

Parámetros

Nombre Tipo Opcional Descripción
taskId string identifier of operation

Retorna

Tip

newProvisionProcessorsFinder()

This return a util to find a provision procesor

Retorna

Tip

Tipo: ProvisionProcessorsFinder


newRuleConfigurationsCatalog()

This return a util to find Rule Configurations Templates

Retorna

Tip

newRuleConfigurationsFinder()

This return a util to find Rule Configurations

Retorna

Tip

newRuleConfigurationsHelper()

This return a util RuleConfigurationsHelper

Retorna

Tip

Tipo: *
{RuleConfigurationsHelper


newScheduleHistoryFinder()

This return a util to view schedule history

Retorna

Tip

newScheduleImageExecutionFinder()

This return a util to view schedule image executions

Retorna

Tip

newSchedulePipelineFinder()

This return a util to view schedule pipelines

Retorna

Tip

newScheduleRestRequestFinder()

This return a util to view schedule rest requests

Retorna

Tip

newSelectBuilder()

This return a util to create your own select to make searching

Retorna

Tip

newSoftwareFinder()

This return a util to find an organization software

Retorna

Tip

newSubscribersFinder()

This return a util to find a Subscriber

Retorna

Tip

newSubscriptionsFinder()

This return a util to find a Subscription

Retorna

Tip

newTicketFinder()

This return a util to find a ticket

Retorna

Tip

Tipo: TicketFinder


newTimeserieFinder()

This return a to find Timeserie configuration

Retorna

Tip

Tipo: TimeserieFinder


newTimeseriesFunctionFinder()

This return a util to find a timeseries function

Retorna

Tip

Tipo: TimeseriesFunctionsFinder


newTimeseriesFunctionsHelper()

This return a TimeseriesFunctionsHelper

Retorna

Tip

newUserFinder()

This return a util to find a user

Retorna

Tip

Tipo: UserFinder


newWorkgroupFinder()

This return a util to find a workgroup

Retorna

Tip

newWorkgroupRelationsFinder()

This return a WorkgroupRelationsFinder

Retorna

Tip

notebookLauncherBuilder()

This return a NotebookLauncherBuilder to build a specific NotebookLauncherBuilder

Retorna

Tip

Tipo: NotebookLauncherBuilder


notebookSchedulerBuilder()

This return a NotebookSchedulerBuilder to build a specific NotebookSchedulerBuilder

Retorna

Tip

Tipo: NotebookSchedulerBuilder


operationalStatusSearchBuilder()

This return a OperationalStatusSearchBuilder to build a specific OperationalStatusSearchBuilder

Retorna

Tip

operationsSearchBuilder()

This return a OperationsSearchBuilder to build a specific ExecutionssSearch

Retorna

Tip

operationTypeBuilder(organization, name, operationTypeObj)

This return a util to update an Operation Type

Parámetros

Nombre Tipo Opcional Descripción
organization *
name *
operationTypeObj *

Retorna

Tip

operationTypesSearchBuilder()

This return a OperationTypesSearchBuilder to build a specific OperationTypesSearch

Retorna

Tip

Tipo: OperationTypesSearchBuilder


organizationManufacturerModelsBuilder(organization, manufacturerIdentifier)

This return a OrganizationManufacturerModelsBuilder to build a specific OrganizationManufacturerModelsBuilder

Parámetros

Nombre Tipo Opcional Descripción
organization *
manufacturerIdentifier *

Retorna

Tip

Tipo: OrganizationManufacturerModelsBuilder


organizationManufacturersBuilder(organization)

This return a OrganizationManufacturersBuilder to build a specific OrganizationManufacturersBuilder

Parámetros

Nombre Tipo Opcional Descripción
organization *

Retorna

Tip

Tipo: OrganizationManufacturersBuilder


organizationPlansBuilder(organization)

This return a OrganizationPlans to build a specific organization plan

Parámetros

Nombre Tipo Opcional Descripción
organization *

Retorna

Tip

organizationsBuilder()

This return a OrganizationsBuilder to build a specific OrganizationsBuilder

Retorna

Tip

organizationsSearchBuilder()

This return a util to search organizations

Retorna

Tip

powerSupplyMessageBuilder()

Retorna

Tip

Tipo: PowerSupply


provisionProcessorsBuilder()

This return a ProvisionsProcesorsBuilder to build a specific ProvisionsProcesorsBuilder

Retorna

Tip

Tipo: provisionProcessorsBuilder


qratingsBuilder()

This return a Qrating to build a specific Qrating

Retorna

Tip

Tipo: QratingsBuilder


rawSearchBuilder()

Create custom search with custom url and raw filter

Retorna

Tip

resourceTypeSearchBuilder()

This return a ResourceTypeSearchBuilder to build a specific ResourceTypeSearchBuilder

Retorna

Tip

ruleConfigurationBuilder(organization, channel, name, ruleConfigObj)

This return a util to update a Rule Configuration

Parámetros

Nombre Tipo Opcional Descripción
organization *
channel *
name *
ruleConfigObj *

Retorna

Tip

rulesSearchBuilder()

This return a RulesSearchBuilder to build a specific RulesSearch

Retorna

Tip

scheduleImageExecutionBuilder()

This return a util to build schedule image executions

Retorna

Tip

schedulePipelineBuilder()

This return a util to build a pipeline

Retorna

Tip

Tipo: SchedulePipeline


scheduleRestRequestBuilder()

This return a util to build schedule rest requests

Retorna

Tip

Tipo: RestRequest


serviceGroupSearchBuilder()

This return a ServiceGroupSearchBuilder to build a specific ServiceGroupSearchBuilder

Retorna

Tip

softwareMessageBuilder()

Retorna

Tip

Tipo: Software


softwaresBuilder(organization)

This return a SoftwaresBuilder to build a specific SoftwaresBuilder

Parámetros

Nombre Tipo Opcional Descripción
organization *

Retorna

Tip

Tipo: SoftwaresBuilder


softwaresSearchBuilder()

This return a SoftwaresSearchBuilder to build a specific SoftwaresSearchBuilder

Retorna

Tip

storageMessageBuilder()

Retorna

Tip

Tipo: Storage


subscriberMessageBuilder()

Retorna

Tip

Tipo: SubscriberMessage


subscribersSearchBuilder()

This return a SubscribersSearchBuilder to build a specific DeviceSearch

Retorna

Tip

subscriptionMessageBuilder()

Retorna

Tip

Tipo: SubscriptionMessage


subscriptionsSearchBuilder()

This return a SubscriptionsSearchBuilder to build a specific DeviceSearch

Retorna

Tip

tasksSearchBuilder()

This return a TasksSearchBuilder to build a specific TasksSearch

Retorna

Tip

ticketPrioritySearchBuilder()

This return a TicketPrioritySearchBuilder to build a specific TicketPrioritySearchBuilder

Retorna

Tip

ticketSeveritySearchBuilder()

This return a TicketSeveritySearchBuilder to build a specific TicketSeveritySearchBuilder

Retorna

Tip

ticketsSearchBuilder()

This return a TicketsSearchBuilder to build a specific TicketSearch

Retorna

Tip

Tipo: *


ticketStatusSearchBuilder()

This return a TicketStatusSearchBuilder to build a specific TicketStatusSearchBuilder

Retorna

Tip

timeserieDatasetBuilder(organization, timeserie)

This return a TimeserieDatasetBuilder to build a specific TimeserieDataset

Parámetros

Nombre Tipo Opcional Descripción
organization *
timeserie *

Retorna

Tip

timeserieDownsamplerBuilder(organization, timeserie, entityId)

This return a TimeserieDownsamplerBuilder to build a specific TimeserieDownsampler

Parámetros

Nombre Tipo Opcional Descripción
organization *
timeserie *
entityId *

Retorna

Tip

timeseriesBuilder()

This return a TimeserieBuilder to build a specific timeserie

Retorna

Tip

Tipo: Timeseries


timeserieSearchBuilder(organization, timeserie)

This return a TimeserieSearchBuilder to build a specific TimeserieSearch

Parámetros

Nombre Tipo Opcional Descripción
organization *
timeserie *

Retorna

Tip

timeseriesFunctionBuilder(organization, identifier)

This return a TimeserieBuilder to build a specific timeserie

Parámetros

Nombre Tipo Opcional Descripción
organization *
identifier *

Retorna

Tip

timezoneSearchBuilder()

This return a TimezoneSearchBuilder to build a specific TimezoneSearchBuilder

Retorna

Tip

usageMessageBuilder()

Retorna

Tip

Tipo: Usage


userLanguagesSearchBuilder()

This return a UserLanguagesSearchBuilder to build a specific UserLanguagesSearchBuilder

Retorna

Tip

userProfilesSearchBuilder()

This return a UserProfilesSearchBuilder to build a specific UserProfilesSearchBuilder

Retorna

Tip

usersBuilder()

This return a util to create a user

Retorna

Tip

Tipo: User


usersSearchBuilder()

This return a UsersSearchBuilder to build a specific UsersSearch

Retorna

Tip

workgroupRelationsBuilder()

This return a WorkgroupRelationsBuilder to build a specific workgroup relation

Retorna

Tip

workgroupsBuilder()

This return a WorkgroupsBuilder to build a specific workgroup

Retorna

Tip

Tipo: Workgroups


workgroupsSearchBuilder()

This return a WorkgroupsSearchBuilder to build a specific WorkgroupsSearch

Retorna

Tip

Subsections of iot

Subsections of catalog

Category

Defines the builder to configure a category of a datamodel. With this builder you can configure a category

constructor

Parámetros

Nombre Tipo Opcional Descripción
Reference InternalOpenGateAPI to the API object.
identifier identifier of category
datastreams Array of category

addDatastream(datastream)

Add a datastream to the category

Parámetros

Nombre Tipo Opcional Descripción
datastream Object json object

Retorna

Tip

Tipo: Category


addDatastreams(datastreams)

Add a datastreams to the category

Parámetros

Nombre Tipo Opcional Descripción
datastreams Object of datastream json object

Retorna

Tip

Tipo: Category


Datastream

Defines the builder to configure a datastream of IoT datamodel. With this builder you can configure a datastream

addQrating(qrating)

Set the qrating attribute. Use {Qrating} utility for create this object

Parámetros

Nombre Tipo Opcional Descripción
qrating Object

Retorna

Tip

Tipo: Datastream


build()

Build a Datastream json object

Retorna

Tip

Tipo: Object
Datastream json object

Ejemplos

ogapi.DatastreamsBuilder().build()

withAccess(access)

Set the access object. Possible values: [READ, WRITE], [READ], [WRITE], []

Parámetros

Nombre Tipo Opcional Descripción
access Array

Retorna

Tip

Tipo: Datastream


withDescription(description)

Set the description attribute

Parámetros

Nombre Tipo Opcional Descripción
description string

Retorna

Tip

Tipo: Datastream


withId(id)

Set the id attribute

Parámetros

Nombre Tipo Opcional Descripción
id string required field

Retorna

Tip

Tipo: Datastream


withName(name)

Set the name attribute

Parámetros

Nombre Tipo Opcional Descripción
name string required field

Retorna

Tip

Tipo: Datastream


withPeriod(period)

Set the period attribute. Possible values: PULSE, CUMULATIVE, INSTANT

Parámetros

Nombre Tipo Opcional Descripción
period string required field

Retorna

Tip

Tipo: Datastream


withSchema(schema)

Set the schema object attribute.

Parámetros

Nombre Tipo Opcional Descripción
schema Object

Retorna

Tip

Tipo: Datastream


withStorage(period, total)

Set the storage object.

Parámetros

Nombre Tipo Opcional Descripción
period string
total number

Retorna

Tip

Tipo: Datastream


withTags(tags)

Set the tags attribute.

Parámetros

Nombre Tipo Opcional Descripción
tags Array

Retorna

Tip

Tipo: Datastream


withUnit(type, label, symbol)

Set the unit object attribute

Parámetros

Nombre Tipo Opcional Descripción
type string required field
label string required field
symbol string required field

Retorna

Tip

Tipo: Datastream


Qrating

Defines the builder to configure a qurating of datastream of IoT datamodel. With this builder you can configure a qrating

build()

Build a Qrating json object

Retorna

Tip

Tipo: Object
Datastream json object

Ejemplos

ogapi.QratingsBuilder().build()

withConversionMatrix(conversionMatrix)

Set the conversionMatrix attribute

Parámetros

Nombre Tipo Opcional Descripción
conversionMatrix Object

Retorna

Tip

Tipo: Qrating


withCumulativePeriodDivisor(cumulativePeriodDivisor)

Set the cumulativePeriodDivisor attribute

Parámetros

Nombre Tipo Opcional Descripción
cumulativePeriodDivisor string

Retorna

Tip

Tipo: Qrating


withIdeal(label, value)

Set the ideal attribute

Parámetros

Nombre Tipo Opcional Descripción
label string required field
value number required field

Retorna

Tip

Tipo: Qrating


withMaxAllowed(label, value)

Set the maxAllowed attribute

Parámetros

Nombre Tipo Opcional Descripción
label string required field
value number required field

Retorna

Tip

Tipo: Qrating


withMaxDesired(label, value)

Set the maxDesired attribute

Parámetros

Nombre Tipo Opcional Descripción
label string required field
value number required field

Retorna

Tip

Tipo: Qrating


withMaxScore(maxScore)

Set the maxScore attribute

Parámetros

Nombre Tipo Opcional Descripción
maxScore number required field

Retorna

Tip

Tipo: Qrating


withMinDesired(label, value)

Set the minDesired attribute

Parámetros

Nombre Tipo Opcional Descripción
label string required field
value number required field

Retorna

Tip

Tipo: Qrating


withMinRequired(label, value)

Set the minRequired attribute

Parámetros

Nombre Tipo Opcional Descripción
label string required field
value number required field

Retorna

Tip

Tipo: Qrating


withVersion(version)

Set the version attribute

Parámetros

Nombre Tipo Opcional Descripción
version string required field

Retorna

Tip

Tipo: Qrating


Subsections of datamodels

Datamodels

This is a base object for create a IoT Datamodel

constructor

Constructor

Parámetros

Nombre Tipo Opcional Descripción
ogapi InternalOpenGateAPI this is ogapi instance
organization string Organization where the IoT datamodel will be created

addAllowedResourceType(resourceType)

Set the addAllowedResourceType attribute

Parámetros

Nombre Tipo Opcional Descripción
resourceType string required field

Retorna

Tip

Tipo: Datamodels


addCategory(category, datastreams)

Add a flavor. If the field datastreams have value, they will add to this flavor

Parámetros

Nombre Tipo Opcional Descripción
category Object
datastreams Array

Retorna

Tip

Tipo: Datamodels


addDatastream(category, datastream)

Add a datastream to the indicated category

Parámetros

Nombre Tipo Opcional Descripción
category string
datastream object

Retorna

Tip

Tipo: Datamodels


delete()

Delete not supported on this builder. Use IoTDatamodelHelper instead.


update()

Update not supported on this builder. Use IoTDatamodelHelper instead.


withDescription(description)

Set the description attribute

Parámetros

Nombre Tipo Opcional Descripción
description string

Retorna

Tip

Tipo: Datamodels


withIdentifier(identifier)

Set the identifier attribute

Parámetros

Nombre Tipo Opcional Descripción
identifier string required field

Retorna

Tip

Tipo: Datamodels


withName(name)

Set the name attribute

Parámetros

Nombre Tipo Opcional Descripción
name string required field

Retorna

Tip

Tipo: Datamodels


withVersion(version)

Set the version attribute

Parámetros

Nombre Tipo Opcional Descripción
version string required field

Retorna

Tip

Tipo: Datamodels


Datamodels Finder

This class allow make get request to organization resource into Opengate North API.

constructor

Constructor

Parámetros

Nombre Tipo Opcional Descripción
Reference InternalOpenGateAPI to the API object.

findByOrganizationAndId(organization, id)

Download a specific IoT Datamodel by its organization and id. This execute a GET http method

Parámetros

Nombre Tipo Opcional Descripción
organization string datamodel organization .
id string datamodel id.

Retorna

Tip

Tipo: Promise


Datamodels Helper

This is a base object for update and delete a IoT Datamodel

constructor

Constructor

Parámetros

Nombre Tipo Opcional Descripción
ogapi InternalOpenGateAPI this is ogapi instance
organization string Organization where the IoT datamodel was create
datamodel object Json object of IoT datamodel to modify or delete.

addCategory(category, datastreams)

Add a category. If the field datastreams have value, they will add to this category

Parámetros

Nombre Tipo Opcional Descripción
category Object
datastreams Array

Retorna

Tip

Tipo: DatamodelsHelper


addDatastream(category, datastream)

Add a datastream to the indicated category

Parámetros

Nombre Tipo Opcional Descripción
category string
datastream object

Retorna

Tip

Tipo: DatamodelsHelper


create()

Create not supported on this builder. Use IoTDatamodelHelper instead.


removeCategory(category)

Remove category

Parámetros

Nombre Tipo Opcional Descripción
category string

Retorna

Tip

Tipo: DatamodelsHelper


removeDatastream(category, id_datastream)

Remove datastream to the indicated category

Parámetros

Nombre Tipo Opcional Descripción
category string
id_datastream string of datastream

Retorna

Tip

Tipo: DatamodelsHelper


updateCategory(old_category, new_category)

Update category name

Parámetros

Nombre Tipo Opcional Descripción
old_category string name
new_category string name

Retorna

Tip

Tipo: DatamodelsHelper


updateDatastream(category, id_datastream, datastream)

Update datastream to the indicated category

Parámetros

Nombre Tipo Opcional Descripción
category string
id_datastream string of datastream
datastream Object json object

Retorna

Tip

Tipo: DatamodelsHelper


withDescription(description)

Set the description attribute

Parámetros

Nombre Tipo Opcional Descripción
description string

Retorna

Tip

Tipo: DatamodelsHelper


withIdentifier(identifier)

Set the identifier attribute

Parámetros

Nombre Tipo Opcional Descripción
identifier string required field

Retorna

Tip

Tipo: Datamodels


withName(name)

Set the name attribute

Parámetros

Nombre Tipo Opcional Descripción
name string required field

Retorna

Tip

Tipo: DatamodelsHelper


withVersion(version)

Set the version attribute

Parámetros

Nombre Tipo Opcional Descripción
version string required field

Retorna

Tip

Tipo: DatamodelsHelper


Subsections of manufacturers

Manufacturer Finder

This class allow make get request to hardware manufacturers resource into Opengate North API.

constructor

Constructor

Parámetros

Nombre Tipo Opcional Descripción
Reference InternalOpenGateAPI to the API object.

findAll()

Download a specific manufacturer by its id. This execute a GET http method

Retorna

Tip

Tipo: Promise


findById(identifier)

Download a specific manufacturer by its id. This execute a GET http method

Parámetros

Nombre Tipo Opcional Descripción
identifier string manufacturer identifier .

Retorna

Tip

Tipo: Promise


findMediaById(manufacturerId, mediaIdentifier)

Download a specific manufacturer media by its ids. This execute a GET http method

Parámetros

Nombre Tipo Opcional Descripción
manufacturerId string manufacturer identifier .
mediaIdentifier string media identifier.

Retorna

Tip

Tipo: Promise


findMedias(manufacturerId)

Download manufacturer medias. This execute a GET http method

Parámetros

Nombre Tipo Opcional Descripción
manufacturerId string manufacturer identifier .

Retorna

Tip

Tipo: Promise


Manufacturer Media

This is a base object that contains all you can do about ManufacturerMedia.

constructor

Constructor

Parámetros

Nombre Tipo Opcional Descripción
Reference InternalOpenGateAPI to the API object.

create(rawFile)

This invoke a request to OpenGate North API and the callback is managed by promises This method create an element deploymentElement

Parámetros

Nombre Tipo Opcional Descripción
rawFile File this File is the deployment element

Retorna

Tip

Tipo: Promise


withFile(file)

Set the file attribute

Parámetros

Nombre Tipo Opcional Descripción
file string required field

Retorna

Tip

Tipo: ManufacturerMedia


withIdentifier(id)

Set the identifier attribute

Parámetros

Nombre Tipo Opcional Descripción
id string required field

Retorna

Tip

Tipo: ManufacturerMedia


withName(name)

Set the name attribute

Parámetros

Nombre Tipo Opcional Descripción
name string required field

Retorna

Tip

Tipo: ManufacturerMedia


Manufacturers

This is a base object that contains all you can do about Manufacturers.

constructor

Constructor

Parámetros

Nombre Tipo Opcional Descripción
Reference InternalOpenGateAPI to the API object.

withAddress(address)

Set the address attribute

Parámetros

Nombre Tipo Opcional Descripción
address string

Retorna

Tip

Tipo: Manufacturers


withDescription(description)

Set the description attribute

Parámetros

Nombre Tipo Opcional Descripción
description string required field

Retorna

Tip

Tipo: Manufacturers


withEmail(email)

Set the email attribute

Parámetros

Nombre Tipo Opcional Descripción
email string

Retorna

Tip

Tipo: Manufacturers


withFax(fax)

Set the fax attribute

Parámetros

Nombre Tipo Opcional Descripción
fax string

Retorna

Tip

Tipo: Manufacturers


withIdentifier(id)

Set the identifier attribute

Parámetros

Nombre Tipo Opcional Descripción
id string required field

Retorna

Tip

Tipo: Manufacturers


withName(name)

Set the name attribute

Parámetros

Nombre Tipo Opcional Descripción
name string required field

Retorna

Tip

Tipo: Manufacturers


withNotes(notes)

Set the notes attribute

Parámetros

Nombre Tipo Opcional Descripción
notes string

Retorna

Tip

Tipo: Manufacturers


withTelephone(telephone)

Set the telephone attribute

Parámetros

Nombre Tipo Opcional Descripción
telephone string

Retorna

Tip

Tipo: Manufacturers


withUrl(url)

Set the url attribute

Parámetros

Nombre Tipo Opcional Descripción
url string

Retorna

Tip

Tipo: Manufacturers


Model Finder

This class allow make get request to hardware models resource into Opengate North API.

constructor

Constructor

Parámetros

Nombre Tipo Opcional Descripción
Reference InternalOpenGateAPI to the API object.

findByManufacturer(manufacturer)

Download all models from a manufacturer. This execute a GET http method

Parámetros

Nombre Tipo Opcional Descripción
manufacturer string manufacturer id .

Retorna

Tip

Tipo: Promise


findByManufacturerAndId(manufacturer, identifier)

Download a specific model by its id. This execute a GET http method

Parámetros

Nombre Tipo Opcional Descripción
manufacturer string manufacturer id .
identifier string model name .

Retorna

Tip

Tipo: Promise


findMediaByManufacturerAndModelAndId(manufacturer, modelId, mediaIdentifier)

Download a specific model media by its ids. This execute a GET http method

Parámetros

Nombre Tipo Opcional Descripción
manufacturer string manufacturer id .
modelId string model identifier .
mediaIdentifier string media identifier.

Retorna

Tip

Tipo: Promise


findMediasByManufacturerAndModel(manufacturer, identifier)

Download a specific model media by its ids. This execute a GET http method

Parámetros

Nombre Tipo Opcional Descripción
manufacturer string manufacturer id .
identifier string model identifier .

Retorna

Tip

Tipo: Promise


Model Media

This is a base object that contains all you can do about ModelMedia.

constructor

Constructor

Parámetros

Nombre Tipo Opcional Descripción
Reference InternalOpenGateAPI to the API object.

create(rawFile)

This invoke a request to OpenGate North API and the callback is managed by promises This method create an element deploymentElement

Parámetros

Nombre Tipo Opcional Descripción
rawFile File this File is the deployment element

Retorna

Tip

Tipo: Promise


withFile(file)

Set the file attribute

Parámetros

Nombre Tipo Opcional Descripción
file string required field

Retorna

Tip

Tipo: ModelMedia


withFileName(fileName)

Set the file name attribute

Parámetros

Nombre Tipo Opcional Descripción
fileName string required field

Retorna

Tip

Tipo: ModelMedia


withIdentifier(id)

Set the identifier attribute

Parámetros

Nombre Tipo Opcional Descripción
id string required field

Retorna

Tip

Tipo: ModelMedia


withName(name)

Set the name attribute

Parámetros

Nombre Tipo Opcional Descripción
name string required field

Retorna

Tip

Tipo: ModelMedia


Models

This is a base object that contains all you can do about Models.

constructor

Constructor

Parámetros

Nombre Tipo Opcional Descripción
Reference InternalOpenGateAPI to the API object.

withDescription(description)

Set the description attribute

Parámetros

Nombre Tipo Opcional Descripción
description string required field

Retorna

Tip

Tipo: Models


withIdentifier(id)

Set the identifier attribute

Parámetros

Nombre Tipo Opcional Descripción
id string required field

Retorna

Tip

Tipo: Models


withName(name)

Set the name attribute

Parámetros

Nombre Tipo Opcional Descripción
name string required field

Retorna

Tip

Tipo: Models


withNotes(notes)

Set the notes attribute

Parámetros

Nombre Tipo Opcional Descripción
notes string

Retorna

Tip

Tipo: Models


withUrl(url)

Set the url attribute

Parámetros

Nombre Tipo Opcional Descripción
url string

Retorna

Tip

Tipo: Models


withVersion(version)

Set the version attribute

Parámetros

Nombre Tipo Opcional Descripción
version string

Retorna

Tip

Tipo: Models


Subsections of notebookScheduler

Notebook Finder

This class allow make get request to planner resource into Opengate North API.

constructor

Constructor

Parámetros

Nombre Tipo Opcional Descripción
ogapi InternalOpenGateAPI Reference to the API object.

findAll()

Download a complete list of notebooks for the user. This execute a GET http method

Retorna

Tip

Tipo: Promise


Notebook Launcher

This is a base object that contains all you can do about Bundles.

constructor

Constructor

Parámetros

Nombre Tipo Opcional Descripción
Reference InternalOpenGateAPI to the API object.

generateReport(generateReport)

Sets the generateReport attribute

Parámetros

Nombre Tipo Opcional Descripción
generateReport boolean

Retorna

Tip

Tipo: NotebookLauncher


withIdentifier(identifier)

Sets the identifier attribute

Parámetros

Nombre Tipo Opcional Descripción
identifier string

Retorna

Tip

Tipo: NotebookLauncher


withReportRetentionDays(reportRetentionDays)

Sets the reportRetentionDays attribute

Parámetros

Nombre Tipo Opcional Descripción
reportRetentionDays number

Retorna

Tip

Tipo: NotebookLauncher


Notebook Scheduler

This is a base object that contains all you can do about Bundles.

constructor

Constructor

Parámetros

Nombre Tipo Opcional Descripción
Reference InternalOpenGateAPI to the API object.

generateReport(generateReport)

Sets the generateReport attribute

Parámetros

Nombre Tipo Opcional Descripción
generateReport boolean

Retorna

Tip

Tipo: NotebookScheduler


withCronPattern(cronPattern)

Sets the crontab pattern

Parámetros

Nombre Tipo Opcional Descripción
cronPattern string

Retorna

Tip

Tipo: NotebookScheduler


withIdentifier(identifier)

Sets the identifier attribute

Parámetros

Nombre Tipo Opcional Descripción
identifier string

Retorna

Tip

Tipo: NotebookScheduler


withNotebookId(notebookId)

Sets the notebookId attribute

Parámetros

Nombre Tipo Opcional Descripción
notebookId string

Retorna

Tip

Tipo: NotebookScheduler


withReportRetentionDays(reportRetentionDays)

Sets the reportRetentionDays attribute

Parámetros

Nombre Tipo Opcional Descripción
reportRetentionDays number

Retorna

Tip

Tipo: NotebookScheduler


Scheduler Finder

This class allow make get request to planner resource into Opengate North API.

constructor

Constructor

Parámetros

Nombre Tipo Opcional Descripción
ogapi InternalOpenGateAPI Reference to the API object.

findAll()

Download a complete list of notebook schedulers for the user. This execute a GET http method

Retorna

Tip

Tipo: Promise


Subsections of operations

Subsections of catalog

Append Entities By

Util used into BaseOperationBuilder to append entities the three different ways. By filter, By tags, By entityList

constructor

Parámetros

Nombre Tipo Opcional Descripción
ogapi InternalOpenGateAPI this is configuration about Opengate North API.
parent BaseOperationBuilder this is a instance of BaseOperationBuilder

filter(filter, resourceType)

Append filter to operation target

Parámetros

Nombre Tipo Opcional Descripción
filter FilterBuilder
resourceType string

Retorna

Tip

Tipo: BaseOperationBuilder


list(entities)

Append entity list to operation target

Parámetros

Nombre Tipo Opcional Descripción
entities EntityListBuilder

Retorna

Tip

Tipo: BaseOperationBuilder


tag(tag)

Set tag to operation target

Parámetros

Nombre Tipo Opcional Descripción
tag string

Retorna

Tip

Tipo: BaseOperationBuilder


Base Operation Builder

Defines the builder to execute an operation that is into catalog

constructor

Constructor

Parámetros

Nombre Tipo Opcional Descripción
ogapi InternalOpenGateAPI this is configuration about Opengate North API.
config object this is configuration about operation.

appendEntitiesBy

Util used into BaseOperationBuilder to append entities the three different ways. By filter, By tags, By entityList


build()

Build a instance of Operation

Retorna

Tip

Tipo: Operation

Ejemplos

 ogapi.operations.builderFactory.newXXXBuilder().build()

executeAtDate(date, active)

The operation will be created with delayed start or if you not pass any argument then the method return a cron expression builder.

Parámetros

Nombre Tipo Opcional Descripción
date Date
active boolean If active is false, an operation is created in paused

Retorna

Tip

Tipo: BaseOperationBuilder,CronExpressionBuilder


executeEach(date, name, end, active, description)

The operation will execute with a period that you must define with ExecuteEachBuilder

Parámetros

Nombre Tipo Opcional Descripción
date Date Date when operation will be executed
name string Name associated to periodicity
end number or Date When periodicity ends. By repetitions or by date
active boolean If active is false, an operation is created in paused
description string Description associated to periodicity

Retorna

Tip

Tipo: ExecuteEachBuilder


executeEvery(date, name, end, active, description)

The operation will execute with a period that you must define with ExecuteEveryBuilder

Parámetros

Nombre Tipo Opcional Descripción
date Date Date when operation will be executed
name string Name associated to periodicity
end number or Date When periodicity ends. By repetitions or by date
active boolean If active is false, an operation is created in paused
description string Description associated to periodicity

Retorna

Tip

Tipo: ExecuteEveryBuilder


executeIDLE()

The operation will be created in IDLE state

Retorna

Tip

Tipo: BaseOperationBuilder


executeImmediately()

The operation will be execute immediately.

Retorna

Tip

Tipo: BaseOperationBuilder


executeLater(minutes, active)

The operation will be created with delayed start or if you not pass any argument then the method return a cron expression builder.

Parámetros

Nombre Tipo Opcional Descripción
minutes number
active boolean If active is false, an operation is created in paused

Retorna

Tip

Tipo: BaseOperationBuilder,CronExpressionBuilder


withAckTimeout(milliseconds, format)

Set ackTimeout to operation.

Parámetros

Nombre Tipo Opcional Descripción
milliseconds number
format string Can be 'milliseconds'

Retorna

Tip

Tipo: BaseOperationBuilder

Ejemplos

 ogapi.operations.builderFactory.newXXXBuilder().withAckTimeout(11)

withCallback(url)

Set a callback to operation. If it is set also will be set notify with true value

Parámetros

Nombre Tipo Opcional Descripción
url string If null then parameter will be removed into builder

Retorna

Tip

Tipo: BaseOperationBuilder

Ejemplos

 ogapi.operations.builderFactory.newXXXBuilder().withCallback("http://my.web")

withJobTimeout(milliseconds, format)

Set a timeout of job.

Parámetros

Nombre Tipo Opcional Descripción
milliseconds number if null then parameter will be removed into builder
format string Can be 'milliseconds'

Retorna

Tip

Tipo: BaseOperationBuilder

Ejemplos

 ogapi.operations.builderFactory.newXXXBuilder().withJobTimeout(180)

withNotes(notes)

Set notes to operation

Parámetros

Nombre Tipo Opcional Descripción
notes string If null then parameter will be removed into builder

Retorna

Tip

Tipo: BaseOperationBuilder

Ejemplos

 ogapi.operations.builderFactory.newXXXBuilder().withNotes("own notes")

withOperationRetries(operationRetries)

Set operation retries

Parámetros

Nombre Tipo Opcional Descripción
operationRetries Array

Retorna

Tip

Tipo: BaseOperationBuilder

Ejemplos

 ogapi.operations.builderFactory.newXXXBuilder().withOperationRetries(11)

withParameters(parameters)

Set parameters of the operation

Parámetros

Nombre Tipo Opcional Descripción
parameters object

Retorna

Tip

Tipo: BaseOperationBuilder

Ejemplos

 ogapi.operations.builderFactory.newXXXBuilder().withParameters({ param1: 'value1', param2: 'value2'})

withRetries(retriesNumber)

Set number of retries that operation will have.

Parámetros

Nombre Tipo Opcional Descripción
retriesNumber number

Retorna

Tip

Tipo: BaseOperationBuilder

Ejemplos

 ogapi.operations.builderFactory.newXXXBuilder().withRetries(2)

withRetriesDelay(milliseconds, format)

Set delay between operation retries.

Parámetros

Nombre Tipo Opcional Descripción
milliseconds number
format string Can be 'milliseconds'

Retorna

Tip

Tipo: BaseOperationBuilder

Ejemplos

 ogapi.operations.builderFactory.newXXXBuilder().withRetriesDelay(11)

withScatteringMaxSpread(percentage)

Set a scattering max spread to operation.

Parámetros

Nombre Tipo Opcional Descripción
percentage number if null then parameter will be removed into builder

Retorna

Tip

Tipo: BaseOperationBuilder

Ejemplos

 ogapi.operations.builderFactory.newXXXBuilder().withScatteringMaxSpread(20)

withScatteringStrategy(factor, warningMaxRate)

Set a scattering strategy to operation.

Parámetros

Nombre Tipo Opcional Descripción
factor number if null then parameter will be removed into builder
warningMaxRate number

Retorna

Tip

Tipo: BaseOperationBuilder

Ejemplos

 ogapi.operations.builderFactory.newXXXBuilder().withScatteringStrategy(20,4)

withTimeout(milliseconds, format)

Set timeout to operation.

Parámetros

Nombre Tipo Opcional Descripción
milliseconds number
format string Can be 'milliseconds'

Retorna

Tip

Tipo: BaseOperationBuilder

Ejemplos

 ogapi.operations.builderFactory.newXXXBuilder().withTimeout(11)

Operation

This is a abstract class, it must be extended to another class that defined the specific search. This class is responsible to manage execute operations request to OpenGate North API

constructor

Constructor

Parámetros

Nombre Tipo Opcional Descripción
ogapi InternalOpenGateAPI this is ogapi instance
resource string this is a base url resource
postObj object it will be sent as a data on post action

execute()

This invoke a request to OpenGate North API and the callback is managed by promises

Retorna

Tip

Tipo: Promise


updatePeriodicity()

This invoke a request to OpenGate North API and the callback is managed by promises

Retorna

Tip

Tipo: Promise


Subsections of parameters

Base Parameter Builder With Parent

This class generate a builder by a dynamic content about specific parameter to an operation.

constructor

Parámetros

Nombre Tipo Opcional Descripción
ogapi InternalOpenGateAPI this is configuration about Opengate North API.
config object this is configuration about parameter operation.
parent BaseOperationBuilder this is a instance of BaseOperationBuilder

build()

This has all knowledge to make a object.

Retorna

Tip

Tipo: object


buildAndAppend()

This method will invoke build and then it will append the parameter to operationBuilder with the correct way

Retorna

Tip

Tipo: BaseOperationBuilder


Parameter Builder Factory

This class generates all operation parameters builders by “parameters” attribute that there is into config operation json

constructor

Parámetros

Nombre Tipo Opcional Descripción
ogapi InternalOpenGateAPI this is configuration about Opengate North API.
parameters object this is configuration about parameter operation.
parent BaseOperationBuilder this is a instance of BaseOperationBuilder

Subsections of period

Execute Each Builder

Defines the builder to configure a period of operation. With this builder you can select how repeat the operation. By days, hours or minutes.

constructor

Constructor

Parámetros

Nombre Tipo Opcional Descripción
parent BaseOperationBuilder this is a operationBaseBuilder.
date Date Date when operation will be executed
periodicityName string Name associated to periodicity
end number or Date When periodicity ends. By repetitions or by date

days(days)

Set a difference of days in each repetition

Parámetros

Nombre Tipo Opcional Descripción
days number

Retorna

Tip

Tipo: BaseOperationBuilder


hours(hours)

Set a difference of hours in each repetition

Parámetros

Nombre Tipo Opcional Descripción
hours number

Retorna

Tip

Tipo: BaseOperationBuilder


minutes(minutes)

Set a difference of minutes in each repetition

Parámetros

Nombre Tipo Opcional Descripción
minutes number

Retorna

Tip

Tipo: BaseOperationBuilder


Execute Every Builder

Defines the builder to configure a period of operation. By this builder you can select period by day, week, month, year.

constructor

Constructor

Parámetros

Nombre Tipo Opcional Descripción
parent BaseOperationBuilder this is a operationBaseBuilder.
date Date Date when operation will be executed
periodicityName string Name associated to periodicity

day()

Every day at time defined will be the pattern

Retorna

Tip

Tipo: BaseOperationBuilder


month(months)

Each month at time and day defined will be the pattern

Parámetros

Nombre Tipo Opcional Descripción
months array months on will be execute the operation

Retorna

Tip

Tipo: ByMonth


Subsections of pattern

By Generic

constructor

Constructor

Parámetros

Nombre Tipo Opcional Descripción
parent BaseOperationBuilder this is a operationBaseBuilder.
date Date Date when operation will be executed
periodicityName string Name associated to periodicity
end number or Date When periodicity ends. By repetitions or by date

By Month

constructor

Constructor

Parámetros

Nombre Tipo Opcional Descripción
parent BaseOperationBuilder this is a operationBaseBuilder.
date Date Date when operation will be executed
periodicityName string Name associated to periodicity
months array Months on will be execute the operation
end number or Date When periodicity ends. By repetitions or by date

day(day)

At this day will be executed the operation

Parámetros

Nombre Tipo Opcional Descripción
day number

Retorna

Tip

Tipo: BaseOperationBuilder


By Week

constructor

Constructor

Parámetros

Nombre Tipo Opcional Descripción
parent BaseOperationBuilder this is a operationBaseBuilder.
date Date Date when operation will be executed
periodicityName string Name associated to periodicity
end number or Date When periodicity ends. By repetitions or by date

days(days)

At this days will be executed the operation

Parámetros

Nombre Tipo Opcional Descripción
days array

Retorna

Tip

Tipo: BaseOperationBuilder


By Year

constructor

Constructor

Parámetros

Nombre Tipo Opcional Descripción
parent BaseOperationBuilder this is a operationBaseBuilder.
date Date Date when operation will be executed
periodicityName string Name associated to periodicity
end number or Date When periodicity ends. By repetitions or by date

day(day)

At this day will be executed the operation

Parámetros

Nombre Tipo Opcional Descripción
day number

Retorna

Tip

Tipo: BaseOperationBuilder


month(month)

At this month will be executed the operation

Parámetros

Nombre Tipo Opcional Descripción
month string

Retorna

Tip

Tipo: BaseOperationBuilder,ByYear


Periodicity Update Builder

executeEach(date, end)

The operation will execute with a period that you must define with ExecuteEachBuilder

Parámetros

Nombre Tipo Opcional Descripción
date Date Date when operation will be executed
end number or Date When periodicity ends. By repetitions or by date

Retorna

Tip

Tipo: ExecuteEach


executeEvery(date, end)

The operation will execute with a period that you must define with ExecuteEveryBuilder

Parámetros

Nombre Tipo Opcional Descripción
date Date Date when operation will be executed
end number or Date When periodicity ends. By repetitions or by date

Retorna

Tip

Tipo: ExecuteEvery


Operation Actions

constructor

Constructor

Parámetros

Nombre Tipo Opcional Descripción
ogapi InternalOpenGateAPI this is configuration about Opengate North API.
operationId string Identifier of the operation on which the action will be carried out

active()

This invoke a request to OpenGate North API and the callback is managed by promises This function active an operation

Retorna

Tip

Tipo: Promise

Ejemplos

ogapi.newOperationActions("xxxxx-xxx-xxxx-xxxxx").active()

activePeriodicity()

This invoke a request to OpenGate North API and the callback is managed by promises This function active periodicity of an operation

Retorna

Tip

Tipo: Promise

Ejemplos

ogapi.newOperationActions("xxxxx-xxx-xxxx-xxxxx").activePeriodicity()

cancel()

This invoke a request to OpenGate North API and the callback is managed by promises This function cancela operation

Retorna

Tip

Tipo: Promise

Ejemplos

Actions("xxxxx-xxx-xxxx-xxxxx").cancel();

cancelPeriodicity()

This invoke a request to OpenGate North API and the callback is managed by promises This function cancel the periodicity of an operation

Retorna

Tip

Tipo: Promise

Ejemplos

ogapi.OperationActions("xxxxx-xxx-xxxx-xxxxx").cancelPeriodicity();

changeCallback(url)

This invoke a request to OpenGate North API and the callback is managed by promises This function pauses (if it was active), updates the callback and passes the operation to the initial state (if activated, activated again)

Parámetros

Nombre Tipo Opcional Descripción
url string

Retorna

Tip

Tipo: promise

Ejemplos

ogapi.OperationActions("xxxxx-xxx-xxxx-xxxxx").changeCallback("http://[your_application_address]/[your_URI]")

executeLater(minutes)

This invoke a request to OpenGate North API and the callback is managed by promises This function pauses (if it was active), updates the delay and passes the operation to the initial state (if activated, activated again)

Parámetros

Nombre Tipo Opcional Descripción
minutes number

Retorna

Tip

Tipo: promise

Ejemplos

ogapi.OperationActions("xxxxx-xxx-xxxx-xxxxx").executeLater(10)

executeNow()

This invoke a request to OpenGate North API and the callback is managed by promises This function pause, update its delay and active an operation for execute immediately

Retorna

Tip

Tipo: Promise

Ejemplos

ogapi.OperationActions("xxxxx-xxx-xxxx-xxxxx").executeNow()

pause()

This invoke a request to OpenGate North API and the callback is managed by promises This function pause an operation

Retorna

Tip

Tipo: Promise

Ejemplos

ogapi.OperationActions("xxxxx-xxx-xxxx-xxxxx").pause()

pausePeriodicity()

This invoke a request to OpenGate North API and the callback is managed by promises This function pause periodicity of an operation

Retorna

Tip

Tipo: Promise

Ejemplos

ogapi.OperationActions("xxxxx-xxx-xxxx-xxxxx").pausePeriodicity()

Operation Finder

This class allow make get request to operation resource into Opengate North API.

constructor

Constructor

Parámetros

Nombre Tipo Opcional Descripción
ogapi InternalOpenGateAPI Reference to the API object.

findById(id)

Download a specific operation by its id. This execute a GET http method

Parámetros

Nombre Tipo Opcional Descripción
id string Operation id.

Retorna

Tip

Tipo: Promise

Ejemplos

  ogapi.newOperationFinder().findById('xxx-xx-xxx-xxx').then().catch();

findExecutionsById(id, size, start)

Download a specific executions of an operation by its id. This execute a GET http method

Parámetros

Nombre Tipo Opcional Descripción
id string Operation id.
size number Defined the number of elements on response
start number Defined the offset on response

Retorna

Tip

Tipo: Promise


findPeriodicityById(id)

Download information of peridodicitiy of a specific operation by its id. This execute a GET http method

Parámetros

Nombre Tipo Opcional Descripción
id string Operation id.

Retorna

Tip

Tipo: Promise

Ejemplos

  ogapi.newOperationFinder().findPeriodicityById('xxx-xx-xxx-xxx').then().catch();

findPeriodicityByPeriodicityId(periodicityId)

Download information of periodicitiy by its id. This execute a GET http method

Parámetros

Nombre Tipo Opcional Descripción
periodicityId string Periodicity id.

Retorna

Tip

Tipo: Promise

Ejemplos

  ogapi.newOperationFinder().findPeriodicityByPeriodicityId('xxx-xx-xxx-xxx').then().catch();

Operations

This class generates all operations builders by a response to search into catalog/operations

constructor

Constructor

Parámetros

Nombre Tipo Opcional Descripción
ogapi InternalOpenGateAPI this is configuration about Opengate North API.

builderByOperationName(name)

Create a builder to create an operation

Parámetros

Nombre Tipo Opcional Descripción
name String name of the operation to be created

Retorna

Tip

Tipo: Promise


updatePeriodicityBuilder(operationId)

Create a builder to update the periodicity of an operation

Parámetros

Nombre Tipo Opcional Descripción
operationId String identifier of the operation to be updated~

Retorna

Tip

Tipo: Promise


Periodicity Actions

constructor

Constructor

Parámetros

Nombre Tipo Opcional Descripción
ogapi InternalOpenGateAPI this is configuration about Opengate North API.
taskId string Identifier of the periodicity on which the action will be carried out

activate()

This invoke a request to OpenGate North API and the callback is managed by promises This function active periodicity of an operation

Retorna

Tip

Tipo: Promise

Ejemplos

ogapi.newPeriodicityActions("xxxxx-xxx-xxxx-xxxxx").activate()

cancel()

This invoke a request to OpenGate North API and the callback is managed by promises This function cancel a periodicity

Retorna

Tip

Tipo: Promise

Ejemplos

ogapi.periodicityActions("xxxxx-xxx-xxxx-xxxxx").cancelPeriodicity();

pause()

This invoke a request to OpenGate North API and the callback is managed by promises This function pauses a periodicity

Retorna

Tip

Tipo: Promise

Ejemplos

ogapi.periodicityActions("xxxxx-xxx-xxxx-xxxxx").pausePeriodicity()

Subsections of operationTypes

Operation Type

This is a base object that contains all you can do about OperationType.

constructor

Constructor

Parámetros

Nombre Tipo Opcional Descripción
Reference InternalOpenGateAPI to the API object.

applicableTo(applicableTo)

Allows the modification of the applicableTo

Parámetros

Nombre Tipo Opcional Descripción
applicableTo array

Retorna

Tip

Tipo: OperationType


create()

Create a new Rule

Retorna

Tip

Tipo: Promise


delete()

Deletes the selected RuleConfiguration

Retorna

Tip

Tipo: Promise


fromCatalog(fromCatalog)

Set the catalog

Parámetros

Nombre Tipo Opcional Descripción
fromCatalog string

Retorna

Tip

Tipo: OperationType


update()

Udpate a Rule

Retorna

Tip

Tipo: Promise


withDescription(description)

Set the description attribute

Parámetros

Nombre Tipo Opcional Descripción
description string

Retorna

Tip

Tipo: OperationType


withIdentifier(name)

Set the name for update attribute

Parámetros

Nombre Tipo Opcional Descripción
name string required field

Retorna

Tip

Tipo: OperationType


withModels(models)

Allows the modification of the allowed models

Parámetros

Nombre Tipo Opcional Descripción
models array

Retorna

Tip

Tipo: OperationType


withName(name)

Set the name attribute

Parámetros

Nombre Tipo Opcional Descripción
name string required field

Retorna

Tip

Tipo: OperationType


withOrganization(organization)

Set the organization attribute

Parámetros

Nombre Tipo Opcional Descripción
organization string required field

Retorna

Tip

Tipo: OperationType


withParameters(parameters)

Allows the modification of the parameters

Parámetros

Nombre Tipo Opcional Descripción
parameters array

Retorna

Tip

Tipo: OperationType


withProfiles(profiles)

Allows the modification of the profiles allowed

Parámetros

Nombre Tipo Opcional Descripción
profiles array

Retorna

Tip

Tipo: OperationType


withSteps(steps)

Allows the modification of the steps

Parámetros

Nombre Tipo Opcional Descripción
steps array

Retorna

Tip

Tipo: OperationType


withTitle(title)

Set the title attribute

Parámetros

Nombre Tipo Opcional Descripción
title string required field

Retorna

Tip

Tipo: OperationType


Operation Type Finder

This class allow make get request to OperationType resource into Opengate North API.

constructor

Constructor

Parámetros

Nombre Tipo Opcional Descripción
ogapi InternalOpenGateAPI Reference to the API object.

findByOrganizationAndName(organization, name)

Performs a get that returns operation type

Parámetros

Nombre Tipo Opcional Descripción
organization string organization
name string Rule Configuration name

Retorna

Tip

Tipo: Promise


Operation Types Catalog

This class allow make get request to OperationType resource into Opengate North API.

constructor

Constructor

Parámetros

Nombre Tipo Opcional Descripción
ogapi InternalOpenGateAPI Reference to the API object.

getOperationTypes()

Performs a get that returns operation types templates

Retorna

Tip

Tipo: Promise


Subsections of organization_manufacturer

Manufacturer Finder

This class allow make get request to hardware manufacturers resource into Opengate North API.

constructor

Constructor

Parámetros

Nombre Tipo Opcional Descripción
Reference InternalOpenGateAPI to the API object.

administrable()

Marks visibility administrable for manufacturer list retrieval

Retorna

Tip

Tipo: this


assignable()

Marks visibility assignable for manufacturer list retrieval

Retorna

Tip

Tipo: this


findByOrganization(organization)

Retrieves all manufacturer from a organization

Parámetros

Nombre Tipo Opcional Descripción
organization string organization name .

Retorna

Tip

Tipo: Promise


findByOrganizationAndId(organization, identifier)

Retrieves a specific manufacturer

Parámetros

Nombre Tipo Opcional Descripción
organization string organization name .
identifier string manufacturer name .

Retorna

Tip

Tipo: Promise


Manufacturers

This is a base object that contains all you can do about Manufacturers.

constructor

Constructor

Parámetros

Nombre Tipo Opcional Descripción
Reference InternalOpenGateAPI to the API object.

withAddress(address)

Set the address attribute

Parámetros

Nombre Tipo Opcional Descripción
address string

Retorna

Tip

Tipo: Manufacturers


withDescription(description)

Set the description attribute

Parámetros

Nombre Tipo Opcional Descripción
description string required field

Retorna

Tip

Tipo: Manufacturers


withEmail(email)

Set the email attribute

Parámetros

Nombre Tipo Opcional Descripción
email string

Retorna

Tip

Tipo: Manufacturers


withFax(fax)

Set the fax attribute

Parámetros

Nombre Tipo Opcional Descripción
fax string

Retorna

Tip

Tipo: Manufacturers


withIdentifier(id)

Set the identifier attribute

Parámetros

Nombre Tipo Opcional Descripción
id string required field

Retorna

Tip

Tipo: Manufacturers


withName(name)

Set the name attribute

Parámetros

Nombre Tipo Opcional Descripción
name string required field

Retorna

Tip

Tipo: Manufacturers


withNotes(notes)

Set the notes attribute

Parámetros

Nombre Tipo Opcional Descripción
notes string

Retorna

Tip

Tipo: Manufacturers


withTelephone(telephone)

Set the telephone attribute

Parámetros

Nombre Tipo Opcional Descripción
telephone string

Retorna

Tip

Tipo: Manufacturers


withUrl(url)

Set the url attribute

Parámetros

Nombre Tipo Opcional Descripción
url string

Retorna

Tip

Tipo: Manufacturers


Model Finder

This class allow make get request to hardware models resource into Opengate North API.

constructor

Constructor

Parámetros

Nombre Tipo Opcional Descripción
Reference InternalOpenGateAPI to the API object.

findByOrganizationAndManufacturerAndId(organization, manufacturer, identifier)

Download a specific model by its id. This execute a GET http method

Parámetros

Nombre Tipo Opcional Descripción
organization string model organization .
manufacturer string model manufacturer .
identifier string model name .

Retorna

Tip

Tipo: Promise


Models

This is a base object that contains all you can do about Models.

constructor

Constructor

Parámetros

Nombre Tipo Opcional Descripción
Reference InternalOpenGateAPI to the API object.

withDescription(description)

Set the description attribute

Parámetros

Nombre Tipo Opcional Descripción
description string required field

Retorna

Tip

Tipo: Models


withIdentifier(id)

Set the identifier attribute

Parámetros

Nombre Tipo Opcional Descripción
id string required field

Retorna

Tip

Tipo: Models


withName(name)

Set the name attribute

Parámetros

Nombre Tipo Opcional Descripción
name string required field

Retorna

Tip

Tipo: Models


withNotes(notes)

Set the notes attribute

Parámetros

Nombre Tipo Opcional Descripción
notes string

Retorna

Tip

Tipo: Models


withUrl(url)

Set the url attribute

Parámetros

Nombre Tipo Opcional Descripción
url string

Retorna

Tip

Tipo: Models


withVersion(version)

Set the version attribute

Parámetros

Nombre Tipo Opcional Descripción
version string

Retorna

Tip

Tipo: Models


Subsections of organization_software

Software Finder

This class allow make get request to hardware softwares resource into Opengate North API.

constructor

Constructor

Parámetros

Nombre Tipo Opcional Descripción
Reference InternalOpenGateAPI to the API object.

administrable()

Marks visibility administrable for software list retrieval

Retorna

Tip

Tipo: this


assignable()

Marks visibility assignable for software list retrieval

Retorna

Tip

Tipo: this


findByOrganization(organization)

Retrieves all software from a organization

Parámetros

Nombre Tipo Opcional Descripción
organization string organization name .

Retorna

Tip

Tipo: Promise


findByOrganizationAndId(organization, identifier)

Retrieves a specific software

Parámetros

Nombre Tipo Opcional Descripción
organization string organization name .
identifier string software name .

Retorna

Tip

Tipo: Promise


Softwares

This is a base object that contains all you can do about Softwares.

constructor

Constructor

Parámetros

Nombre Tipo Opcional Descripción
Reference InternalOpenGateAPI to the API object.

withIdentifier(id)

Set the identifier attribute

Parámetros

Nombre Tipo Opcional Descripción
id string required field

Retorna

Tip

Tipo: Softwares


withModels(models)

Set the model attribute

Parámetros

Nombre Tipo Opcional Descripción
models Array

Retorna

Tip

Tipo: Softwares


withName(name)

Set the name attribute

Parámetros

Nombre Tipo Opcional Descripción
name string required field

Retorna

Tip

Tipo: Softwares


withType(type)

Set the type attribute

Parámetros

Nombre Tipo Opcional Descripción
type string

Retorna

Tip

Tipo: Softwares


withVersion(version)

Set the version attribute

Parámetros

Nombre Tipo Opcional Descripción
version string required field

Retorna

Tip

Tipo: Softwares


Subsections of organizations

Domain Finder

This class allow make get request to certificate resource into Opengate North API.

constructor

Constructor

Parámetros

Nombre Tipo Opcional Descripción
Reference InternalOpenGateAPI to the API object.

findByNameWithHierarchy(name)

Constructor

Parámetros

Nombre Tipo Opcional Descripción
name string domain name.

Retorna

Tip

Tipo: Promise


Organization Finder

This class allow make get request to organization resource into Opengate North API.

constructor

Constructor

Parámetros

Nombre Tipo Opcional Descripción
ogapi InternalOpenGateAPI Reference to the API object.

findByDomainAndWorkgroup(domain, workgroup)

Performs a get that returns organizations related

Parámetros

Nombre Tipo Opcional Descripción
domain string domain
workgroup string workgroup.

Retorna

Tip

Tipo: Promise


findByName(name)

Find a specify organization by a name. This execute a GET http method

Parámetros

Nombre Tipo Opcional Descripción
name string Organization name

Retorna

Tip

Tipo: Promise


Organizations

This is a base object that contains all you can do about Organizations.

constructor

Constructor

Parámetros

Nombre Tipo Opcional Descripción
Reference InternalOpenGateAPI to the API object.

withAuth(auth)

Sets the auth security configuration

Parámetros

Nombre Tipo Opcional Descripción
auth object

Retorna

Tip

Tipo: Organizations


withCountryCode(countryCode)

Set the country code attribute

Parámetros

Nombre Tipo Opcional Descripción
countryCode string

Retorna

Tip

Tipo: Organizations


withDescription(description)

Set the description attribute

Parámetros

Nombre Tipo Opcional Descripción
description string

Retorna

Tip

Tipo: Organizations


withDomain(domain)

Set the parent domain

Parámetros

Nombre Tipo Opcional Descripción
domain string

Retorna

Tip

Tipo: Organizations


withLangCode(langCode)

Set the lang code attribute

Parámetros

Nombre Tipo Opcional Descripción
langCode string

Retorna

Tip

Tipo: Organizations


withLocation(latitude, longitude)

Sets the map location attribute

Parámetros

Nombre Tipo Opcional Descripción
latitude number
longitude number

Retorna

Tip

Tipo: Organizations


withName(name)

Set the name attribute

Parámetros

Nombre Tipo Opcional Descripción
name string required field

Retorna

Tip

Tipo: Organizations


withOnlyAssignedDomainCertificates(onlyDomainCerts)

Set the onlyAssignedDomainCertificates attribute

Parámetros

Nombre Tipo Opcional Descripción
onlyDomainCerts boolean required field

Retorna

Tip

Tipo: Organizations


withPasswordPolicy(passPolicy)

Sets the password poliicy configuration

Parámetros

Nombre Tipo Opcional Descripción
passPolicy object

Retorna

Tip

Tipo: Organizations


withPlan(plan)

Set the plan attribute

Parámetros

Nombre Tipo Opcional Descripción
plan string

Retorna

Tip

Tipo: Organizations


withTimeZone(timeZone)

Set the time zone attribute

Parámetros

Nombre Tipo Opcional Descripción
timeZone string

Retorna

Tip

Tipo: Organizations


withZoom(zoom)

Sets the map zoom attribute

Parámetros

Nombre Tipo Opcional Descripción
zoom number

Retorna

Tip

Tipo: Organizations


Subsections of plan

Device Plans

This is a base object that contains all you can do about Device plans.

constructor

Parámetros

Nombre Tipo Opcional Descripción
Reference InternalOpenGateAPI to the API object.

withFlowRate(flowRate)

Set the flowRate attribute

Parámetros

Nombre Tipo Opcional Descripción
flowRate object {value: number, unit: [SECONDS, MINUTES, HOURS, DAYS, MONTHS, YEARS]}

Retorna

Tip

Tipo: OrganizationPlans


withIdentifier(identifier)

Set the identifier attribute

Parámetros

Nombre Tipo Opcional Descripción
identifier string required field

Retorna

Tip

Tipo: DevicePlans


withName(name)

Set the name attribute

Parámetros

Nombre Tipo Opcional Descripción
name string required field

Retorna

Tip

Tipo: DevicePlans


Device Plans Finder

This class allow make get request to organization device plans resource into Opengate North API.

constructor

Parámetros

Nombre Tipo Opcional Descripción
Reference InternalOpenGateAPI to the API object.

administrable()

Marks visibility administrable for organization device plans list retrieval. ogapi.newDevicePlansFinder().administrable().findByOrganization('organization').then().catch();

Retorna

Tip

Tipo: this


assignable()

Marks visibility assignable for organization device plans list retrieval ogapi.newDevicePlansFinder().assignable().findByOrganization('organization').then().catch();

Retorna

Tip

Tipo: this


default()

Marks visibility default for organization device plans list list retrieval. ogapi.newDevicePlansFinder().default().findByOrganization('organization').then().catch();

Retorna

Tip

Tipo: this


findByOrganization(organization)

Retrieves all device plans from a organization ogapi.newDevicePlansFinder().findByOrganization('organization').then().catch();

Parámetros

Nombre Tipo Opcional Descripción
organization string organization name .

Retorna

Tip

Tipo: Promise


findByOrganizationAndId(organization, identifier)

Retrieves a specific device plan from a organization ogapi.newDevicePlansFinder().findByOrganizationAndId('organization', 'identifier').then().catch();

Parámetros

Nombre Tipo Opcional Descripción
organization string organization name .
identifier string plan name.

Retorna

Tip

Tipo: Promise


Organization Plans

This is a base object that contains all you can do about Organizations plan.

constructor

Parámetros

Nombre Tipo Opcional Descripción
Reference InternalOpenGateAPI to the API object.

withFlowRate(flowRate)

Set the flowRate attribute

Parámetros

Nombre Tipo Opcional Descripción
flowRate object {value: number, unit: [SECONDS, MINUTES, HOURS, DAYS, MONTHS, YEARS]}

Retorna

Tip

Tipo: OrganizationPlans


withIdentifier(identifier)

Set the identifier attribute

Parámetros

Nombre Tipo Opcional Descripción
identifier string required field

Retorna

Tip

Tipo: OrganizationPlans


withMaxDeviceAmount(maxDeviceAmount)

Set the maxDeviceAmount attribute

Parámetros

Nombre Tipo Opcional Descripción
maxDeviceAmount object optional and greater than 0

Retorna

Tip

Tipo: OrganizationPlans


withMaxStorageLifeTime(maxStorageLifeTime)

Set the maxStorageLifeTime attribute

Parámetros

Nombre Tipo Opcional Descripción
maxStorageLifeTime object required field: {total: number, period: [SECONDS, MINUTES, HOURS, DAYS, MONTHS, YEARS]}

Retorna

Tip

Tipo: OrganizationPlans


withName(name)

Set the name attribute

Parámetros

Nombre Tipo Opcional Descripción
name string required field

Retorna

Tip

Tipo: OrganizationPlans


Organization Plans Finder

This class allow make get request to organization plans resource into Opengate North API.

constructor

Parámetros

Nombre Tipo Opcional Descripción
Reference InternalOpenGateAPI to the API object.

administrable()

Marks visibility administrable for organization plans list retrieval. ogapi.newOrganizationPlansFinder().administrable().findByOrganization('organization').then().catch();

Retorna

Tip

Tipo: this


assignable()

Marks visibility assignable for organization plans list retrieval ogapi.newOrganizationPlansFinder().assignable().findByOrganization('organization').then().catch();

Retorna

Tip

Tipo: this


default()

Marks visibility default for plans list list retrieval. ogapi.newOrganizationPlansFinder().default().findByOrganization('organization').then().catch();

Retorna

Tip

Tipo: this


findByOrganization(organization)

Retrieves all plans from a organization ogapi.newOrganizationPlansFinder().findByOrganization('organization').then().catch();

Parámetros

Nombre Tipo Opcional Descripción
organization string organization name .

Retorna

Tip

Tipo: Promise


findByOrganizationAndId(organization, identifier)

Retrieves a specific plan from a organization ogapi.newOrganizationPlansFinder().findByOrganizationAndId('organization', 'identifier').then().catch();

Parámetros

Nombre Tipo Opcional Descripción
organization string organization name .
identifier string plan name.

Retorna

Tip

Tipo: Promise


Subsections of provision

Base Provision

This is an abstract class, it must be extended to another class that defines the different actions of a specific provision. This class is responsible for managing the request to execute Norte OpenGate API

constructor

Constructor

Parámetros

Nombre Tipo Opcional Descripción
ogapi InternalOpenGateAPI this is ogapi instance
resource string this is a base url resource
timeout number timeout on request
requiredParameters array
serviceBaseURL string base of the uri petition

create()

This invoke a request to OpenGate North API and the callback is managed by promises This function create a entity of provision

Retorna

Tip

Tipo: Promise

Ejemplos

 ogapi.organizationsBuilder().create()

delete(body)

This invoke a request to OpenGate North API and the callback is managed by promises This function deletes a entity of provision

Parámetros

Nombre Tipo Opcional Descripción
body *

Retorna

Tip

Tipo: Promise

Ejemplos

ogapi.organizationsBuilder().withName('delete_organization').delete();
ogapi.usersBuilder().withEmail('delete@user.com').delete();
ogapi.certificatesBuilder().withId('d3l3t3-c3rt1f1c4t3').delete();

update()

This invoke a request to OpenGate North API and the callback is managed by promises This function updates a entity of provision

Retorna

Tip

Tipo: Promise

Ejemplos

 ogapi.organizationsBuilder().update()

Subsections of bulk

Bulk Execution Builder

This builder give you the necessary tools to create a bulk executions using our OpenGate REST

constructor

Constructor

Parámetros

Nombre Tipo Opcional Descripción
ogapi InternalOpenGateAPI required field. This is ogapi instance
organization string required field. This is the organization name
processorId string required field. This is the provision processor use for bulk provision
timeout number timeout in millisecons. The request will have a specific time out if it will be exceeded then the promise throw an exception

bulk(rawFile, extension)

Do a bulk using specific Provision Processor.

Parámetros

Nombre Tipo Opcional Descripción
rawFile string,File String with path of file or File (Blob)
extension string File format

Retorna

Tip

Tipo: *

Ejemplos

 ogapi.bulkExecutionBuilder('orgname', 'processorId', 10000).bulk(rawFile, extension)

plan(rawFile, extension, numberOfEntriesToProcess)

Instead of creating a bulk process, return the provision process planning for specified entries. This is is synch process that does not cause changes in the database

Parámetros

Nombre Tipo Opcional Descripción
rawFile string,File String with path of file or File (Blob)
extension string File format
numberOfEntriesToProcess number Number of entries to be processed.

Retorna

Tip

Tipo: *

Ejemplos

 ogapi.bulkExecutionBuilder('orgname', 'processorId', 10000).plan(rawFile, extension)
 ogapi.bulkExecutionBuilder('orgname', 'processorId', 10000).plan(rawFile, extension, numberOfEntriesToProcess)

Subsections of country

Countries Catalog

This class allow make get request to countries catalog resource into Opengate North API.

constructor

Constructor

Parámetros

Nombre Tipo Opcional Descripción
ogapi InternalOpenGateAPI Reference to the API object.

getCountries()

Performs a get that returns countries

Retorna

Tip

Tipo: Promise


Subsections of entities

Asset Builder

Subscription builder. This builder give you the necessary tools to create a subscription using our OpenGate REST.

constructor

Constructor

Parámetros

Nombre Tipo Opcional Descripción
ogapi InternalOpenGateAPI this is ogapi instance
organization string this is the organization name where subscription will be created
allowedDatastreams array Allowed datastreams to add into the new subscription
definedSchemas array Jsonschema about all OpenGate specific types
jsonSchemaValidator Validator Json schema validator tool

Bulk Builder

This class allow set simple values.

constructor

Constructor

Parámetros

Nombre Tipo Opcional Descripción
ogapi InternalOpenGateAPI required field. This is ogapi instance
resource resource required field. This is the resource used for the bulk provision
extension extension required field. Type of file to send
timeout number timeout in millisecons. The request will have a specific time out if it will be exceeded then the promise throw an exception

create(rawFile, csv_response)

Execute the bulk creation operation

Parámetros

Nombre Tipo Opcional Descripción
rawFile string,Blob File with format string or Blob
csv_response boolean true if you want a response on format csv. False or null if you want a response on format json

Retorna

Tip

Tipo: *

Ejemplos

 ogapi.newCsvBulkBuilder('orgname', 'entities', 10000).create(rawFile)
 ogapi.newCsvBulkBuilder('orgname', 'entities', 10000).create(new Blob(), true)

delete(rawFile, csv_response)

Execute the bulk delete operation

Parámetros

Nombre Tipo Opcional Descripción
rawFile string,Blob File with format string or Blob
csv_response boolean true if you want a response on format csv. False or null if you want a response on format json

Retorna

Tip

Tipo: *

Ejemplos

 ogapi.newCsvBulkBuilder('orgname', 'entities', 10000).delete(rawFile)
 ogapi.newCsvBulkBuilder('orgname', 'entities', 10000).delete(new Blob(), true)

deleteAll(rawFile, csv_response)

Execute the bulk delete full operation

Parámetros

Nombre Tipo Opcional Descripción
rawFile string,Blob File with format string or Blob
csv_response boolean true if you want a response on format csv. False or null if you want a response on format json

Retorna

Tip

Tipo: *

Ejemplos

 ogapi.newCsvBulkBuilder('orgname', 'entities', 10000).deleteAll(rawFile)
 ogapi.newCsvBulkBuilder('orgname', 'entities', 10000).deleteAll(new Blob(), true)

patch(rawFile, csv_response)

Execute the bulk patch operation

Parámetros

Nombre Tipo Opcional Descripción
rawFile string,Blob File with format string or Blob
csv_response boolean true if you want a response on format csv. False or null if you want a response on format json

Retorna

Tip

Tipo: *

Ejemplos

 ogapi.newCsvBulkBuilder('orgname', 'entities', 10000).update(rawFile)
 ogapi.newCsvBulkBuilder('orgname', 'entities', 10000).update(new Blob(), true)

update(rawFile, csv_response)

Execute the bulk update operation

Parámetros

Nombre Tipo Opcional Descripción
rawFile string,Blob File with format string or Blob
csv_response boolean true if you want a response on format csv. False or null if you want a response on format json

Retorna

Tip

Tipo: *

Ejemplos

 ogapi.newCsvBulkBuilder('orgname', 'entities', 10000).update(rawFile)
 ogapi.newCsvBulkBuilder('orgname', 'entities', 10000).update(new Blob(), true)

Complex Builder

This class extends SimpleBuilder to allow set complex values. What is a complex value? It is simple, It is a value that need a communications module identifier to allow set into the box.

constructor

Constructor

Parámetros

Nombre Tipo Opcional Descripción
ogapi InternalOpenGateAPI this is ogapi instance
resource string this is the resource url where can be create/delete/update/read the entity
allowedDatastreams array Allowed datastreams to add into the new entity
definedSchemas array Jsonschema about all OpenGate specific types
jsonSchemaValidator Validator Json schema validator tool

withComplex(_id, idCommunicationModules, val)

Set a complex value to entity

Parámetros

Nombre Tipo Opcional Descripción
_id string Datastream identifier
idCommunicationModules string Communications module identifier
val object Value to set.

Retorna

Tip

Tipo: *


Csv Bulk Builder

Csv builder. This builder give you the necessary tools to create a csv bulk using our OpenGate REST.

constructor

Constructor

Parámetros

Nombre Tipo Opcional Descripción
ogapi InternalOpenGateAPI required field. This is ogapi instance
organization string required field. This is the organization name where entities will be created, updated or deleted
resource resource required field. This is the resource used for the bulk provision
timeout number timeout in millisecons. The request will have a specific time out if it will be exceeded then the promise throw an exception
async boolean forces async execution for the bulk operation

Device Builder

Device builder. This builder give you the necessary tools to create a device using our OpenGate REST.

constructor

Constructor

Parámetros

Nombre Tipo Opcional Descripción
ogapi InternalOpenGateAPI this is ogapi instance
organization string this is the organization name where device will be created
allowedDatastreams array Allowed datastreams to add into the new device
definedSchemas array Jsonschema about all OpenGate specific types
jsonSchemaValidator Validator Json schema validator tool
ms number timeout in milliseconds

create()

This invoke a request to OpenGate North API and the callback is managed by promises This function create a entity of provision

Retorna

Tip

Tipo: Promise

Ejemplos

 ogapi.organizationsBuilder().create()

update()

This invoke a request to OpenGate North API and the callback is managed by promises This function updates a entity of provision and check if any subscriber/subscription exits or no. If a subscriber/subscription not exists then this entities will be created and after that will be added to entity box.

Retorna

Tip

Tipo: Promise

Ejemplos

 ogapi.entityBuilder.devicesBuilder().update()

Entity Builder

This is a base object that contains all you can do about Devices.

constructor

Constructor

Parámetros

Nombre Tipo Opcional Descripción
Reference InternalOpenGateAPI to the API object.

assetsBuilder(organization, timeout)

Get a AssetBuilder for operate with entities of type asset

Parámetros

Nombre Tipo Opcional Descripción
organization string required field
timeout number timeout on request

Retorna

Tip

Tipo: Promise

Ejemplos

ogapi.assetsBuilder('orgname').then(function(assetBuilder){//...}).catch()

devicesBuilder(organization, timeout)

Get a DeviceBuilder for operate with entities of type device

Parámetros

Nombre Tipo Opcional Descripción
organization string required field
timeout number timeout on request

Retorna

Tip

Tipo: Promise

Ejemplos

ogapi.devicesBuilder('orgname').then(function(deviceBuilder){//...}).catch()

newCsvBulkBuilder(organization, resource, timeout, async)

Get a new CsvBulkBuilder

Parámetros

Nombre Tipo Opcional Descripción
organization string required field.
resource string required field. Type of resource: entities or tickets
timeout number timeout in millisecons. The request will have a specific time out if it will be exceeded then the promise throw an exception
async boolean forces async execution for the bulk operation

Retorna

Tip

Tipo: CsvBulkBuilder

Ejemplos

 ogapi.newCsvBulkBuilder('orgname', 'entities', 10000, false)
 ogapi.newCsvBulkBuilder('orgname', 'entities', 10000, true)

newJsonBulkBuilder(organization, resource, timeout, async)

Get a new JsonBulkBuilder

Parámetros

Nombre Tipo Opcional Descripción
organization string required field.
resource string required field. Type of resource: entities or tickets
timeout number timeout in millisecons. The request will have a specific time out if it will be exceeded then the promise throw an exception
async boolean forces async execution for the bulk operation

Retorna

Tip

Tipo: JsonBulkBuilder

Ejemplos

 ogapi.newJsonBulkBuilder('orgname', 'entities', 10000)

newJsonFlattenedBulkBuilder(organization, resource, timeout, async)

Get a new JsonFlattenedBulkBuilder

Parámetros

Nombre Tipo Opcional Descripción
organization string required field.
resource string required field. Type of resource: entities or tickets
timeout number timeout in millisecons. The request will have a specific time out if it will be exceeded then the promise throw an exception
async boolean forces async execution for the bulk operation

Retorna

Tip

Tipo: JsonFlattenedBulkBuilder

Ejemplos

 ogapi.newJsonFlattenedBulkBuilder('orgname', 'entities', 10000)

subscribersBuilder(organization, timeout)

Get a SubscriberBuilder for operate with entities of type subscriber

Parámetros

Nombre Tipo Opcional Descripción
organization string required field
timeout number timeout on request

Retorna

Tip

Tipo: Promise

Ejemplos

ogapi.subscribersBuilder('orgname').then(function(subscriberBuilder){//...}).catch()

subscriptionsBuilder(organization, timeout)

Get a SubscriptionBuilder for operate with entities of type subscription

Parámetros

Nombre Tipo Opcional Descripción
organization string required field
timeout number timeout on request

Retorna

Tip

Tipo: Promise

Ejemplos

ogapi.subscriptionsBuilder('orgname').then(function(subscriptionBuilder){//...}).catch()

ticketsBuilder(organization, timeout)

Get a TicketBuilder for operate with entities of type ticket

Parámetros

Nombre Tipo Opcional Descripción
organization string required field
timeout number timeout on request

Retorna

Tip

Tipo: Promise

Ejemplos

ogapi.ticketsBuilder('orgname').then(function(ticketBuilder){//...}).catch()

Json Bulk Builder

Json builder. This builder give you the necessary tools to create a json bulk using our OpenGate REST.

constructor

Constructor

Parámetros

Nombre Tipo Opcional Descripción
ogapi InternalOpenGateAPI required field. This is ogapi instance
organization string required field. This is the organization name where entities will be created, updated or deleted
resource resource required field. This is the resource used for the bulk provision
timeout number timeout in millisecons. The request will have a specific time out if it will be exceeded then the promise throw an exception
async boolean forces async execution for the bulk operation

Json Flattened Bulk Builder

Json builder. This builder give you the necessary tools to create a json bulk using our OpenGate REST.

constructor

Constructor

Parámetros

Nombre Tipo Opcional Descripción
ogapi InternalOpenGateAPI required field. This is ogapi instance
organization string required field. This is the organization name where entities will be created, updated or deleted
resource resource required field. This is the resource used for the bulk provision
timeout number timeout in millisecons. The request will have a specific time out if it will be exceeded then the promise throw an exception
async boolean forces async execution for the bulk operation

Simple Builder

This class allow set simple values.

constructor

Constructor

Parámetros

Nombre Tipo Opcional Descripción
ogapi InternalOpenGateAPI this is ogapi instance
resource string this is the resource url where can be create/delete/update/read the entity
allowedDatastreams array Allowed datastreams to add into the new entity
definedSchemas array Jsonschema about all OpenGate specific types
jsonSchemaValidator Validator Json schema validator tool

deleteAll()

This invoke a request to OpenGate North API and the callback is managed by promises This function deletes a entity of provision

Retorna

Tip

Tipo: Promise


getAllowedDatastreams()

Retorna

Tip

Tipo: array
Allowed Datastream definition array


getEntityKey()

Retorna

Tip

Tipo: string
Entity identifier


patch()

This invoke a request to OpenGate North API and the callback is managed by promises This function patch a entity of provision

Retorna

Tip

Tipo: Promise

Ejemplos

 ogapi.organizationsBuilder().update()

update()

This invoke a request to OpenGate North API and the callback is managed by promises This function updates a entity of provision

Retorna

Tip

Tipo: Promise

Ejemplos

 ogapi.organizationsBuilder().update()

with(_id, val)

Set new datastream value

Parámetros

Nombre Tipo Opcional Descripción
_id string Datastream identifier
val objecr Datastream value. If this value is null then datastream value will be removed.

Retorna

Tip

Tipo: *


Subscriber Builder

Subscriber builder. This builder give you the necessary tools to create a subscriber using our OpenGate REST.

constructor

Constructor

Parámetros

Nombre Tipo Opcional Descripción
ogapi InternalOpenGateAPI this is ogapi instance
organization string this is the organization name where subscriber will be created
allowedDatastreams array Allowed datastreams to add into the new subscriber
definedSchemas array Jsonschema about all OpenGate specific types
jsonSchemaValidator Validator Json schema validator tool

Subscription Builder

Subscription builder. This builder give you the necessary tools to create a subscription using our OpenGate REST.

constructor

Constructor

Parámetros

Nombre Tipo Opcional Descripción
ogapi InternalOpenGateAPI this is ogapi instance
organization string this is the organization name where subscription will be created
allowedDatastreams array Allowed datastreams to add into the new subscription
definedSchemas array Jsonschema about all OpenGate specific types
jsonSchemaValidator Validator Json schema validator tool

Ticket Builder

Subscription builder. This builder give you the necessary tools to create a subscription using our OpenGate REST.

constructor

Constructor

Parámetros

Nombre Tipo Opcional Descripción
ogapi InternalOpenGateAPI this is ogapi instance
organization string this is the organization name where subscription will be created
allowedDatastreams array Allowed datastreams to add into the new subscription
definedSchemas array Jsonschema about all OpenGate specific types
jsonSchemaValidator Validator Json schema validator tool

Provision Generic Finder

This class allow make get request to user resource into Opengate North API.

constructor

Constructor

Parámetros

Nombre Tipo Opcional Descripción
ogapi InternalOpenGateAPI Reference to the API object.
source string Relative url where is located the resource.
reponseJsonData string Relative url where is located the resource.
error_not_found string String error which will be thrown on not_found error.

Subsections of provisionProcessors

Provision Processors

This is a base object that contains all you can do about Provision Processors.

constructor

Constructor

Parámetros

Nombre Tipo Opcional Descripción
Reference InternalOpenGateAPI to the API object.

withConfigurationParams(configurationParams)

Set the ConfigurationParams attribute

Parámetros

Nombre Tipo Opcional Descripción
configurationParams object required field

Retorna

Tip

Tipo: ProvisionPrecessors


withIdentifier(identifier)

Set the identifier attribute

Parámetros

Nombre Tipo Opcional Descripción
identifier string required field

Retorna

Tip

Tipo: ProvisionPrecessors


withName(name)

Set the name attribute

Parámetros

Nombre Tipo Opcional Descripción
name string required field

Retorna

Tip

Tipo: ProvisionPrecessors


withOrganization(organization)

Set the organization attribute

Parámetros

Nombre Tipo Opcional Descripción
organization string required field

Retorna

Tip

Tipo: ProvisionPrecessors


withScriptProcessor(scriptProcessor)

Set the ScriptProcessor attribute

Parámetros

Nombre Tipo Opcional Descripción
scriptProcessor object required field

Retorna

Tip

Tipo: ProvisionPrecessors


provision Processors Finder

This class allow make get request to ProvisionProcessors Finder resource into Opengate North API.

constructor

Constructor

Parámetros

Nombre Tipo Opcional Descripción
ogapi InternalOpenGateAPI Reference to the API object.

findByOrganization(organization)

Performs a get that returns list of provision processors

Parámetros

Nombre Tipo Opcional Descripción
organization string organization

Retorna

Tip

Tipo: Promise


findByOrganizationAndProvisionProcessorId(organization, identifier)

Performs a get that returns a definition of provision Processors

Parámetros

Nombre Tipo Opcional Descripción
organization string organization
identifier string Provision Processors identifier

Retorna

Tip

Tipo: Promise


Subsections of rulesConfiguration

Rule Configurations

This is a base object that contains all you can do about RulesConfigurations.

constructor

Constructor

Parámetros

Nombre Tipo Opcional Descripción
Reference InternalOpenGateAPI to the API object.

create()

Create a new Rule

Retorna

Tip

Tipo: Promise


delete()

Deletes the selected RuleConfiguration

Retorna

Tip

Tipo: Promise


update()

Udpate a Rule

Retorna

Tip

Tipo: Promise


updateParameters(newParameters)

Udpate a Rule

Parámetros

Nombre Tipo Opcional Descripción
newParameters *

Retorna

Tip

Tipo: Promise


withActions(actions)

Allows the modification of the actions

Parámetros

Nombre Tipo Opcional Descripción
actions object

Retorna

Tip

Tipo: _RuleCondition


withActionsDelay(actionsDelay)

Set the actions delay attribute

Parámetros

Nombre Tipo Opcional Descripción
actionsDelay number

Retorna

Tip

Tipo: RulesConfigurations


withActive(active)

Set the active attribute

Parámetros

Nombre Tipo Opcional Descripción
active boolean

Retorna

Tip

Tipo: RulesConfigurations


withChannel(channel)

Set the channel attribute

Parámetros

Nombre Tipo Opcional Descripción
channel string required field

Retorna

Tip

Tipo: RulesConfigurations


withCondition(conditionFilter)

Allows the modification of a condition

Parámetros

Nombre Tipo Opcional Descripción
conditionFilter string

Retorna

Tip

Tipo: _RuleCondition


withDescription(description)

Set the description attribute

Parámetros

Nombre Tipo Opcional Descripción
description string

Retorna

Tip

Tipo: RulesConfigurations


withIdentifier(identifier)

Set the identifier attribute

Parámetros

Nombre Tipo Opcional Descripción
identifier string required field

Retorna

Tip

Tipo: RulesConfigurations


withJavascript(javascript)

Set the javascript attribute

Parámetros

Nombre Tipo Opcional Descripción
javascript string

Retorna

Tip

Tipo: RulesConfigurations


withMode(mode)

Set the mode attribute

Parámetros

Nombre Tipo Opcional Descripción
mode string

Retorna

Tip

Tipo: RulesConfigurations


withName(name)

Set the name attribute

Parámetros

Nombre Tipo Opcional Descripción
name string required field

Retorna

Tip

Tipo: RulesConfigurations


withOrganization(organization)

Set the organization attribute

Parámetros

Nombre Tipo Opcional Descripción
organization string required field

Retorna

Tip

Tipo: RulesConfigurations


withParameters(parameters)

Allows the modification of the actions

Parámetros

Nombre Tipo Opcional Descripción
parameters array

Retorna

Tip

Tipo: _RuleCondition


withType(type)

Set the type attribute

Parámetros

Nombre Tipo Opcional Descripción
type string

Retorna

Tip

Tipo: RulesConfigurations


Rule Configurations Actions

constructor

Constructor

Parámetros

Nombre Tipo Opcional Descripción
ogapi InternalOpenGateAPI this is configuration about Opengate North API.
name string Identifier of the ryule configuration to operate

cloneTo(newRuleName, newRuleOpenAction, newRuleCloseAction, newRuleNotifications)

Clones a rule configuration into a new one

Parámetros

Nombre Tipo Opcional Descripción
newRuleName string
newRuleOpenAction boolean
newRuleCloseAction string
newRuleNotifications boolean

Retorna

Tip

Tipo: Promise


Rule Configurations Catalog

This class allow make get request to RuleConfigurations resource into Opengate North API.

constructor

Constructor

Parámetros

Nombre Tipo Opcional Descripción
ogapi InternalOpenGateAPI Reference to the API object.

getTemplates()

Performs a get that returns rule templates

Retorna

Tip

Tipo: Promise


Rule Configurations Finder

This class allow make get request to RuleConfigurations resource into Opengate North API.

constructor

Constructor

Parámetros

Nombre Tipo Opcional Descripción
ogapi InternalOpenGateAPI Reference to the API object.

findByOrganizationAndChannelAndName(organization, channel, name)

Performs a get that returns organizations related

Parámetros

Nombre Tipo Opcional Descripción
organization string organization
channel string channel.
name string Rule Configuration name

Retorna

Tip

Tipo: Promise


Rule Configurations Helper

This class allow make get request to RuleConfigurationsHelper resource into Opengate North API.

constructor

Constructor

Parámetros

Nombre Tipo Opcional Descripción
ogapi InternalOpenGateAPI Reference to the API object.

getDocJavascriptFunctions()

Performs a get that returns documentation of javascript functions from rules service

Retorna

Tip

Tipo: Promise


getDocPrivateJavascriptFunctions()

Performs a get that returns documentation private of javascript functions from rules service

Retorna

Tip

Tipo: Promise


Subsections of schedule

History Finder

This class allow make get request to planner resource into Opengate North API.

constructor

Constructor

Parámetros

Nombre Tipo Opcional Descripción
ogapi InternalOpenGateAPI Reference to the API object.

findByOrganization(organization)

Download a complete list of scheduler history for the organization. This execute a GET http method

Parámetros

Nombre Tipo Opcional Descripción
organization *

Retorna

Tip

Tipo: Promise


findByOrganizationAndSchedulerId(organization, schedulerId)

Download a complete list of scheduler history for the organization and type selected. This execute a GET http method

Parámetros

Nombre Tipo Opcional Descripción
organization *
schedulerId *

Retorna

Tip

Tipo: Promise


findByOrganizationAndType(organization, type)

Download a complete list of scheduler history for the organization and type selected. This execute a GET http method

Parámetros

Nombre Tipo Opcional Descripción
organization *
type *

Retorna

Tip

Tipo: Promise


withLimit(limit)

Marks results limit

Parámetros

Nombre Tipo Opcional Descripción
limit *

Retorna

Tip

Tipo: this


withSchedulerId(schedulerId)

Set parameter schedulerIds

Parámetros

Nombre Tipo Opcional Descripción
schedulerId *

Retorna

Tip

Tipo: this


withSchedulerType(schedulerType)

Set parameter schedulerIds

Parámetros

Nombre Tipo Opcional Descripción
schedulerType *

Retorna

Tip

Tipo: this


Image Execution

This is a base object that contains all you can do about Bundles.

constructor

Constructor

Parámetros

Nombre Tipo Opcional Descripción
Reference InternalOpenGateAPI to the API object.

withEnvFrom(imageExecutionEnvFrom)

Sets the env from for imageExecution

Parámetros

Nombre Tipo Opcional Descripción
imageExecutionEnvFrom array

Retorna

Tip

Tipo: ImageExecution


withEnvVars(imageExecutionEnvVars)

Sets the env vars for imageExecution

Parámetros

Nombre Tipo Opcional Descripción
imageExecutionEnvVars object

Retorna

Tip

Tipo: ImageExecution


withIdentifier(identifier)

Sets the identifier attribute

Parámetros

Nombre Tipo Opcional Descripción
identifier string

Retorna

Tip

Tipo: ImageExecution


withMaxTimeToWaitCallback(asyncResponseMaxTimeToWaitCallback)

Sets the async response with selected timeout

Parámetros

Nombre Tipo Opcional Descripción
asyncResponseMaxTimeToWaitCallback string

Retorna

Tip

Tipo: ImageExecution


withName(imageExecutionName)

Sets the name for imageExecution

Parámetros

Nombre Tipo Opcional Descripción
imageExecutionName string

Retorna

Tip

Tipo: ImageExecution


withOrganization(organization)

Set the organization attribute

Parámetros

Nombre Tipo Opcional Descripción
organization string

Retorna

Tip

Tipo: ImageExecution


withScheduleCronExpression(cronExpression, timezone)

Sets the crontab expression for schedule

Parámetros

Nombre Tipo Opcional Descripción
cronExpression string
timezone string

Retorna

Tip

Tipo: ImageExecution


withScheduleExecuteNow(executeNow)

Sets the executeNow attribute

Parámetros

Nombre Tipo Opcional Descripción
executeNow boolean

Retorna

Tip

Tipo: ImageExecution


withScheduleFrom(from)

Sets the from attribute

Parámetros

Nombre Tipo Opcional Descripción
from string

Retorna

Tip

Tipo: ImageExecution


withScheduleMinutesInterval(interval)

Sets the interval for schedule in minutes

Parámetros

Nombre Tipo Opcional Descripción
interval number in minutes

Retorna

Tip

Tipo: ImageExecution


withScheduleTo(to)

Sets the to attribute

Parámetros

Nombre Tipo Opcional Descripción
to string

Retorna

Tip

Tipo: ImageExecution


withTag(imageExecutionTag)

Sets the tag for imageExecution

Parámetros

Nombre Tipo Opcional Descripción
imageExecutionTag string

Retorna

Tip

Tipo: ImageExecution


withTimeout(timeout)

Sets the execution timeout for imageExecution

Parámetros

Nombre Tipo Opcional Descripción
timeout string

Retorna

Tip

Tipo: ImageExecution


Image Execution Finder

This class allow make get request to planner resource into Opengate North API.

constructor

Constructor

Parámetros

Nombre Tipo Opcional Descripción
ogapi InternalOpenGateAPI Reference to the API object.

findByOrganization(organization)

Download a complete list of scheduler history for the organization. This execute a GET http method

Parámetros

Nombre Tipo Opcional Descripción
organization *

Retorna

Tip

Tipo: Promise


Pipeline

This is a base object that contains all you can do about Bundles.

constructor

Constructor

Parámetros

Nombre Tipo Opcional Descripción
Reference InternalOpenGateAPI to the API object.

addImageExecution(imageExecution)

Adds an Image Execution to the pipeline

Parámetros

Nombre Tipo Opcional Descripción
imageExecution ImageExecution

Retorna

Tip

Tipo: Pipeline


addRestResquest(restRequest)

Adds a rest request to the pipeline

Parámetros

Nombre Tipo Opcional Descripción
restRequest RestRequest

Retorna

Tip

Tipo: Pipeline


withIdentifier(identifier)

Sets the identifier attribute

Parámetros

Nombre Tipo Opcional Descripción
identifier string

Retorna

Tip

Tipo: Pipeline


withOrganization(organization)

Set the organization attribute

Parámetros

Nombre Tipo Opcional Descripción
organization string

Retorna

Tip

Tipo: Pipeline


withScheduleCronExpression(cronExpression, timezone)

Sets the crontab expression for schedule

Parámetros

Nombre Tipo Opcional Descripción
cronExpression string
timezone string

Retorna

Tip

Tipo: Pipeline


withScheduleExecuteNow(executeNow)

Sets the executeNow attribute

Parámetros

Nombre Tipo Opcional Descripción
executeNow boolean

Retorna

Tip

Tipo: Pipeline


withScheduleFrom(from)

Sets the from attribute

Parámetros

Nombre Tipo Opcional Descripción
from string

Retorna

Tip

Tipo: Pipeline


withScheduleMinutesInterval(interval)

Sets the interval for schedule in minutes

Parámetros

Nombre Tipo Opcional Descripción
interval number in minutes

Retorna

Tip

Tipo: Pipeline


withScheduleTo(to)

Sets the to attribute

Parámetros

Nombre Tipo Opcional Descripción
to string

Retorna

Tip

Tipo: Pipeline


Pipeline Finder

This class allow make get request to planner resource into Opengate North API.

constructor

Constructor

Parámetros

Nombre Tipo Opcional Descripción
ogapi InternalOpenGateAPI Reference to the API object.

findByOrganization(organization)

Download a complete list of pipelins for the organization. This executes a GET http method

Parámetros

Nombre Tipo Opcional Descripción
organization *

Retorna

Tip

Tipo: Promise


Rest Request

This is a base object that contains all you can do about Bundles.

constructor

Constructor

Parámetros

Nombre Tipo Opcional Descripción
Reference InternalOpenGateAPI to the API object.

withAsyncResponseMaxTimeToWaitCallback(asyncResponseMaxTimeToWaitCallback)

Sets the async response with selected timeout

Parámetros

Nombre Tipo Opcional Descripción
asyncResponseMaxTimeToWaitCallback string

Retorna

Tip

Tipo: RestRequest


withBody(restRequestBody)

Sets the body for restRequest

Parámetros

Nombre Tipo Opcional Descripción
restRequestBody string

Retorna

Tip

Tipo: RestRequest


withHeaders(restRequestHeaders)

Sets the header for restRequest

Parámetros

Nombre Tipo Opcional Descripción
restRequestHeaders string

Retorna

Tip

Tipo: RestRequest


withIdentifier(identifier)

Sets the identifier attribute

Parámetros

Nombre Tipo Opcional Descripción
identifier string

Retorna

Tip

Tipo: RestRequest


withMethod(restRequestMethod)

Sets the method for restRequest

Parámetros

Nombre Tipo Opcional Descripción
restRequestMethod string

Retorna

Tip

Tipo: RestRequest


withOrganization(organization)

Set the organization attribute

Parámetros

Nombre Tipo Opcional Descripción
organization string

Retorna

Tip

Tipo: RestRequest


withScheduleCronExpression(cronExpression, timezone)

Sets the crontab expression for schedule

Parámetros

Nombre Tipo Opcional Descripción
cronExpression string
timezone string

Retorna

Tip

Tipo: RestRequest


withScheduleExecuteNow(executeNow)

Sets the executeNow attribute

Parámetros

Nombre Tipo Opcional Descripción
executeNow boolean

Retorna

Tip

Tipo: RestRequest


withScheduleFrom(from)

Sets the from attribute

Parámetros

Nombre Tipo Opcional Descripción
from string

Retorna

Tip

Tipo: RestRequest


withScheduleMinutesInterval(interval)

Sets the interval for schedule in minutes

Parámetros

Nombre Tipo Opcional Descripción
interval number in minutes

Retorna

Tip

Tipo: RestRequest


withScheduleTo(to)

Sets the to attribute

Parámetros

Nombre Tipo Opcional Descripción
to string

Retorna

Tip

Tipo: RestRequest


withSyncResponseTimeout(syncResponseTimeout)

Sets the sync response with selected timeout

Parámetros

Nombre Tipo Opcional Descripción
syncResponseTimeout string

Retorna

Tip

Tipo: RestRequest


withUrl(restRequestUrl)

Sets the url for restRequest

Parámetros

Nombre Tipo Opcional Descripción
restRequestUrl string

Retorna

Tip

Tipo: RestRequest


Rest Request Finder

This class allow make get request to planner resource into Opengate North API.

constructor

Constructor

Parámetros

Nombre Tipo Opcional Descripción
ogapi InternalOpenGateAPI Reference to the API object.

findByOrganization(organization)

Download a complete list of scheduler history for the organization. This execute a GET http method

Parámetros

Nombre Tipo Opcional Descripción
organization *

Retorna

Tip

Tipo: Promise


Schedule History Finder

This class allow make get request to planner resource into Opengate North API.

constructor

Constructor

Parámetros

Nombre Tipo Opcional Descripción
ogapi InternalOpenGateAPI Reference to the API object.

findByOrganization(organization)

Download a complete list of scheduler history for the organization. This execute a GET http method

Parámetros

Nombre Tipo Opcional Descripción
organization *

Retorna

Tip

Tipo: Promise


findByOrganizationAndType(organization, type)

Download a complete list of scheduler history for the organization. This execute a GET http method

Parámetros

Nombre Tipo Opcional Descripción
organization *
type *

Retorna

Tip

Tipo: Promise


searching

Subsections of searching

Asset Search

This extends Search and allow make request to any available resource into Opengate North API.

constructor

Constructor

Parámetros

Nombre Tipo Opcional Descripción
ogapi InternalOpenGateAPI this is configuration about Opengate North API.
url string this define a specific resource to make the search
filter object this is the filter
limit object this is the pagination about the search
sort object this defined parameters to order the result of search
group object this defined the group by

execute()

This invoke a request to OpenGate North API and the callback is managed by promises

Retorna

Tip

Tipo: Promise


Base Search

This is a abstract class, it must be extended to another class that defined the specific search. This class is responsible to manage execute request to OpenGate North API

constructor

Constructor

Parámetros

Nombre Tipo Opcional Descripción
ogapi InternalOpenGateAPI this is ogapi instance
resource string this is a base url resource
timeout number timeout on request
serviceBaseURL string base of the uri petition

downloadCsv()

This invoke a request to OpenGate North API and the callback is managed by promises

Retorna

Tip

Tipo: Promise
Promise with data with format csv


execute()

This invoke a request to OpenGate North API and the callback is managed by promises

Retorna

Tip

Tipo: Promise


executeWithAsyncPaging(resource)

This invokes a request for asynchronous paging to the OpenGate North API and the return of the pages is managed by promises and its notify object To cancel the process in the notify method return false or string with custom message for response In case of canceling the process, the response will be 403: Forbidden -> {data: 'Cancel process'|| custom_message, statusCode: 403}

Parámetros

Nombre Tipo Opcional Descripción
resource string resource to find.

Retorna

Tip

Tipo: Promise


builder

Subsections of builder

Administrative State Search Builder

Defined a search over operational status catalogs

constructor

Parámetros

Nombre Tipo Opcional Descripción
parent InternalOpenGateAPI Instance of our InternalOpenGateAPI

build()

Build a instance of StaticSearch

Retorna

Tip

Tipo: StaticSearch

Ejemplos

  ogapi.administrativeStateSearchBuilder().filter({and:[]}).build()

withEntityType(entityType)

Set entityType to search

Parámetros

Nombre Tipo Opcional Descripción
entityType string model name

Retorna

Tip

Tipo: AdministrativeStateSearchBuilder

Ejemplos

 ogapi.administrativeStateSearchBuilder().withEntityType('myEntityType').build()

withId(administrativeStateId)

Sets id to search

Parámetros

Nombre Tipo Opcional Descripción
administrativeStateId string specific type id

Retorna

Tip

Tipo: AdministrativeStateSearchBuilder

Ejemplos

 ogapi.administrativeStateSearchBuilder().withId('myId').build()

Alarms Search Builder

Defined a search over Alarms

constructor

Parámetros

Nombre Tipo Opcional Descripción
parent InternalOpenGateAPI Instance of our InternalOpenGateAPI

group(group)

The search request will have this group by

Parámetros

Nombre Tipo Opcional Descripción
group object

Retorna

Tip

Tipo: AlarmsSearchBuilder

Ejemplos


Allowed Resource Type Search Builder

Defined a search over mobile phone provider catalog

constructor

Parámetros

Nombre Tipo Opcional Descripción
parent InternalOpenGateAPI Instance of our InternalOpenGateAPI

build()

Build a instance of StaticSearch

Retorna

Tip

Tipo: StaticSearch

Ejemplos

  ogapi.AllowedResourceTypeSearchBuilder().build()

withType(type)

Sets type to search

Parámetros

Nombre Tipo Opcional Descripción
type string type to searcg

Retorna

Tip

Tipo: AllowedResourceTypeSearchBuilder

Ejemplos

 ogapi.AllowedResourceTypeSearchBuilder().withType('device').build()

Areas Search Builder

Defined a search over Areas

constructor

Parámetros

Nombre Tipo Opcional Descripción
parent InternalOpenGateAPI Instance of our InternalOpenGateAPI

Assets Search Builder

Defined a search over Assets

constructor

Parámetros

Nombre Tipo Opcional Descripción
parent InternalOpenGateAPI Instance of our InternalOpenGateAPI

build()

Build a instance of Search

Retorna

Tip

Tipo: Search

Ejemplos

 ogapi.assetsSearchBuilder().onProvisioned().build()

group(group)

The search request will have this group by

Parámetros

Nombre Tipo Opcional Descripción
group object

Retorna

Tip

Tipo: AssetsSearchBuilder

Ejemplos


select(select)

The search request will have this filter

Parámetros

Nombre Tipo Opcional Descripción
select SelectBuilder,object

Retorna

Tip

Tipo: AssetsSearchBuilder

Ejemplos

 ogapi.assetsSearchBuilder().select(
     ogapi.newSelectBuilder().add(SE.element("provision.device.identifier", ["value"], "id"), SE.add("device.temperature.value", ["value"]))
 ) // Setting SelectBuilder
 ogapi.assetsSearchBuilder().select({ "elements": [{"name": "provision.device.identifier",
	"fields": [{"field": "value","alias": "identifier"}]},
     {"name": "device.temperature.value","fields": [{"field": "value","alias": "identifier"}]}]
  }) //Custom select

summary()

The response will only have a summary information

Retorna

Tip

Tipo: AssetsSearchBuilder

Ejemplos

ogapi.assetsSearchBuilder().summary() 

Basic Types Search Builder

This is a abstract class, it must be extended to another class that defined the specific search. This class is responsible to manage execute request to OpenGate North API

constructor

Constructor

Parámetros

Nombre Tipo Opcional Descripción
ogapi InternalOpenGateAPI this is ogapi instance
timeout number timeout on request

execute()

This invoke a request to OpenGate North API and the callback is managed by promises

Retorna

Tip

Tipo: Promise


withPath(path)

Sets path to search

Parámetros

Nombre Tipo Opcional Descripción
path string jsonSchemaPath

Retorna

Tip

Tipo: BasicTypesSearchBuilder

Ejemplos

 ogapi.basicTypesSearchBuilder().withPath('string').build()

withPublicParameters(publicParameters)

Sets publicParameters to search

Parámetros

Nombre Tipo Opcional Descripción
publicParameters boolean boolean

Retorna

Tip

Tipo: BasicTypesSearchBuilder

Ejemplos

 ogapi.basicTypesSearchBuilder().withPublicParameters(true).build()

Bulk Execution Search Builder

Searching over all the created bulk process, which are already done or still in progress.

constructor

Parámetros

Nombre Tipo Opcional Descripción
parent InternalOpenGateAPI Instance of our InternalOpenGateAPI

build()

Build a instance of WPSearch

Retorna

Tip

Tipo: WPSearch

Ejemplos

 ogapi.bulkExecutionSearchBuilder().build()

Bulk Search Builder

Defined a search over bulk entities operations

constructor

Parámetros

Nombre Tipo Opcional Descripción
parent InternalOpenGateAPI Instance of our InternalOpenGateAPI

Bundles Search Builder

Defined a search over Bundles

constructor

Parámetros

Nombre Tipo Opcional Descripción
parent InternalOpenGateAPI Instance of our InternalOpenGateAPI

Certificates Search Builder

Defined a search over Bundles

constructor

Parámetros

Nombre Tipo Opcional Descripción
parent InternalOpenGateAPI Instance of our InternalOpenGateAPI

administrable()

The search result will have all certificates which can be administered by the user

Retorna

Tip

Tipo: CertificatesSearchBuilder

Ejemplos

 ogapi.certificatesSearchBuilder().administrable()

assignable()

The search result will have all certificates which can be assignable to some device ogapi.certificatesSearchBuilder().assignable()

Retorna

Tip

Tipo: CertificatesSearchBuilder


withFetch(flag)

Set fecth value

Parámetros

Nombre Tipo Opcional Descripción
flag flag

Retorna

Tip

Tipo: CertificatesSearchBuilder

Ejemplos

 ogapi.certificatesSearchBuilder().withFetch(true)

Channels Search Builder

Defined a search over Channels

constructor

Parámetros

Nombre Tipo Opcional Descripción
parent InternalOpenGateAPI Instance of our InternalOpenGateAPI

disableDefaultSorted()

The response will return a response without sorted

Retorna

Tip

Tipo: ChannelsSearchBuilder

Ejemplos

ogapi.channelsSearchBuilder().disableDefaultSorted() 

summary()

The response will only have a summary information

Retorna

Tip

Tipo: SearchWithSummaryBuilder

Ejemplos

ogapi.channelsSearchBuilder().summary() 

Communications Module Type Search Builder

Defined a search over operational status catalogs

constructor

Parámetros

Nombre Tipo Opcional Descripción
parent InternalOpenGateAPI Instance of our InternalOpenGateAPI

build()

Build a instance of StaticSearch

Retorna

Tip

Tipo: StaticSearch

Ejemplos

  ogapi.administrativeStateSearchBuilder().filter({and:[]}).build()

withType(communicationsModuleType)

Sets id to search

Parámetros

Nombre Tipo Opcional Descripción
communicationsModuleType string specific type

Retorna

Tip

Tipo: CommunicationsModuleTypeSearchBuilder

Ejemplos

 ogapi.communicationsModuleTypeSearchBuilder().withType('GENERIC').build()

Country Codes Search Builder

Defined a search over operational status catalogs

constructor

Parámetros

Nombre Tipo Opcional Descripción
parent InternalOpenGateAPI Instance of our InternalOpenGateAPI

build()

Build a instance of StaticSearch

Retorna

Tip

Tipo: StaticSearch

Ejemplos

  ogapi.countryCodesSearchBuilder().filter({and:[]}).build()

Datamodels Search Builder

Defined a search over Datamodels

constructor

Parámetros

Nombre Tipo Opcional Descripción
parent InternalOpenGateAPI Instance of our InternalOpenGateAPI

Datapoints Search Builder

Defined a search over Datastreams

constructor

Parámetros

Nombre Tipo Opcional Descripción
parent InternalOpenGateAPI Instance of our InternalOpenGateAPI

betweenDates(fromDate, toDate)

Set time window to search

Parámetros

Nombre Tipo Opcional Descripción
fromDate date Add from date
toDate date Add to date

Retorna

Tip

Tipo: DatapointsSearchBuilder

Ejemplos

ogapi.datapointsSearchBuilder().withDeviceId('myDevice').build()

select(select)

The search request will have this filter

Parámetros

Nombre Tipo Opcional Descripción
select SelectBuilder,object

Retorna

Tip

Tipo: SearchBuilder

Ejemplos

 ogapi.entitiesSearchBuilder().select(
     ogapi.newSelectBuilder().add(SE.element("provision.device.identifier", ["value"], "id"), SE.add("device.temperature.value", ["value"]))
 ) // Setting SelectBuilder
 ogapi.entitiesSearchBuilder().select({ "elements": [{"name": "provision.device.identifier",
	"fields": [{"field": "value","alias": "identifier"}]},
     {"name": "device.temperature.value","fields": [{"field": "value","alias": "identifier"}]}]
  }) //Custom select

withDatastream(datastreamId)

Set datastreamId to search

Parámetros

Nombre Tipo Opcional Descripción
datastreamId string Datastream.id of Datapoint

Retorna

Tip

Tipo: DatapointsSearchBuilder

Ejemplos

ogapi.datapointsSearchBuilder().withDeviceId('myDevice').build()

withDeviceId(deviceId)

Set deviceId to search

Parámetros

Nombre Tipo Opcional Descripción
deviceId string Prov.customId of Device

Retorna

Tip

Tipo: DatapointsSearchBuilder

Ejemplos

ogapi.datapointsSearchBuilder().withDeviceId('myDevice').build()

withFeed(feedId)

Set feedName to search

Parámetros

Nombre Tipo Opcional Descripción
feedId string Datastream.id of Datapoint

Retorna

Tip

Tipo: DatapointsSearchBuilder

Ejemplos

ogapi.datapointsSearchBuilder().withDeviceId('myDevice').build()

Dataset Entities Search Builder

Defined a search over Executions

constructor

Parámetros

Nombre Tipo Opcional Descripción
parent InternalOpenGateAPI Instance of our InternalOpenGateAPI

build()

Build a instance of Search

Retorna

Tip

Tipo: Search

Ejemplos

 ogapi.datasetEntitiesSearchBuilder()

disableCaseSensitive(flag)

The response will return a response by applying the filter with likes case-no-sensitive

Parámetros

Nombre Tipo Opcional Descripción
flag *

Retorna

Tip

Tipo: DatasetEntitiesSearchBuilder

Ejemplos

ogapi.datasetEntitiesSearchBuilder().disableCaseSensitive() 

disableDefaultSorted()

The response will return a response without sorted

Retorna

Tip

Tipo: DatasetEntitiesSearchBuilder

Ejemplos

ogapi.datasetEntitiesSearchBuilder().disableDefaultSorted() 

flattened()

The response will return a flattened response

Retorna

Tip

Tipo: DatasetEntitiesSearchBuilder

Ejemplos

ogapi.datasetEntitiesSearchBuilder().flattened() 

group(group)

The search request will have this group by

Parámetros

Nombre Tipo Opcional Descripción
group object

Retorna

Tip

Tipo: DatasetEntitiesSearchBuilder

Ejemplos


removeCaseSensitive()

The response will return a response by deleteing the parameters with likes case-no-sensitive

Retorna

Tip

Tipo: DatasetEntitiesSearchBuilder

Ejemplos

ogapi.datasetEntitiesSearchBuilder().disableCaseSensitive() 

select(select)

The search request will have this filter

Parámetros

Nombre Tipo Opcional Descripción
select SelectBuilder,object

Retorna

Tip

Tipo: DatasetEntitiesSearchBuilder

Ejemplos

 ogapi.datasetEntitiesSearchBuilder().select(
     ogapi.newSelectBuilder().add(SE.element("provision.device.identifier", ["value"], "id"), SE.add("device.temperature.value", ["value"]))
 ) // Setting SelectBuilder
 ogapi.datasetEntitiesSearchBuilder().select({ "elements": [{"name": "provision.device.identifier",
	"fields": [{"field": "value","alias": "identifier"}]},
     {"name": "device.temperature.value","fields": [{"field": "value","alias": "identifier"}]}]
  }) //Custom select

Dataset Search Builder

Defined a search over Executions

constructor

Parámetros

Nombre Tipo Opcional Descripción
parent InternalOpenGateAPI Instance of our InternalOpenGateAPI

build()

Build a instance of Search

Retorna

Tip

Tipo: Search

Ejemplos

 ogapi.datasetSearchBuilder(organization, datasetId).build()

group(group)

The search request will have this group by

Parámetros

Nombre Tipo Opcional Descripción
group object

Retorna

Tip

Tipo: DatasetSearchBuilder

Ejemplos


select(select)

The search request will have this filter

Parámetros

Nombre Tipo Opcional Descripción
select SelectBuilder,object

Retorna

Tip

Tipo: DatasetSearchBuilder

Ejemplos

 ogapi.datasetSearchBuilder(organization, datasetId).select(
     ogapi.newSelectBuilder().add(SE.element("provision.device.identifier", ["value"], "id"), SE.add("device.temperature.value", ["value"]))
 ) // Setting SelectBuilder
 ogapi.datasetSearchBuilder(organization, datasetId).select({ "elements": [{"name": "provision.device.identifier",
	"fields": [{"field": "value","alias": "identifier"}]},
     {"name": "device.temperature.value","fields": [{"field": "value","alias": "identifier"}]}]
  }) //Custom select

sort(sort)

The search request will use this sort

Parámetros

Nombre Tipo Opcional Descripción
sort string

Retorna

Tip

Tipo: DatasetSearchBuilder

Ejemplos


Datasets Catalog Search Builder

Defined a search over Areas

constructor

Parámetros

Nombre Tipo Opcional Descripción
parent InternalOpenGateAPI Instance of our InternalOpenGateAPI

Datastreams Search Builder

Defined a search over Datastreams

constructor

Parámetros

Nombre Tipo Opcional Descripción
parent InternalOpenGateAPI Instance of our InternalOpenGateAPI

Devices Search Builder

Defined a search over Devices

constructor

Parámetros

Nombre Tipo Opcional Descripción
parent InternalOpenGateAPI Instance of our InternalOpenGateAPI

group(group)

The search request will have this group by

Parámetros

Nombre Tipo Opcional Descripción
group object

Retorna

Tip

Tipo: DevicesSearchBuilder

Ejemplos


summary()

The response will only have a summary information

Retorna

Tip

Tipo: DevicesSearchBuilder

Ejemplos

ogapi.devicesSearchBuilder().summary() 

Entities Search Builder

Defined a search over Executions

constructor

Parámetros

Nombre Tipo Opcional Descripción
parent InternalOpenGateAPI Instance of our InternalOpenGateAPI

build()

Build a instance of Search

Retorna

Tip

Tipo: Search

Ejemplos

 ogapi.entitiesSearchBuilder()

disableCaseSensitive(flag)

The response will return a response by applying the filter with likes case-no-sensitive

Parámetros

Nombre Tipo Opcional Descripción
flag *

Retorna

Tip

Tipo: EntitiesSearchBuilder

Ejemplos

ogapi.entitiesSearchBuilder().disableCaseSensitive() 

disableDefaultSorted()

The response will return a response without sorted

Retorna

Tip

Tipo: EntitiesSearchBuilder

Ejemplos

ogapi.entitiesSearchBuilder().disableDefaultSorted() 

flattened()

The response will return a flattened response

Retorna

Tip

Tipo: EntitiesSearchBuilder

Ejemplos

ogapi.entitiesSearchBuilder().flattened() 

group(group)

The search request will have this group by

Parámetros

Nombre Tipo Opcional Descripción
group object

Retorna

Tip

Tipo: EntitiesSearchBuilder

Ejemplos


removeCaseSensitive()

The response will return a response by deleteing the parameters with likes case-no-sensitive

Retorna

Tip

Tipo: EntitiesSearchBuilder

Ejemplos

ogapi.entitiesSearchBuilder().disableCaseSensitive() 

select(select)

The search request will have this filter

Parámetros

Nombre Tipo Opcional Descripción
select SelectBuilder,object

Retorna

Tip

Tipo: EntitiesSearchBuilder

Ejemplos

 ogapi.entitiesSearchBuilder().select(
     ogapi.newSelectBuilder().add(SE.element("provision.device.identifier", ["value"], "id"), SE.add("device.temperature.value", ["value"]))
 ) // Setting SelectBuilder
 ogapi.entitiesSearchBuilder().select({ "elements": [{"name": "provision.device.identifier",
	"fields": [{"field": "value","alias": "identifier"}]},
     {"name": "device.temperature.value","fields": [{"field": "value","alias": "identifier"}]}]
  }) //Custom select

Executions History Search Builder

Defined a search over Executions

constructor

Parámetros

Nombre Tipo Opcional Descripción
parent InternalOpenGateAPI Instance of our InternalOpenGateAPI

Executions Search Builder

Defined a search over Executions

constructor

Parámetros

Nombre Tipo Opcional Descripción
parent InternalOpenGateAPI Instance of our InternalOpenGateAPI

Feeds Search Builder

Defined a search over Feeds

constructor

Parámetros

Nombre Tipo Opcional Descripción
parent InternalOpenGateAPI Instance of our InternalOpenGateAPI

Fields Definition Search Builder

Defined a search over operational status catalogs

constructor

Parámetros

Nombre Tipo Opcional Descripción
parent InternalOpenGateAPI Instance of our InternalOpenGateAPI

build()

Build a instance of StaticSearch

Retorna

Tip

Tipo: StaticSearch

Ejemplos

  ogapi.FieldsDefinitionSearchBuilder().build()

withType(fieldDefinitionType)

Sets id to search

Parámetros

Nombre Tipo Opcional Descripción
fieldDefinitionType string specific type

Retorna

Tip

Tipo: fieldsDefinitionSearchBuilder

Ejemplos

 ogapi.fieldsDefinitionSearchBuilder().withType('string').build()

Flattened Search Builder

This is a abstract class. It is a class that extends from base to make all kind of summary search request to OpenGate North API.

constructor

Constructor

Parámetros

Nombre Tipo Opcional Descripción
parent InternalOpenGateAPI this is ogapi instance
routes object this defined the routes. One of those routes must be called on Builder before call build method.

build()

Build a instance of Search

Retorna

Tip

Tipo: Search

Ejemplos

 ogapi.devicesSearchBuilder().onProvisioned().build()

flattened()

The response will return a flattened response

Retorna

Tip

Tipo: FlattenedSearchBuilder

Ejemplos

ogapi.entitiesSearchBuilder().flattened() 

Io T Datastream Access Search Builder

Defined a search over mobile phone provider catalog

constructor

Parámetros

Nombre Tipo Opcional Descripción
parent InternalOpenGateAPI Instance of our InternalOpenGateAPI

build()

Build a instance of StaticSearch

Retorna

Tip

Tipo: StaticSearch

Ejemplos

  ogapi.ioTDatastreamAccessSearchBuilder().build()

Io T Datastream Period Search Builder

Defined a search over mobile phone provider catalog

constructor

Parámetros

Nombre Tipo Opcional Descripción
parent InternalOpenGateAPI Instance of our InternalOpenGateAPI

build()

Build a instance of StaticSearch

Retorna

Tip

Tipo: StaticSearch

Ejemplos

  ogapi.ioTDatastreamPeriodSearchBuilder().build()

Io T Datastream Storage Period Search Builder

Defined a search over mobile phone provider catalog

constructor

Parámetros

Nombre Tipo Opcional Descripción
parent InternalOpenGateAPI Instance of our InternalOpenGateAPI

build()

Build a instance of StaticSearch

Retorna

Tip

Tipo: StaticSearch

Ejemplos

  ogapi.ioTDatastreamStoragePeriodSearchBuilder().build()

Mobile Phone Provider Search Builder

Defined a search over mobile phone provider catalog

constructor

Parámetros

Nombre Tipo Opcional Descripción
parent InternalOpenGateAPI Instance of our InternalOpenGateAPI

Operation Types Builder

Defined a search over operationTypes

constructor

Parámetros

Nombre Tipo Opcional Descripción
parent InternalOpenGateAPI Instance of our InternalOpenGateAPI

build()

Build a instance of Search

Retorna

Tip

Tipo: Search

Ejemplos

 ogapi.devicesSearchBuilder().onProvisioned().build()

Operational Status Search Builder

Defined a search over operational status catalogs

constructor

Parámetros

Nombre Tipo Opcional Descripción
parent InternalOpenGateAPI Instance of our InternalOpenGateAPI

build()

Build a instance of StaticSearch

Retorna

Tip

Tipo: StaticSearch

Ejemplos

  ogapi.operationalStatusSearchBuilder().filter({and:[]}).build()

withEntityType(entityType)

Set entityType to search

Parámetros

Nombre Tipo Opcional Descripción
entityType string model name

Retorna

Tip

Tipo: OperationalStatusSearchBuilder

Ejemplos

 ogapi.operationalStatusSearchBuilder().withEntityType('myEntityType').build()

withId(operationalStatusId)

Sets id to search

Parámetros

Nombre Tipo Opcional Descripción
operationalStatusId string operational status id

Retorna

Tip

Tipo: OperationalStatusSearchBuilder

Ejemplos

 ogapi.operationalStatusSearchBuilder().withId('myId').build()

Operations Search Builder

Defined a search over executions´s opreations

constructor

Parámetros

Nombre Tipo Opcional Descripción
parent InternalOpenGateAPI Instance of our InternalOpenGateAPI

Organizations Search Builder

Defined a search over Devices

constructor

Parámetros

Nombre Tipo Opcional Descripción
parent InternalOpenGateAPI Instance of our InternalOpenGateAPI

disableDefaultSorted()

The response will return a response without sorted

Retorna

Tip

Tipo: OrganizationsSearchBuilder

Ejemplos

ogapi.ticketsSearchBuilder().disableDefaultSorted() 

flattened()

The response will return a flattened response

Retorna

Tip

Tipo: OrganizationsSearchBuilder

Ejemplos

ogapi.ticketsSearchBuilder().flattened() 

group(group)

The search request will have this group by

Parámetros

Nombre Tipo Opcional Descripción
group object

Retorna

Tip

Tipo: SearchBuilder

Ejemplos


select(select)

The search request will have this filter

Parámetros

Nombre Tipo Opcional Descripción
select SelectBuilder,object

Retorna

Tip

Tipo: SearchBuilder

Ejemplos

 ogapi.ticketsSearchBuilder().select(
     ogapi.newSelectBuilder().add(SE.element("provision.ticket.identifier", [[{"field": "value","alias": "identifier"}], ), SE.add("device.temperature.value", [[{"field": "value"}]))
 ) // Setting SelectBuilder
 ogapi.ticketsSearchBuilder().select({ "elements": [{"name": "provision.device.identifier",
	"fields": [{"field": "value","alias": "identifier"}]},
     {"name": "provision.ticket.name","fields": [{"field": "value","alias": "identifier"}]}]
  }) //Custom select

summary()

The response will only have a summary information

Retorna

Tip

Tipo: OrganizationsSearchBuilder

Ejemplos

ogapi.ticketsSearchBuilder().summary() 

Pre Filtered Search Builder

This is a abstract class. It is a class that extends from base to make all kind of summary search request to OpenGate North API.

constructor

Constructor

Parámetros

Nombre Tipo Opcional Descripción
parent InternalOpenGateAPI this is ogapi instance
routes object this defined the routes. One of those routes must be called on Builder before call build method.

collected()

This option forces search api to add a filter of collected content

Retorna

Tip

Tipo: PreFilteredSearchBuilder

Ejemplos

ogapi.subscribersSearchBuilder().collected() 

disableCaseSensitive(flag)

The response will return a response by applying the filter with likes case-no-sensitive

Parámetros

Nombre Tipo Opcional Descripción
flag *

Retorna

Tip

Tipo: EntitiesSearchBuilder

Ejemplos

ogapi.entitiesSearchBuilder().disableCaseSensitive() 

disableDefaultSorted()

The response will return a response without sorted

Retorna

Tip

Tipo: PreFilteredSearchBuilder

Ejemplos

ogapi.assetsSearchBuilder().disableDefaultSorted() 

provisioned()

This option forces search api to add a filter of provisioned content

Retorna

Tip

Tipo: PreFilteredSearchBuilder

Ejemplos

ogapi.subscribersSearchBuilder().provisioned() 

removeCaseSensitive()

The response will return a response by applying the filter with likes case-no-sensitive

Retorna

Tip

Tipo: EntitiesSearchBuilder

Ejemplos

ogapi.entitiesSearchBuilder().removeCaseSensitive() 

select(select)

The search request will have this filter

Parámetros

Nombre Tipo Opcional Descripción
select SelectBuilder,object

Retorna

Tip

Tipo: PreFilteredSearchBuilder

Ejemplos

 ogapi.devicesSearchBuilder().select(
     ogapi.newSelectBuilder().add(SE.element("provision.device.identifier", ["value"], "id"), SE.add("device.temperature.value", ["value"]))
 ) // Setting SelectBuilder
 ogapi.devicesSearchBuilder().select({
     "elements": [
         {"name": "provision.device.identifier","fields": ["value"],"alias": "id"},
         {"name": "device.temperature.value","fields": ["value"]}
     ]
 }) //Custom select

Raw Search Builder

Defined a search over custom resource and custom filter

build()

Create Search instance

Retorna

Tip

Tipo: *
Search


filter(rawFilter)

Set raw filter

Parámetros

Nombre Tipo Opcional Descripción
rawFilter object raw filter

Retorna

Tip

Tipo: *
RawSearchBuilder


from(url)

Set custom url

Parámetros

Nombre Tipo Opcional Descripción
url string custom Opengate North API url

Retorna

Tip

Tipo: *
RawSearchBuilder


limit(rawLimit)

Set raw limit

Parámetros

Nombre Tipo Opcional Descripción
rawLimit object raw limit

Retorna

Tip

Tipo: *
RawSearchBuilder


Resource Type Search Builder

Defined a search over mobile phone provider catalog

constructor

Parámetros

Nombre Tipo Opcional Descripción
parent InternalOpenGateAPI Instance of our InternalOpenGateAPI

build()

Build a instance of StaticSearch

Retorna

Tip

Tipo: StaticSearch

Ejemplos

  ogapi.ResourceTypeSearchBuilder().build()

Rule Configuration Severity Search Builder

Defined a search over ruleConfigurationSeverity catalog

constructor

Parámetros

Nombre Tipo Opcional Descripción
parent InternalOpenGateAPI Instance of our InternalOpenGateAPI

build()

Build a instance of StaticSearch

Retorna

Tip

Tipo: StaticSearch

Ejemplos

  ogapi.ruleConfigurationSeveritySearchBuilder().build()

Rule Mode Search Builder

Defined a search over ruleMode catalog

constructor

Parámetros

Nombre Tipo Opcional Descripción
parent InternalOpenGateAPI Instance of our InternalOpenGateAPI

build()

Build a instance of StaticSearch

Retorna

Tip

Tipo: StaticSearch

Ejemplos

  ogapi.ruleModeSearchBuilder().build()

Rule Type Search Builder

Defined a search over ruleType catalog

constructor

Parámetros

Nombre Tipo Opcional Descripción
parent InternalOpenGateAPI Instance of our InternalOpenGateAPI

build()

Build a instance of StaticSearch

Retorna

Tip

Tipo: StaticSearch

Ejemplos

  ogapi.ruleTypeSearchBuilder().build()

Rules Search Builder

Defined a search over Rulse

constructor

Parámetros

Nombre Tipo Opcional Descripción
parent InternalOpenGateAPI Instance of our InternalOpenGateAPI

Search Builder

This is a abstract class. It is a base to make all kind of search request to OpenGate North API.

constructor

Constructor

Parámetros

Nombre Tipo Opcional Descripción
parent InternalOpenGateAPI this is ogapi instance
routes object this defined the routes. One of those routes must be called on Builder before call build method.

addSortAscendingBy(filterField)

Add ascending param into the sort search object

Parámetros

Nombre Tipo Opcional Descripción
filterField string This field must be allowed into the specific resource

Retorna

Tip

Tipo: SearchBuilder

Ejemplos

 ogapi.subscriptionsSearchBuilder().addSortAscendingBy('prov.customid') // Order by prov.customid Ascending  

addSortBy(filterField, typeSort)

Add ascending/descending param into the sort search object

Parámetros

Nombre Tipo Opcional Descripción
filterField string This field must be allowed into the specific resource
typeSort string

Retorna

Tip

Tipo: SearchBuilder

Ejemplos

 ogapi.subscriptionsSearchBuilder().addSortBy('prov.customid','ASCENDING') // Order by prov.customid Ascending
 ogapi.devicesSearchBuilder().addSortBy('prov.customid','DESCENDING') // Order by prov.customid Descending 

addSortDescendingBy(filterField)

Add descending param into the sort search object

Parámetros

Nombre Tipo Opcional Descripción
filterField string This field must be allowed into the specific resource

Retorna

Tip

Tipo: SearchBuilder

Ejemplos

 ogapi.devicesSearchBuilder().addSortDescendingBy('prov.customid') // Order by prov.customid Descending

build()

Build a instance of Search

Retorna

Tip

Tipo: Search

Ejemplos

 ogapi.devicesSearchBuilder().onProvisioned().build()

filter(filter)

The search request will have this filter

Parámetros

Nombre Tipo Opcional Descripción
filter FilterBuilder,object

Retorna

Tip

Tipo: SearchBuilder

Ejemplos

 ogapi.subscriptionsSearchBuilder().filter(
     ogapi.newFilterBuilder().and(Ex.like('prov.customid', 'SN32'), Ex.neq('entityId', '1124'))
 ) // Setting FilterBuilder
 ogapi.subscriptionsSearchBuilder().filter(
      {"and": [{"like": {"entityId": "0000000000000001"}}]}
 ) // Custom filter

findAllFields(input)

Return a promise which it will contains an array with fields recommended with complete structure

Parámetros

Nombre Tipo Opcional Descripción
input *

Retorna

Tip

Tipo: Promise


findFieldPath(field)

Return a promise which it will contains an string with the path of a field

Parámetros

Nombre Tipo Opcional Descripción
field *

Retorna

Tip

Tipo: Promise


findFields(input)

Return a promise which it will contains an array with fields recommended with only identifier

Parámetros

Nombre Tipo Opcional Descripción
input *

Retorna

Tip

Tipo: Promise


limit(size, start)

Set reponse pagination.

Parámetros

Nombre Tipo Opcional Descripción
size number Defined the number of elements on response
start number Defined the offset on response

Retorna

Tip

Tipo: SearchBuilder

Ejemplos

 ogapi.subscribersSearchBuilder().limit(10) // Without offset
 ogapi.subscribersSearchBuilder().limit(25,50) //With offset value 50

removeSortBy(filterField)

Remove sort param from the search object

Parámetros

Nombre Tipo Opcional Descripción
filterField string This field must be allowed into the specific resource

Retorna

Tip

Tipo: SearchBuilder

Ejemplos

 ogapi.subscriptionsSearchBuilder().removeSortBy('prov.customid') // Remove order by prov.customid
 ogapi.subscriptionsSearchBuilder().removeSortBy() // Remove all order by parameters

withTimeout(ms)

The request will have a specific time out if it will be exceeded then the promise throw an exception

Parámetros

Nombre Tipo Opcional Descripción
ms number timeout in milliseconds

Retorna

Tip

Tipo: SearchBuilder

Ejemplos

 ogapi.subscriptionsSearchBuilder().withTimeout(2000) 

Search With Summary Builder

This is a abstract class. It is a class that extends from base to make all kind of summary search request to OpenGate North API.

constructor

Constructor

Parámetros

Nombre Tipo Opcional Descripción
parent InternalOpenGateAPI this is ogapi instance
routes object this defined the routes. One of those routes must be called on Builder before call build method.

summary()

The response will only have a summary information

Retorna

Tip

Tipo: SearchWithSummaryBuilder

Ejemplos

ogapi.subscriptionsSearchBuilder().summary() 

Service Group Search Builder

Defined a search over service group catalogs

constructor

Parámetros

Nombre Tipo Opcional Descripción
parent InternalOpenGateAPI Instance of our InternalOpenGateAPI

build()

Build a instance of StaticSearch

Retorna

Tip

Tipo: StaticSearch

Ejemplos

  ogapi.serviceGroupSearchBuilder().filter({and:[]}).build()

withEntityType(entityType)

Set entityType to search

Parámetros

Nombre Tipo Opcional Descripción
entityType string entity type

Retorna

Tip

Tipo: ServiceGroupSearchBuilder

Ejemplos

 ogapi.serviceGroupSearchBuilder().withEntityType('myEntityType').build()

Softwares Search Builder

Defined a search over Datastreams

constructor

Parámetros

Nombre Tipo Opcional Descripción
parent InternalOpenGateAPI Instance of our InternalOpenGateAPI

withHardwareId(hardwareId)

Sets hardware id to search

Parámetros

Nombre Tipo Opcional Descripción
hardwareId string hardware id

Retorna

Tip

Tipo: SoftwaresSearchBuilder

Ejemplos

 ogapi.hardwareSearchBuilder().withHardwareId('myHardware').build()

withId(softwareId)

Sets softwareId to search

Parámetros

Nombre Tipo Opcional Descripción
softwareId string software id

Retorna

Tip

Tipo: SoftwaresSearchBuilder

Ejemplos

 ogapi.softwareSearchBuilder().withId('mySoftwareId').build()

withManufacturer(manufacturerName)

Set feedName to search

Parámetros

Nombre Tipo Opcional Descripción
manufacturerName string manufacturer name

Retorna

Tip

Tipo: SoftwaresSearchBuilder

Ejemplos

 ogapi.softwareSearchBuilder().withManufacturer('myManufacturer').build()

withModel(modelName)

Set modelName to search

Parámetros

Nombre Tipo Opcional Descripción
modelName string model name

Retorna

Tip

Tipo: SoftwaresSearchBuilder

Ejemplos

 ogapi.softwareSearchBuilder().withModel('myModel').build()

withModelVersion(modelVersion)

Set modelVersion to search

Parámetros

Nombre Tipo Opcional Descripción
modelVersion string model version

Retorna

Tip

Tipo: SoftwaresSearchBuilder

Ejemplos

 ogapi.softwareSearchBuilder().withModelVersion('myModelVersion).build()

withName(softwareName)

Set softwareName to search

Parámetros

Nombre Tipo Opcional Descripción
softwareName string software name

Retorna

Tip

Tipo: SoftwaresSearchBuilder

Ejemplos

 ogapi.softwareSearchBuilder().withName('mySoftware').build()

withType(softwareType)

Set softwareType to search

Parámetros

Nombre Tipo Opcional Descripción
softwareType string software version

Retorna

Tip

Tipo: SoftwaresSearchBuilder

Ejemplos

 ogapi.softwareSearchBuilder().withType('mySoftwareType).build()

withVersion(softwareVersion)

Set softwareVersion to search

Parámetros

Nombre Tipo Opcional Descripción
softwareVersion string software version

Retorna

Tip

Tipo: SoftwaresSearchBuilder

Ejemplos

 ogapi.softwareSearchBuilder().withVersion('mySoftwareVersion).build()

Subscribers Search Builder

Defined a search over Subscribers

constructor

Parámetros

Nombre Tipo Opcional Descripción
parent InternalOpenGateAPI Instance of our InternalOpenGateAPI

Subscriptions Search Builder

Defined a search over Subscriptions

constructor

Parámetros

Nombre Tipo Opcional Descripción
parent InternalOpenGateAPI Instance of our InternalOpenGateAPI

Tasks Search Builder

Defined a search over periodic executions´s operations

constructor

Parámetros

Nombre Tipo Opcional Descripción
parent InternalOpenGateAPI Instance of our InternalOpenGateAPI

Ticket Priority Search Builder

Defined a search over ticket priority catalog

constructor

Parámetros

Nombre Tipo Opcional Descripción
parent InternalOpenGateAPI Instance of our InternalOpenGateAPI

build()

Build a instance of StaticSearch

Retorna

Tip

Tipo: StaticSearch

Ejemplos

  ogapi.ticketPrioritySearchBuilder().build()

Ticket Severity Search Builder

Defined a search over ticket severity catalog

constructor

Parámetros

Nombre Tipo Opcional Descripción
parent InternalOpenGateAPI Instance of our InternalOpenGateAPI

build()

Build a instance of StaticSearch

Retorna

Tip

Tipo: StaticSearch

Ejemplos

  ogapi.ticketSeveritySearchBuilder().build()

Ticket Status Search Builder

Defined a search over ticket status catalog

constructor

Parámetros

Nombre Tipo Opcional Descripción
parent InternalOpenGateAPI Instance of our InternalOpenGateAPI

build()

Build a instance of StaticSearch

Retorna

Tip

Tipo: StaticSearch

Ejemplos

  ogapi.ticketStatusSearchBuilder().build()

Tickets Search Builder

Defined a search over Devices

constructor

Parámetros

Nombre Tipo Opcional Descripción
parent InternalOpenGateAPI Instance of our InternalOpenGateAPI

disableDefaultSorted()

The response will return a response without sorted

Retorna

Tip

Tipo: TicketsSearchBuilder

Ejemplos

ogapi.ticketsSearchBuilder().disableDefaultSorted() 

flattened()

The response will return a flattened response

Retorna

Tip

Tipo: TicketsSearchBuilder

Ejemplos

ogapi.ticketsSearchBuilder().flattened() 

group(group)

The search request will have this group by

Parámetros

Nombre Tipo Opcional Descripción
group object

Retorna

Tip

Tipo: SearchBuilder

Ejemplos


select(select)

The search request will have this filter

Parámetros

Nombre Tipo Opcional Descripción
select SelectBuilder,object

Retorna

Tip

Tipo: SearchBuilder

Ejemplos

 ogapi.ticketsSearchBuilder().select(
     ogapi.newSelectBuilder().add(SE.element("provision.ticket.identifier", [[{"field": "value","alias": "identifier"}], ), SE.add("device.temperature.value", [[{"field": "value"}]))
 ) // Setting SelectBuilder
 ogapi.ticketsSearchBuilder().select({ "elements": [{"name": "provision.device.identifier",
	"fields": [{"field": "value","alias": "identifier"}]},
     {"name": "provision.ticket.name","fields": [{"field": "value","alias": "identifier"}]}]
  }) //Custom select

summary()

The response will only have a summary information

Retorna

Tip

Tipo: TicketsSearchBuilder

Ejemplos

ogapi.ticketsSearchBuilder().summary() 

Timeserie Dataset Builder

Defined a search over timeseries

constructor

Parámetros

Nombre Tipo Opcional Descripción
parent InternalOpenGateAPI Instance of our InternalOpenGateAPI

addColumn(name, aggregation, alias)

Add column that will be requested

Parámetros

Nombre Tipo Opcional Descripción
name string
aggregation string
alias string

Retorna

Tip

Tipo: TimeserieDatasetBuilder


build()

Build a instance of Search

Retorna

Tip

Tipo: Search

Ejemplos

 ogapi.timeserieDatasetBuilder(organization, timeserieId).build()

columns(columns)

Add columns that will be requested

Parámetros

Nombre Tipo Opcional Descripción
columns array

Retorna

Tip

Tipo: TimeserieDatasetBuilder


select(select)

The search request will have

Parámetros

Nombre Tipo Opcional Descripción
select object

Retorna

Tip

Tipo: TimeserieDatasetBuilder


Timeserie Downsampler Builder

Defined a search over timeseries

constructor

Parámetros

Nombre Tipo Opcional Descripción
parent InternalOpenGateAPI Instance of our InternalOpenGateAPI

addColumn(name, interpolation, aggregation, alias)

Add column that will be requested

Parámetros

Nombre Tipo Opcional Descripción
name string
interpolation string
aggregation string
alias string

Retorna

Tip

Tipo: TimeserieDownsamplerBuilder


bucketTime(bucketTime)

The bucket for the downsampling (must be higher than the time series bucket)

Parámetros

Nombre Tipo Opcional Descripción
bucketTime number

Retorna

Tip

Tipo: TimeserieDownsamplerBuilder


build()

Build a instance of Search

Retorna

Tip

Tipo: Search

Ejemplos

 ogapi.timeserieDownsamplerBuilder(organization, timeserieId).build()

columns(columns)

Add columns that will be requested

Parámetros

Nombre Tipo Opcional Descripción
columns array

Retorna

Tip

Tipo: TimeserieDownsamplerBuilder


select(select)

The search request will have this select

Parámetros

Nombre Tipo Opcional Descripción
select object

Retorna

Tip

Tipo: TimeserieDownsamplerBuilder


start(start)

The start time for the downsampling

Parámetros

Nombre Tipo Opcional Descripción
start string

Retorna

Tip

Tipo: TimeserieDownsamplerBuilder


Timeserie Search Builder

Defined a search over timeseries

constructor

Parámetros

Nombre Tipo Opcional Descripción
parent InternalOpenGateAPI Instance of our InternalOpenGateAPI

build()

Build a instance of Search

Retorna

Tip

Tipo: Search

Ejemplos

 ogapi.timeserieSearchBuilder(organization, timeserieId).build()

group(group)

The search request will have this group by

Parámetros

Nombre Tipo Opcional Descripción
group object

Retorna

Tip

Tipo: TimeserieSearchBuilder

Ejemplos


select(select)

The search request will have this filter

Parámetros

Nombre Tipo Opcional Descripción
select SelectBuilder,object

Retorna

Tip

Tipo: TimeserieSearchBuilder

Ejemplos

 ogapi.timeserieSearchBuilder(organization, timeserieId).select(
     ogapi.newSelectBuilder().add(SE.element("Identifier", ["value"], "id"), SE.add("Temperature", ["value"]))
 ) // Setting SelectBuilder
 ogapi.timeserieSearchBuilder(organization, timeserieId).select({ "elements": [{"name": "Identifier",
	"fields": [{"field": "value","alias": "identifier"}]},
     {"name": "Temperature","fields": [{"field": "value","alias": "identifier"}]}]
  }) //Custom select

sort(sort)

The search request will use this sort

Parámetros

Nombre Tipo Opcional Descripción
sort string

Retorna

Tip

Tipo: TimeserieSearchBuilder

Ejemplos


Timezone Search Builder

Defined a search over operational status catalogs

constructor

Parámetros

Nombre Tipo Opcional Descripción
parent InternalOpenGateAPI Instance of our InternalOpenGateAPI

build()

Build a instance of StaticSearch

Retorna

Tip

Tipo: StaticSearch

Ejemplos

  ogapi.timezonesSearchBuilder().filter({and:[]}).build()

User Languages Search Builder

Defined a search over operational status catalogs

constructor

Parámetros

Nombre Tipo Opcional Descripción
parent InternalOpenGateAPI Instance of our InternalOpenGateAPI

build()

Build a instance of StaticSearch

Retorna

Tip

Tipo: StaticSearch

Ejemplos

  ogapi.userLanguagesSearchBuilder().filter({and:[]}).build()

User Profiles Search Builder

Defined a search over operational status catalogs

constructor

Parámetros

Nombre Tipo Opcional Descripción
parent InternalOpenGateAPI Instance of our InternalOpenGateAPI

build()

Build a instance of StaticSearch

Retorna

Tip

Tipo: StaticSearch

Ejemplos

  ogapi.userProfileSearchBuilder().filter({and:[]}).build()

withId(userProfileId)

Sets id to search

Parámetros

Nombre Tipo Opcional Descripción
userProfileId string user profile id

Retorna

Tip

Tipo: userProfileSearchBuilder

Ejemplos

 ogapi.userProfileSearchBuilder().withId('myId').build()

Users Search Builder

Defined a search over Users

constructor

Parámetros

Nombre Tipo Opcional Descripción
parent InternalOpenGateAPI Instance of our InternalOpenGateAPI

Workgroups Search Builder

Defined a search over Workgroups

constructor

Parámetros

Nombre Tipo Opcional Descripción
parent InternalOpenGateAPI Instance of our InternalOpenGateAPI

Device Search

This extends Search and allow make request to any available resource into Opengate North API.

constructor

Constructor

Parámetros

Nombre Tipo Opcional Descripción
ogapi InternalOpenGateAPI this is configuration about Opengate North API.
url string this define a specific resource to make the search
filter object this is the filter
limit object this is the pagination about the search
sort object this defined parameters to order the result of search
group object this defined the group by

execute()

This invoke a request to OpenGate North API and the callback is managed by promises

Retorna

Tip

Tipo: Promise


Entity Search

This extends Search and it allow make request to any available resource into /entities resource at Opengate North API

constructor

Constructor

Parámetros

Nombre Tipo Opcional Descripción
ogapi InternalOpenGateAPI this is configuration about Opengate North API.
url string this define a specific resource to make the search
filter object this is the filter
limit object this is the pagination about the search
sort object this define parameters to order the result of search
group object this define parameters to group
select object this define fields to retrieve

execute()

This invoke a request to OpenGate North API and the callback is managed by promises

Retorna

Tip

Tipo: Promise


Subsections of error

Search Builder Error

This defined a specific Error that it will be thrown on build method at SearchBuilders

constructor

Parámetros

Nombre Tipo Opcional Descripción
error string Error description

Filter Builder

constructor

Ejemplos

var fb = ogapi.newFilterBuilder()

and(args)

Parámetros

Nombre Tipo Opcional Descripción
args [Expression] The parameters will be operators of the class Expression

Retorna

Tip

Tipo: *

Ejemplos

fb.and(Ex.like("collected.serialNumber", "SN"), Ex.eq("entityId", "e64ccd08-e302-4b65-b19d-e38eeb7b2d25"))

or(args)

Parámetros

Nombre Tipo Opcional Descripción
args [Expression] The parameters will be operators of the class Expression

Retorna

Tip

Tipo: *

Ejemplos

fb.or(Ex.like("collected.serialNumber", "SN"), Ex.eq("entityId", "e64ccd08-e302-4b65-b19d-e38eeb7b2d25"))

Search

This extends BaseSearch and allow make request to any available resource into Opengate North API.

constructor

Parámetros

Nombre Tipo Opcional Descripción
ogapi InternalOpenGateAPI this is configuration about Opengate North API.
url string this define a specific resource to make the search
filter object this is the filter
limit object this is the pagination about the search
sort object this defined parameters to order the result of search
group object
select object
timeout nubmer

Search Without Limit

This extends BaseSearch and allow make request to any available resource into Opengate North API.

constructor

Parámetros

Nombre Tipo Opcional Descripción
ogapi InternalOpenGateAPI this is configuration about Opengate North API.
url string this define a specific resource to make the search
filter object this is the filter
limit object this is the pagination about the search
sort object this defined parameters to order the result of search
group object
select object
timeout nubmer

Select Builder

constructor

Ejemplos

var sb = ogapi.newSelectBuilder()

add(args)

Parámetros

Nombre Tipo Opcional Descripción
args SelectElement The parameters will be operators of the class SelectElement

Retorna

Tip

Tipo: *

Ejemplos

sb.add(Se.element('provision.device.identifier', ['value'], 'identifier'), sb.add(Se.element('device.temperature.value', ['value'])))

Static Search

This extends Search and it allow make request to any available resource into static resources for Opengate North API

constructor

Constructor

Parámetros

Nombre Tipo Opcional Descripción
ogapi InternalOpenGateAPI this is configuration about Opengate North API.
url string this define a specific resource to make the search
filter object this is the filter

execute()

This invoke a dummy request to OpenGate North API and the callback is managed by promises

Retorna

Tip

Tipo: Promise


WP Search

This extends BaseSearch and allow make request to any available resource into Opengate North API. The resource does not have the ‘search’ prefix. For this, use class Search

constructor

Parámetros

Nombre Tipo Opcional Descripción
ogapi InternalOpenGateAPI this is configuration about Opengate North API.
url string this define a specific resource to make the search
filter object this is the filter
limit object this is the pagination about the search
sort object this defined parameters to order the result of search
group object
select object
timeout nubmer

Subsections of security

Certificate Finder

This class allow make get request to certificate resource into Opengate North API.

constructor

Constructor

Parámetros

Nombre Tipo Opcional Descripción
Reference InternalOpenGateAPI to the API object.

findById(id)

Download a specific certificate by id. This execute a GET http method

Parámetros

Nombre Tipo Opcional Descripción
id string Id of the certificate.

Retorna

Tip

Tipo: Promise


findByIdAndFormat(id, mimetype)

Download a certificate using id and in a specific format. This execute a GET http method

Parámetros

Nombre Tipo Opcional Descripción
id string Id of the certificate.
mimetype string Certificate format mimetype.

Retorna

Tip

Tipo: Promise


Certificates

This is a base object that contains all you can do about Certificates.

constructor

Constructor

Parámetros

Nombre Tipo Opcional Descripción
Reference InternalOpenGateAPI to the API object.

create(rawFile)

This invoke a request to OpenGate North API and the callback is managed by promises This method create an element certificate

Parámetros

Nombre Tipo Opcional Descripción
rawFile File this File is the certificate

Retorna

Tip

Tipo: Promise


update()

This invoke a request to OpenGate North API and the callback is managed by promises This method update an element certificate

Retorna

Tip

Tipo: Promise


withAdministrativeState(administrativeState)

Set the administrativeState attribute

Parámetros

Nombre Tipo Opcional Descripción
administrativeState string

Retorna

Tip

Tipo: Certificates


withDescription(description)

Set the description attribute

Parámetros

Nombre Tipo Opcional Descripción
description string optional field

Retorna

Tip

Tipo: Certificates


withDomains(domains)

Set the domains attribute

Parámetros

Nombre Tipo Opcional Descripción
domains Array

Retorna

Tip

Tipo: Certificates


withId(id)

Set the id attribute

Parámetros

Nombre Tipo Opcional Descripción
id string required field on delete

Retorna

Tip

Tipo: Certificates


withName(name)

Set the name attribute

Parámetros

Nombre Tipo Opcional Descripción
name string required field

Retorna

Tip

Tipo: Certificates


withParameters(parameters)

Set the parameters attribute

Parámetros

Nombre Tipo Opcional Descripción
parameters string optional field

Retorna

Tip

Tipo: Certificates


withTags(tags)

Set the tags attribute

Parámetros

Nombre Tipo Opcional Descripción
tags Array

Retorna

Tip

Tipo: Certificates


withUsages(usages)

Set the usages attribute

Parámetros

Nombre Tipo Opcional Descripción
usages Array

Retorna

Tip

Tipo: Certificates


Security

This extends BaseProvision and contains all you can do about Security.

constructor

Constructor

Parámetros

Nombre Tipo Opcional Descripción
ogapi InternalOpenGateAPI this is configuration about Opengate North API.
url string this define a specific resource to make the provision

Subsections of timeseries

Timeseries

This is a base object that contains all you can do about Timeseries.

constructor

Constructor

Parámetros

Nombre Tipo Opcional Descripción
Reference InternalOpenGateAPI to the API object.

onlyPlan()

Mark timeseries as plan only

Retorna

Tip

Tipo: Timeseries


optimizationPlan()

Request optimization plan

Retorna

Tip

Tipo: Promise


withBucketColumn(bucketColumn)

Name of generated column with bucket date.Required if timeBucket > 0.

Parámetros

Nombre Tipo Opcional Descripción
bucketColumn string pattern: ^[a-zA-Z0-9 _-]*$

Retorna

Tip

Tipo: Timeseries


withBucketInitColumn(bucketInitColumn)

Name of generated column with bucket init date.

Parámetros

Nombre Tipo Opcional Descripción
bucketInitColumn string pattern: ^[a-zA-Z0-9 _-]*$

Retorna

Tip

Tipo: Timeseries


withColumns(columns)

List of data that is needed for each entity.

Parámetros

Nombre Tipo Opcional Descripción
columns array required field

Retorna

Tip

Tipo: Timeseries


withContext(context)

List of data that is needed for each entity.

Parámetros

Nombre Tipo Opcional Descripción
context array

Retorna

Tip

Tipo: Timeseries


withDescription(description)

Long text to explain timeserie definition

Parámetros

Nombre Tipo Opcional Descripción
description string

Retorna

Tip

Tipo: Timeseries


withIdentifier(identifier)

Set the identifier attribute

Parámetros

Nombre Tipo Opcional Descripción
identifier string required field

Retorna

Tip

Tipo: Timeseries


withIdentifierColumn(identifierColumn)

Set the identifierColumn attribute

Parámetros

Nombre Tipo Opcional Descripción
identifierColumn string required field

Retorna

Tip

Tipo: Datasets


withName(name)

Name which will be unique in each organization

Parámetros

Nombre Tipo Opcional Descripción
name string required field

Retorna

Tip

Tipo: Timeseries


withOrganization(organization)

Set the organization attribute

Parámetros

Nombre Tipo Opcional Descripción
organization string required field

Retorna

Tip

Tipo: Timeseries


withOrigin(origin)

Initial date to first bucket with ISO date time format. Next bucket will be calcullated from this date. Default value is created date with time equals 00:00:00.000Z

Parámetros

Nombre Tipo Opcional Descripción
origin string

Retorna

Tip

Tipo: Timeseries


withRetention(retention)

Time that a row is stored to be got in searching. Default value is 1 month

Parámetros

Nombre Tipo Opcional Descripción
retention number

Retorna

Tip

Tipo: Timeseries


withSorts(sorts)

List of sorting fields

Parámetros

Nombre Tipo Opcional Descripción
sorts array required field

Retorna

Tip

Tipo: Timeseries


withTimeBucket(timeBucket)

Duration of buckets in seconds.

Parámetros

Nombre Tipo Opcional Descripción
timeBucket integer required field

Retorna

Tip

Tipo: Timeseries


Timeseries Finder

This class allow make get request to TimeseriesFinder resource into Opengate North API.

constructor

Constructor

Parámetros

Nombre Tipo Opcional Descripción
ogapi InternalOpenGateAPI Reference to the API object.

findByOrganization(organization, expand, dataStreams)

Performs a get that returns list of timeseries

Parámetros

Nombre Tipo Opcional Descripción
organization string organization
expand Array ['columns', 'context']
dataStreams Array ["ds_id_1","ds_id_2"]

Retorna

Tip

Tipo: Promise


findByOrganizationAndName(organization, name)

Performs a get that returns a definition of timeserie

Parámetros

Nombre Tipo Opcional Descripción
organization string organization
name string timeserie name

Retorna

Tip

Tipo: Promise


findByOrganizationAndTimeserieId(organization, timeserieId)

Performs a get that returns a definition of timeserie

Parámetros

Nombre Tipo Opcional Descripción
organization string organization
timeserieId string timeserie identifier

Retorna

Tip

Tipo: Promise


Subsections of timeseriesFunctionsCatalog

Timeseries Function

This is a base object that contains all you can do about TimeseriesFunction.

constructor

Constructor

Parámetros

Nombre Tipo Opcional Descripción
Reference InternalOpenGateAPI to the API object.

delete()

Deletes the selected RuleConfiguration

Retorna

Tip

Tipo: Promise


update()

Udpate a Rule

Retorna

Tip

Tipo: Promise


withDescription(description)

Set the description attribute

Parámetros

Nombre Tipo Opcional Descripción
description string

Retorna

Tip

Tipo: TimeseriesFunction


withIdentifier(name)

Set the name for update attribute

Parámetros

Nombre Tipo Opcional Descripción
name string required field

Retorna

Tip

Tipo: TimeseriesFunction


withName(name)

Set the name attribute

Parámetros

Nombre Tipo Opcional Descripción
name string required field

Retorna

Tip

Tipo: TimeseriesFunction


withOrganization(organization)

Set the organization attribute

Parámetros

Nombre Tipo Opcional Descripción
organization string required field

Retorna

Tip

Tipo: TimeseriesFunction


withReturnType(returnType)

Set the returnType attribute

Parámetros

Nombre Tipo Opcional Descripción
returnType String

Retorna

Tip

Tipo: TimeseriesFunction


withScript(script)

Set the script attribute

Parámetros

Nombre Tipo Opcional Descripción
script string

Retorna

Tip

Tipo: TimeseriesFunction


withValueTypes(valueTypes)

Set the valueTypes attribute

Parámetros

Nombre Tipo Opcional Descripción
valueTypes Array

Retorna

Tip

Tipo: TimeseriesFunction


Timeseries Function Finder

This class allow make get request to TimeseriesFunction resource into Opengate North API.

constructor

Constructor

Parámetros

Nombre Tipo Opcional Descripción
ogapi InternalOpenGateAPI Reference to the API object.

findByOrganization(organization)

Performs a get that returns a list of timeseries function

Parámetros

Nombre Tipo Opcional Descripción
organization string organization

Retorna

Tip

Tipo: Promise


findByOrganizationAndName(organization, name, script)

Performs a get that returns a timeseries function metadata

Parámetros

Nombre Tipo Opcional Descripción
organization string organization
name string Timeseries function Configuration name
script boolean If true script content will be downloaded

Retorna

Tip

Tipo: Promise


Timeseries Functions Helper

This class allow make get request to newTimeseriesFunctionsHelper resource into Opengate North API.

constructor

Constructor

Parámetros

Nombre Tipo Opcional Descripción
ogapi InternalOpenGateAPI Reference to the API object.

getDocJavascriptFunctions()

Performs a get that returns documentation of javascript functions from rules service

Retorna

Tip

Tipo: Promise


getDocPrivateJavascriptFunctions()

Performs a get that returns documentation private of javascript functions from rules service

Retorna

Tip

Tipo: Promise


Subsections of users

User

This class allow make get request to user resource into Opengate North API.

constructor

Constructor

Parámetros

Nombre Tipo Opcional Descripción
Reference InternalOpenGateAPI to the API object.

changeApiKey(apiKey)

This invoke a request to OpenGate North API and the callback is managed by promises This function updates a apiKey of a user

Parámetros

Nombre Tipo Opcional Descripción
apiKey String required field

Retorna

Tip

Tipo: Promise

Ejemplos

 ogapi.usersBuilder().withEmail(example@example.es).withPassword(oldPassword).changeApiKey(newPassword);

changePassword(newPassword)

This invoke a request to OpenGate North API and the callback is managed by promises This function updates a password of a user

Parámetros

Nombre Tipo Opcional Descripción
newPassword String required field

Retorna

Tip

Tipo: Promise

Ejemplos

 ogapi.usersBuilder().withEmail(example@example.es).withPassword(oldPassword).changePassword(newPassword);

login(email, password, twoFaCode)

This invoke a request to OpenGate North API and the callback is managed by promises This function get a JWT for user with Two Factor Authorithation (optional)

Parámetros

Nombre Tipo Opcional Descripción
email String required field
password String required field
twoFaCode String optional field

Retorna

Tip

Tipo: Promise

Ejemplos

 ogapi.usersBuilder().login(email, password);
 ogapi.usersBuilder().login(email, password, twoFaCode);

requestResetPassword()

This invoke a request to OpenGate North API and the callback is managed by promises This function request for new password when the user forgets it. Sends a password recovery email

Retorna

Tip

Tipo: Promise

Ejemplos

 ogapi.usersBuilder().withEmail(example@example.es).requestResetPassword()

updatePassword(newPassword, tokenId)

This invoke a request to OpenGate North API and the callback is managed by promises This function updates a password of a user with a tokenId

Parámetros

Nombre Tipo Opcional Descripción
newPassword String required field
tokenId String required field

Retorna

Tip

Tipo: Promise

Ejemplos

 ogapi.usersBuilder().withEmail(example@example.es).updatePassword(newPassword, tokenid);

with2FaType(twoFaType)

Set the 2FaType attribute

Parámetros

Nombre Tipo Opcional Descripción
twoFaType string required field

Retorna

Tip

Tipo: User


withApiKey(apiKey)

Set the apiKey attribute. Only on update user

Parámetros

Nombre Tipo Opcional Descripción
apiKey string required field

Retorna

Tip

Tipo: User


withCountryCode(countryCode)

Set the countryCode attribute

Parámetros

Nombre Tipo Opcional Descripción
countryCode string required field

Retorna

Tip

Tipo: User


withDescription(description)

Set the description attribute

Parámetros

Nombre Tipo Opcional Descripción
description string required field

Retorna

Tip

Tipo: User


withDomain(domain)

Set the domain attribute

Parámetros

Nombre Tipo Opcional Descripción
domain string required field

Retorna

Tip

Tipo: User


withEmail(email)

Set the email attribute

Parámetros

Nombre Tipo Opcional Descripción
email string required field

Retorna

Tip

Tipo: User


withForcePasswordChange(forcePasswordChange)

Set the forcePasswordChange: if true Forces you to reset your password on your next login attempt.

Parámetros

Nombre Tipo Opcional Descripción
forcePasswordChange boolean

Retorna

Tip

Tipo: User


withLangCode(langCode)

Set the langCode attribute

Parámetros

Nombre Tipo Opcional Descripción
langCode string required field

Retorna

Tip

Tipo: User


withLoginWithPassword(loginWithPassword)

Enable or disable login with password

Parámetros

Nombre Tipo Opcional Descripción
loginWithPassword boolean

Retorna

Tip

Tipo: User


withName(name)

Set the name attribute

Parámetros

Nombre Tipo Opcional Descripción
name string required field

Retorna

Tip

Tipo: User


withPassword(password)

Set the password attribute

Parámetros

Nombre Tipo Opcional Descripción
password string required field

Retorna

Tip

Tipo: User


withProfile(profile)

Set the profile attribute

Parámetros

Nombre Tipo Opcional Descripción
profile string required field

Retorna

Tip

Tipo: User


withSurname(surname)

Set the surname attribute

Parámetros

Nombre Tipo Opcional Descripción
surname string required field

Retorna

Tip

Tipo: User


withTimezone(timezone)

Set the timezone attribute

Parámetros

Nombre Tipo Opcional Descripción
timezone string required field

Retorna

Tip

Tipo: User


withWorkgroup(workgroup)

Set the workgroup attribute

Parámetros

Nombre Tipo Opcional Descripción
workgroup string required field

Retorna

Tip

Tipo: User


User Finder

This class allow make get request to user resource into Opengate North API.

constructor

Constructor

Parámetros

Nombre Tipo Opcional Descripción
Reference InternalOpenGateAPI to the API object.

findByEmail(email)

Find a specify user by a email. This execute a GET http method

Parámetros

Nombre Tipo Opcional Descripción
email string Email of the user.

Retorna

Tip

Tipo: Promise


findByEmailAndPassword(email, password)

Find a specific user with apiKey by a email and password. This execute a GET http method

Parámetros

Nombre Tipo Opcional Descripción
email string Email of the user.
password string password of the user.

Retorna

Tip

Tipo: Promise


Subsections of util

Expression

and(args)

Parámetros

Nombre Tipo Opcional Descripción
args ...*

Retorna

Tip

Tipo: object
This returns a json with the query of the logical operator "and" built.

Ejemplos

Ex.and(Ex.like("collected.serialNumber", "SN"), Ex.eq("entityId", "e64ccd08-e302-4b65-b19d-e38eeb7b2d25"))


returns:

{
  and : [
    {
      like: {
        "collected.serialNumber": "SN"
      }
    },  
    {
      eq: {
        "entityId": "e64ccd08-e302-4b65-b19d-e38eeb7b2d25"
      }
    }
  ]
}

eq(key, value)

Parámetros

Nombre Tipo Opcional Descripción
key String This is the name of the field
value String This is the value of the field

Retorna

Tip

Tipo: object
This returns a json with the query of the operator "eq" built.

Ejemplos

Ex.eq("entityId", "e64ccd08-e302-4b65-b19d-e38eeb7b2d25")


returns:

{
  eq : {
    "entityId": "e64ccd08-e302-4b65-b19d-e38eeb7b2d25"
  }
}

gt(key, value)

Parámetros

Nombre Tipo Opcional Descripción
key String This is the name of the field
value String This is the value of the field

Retorna

Tip

Tipo: object
This returns a json with the query of the operator "gt" built.

Ejemplos

Ex.gt("collected.imei", "123456786543210")


returns:

{
  gt : {
    "collected.imei": "123456786543210"
  }
}

gte(key, value)

Parámetros

Nombre Tipo Opcional Descripción
key String This is the name of the field
value String This is the value of the field

Retorna

Tip

Tipo: object
This returns a json with the query of the operator "gte" built.

Ejemplos

Ex.gte("collected.imei", "123456786543210")


{
  gte : {
    "collected.imei": "123456786543210"
  }
}

in(key, value)

Parámetros

Nombre Tipo Opcional Descripción
key String This is the name of the field
value String This is the value of the field

Retorna

Tip

Tipo: object
This returns a json with the query of the operator "in" built.

Ejemplos

Ex.in("entityId", ["e64ccd08-e302-4b65-b19d-e38eeb7b2d24","e64ccd08-e302-4b65-b19d-e38eeb7b2d25"])


{
  in : {
    "entityId": ["e64ccd08-e302-4b65-b19d-e38eeb7b2d24","e64ccd08-e302-4b65-b19d-e38eeb7b2d25"]
  }
}

like(key, value)

Parámetros

Nombre Tipo Opcional Descripción
key String This is the name of the field
value String This is the value of the field

Retorna

Tip

Tipo: object
This returns a json with the query of the operator "like" built.

Ejemplos

Ex.like("collected.serialNumber", "SN")


returns:

{
  like : {
    "collected.serialNumber": "SN"
  }
}

lt(key, value)

Parámetros

Nombre Tipo Opcional Descripción
key String This is the name of the field
value String This is the value of the field

Retorna

Tip

Tipo: object
This returns a json with the query of the operator "lt" built.

Ejemplos

Ex.lt("collected.imei", "123456786543210")


returns:

{
  lt : {
    "collected.imei": "123456786543210"
  }
}

lte(key, value)

Parámetros

Nombre Tipo Opcional Descripción
key String This is the name of the field
value String This is the value of the field

Retorna

Tip

Tipo: object
This returns a json with the query of the operator "lte" built.

Ejemplos

Ex.lte("collected.imei", "123456786543210")


{
  lte : {
    "collected.imei": "123456786543210"
  }
}

neq(key, value)

Parámetros

Nombre Tipo Opcional Descripción
key String This is the name of the field
value String This is the value of the field

Retorna

Tip

Tipo: object
This returns a json with the query of the operator "neq" built.

Ejemplos

Ex.neq("entityId", "e64ccd08-e302-4b65-b19d-e38eeb7b2d25")


returns:

{
  neq : {
    "entityId": "e64ccd08-e302-4b65-b19d-e38eeb7b2d25"
  }
}

or(args)

Parámetros

Nombre Tipo Opcional Descripción
args ...*

Retorna

Tip

Tipo: object
This returns a json with the query of the logical operator "or" built.

Ejemplos

Ex.or(Ex.like("collected.serialNumber", "SN"), Ex.eq("entityId", "e64ccd08-e302-4b65-b19d-e38eeb7b2d25"))


returns:

{
  or : [
    {
      like: {
        "collected.serialNumber": "SN"
      }
    },  
    {
      eq: {
        "entityId": "e64ccd08-e302-4b65-b19d-e38eeb7b2d25"
      }
    }
  ]
}

North Amplia REST

This is a wrapper of a Rest api javascript

constructor

This is a constructor of a Rest api javascript

Parámetros

Nombre Tipo Opcional Descripción
_options { url: string,port: string,version: string,apiKey: string,JTW: string} this is configuration about Opengate North API.
backend function this is a backend selected to manage a request to Opengate North API.

default()

This return a default configuration object

Retorna

Tip

Tipo: object


delete(url, timeout, headers, parameters, body, serviceBaseURL)

Invoke DELETE action to url specified

Parámetros

Nombre Tipo Opcional Descripción
url string url to execute DELETE
timeout number timeout in milliseconds
headers object headers of request
parameters object parameters of request
body object body of request
serviceBaseURL string base of the uri petition

Retorna

Tip

Tipo: Promise


get(url, timeout, headers, parameters, asBlob, serviceBaseURL)

Invoke GET action to url specified

Parámetros

Nombre Tipo Opcional Descripción
url string url to execute GET
timeout number timeout in milliseconds
headers object headers of request
parameters object parameters of request
asBlob boolean response body as Blob
serviceBaseURL string base of the uri petition

Retorna

Tip

Tipo: Promise


patch(url, data, timeout, headers, parameters, serviceBaseURL)

Invoke PATCH action to url and data specified

Parámetros

Nombre Tipo Opcional Descripción
url string url to execute PATCH
data object attach data to request PATCH
timeout number timeout in milliseconds
headers object headers of request
parameters object parameters of request
serviceBaseURL string base of the uri petition

Retorna

Tip

Tipo: Promise


post(url, data, timeout, headers, parameters, serviceBaseURL)

Invoke POST action to url and data specified

Parámetros

Nombre Tipo Opcional Descripción
url string url to execute POST
data object attach data to request POST
timeout number timeout in milliseconds
headers object headers of request
parameters object parameters of request
serviceBaseURL string base of the uri petition

Retorna

Tip

Tipo: Promise


post_multipart(url, formData, events, timeout, headers, parameters, serviceBaseURL)

Invoke POST multipart action to url and data specified

Parámetros

Nombre Tipo Opcional Descripción
url string url to execute POST
formData FormData attach data to request POST
events object events allowed, xhr.process
timeout number timeout in milliseconds
headers object headers of request
parameters object parameters of request
serviceBaseURL string base of the uri petition

Retorna

Tip

Tipo: Promise


put(url, data, timeout, headers, parameters, serviceBaseURL)

Invoke PUT action to url and data specified

Parámetros

Nombre Tipo Opcional Descripción
url string url to execute PUT
data object attach data to request PUT
timeout number timeout in milliseconds
headers object headers of request
parameters object parameters of request
serviceBaseURL string base of the uri petition

Retorna

Tip

Tipo: Promise


put_multipart(url, formData, events, timeout, headers, parameters, serviceBaseURL)

Invoke put multipart action to url and data specified

Parámetros

Nombre Tipo Opcional Descripción
url string url to execute POST
formData FormData attach data to request POST
events object events allowed, xhr.process
timeout number timeout in milliseconds
headers object headers of request
parameters object parameters of request
serviceBaseURL string base of the uri petition

Retorna

Tip

Tipo: Promise


Select Element

element(name, fields)

Parámetros

Nombre Tipo Opcional Descripción
name String Indicates the datastream to show
fields [{field: field, alias:alias}] The fields that you want to show from that datastream

Retorna

Tip

Tipo: Object
This returns a json with the object element built.

Ejemplos

 SE.element('provision.device.identifier', ['value'], 'identifier')
 returns:
 {
     name : 'provision.device.identifier',
     fields: ['value'],
     alias: 'identifier
 }

 SE.element('provision.device.identifier', ['value'])
 returns:
 {
     name : 'provision.device.identifier',
     fields: ['value']
 }

South Amplia REST

Subsections of workgroups

Workgroup Finder

This class allow make get request to workgroup resource into Opengate North API.

constructor

Constructor

Parámetros

Nombre Tipo Opcional Descripción
Reference InternalOpenGateAPI to the API object.

findByDomainAndName(domain, name)

Constructor

Parámetros

Nombre Tipo Opcional Descripción
domain string domain name
name string workgroup name

Retorna

Tip

Tipo: Promise


Workgroup Relations

This is a base object that contains all you can do about workgroups.

constructor

Constructor

Parámetros

Nombre Tipo Opcional Descripción
Reference InternalOpenGateAPI to the API object.

update()

Update not allowed


withChannel(channel)

Set the channel attribute

Parámetros

Nombre Tipo Opcional Descripción
channel string required field for creation or update

Retorna

Tip

Tipo: WorkgroupRelations


withWorkgroup(workgroup)

Set the workgroup attribute

Parámetros

Nombre Tipo Opcional Descripción
workgroup string required field

Retorna

Tip

Tipo: WorkgroupRelations


Workgroup Relations Finder

This class allow make get request to workgroup relation resource into Opengate North API.

constructor

Constructor

Parámetros

Nombre Tipo Opcional Descripción
Reference InternalOpenGateAPI to the API object.

findByDomainAndName(domain, name)

Constructor

Parámetros

Nombre Tipo Opcional Descripción
domain string domain name
name string workgroup name

Retorna

Tip

Tipo: Promise


Workgroups

This is a base object that contains all you can do about workgroups.

constructor

Constructor

Parámetros

Nombre Tipo Opcional Descripción
Reference InternalOpenGateAPI to the API object.

withAdministrative(administrative)

Set the administrative attribute

Parámetros

Nombre Tipo Opcional Descripción
administrative boolean

Retorna

Tip

Tipo: Workgroups


withDescription(description)

Set the description attribute

Parámetros

Nombre Tipo Opcional Descripción
description string required field

Retorna

Tip

Tipo: Workgroups


withDomainName(domainName)

Set the domain attribute

Parámetros

Nombre Tipo Opcional Descripción
domainName string required field

Retorna

Tip

Tipo: Workgroups


withName(name)

Set the name attribute

Parámetros

Nombre Tipo Opcional Descripción
name string required field

Retorna

Tip

Tipo: Workgroups


OpenGate Data Python

Opengate-data

This reference is generated from the docstrings of opengate-data 1.15.1.

Opengate-data is a Python library (requires Python 3.10+) that helps you integrate OpenGate into your Python projects.

Installation

To install the library, run:

pip install opengate-data

Or, if you are using uv:

uv add opengate-data

Quick Start: Searching Entities

Here is a simple example of how to search for entities using the EntitiesSearchBuilder:

from opengate_data import OpenGateClient

# Initialize the client
client = OpenGateClient(url="https://api.opengate.es", api_key="YOUR_API_KEY")

# Create a search builder
search = client.new_entities_search_builder()

# Build the query with filters and selection
search.with_filter(
    client.new_filter_builder().eq("provision.administration.organization", "your_org").build()
).with_select(
    client.new_select_builder().add("provision.device.identifier", ["value"]).build()
).with_limit(10, 0)

# Execute the search
results = search.execute()
print(results)

Basic use with user and password

To initialize the OpenGateClient using a username and password:

client = OpenGateClient(url="Url", user="User", password="Password")

Basic use with api-key

To initialize the client using an api_key:

client = OpenGateClient(url="Url", api_key="Api_Key")

Basic use token_jwt with .env

To initialize the client using a token_jwt with a .env file.

  1. Create a .env file with the following content: TOKEN_JWT="token_jwt"

  2. Load the environment variable and initialize the client:

    client = OpenGateClient()

By default, if you use OpenGateClient without parameters, and you set the environment variable TOKEN_JWT, OpenGateClient will be created with this value. If you want to use TOKEN_JWT from environment, you may delete the OPENGATE_API_KEY environment variable.

Basic use with environment variables

The most professional way to initialize the client is by using standard environment variables. If you set these, you can simply call OpenGateClient():

# export OPENGATE_URL="https://api.opengate.es"
# export OPENGATE_API_KEY="YOUR_API_KEY"

client = OpenGateClient()

Basic use of token_jwt with an environment variable

To initialize the client using a token_jwt from an environment variable, you can set the token_jwt directly in your environment without relying on a .env:

  1. Create environment variable

    • On UNIX systems, use:

      export TOKEN_JWT="token_jwt"
    • On Windows, use:

      set TOKEN_JWT="token_jwt"
  2. Initialize the client.

    client = OpenGateClient()

Similar to the previous example, if you use OpenGateClient without parameters, and you set the environment variable TOKEN_JWT, OpenGateClient will be created with this value. If you want to use TOKEN_JWT from environment, you may delete API_KEY variable environment.

Basic use without url for services K8s

To initialize the OpenGateClient without specifying a URL, you can either omit the url parameter or set it to None.

client = OpenGateClient(api_key="Api_Key")
# or
client = OpenGateClient(url=None, api_key="Api_Key")

Similar to the previous examples, you have the option to provide the api_key directly, set it to None, or omit it altogether. If you choose to omit it, the client will automatically retrieve the api_key from the environment variable if it is set. Additionally, you can also authenticate using a username and password by specifying those credentials instead.

Features

The library consists of the following modules:

  • IA
    • Models
    • Pipelines
    • Transformers
  • Collection
    • Collection
    • Bulk Collection
    • Pandas Collection
  • Provision
    • Asset
    • Bulk
    • Devices
    • Processor
  • Rules
    • Rules
  • Searching
    • Alarms
    • Datapoints
    • Data sets
    • Entities
    • Operations
    • Rules
    • Timeseries
  • File Connector
    • File Connector

Basic Examples of the OpenGate-Data Modules

The unit tests double as usage examples: opengate_data/test/unit/ holds one directory per module, each showing the configurations and use cases of its builders.

License

This project is licensed under the Apache License 2.0.

Subsections of OpenGate Data Python

Subsections of Python Reference

AI Models

opengate_data.ai_models.ai_models

AIModelsBuilder

AIModelsBuilder Objects

class AIModelsBuilder()

AI Model Builder


with_organization_name

def with_organization_name(organization_name: str) -> "AIModelsBuilder"

Specify the organization name.

Arguments:

  • organization_name str - The name of the organization.

Returns:

  • AIModelsBuilder - Returns self for chaining.

Example:

builder.with_organization_name('organization_name')


with_identifier

def with_identifier(identifier: str) -> "AIModelsBuilder"

Specify the identifier for the pipeline.

Arguments:

  • identifier str - The identifier for the pipeline.

Returns:

  • AIModelsBuilder - Returns self for chaining.

Example:

builder.with_identifier('identifier')


with_env

def with_env(data_env: str) -> "AIModelsBuilder"

Specify the environment variable.

Arguments:

  • data_env str - The environment variable.

Returns:

  • AIModelsBuilder - Returns self for chaining.

Example:

builder.with_env('MODEL_ID')


with_find_by_name

def with_find_by_name(find_name: str) -> "AIModelsBuilder"

Specify the name to find.

Arguments:

  • find_name str - The name of the model.

Returns:

  • AIModelsBuilder - Returns self for chaining.

Example:

builder.with_find_by_name('model_name.onnx')


with_config_file

def with_config_file(config_file: str, section: str,
                     config_key: str) -> "AIModelsBuilder"

Sets up the configuration file (.ini).

This method allows specifying a configuration file, a section within that file, and a key to retrieve a specific value from the section.

Arguments:

  • config_file str - The path to the.ini configuration file.
  • section str - The section name within the.ini file where the desired configuration is located.
  • config_key str - The key within the specified section whose value will be retrieved.

Raises:

  • TypeError - If the provided config_file is not a string.
  • TypeError - If the provided section is not a string.
  • TypeError - If the provided config_key is not a string.

Returns:

  • AIModelsBuilder - Returns itself to allow for method chaining.

Example:

[id]
model_id = afe07216-14ec-4134-97ae-c483b11d965a
builder.with_config_file('model_config.ini', 'id', 'model_id')


add_file

def add_file(file: str) -> "AIModelsBuilder"

Attaches the model file to upload, in PMML or ONNX format.

Arguments:

  • file str - The path to the file to be added.

Returns:

  • AIModelsBuilder - Returns itself to allow for method chaining.

Raises:

  • TypeError - If the provided file path is not a string.

Example:

builder.add_file('file.onnx')


with_prediction

def with_prediction(data_prediction: dict) -> "AIModelsBuilder"

Prediction with a model

Arguments:

  • data_prediction dict - Prediction

Raises:

  • TypeError - If the prediction is not a dict.

Returns:

  • AIModelsBuilder - Returns itself to allow for method chaining.

Example:

prediction = {
- `"X"` - [
{
- `"input_8"` - [
[
-0.5391107438074961,
-0.15950019784171535,
]
]
}
]
}
builder.with_prediction(prediction)


with_output_file_path

def with_output_file_path(output_file_path: str) -> "AIModelsBuilder"

Sets the output file path for the model.

This method allows you to specify the path where the output file will be saved. It is particularly useful for operations that involve downloading or saving files.

Arguments:

  • output_file_path str - The path where the output file will be saved.

Returns:

  • AIModelsBuilder - The instance of the AIModelsBuilder class.

Example:

builder.with_output_file_path("rute/prueba.onnx")


create

def create() -> "AIModelsBuilder"

Initiates the creation process of a new model.

This method prepares the AIModelsBuilder instance to create a new model by setting up the necessary parameters such as the organization name and the file to be associated with the model.

Returns:

  • AIModelsBuilder - The instance of the AIModelsBuilder class itself, allowing for method chaining.

Example:

builder.with_organization_name("MyOrganization").add_file("example.onnx").create()


find_one

def find_one() -> "AIModelsBuilder"

Retrieve a single model.

This method sets up the AIModelsBuilder instance to retrieve a specific model associated with the specified organization and identifier.

Returns:

  • AIModelsBuilder - The instance of the AIModelsBuilder class itself, allowing for method chaining.

Example:

builder.with_organization_name("organization_name").with_identifier("model_identifier").find_one()


find_all

def find_all() -> "AIModelsBuilder"

Retrieve all models.

This method sets up the AIModelsBuilder instance to retrieve all models associated with the specified organization.

Returns:

  • AIModelsBuilder - The instance of the AIModelsBuilder class itself, allowing for method chaining.

Example:

builder.with_organization_name("MyOrganization").find_all()


update

def update() -> "AIModelsBuilder"

Update an existing model.

This method sets up the AIModelsBuilder instance to update a specific model associated with the specified organization and identifier.

Returns:

  • AIModelsBuilder - The instance of the AIModelsBuilder class itself, allowing for method chaining.

Example:

builder.with_organization_name("MyOrganization").with_identifier("model_identifier").add_file("updated_model.onnx").update()
builder.with_organization_name("MyOrganization").with_find_by_name("model_name.onnx").add_file("updated_model.onnx").update()
builder.with_organization_name("MyOrganization").with_config_file('model_config.ini', 'id', 'model').add_file("updated_model.onnx").update()


delete

def delete() -> "AIModelsBuilder"

Delete an existing model within the organization.

This method sets up the AIModelsBuilder instance to delete a specific model associated with the specified organization and identifier.

Returns:

  • AIModelsBuilder - The instance of the AIModelsBuilder class itself, allowing for method chaining.

Example:

builder.with_organization_name("MyOrganization").with_identifier("model_identifier").delete()
builder.with_organization_name("MyOrganization").with_find_by_name("model_name.onnx").delete()
builder.with_organization_name("MyOrganization").with_config_file('model_config.ini', 'id', 'model').delete()


validate

def validate() -> "AIModelsBuilder"

Validate the model configuration.

This method sets up the AIModelsBuilder instance to validate the configuration of a model associated with the specified organization.

Returns:

  • AIModelsBuilder - The instance of the AIModelsBuilder class itself, allowing for method chaining.

Example:

builder.with_organization_name("MyOrganization").add_file("model.onnx").validate()


download

def download() -> "AIModelsBuilder"

Download the model file.

This method sets up the AIModelsBuilder instance to download the file of a specific model associated with the specified organization and identifier.

Returns:

  • AIModelsBuilder - The instance of the AIModelsBuilder class itself, allowing for method chaining.

Example:

builder.with_organization_name("MyOrganization").with_identifier("model_identifier").with_output_file_path("model.onnx").download()
builder.with_organization_name("MyOrganization").with_find_by_name("model_name.onnx").with_output_file_path("model.onnx").download()
builder.with_organization_name("MyOrganization").with_config_file('model_config.ini', 'id', 'model').with_output_file_path("model.onnx").download()


prediction

def prediction() -> "AIModelsBuilder"

Make a prediction using the model.

This method sets up the AIModelsBuilder instance to make a prediction using a specific model associated with the specified organization and identifier.

Returns:

  • AIModelsBuilder - The instance of the AIModelsBuilder class itself, allowing for method chaining.

Example:

prediction_data = {
- `"X"` - [
{
- `"input_8"` - [
[
-0.5391107438074961,
-0.15950019784171535,
]
]
}
]
}
builder.with_organization_name("MyOrganization").with_identifier("model_identifier").with_prediction(prediction_data).prediction()
builder.with_organization_name("MyOrganization").with_find_by_name("model_name.onnx").with_prediction(prediction_data).prediction()
builder.with_organization_name("MyOrganization").with_config_file('model_config.ini', 'id', 'model').with_prediction(prediction_data).prediction()


save

def save() -> "AIModelsBuilder"

Save the model configuration.

This method sets up the AIModelsBuilder instance to save the configuration of a model associated with the specified organization.

Returns:

  • AIModelsBuilder - The instance of the AIModelsBuilder class itself, allowing for method chaining.

Example:

builder.with_organization_name("MyOrganization").with_env("env_var").save()
builder.with_organization_name("MyOrganization").with_config_file('model_config.ini', 'id', 'model').save()


set_config_file_identifier

def set_config_file_identifier() -> "AIModelsBuilder"

Set the model identifier from a configuration file.

This method sets up the AIModelsBuilder instance to retrieve the model identifier from a specified configuration file. It reads the identifier from the given section and key within the configuration file and sets it for the builder instance.

Returns:

  • AIModelsBuilder - The instance of the AIModelsBuilder class itself, allowing for method chaining.

Example:

builder.with_config_file('model_config.ini', 'id', 'model_id').set_config_file_identifier()


set_env_identifier

def set_env_identifier() -> "AIModelsBuilder"

Set the model identifier from an environment variable.

This method sets up the AIModelsBuilder instance to retrieve the model identifier from a specified environment variable. It reads the identifier from the environment variable and sets it for the builder instance.

Returns:

  • AIModelsBuilder - The instance of the AIModelsBuilder class itself, allowing for method chaining.

Example:

builder.with_env("env_var").set_env_identifier()


build

def build() -> "AIModelsBuilder"

Finalizes the construction of the IoT collection configuration.

This method prepares the builder to execute the collection by ensuring all necessary configurations are set and validates the overall integrity of the build. It should be called before executing the collection to ensure that the configuration is complete and valid.

The build process involves checking that mandatory fields such as the device identifier are set. It also ensures that method calls that are incompatible with each other (like build and build_execute) are not both used.

Returns:

  • AIModelsBuilder - Returns itself to allow for method chaining, enabling further actions like execute.

Raises:

  • ValueError - If required configurations are missing or if incompatible methods are used together.

Example:

builder.build()


build_execute

def build_execute()

Executes the data sets search immediately after building the configuration.

This method is a shortcut that combines building and executing in a single step.

Returns:

  • dict - A dictionary containing the execution response which includes the status code and potentially other metadata about the execution.

Raises:

  • ValueError - If build has already been called on this builder instance.

Example:

builder.build_execute()


execute

def execute() -> Response

Execute the configured operation and return the response.

This method executes the operation that has been configured using the builder pattern. It ensures that the build method has been called and that it is the last method invoked before execute. Depending on the configured method (e.g., create, find, update, delete), it calls the appropriate internal execution method.

Returns:

  • requests.Response - The response object from the executed request.

Raises:

  • Exception - If the build method has not been called or if it is not the last method invoked before execute.
  • ValueError - If the configured method is unsupported.

Example:

builder.execute()

opengate_data.ai_models

AI Pipelines

opengate_data.ai_pipelines.ai_pipelines

AIPipelinesBuilder

AIPipelinesBuilder Objects

class AIPipelinesBuilder()

Builder pipelines


with_organization_name

def with_organization_name(organization_name: str) -> "AIPipelinesBuilder"

Specify the organization name.

Arguments:

  • organization_name str - The name of the organization.

Returns:

  • AIPipelinesBuilder - Returns self for chaining.

Example:

builder.with_organization_name('organization_name')


with_identifier

def with_identifier(identifier: str) -> "AIPipelinesBuilder"

Specify the identifier for the pipeline.

Arguments:

  • identifier str - The identifier for the pipeline.

Returns:

  • AIPipelinesBuilder - Returns self for chaining.

Example:

builder.with_identifier('identifier')


with_env

def with_env(data_env: str) -> "AIPipelinesBuilder"

Specify the environment variable.

Arguments:

  • data_env str - The environment variable.

Returns:

  • AIPipelinesBuilder - Returns self for chaining.

Example:

builder.with_env('PIPELINE_ID')


with_find_by_name

def with_find_by_name(find_name: str) -> "AIPipelinesBuilder"

Specify the name to find.

Arguments:

  • find_name str - The name of the pipeline.

Returns:

  • AIPipelinesBuilder - Returns self for chaining.

Example:

builder.with_find_by_name('pipeline_name')


with_config_file

def with_config_file(config_file: str, section: str,
                     config_key: str) -> "AIPipelinesBuilder"

Sets up the configuration file (.ini).

This method allows specifying a configuration file, a section within that file, and a key to retrieve a specific value from the section.

Arguments:

  • config_file str - The path to the.ini configuration file.
  • section str - The section name within the.ini file where the desired configuration is located.
  • config_key str - The key within the specified section whose value will be retrieved.

Raises:

  • TypeError - If the provided config_file is not a string.
  • TypeError - If the provided section is not a string.
  • TypeError - If the provided config_key is not a string.

Example:

[id]
pipeline_id = afe07216-14ec-4134-97ae-c483b11d965a
config_file_path = os.path.join(os.path.dirname(__file__), 'config_test.ini')
builder.with_config_file(config_file_path, 'id', 'pipeline_id')

Returns:

  • AIPipelinesBuilder - Returns itself to allow for method chaining.


with_prediction

def with_prediction(data_prediction: dict) -> "AIPipelinesBuilder"

Prediction with a model

Arguments:

  • data_prediction dict - Prediction

Raises:

  • TypeError - If the prediction is not a dict.

Returns:

  • AIPipelinesBuilder - Returns itself to allow for method chaining.

Example:

{
- `"input"` - {},
- `"collect"` - {
- `"deviceId"` - "123456",
- `"datastream"` - "PredictionDatastream"
}
}
builder.with_prediction(prediction)


with_name

def with_name(name: str) -> "AIPipelinesBuilder"

Name a new pipeline

Arguments:

  • name str - Name a new pipeline

Raises:

  • TypeError - If the name is not a string.

Returns:

  • AIPipelinesBuilder - Returns itself to allow for method chaining.

Example:

builder.with_name(name_prediction)


add_action

def add_action(file_name: str,
               type_action: str | None = None) -> "AIPipelinesBuilder"

Add action name and type of model or transform exist.

Arguments:

  • file_name str - The name of the file representing the action.
  • type_action str | None - The type of the action, either ‘MODEL’ or ‘TRANSFORMER’. If None, it will be inferred from the file extension.

Raises:

  • TypeError - If file_name is not a string.
  • TypeError - If type_action is not a string or None.

Returns:

  • AIPipelinesBuilder - Returns itself to allow for method chaining.

Example:

builder.add_action('transform.py', 'TRANSFORMER')
builder.add_action('test/file_create.onnx', 'MODEL')
builder.add_action('test/file_update.onnx')


build

def build() -> "AIPipelinesBuilder"

This method prepares the builder to execute the collection by ensuring all necessary configurations are set and validates the overall integrity of the build. It should be called before executing the collection to ensure that the configuration is complete and valid.

The build process involves checking that mandatory fields such as the device identifier are set. It also ensures that method calls that are incompatible with each other (like build and build_execute) are not both used.

Returns:

  • AIPipelinesBuilder - Returns itself to allow for method chaining, enabling further actions like execute.

Raises:

  • ValueError - If required configurations are missing or if incompatible methods are used together.

Notes:

This method should be used as a final step before execute to prepare the operations search configuration. It does not modify the state but ensures that the builder’s state is ready for execution.

Example:

builder.build()


build_execute

def build_execute()

Executes the data sets search immediately after building the configuration.

This method is a shortcut that combines building and executing in a single step.

Returns:

  • dict - A dictionary containing the execution response which includes the status code and potentially other metadata about the execution.

Raises:

  • ValueError - If build has already been called on this builder instance.

Example:

builder.build_execute()


create

def create() -> "AIPipelinesBuilder"

Creates a new pipeline.

This method prepares the request to create a new pipeline using the specified configuration in the object. It is necessary to define the name (with_name) and actions (add_action) before calling this method.

Returns:

  • AIPipelinesBuilder - Returns the same object to allow method chaining.

Example:

builder.with_organization_name(organization)                .with_name('MyPipeline').add_action('transform.py', 'TRANSFORMER')                .add_action('test/file_create.onnx', 'MODEL')                .create()


find_all

def find_all() -> "AIPipelinesBuilder"

Retrieves all available pipelines.

Returns:

  • AIPipelinesBuilder - Returns the same object to allow method chaining.

Example:

builder.with_organization_name('MyOrganization').find_all()


find_one

def find_one() -> "AIPipelinesBuilder"

Finds a specific pipeline by its identifier.

This method prepares the request to find a specific pipeline based on its identifier. The identifier is obtained automatically if not explicitly defined or can be obtained from a configuration file or environment variables.

Returns:

  • AIPipelinesBuilder - Returns the same object to allow method chaining.

Example:

builder.with_organization_name('my_organization').with_identifier('identifier').find_one()


update

def update() -> "AIPipelinesBuilder"

Updates an existing pipeline.

This method prepares the request to update an existing pipeline. It is necessary to define the organization’s name (with_organization_name) and the pipeline’s name (with_name) before calling this method.

Returns:

  • AIPipelinesBuilder - Returns the same object to allow method chaining.

Example:

builder.with_organization_name('MyOrganization').with_identifier("pipeline_identifier").with_name('MyPipeline').update()
config_file_path = os.path.join(os.path.dirname(__file__), 'config_test.ini')
builder.with_organization_name('MyOrganization').with_find_by_name("pipeline_name").with_config_file(config_file_path, 'id', 'model').with_name('MyPipeline').update()
builder.with_organization_name('MyOrganization').with_name('MyPipeline').update()


delete

def delete() -> "AIPipelinesBuilder"

Deletes an existing pipeline.

This method prepares the request to delete an existing pipeline. It is necessary to define the organization’s name (with_organization_name) and the pipeline’s identifier (with_identifier) before calling this method.

Returns:

  • AIPipelinesBuilder - Returns the same object to allow method chaining.

Example:

builder.with_organization_name('MyOrganization').with_identifier('pipeline_identifier').delete()


prediction

def prediction() -> "AIPipelinesBuilder"

Performs a prediction with a model.

This method prepares the request to perform a prediction using the model associated with the specified pipeline. It is necessary to define the organization’s name (with_organization_name), the pipeline’s identifier (with_identifier), and provide prediction data (with_prediction) before calling this method.

Returns:

  • AIPipelinesBuilder - Returns the same object to allow method chaining.

Example:

- `builder.with_organization_name('MyOrganization').with_identifier('pipeline_identifier').with_prediction({'input'` - {}, 'collect': {'deviceId': '123456', 'datastream': 'PredictionDatastream'}}).prediction()


save

def save() -> "AIPipelinesBuilder"

Save the model configuration.

This method sets up the AIPipelinesBuilder instance to save the configuration of a model associated with the specified organization. It configures the URL endpoint for the save operation and sets the operation type to ‘save’.

Returns:

  • AIPipelinesBuilder - The instance of the AIModelsBuilder class itself, allowing for method chaining.

Example:

builder.with_organization_name("MyOrganization").with_env("MODEL_ENV_VAR").save().build().execute()
config_file_path = os.path.join(os.path.dirname(__file__), 'config_test.ini')
builder.with_organization_name("MyOrganization").with_config_file(config_file_path, 'id', 'model').save().build().execute()


set_config_file_identifier

def set_config_file_identifier() -> "AIPipelinesBuilder"

Set the model identifier from a configuration file.

This method sets up the AIModelsBuilder instance to retrieve the model identifier from a specified configuration file. It reads the identifier from the given section and key within the configuration file and sets it for the builder instance.

Returns:

  • AIPipelinesBuilder - The instance of the AIModelsBuilder class itself, allowing for method chaining.

Example:

config_file_path = os.path.join(os.path.dirname(__file__), 'config_test.ini')
builder.with_config_file(config_file_path, 'id', 'model_id').set_config_file_identifier().build().execute()


set_env_identifier

def set_env_identifier() -> "AIPipelinesBuilder"

Set the model identifier from an environment variable.

This method sets up the AIModelsBuilder instance to retrieve the model identifier from a specified environment variable. It reads the identifier from the environment variable and sets it for the builder instance.

Returns:

  • AIPipelinesBuilder - The instance of the AIModelsBuilder class itself, allowing for method chaining.

Example:

builder.with_env("MODEL_ENV_VAR").set_env_identifier().build().execute()


execute

def execute()

Execute the configured operation and return the response.

This method executes the operation that has been configured using the builder pattern. It ensures that the build method has been called and that it is the last method invoked before execute. Depending on the configured method (e.g., create, find, update, delete), it calls the appropriate internal execution method.

Returns:

  • requests.Response - The response object from the executed request.

Raises:

  • Exception - If the build method has not been called or if it is not the last method invoked before execute.
  • ValueError - If the configured method is unsupported.

Example:

builder.execute()

opengate_data.ai_pipelines

AI Transformers

opengate_data.ai_transformers.ai_transformers

AITransformersBuilder

AITransformersBuilder Objects

class AITransformersBuilder()

Class transformer builder


with_organization_name

def with_organization_name(organization_name: str) -> "AITransformersBuilder"

Specify the organization name.

Arguments:

  • organization_name str - The name of the organization.

Returns:

  • AITransformersBuilder - Returns self for chaining.

Example:

builder.with_organization_name('organization_name')


with_identifier

def with_identifier(identifier: str) -> "AITransformersBuilder"

Specify the identifier for the pipeline.

Arguments:

  • identifier str - The identifier for the pipeline.

Returns:

  • AITransformersBuilder - Returns self for chaining.

Example:

builder.with_identifier('identifier')


with_env

def with_env(data_env: str) -> "AITransformersBuilder"

Specify the environment variable.

Arguments:

  • data_env str - The environment variable.

Returns:

  • AITransformersBuilder - Returns self for chaining.

Example:

builder.with_env('TRANSFORMER_ID')


with_config_file

def with_config_file(config_file: str, section: str,
                     config_key: str) -> "AITransformersBuilder"

This method allows specifying a configuration file, a section within that file, and a key to retrieve a specific value from the section.

Arguments:

  • config_file str - The path to the.ini configuration file.
  • section str - The section name within the.ini file where the desired configuration is located.
  • config_key str - The key within the specified section whose value will be retrieved.

Raises:

  • TypeError - If the provided config_file is not a string.
  • TypeError - If the provided section is not a string.
  • TypeError - If the provided config_key is not a string.

Returns:

AITransformersBuilder

Example:

[id]
model_id = afe07216-14ec-4134-97ae-c483b11d965a

config_file_path = os.path.join(os.path.dirname(__file__), 'config_test.ini')
builder.with_config_file(config_file_path, 'id', 'model_id')


add_file

def add_file(file_path: str, filetype: str = None)

Adds a file to the transformer resource.

This method allows specifying one or more files to be included in the transformer resource being created. The content type for each file can be specified if needed.

Arguments:

  • file_path str - Full path to the file to add.
  • filetype str, optional - Content type of the file. Defaults to None, meaning the content type will be automatically inferred.

Returns:

  • AITransformersBuilder - Returns the current instance to allow method chaining.

Example:

ai_transformer_create = client.ai_transformers_builder().with_organization('organization')                  .add_file('exittransformer.py', 'text/python')                  .add_file('pkl_encoder.pkl')


with_find_by_name

def with_find_by_name(find_name: str) -> "AITransformersBuilder"

Specify the name to find.

Arguments:

  • find_name str - The name of the transformer.

Returns:

  • AITransformersBuilder - Returns self for chaining.

Example:

builder.with_find_by_name('transformer_name')


with_evaluate

def with_evaluate(data_evaluate: dict) -> "AITransformersBuilder"

Evaluate with transformer

Arguments:

  • data_evaluate dict - Evaluate

Raises:

  • TypeError - If to evaluate is not a dict.

Returns:

  • AITransformersBuilder - Returns itself to allow for method chaining.

Example:

evaluate_data = {
- `"data"` - {
- `"PPLast12H"` - 0,
- `"PPLast24H"` - 0,
- `"PPLast72H"` - 1,
- `"currentTemp"` - -2,
- `"changeTemp"` - -2
},
- `"date"` - "2022-06-13T13:59:34.779+02:00"
}
builder.with_evaluate(evaluate_data)


with_output_file_path

def with_output_file_path(output_file_path: str) -> "AITransformersBuilder"

Sets the output file path for the transformer.

This method allows you to specify the path where the output file will be saved. It is particularly useful for operations that involve downloading or saving files.

Arguments:

  • output_file_path str - The path where the output file will be saved.

Returns:

  • AITransformersBuilder - The instance of the AIModelsBuilder class.

Example:

builder.with_output_file_path("rute/prueba.onnx")


with_file_name

def with_file_name(file_name: str) -> "AITransformersBuilder"

Specifies the name of the file to be processed.

This method allows you to specify the name of the file that will be used in operations such as download or evaluation. It is particularly useful when working with specific files that require unique identifiers or names for processing.

Arguments:

  • file_name str - The name of the file to be processed.

Returns:

  • AITransformersBuilder - Returns self for chaining.

Example:

builder.with_file_name('pkl_encoder.pkl')


create

def create() -> "AITransformersBuilder"

Prepares the creation of the transformer resource.

Returns:

  • AITransformersBuilder - Returns the current instance to allow method chaining.

Example:

builder.with_organization('Organization').add_file('exittransformer.py', 'text/python').add_file('pkl_encoder.pkl').create()            ~~~

<a id="opengate_data.ai_transformers.ai_transformers.AITransformersBuilder.find_all"></a>

---
#### find\_all

```python
def find_all() -> "AITransformersBuilder"
```

Searches for all available transformer resources.

**Returns**:

- `AITransformersBuilder` - Returns the current instance to allow method chaining.


**Example**:

~~~python
builder.with_organization_name('my_organization').find_all()


find_one

def find_one() -> "AITransformersBuilder"

Searches for a single transformer resource by its identifier.

This method prepares the request to find a specific transformer based on its identifier. The identifier is obtained automatically if not explicitly defined or can be obtained from a configuration file or environment variables.

Returns:

  • AITransformersBuilder - Returns the current instance to allow method chaining.

Example:

builder.with_organization_name('my_organization').with_identifier('identifier').find_one()


update

def update() -> "AITransformersBuilder"

Updates an existing transformer resource.

This method prepares the URL and HTTP method necessary to send a PUT request to the API to update an existing transformer. It is necessary to configure the relevant attributes of the AITransformersBuilder instance, including the identifier of the transformer to update, before calling this method.

Returns:

  • AITransformersBuilder - Returns the current instance to allow method chaining.

Example:

builder.with_organization_name('my_organization').with_identifier('identifier').update()


delete

def delete() -> "AITransformersBuilder"

Deletes an existing transformer resource.

This method prepares the URL and HTTP method necessary to send a DELETE request to the API to delete an existing transformer. It is necessary to configure the identifier attribute of the AITransformersBuilder instance before calling this method.

Returns:

  • AITransformersBuilder - Returns the current instance to allow method chaining.

Example:

builder.with_organization_name('my_organization').with_identifier('identifier').delete()


download

def download() -> "AITransformersBuilder"

Download the model file.

This method sets up the AIModelsBuilder instance to download the file of a specific model associated with the specified organization and identifier. It configures the URL endpoint for the download operation and sets the operation type to ‘download’.

Returns:

  • AITransformersBuilder - The instance of the AIModelsBuilder class itself, allowing for method chaining.

Example:

builder.with_organization_name("MyOrganization").with_identifier("model_identifier").with_output_file_path("model.onnx").download().build().execute()
builder.with_organization_name("MyOrganization").with_find_by_name("model_name.onnx").with_output_file_path("model.onnx").download().build().execute()
config_file_path = os.path.join(os.path.dirname(__file__), 'config_test.ini')
builder.with_organization_name("MyOrganization").with_config_file(config_file_path, 'id', 'model').with_output_file_path("model.onnx").download().build().execute()


evaluate

def evaluate() -> "AITransformersBuilder"

Prepares the evaluation of the transformer with provided data.

This method sets up the URL and method for evaluating the transformer using the provided data. The evaluation data should be set using the with_evaluate method before calling this method.

Returns:

  • AITransformersBuilder - Returns the current instance to allow method chaining.

Example:

builder.with_organization_name('my_organization').with_identifier('identifier').with_evaluate(evaluate_data).evaluate()


save

def save() -> "AITransformersBuilder"

Saves the transformer configuration.

This method prepares the URL and method for saving the transformer configuration. It checks if the identifier is set from the environment or configuration file and then either updates or creates the transformer accordingly.

Returns:

  • AITransformersBuilder - Returns the current instance to allow method chaining.

Example:

builder.with_organization_name('my_organization').with_env('TRANSFORMER_ID').save()


set_config_file_identifier

def set_config_file_identifier() -> "AITransformersBuilder"

Sets the transformer identifier in the configuration file.

This method sets the transformer identifier in the specified configuration file. It reads the configuration file, updates the identifier, and writes the changes back to the file.

Returns:

  • AITransformersBuilder - Returns the current instance to allow method chaining.

Example:

config_file_path = os.path.join(os.path.dirname(__file__), 'config_test.ini')
builder.with_config_file(config_file_path, 'id', 'transformer_id').set_config_file_identifier()


set_env_identifier

def set_env_identifier() -> "AITransformersBuilder"

Sets the transformer identifier in the environment variables.

This method sets the transformer identifier in the specified environment variable. It reads the environment variable, updates the identifier, and writes the changes back to the environment file.

Returns:

  • AITransformersBuilder - Returns the current instance to allow method chaining.

Example:

builder.with_env('TRANSFORMER_ID').set_env_identifier()


set_env_identifier

def set_env_identifier() -> "AITransformersBuilder"

Set the model identifier from an environment variable.

This method sets up the AITransformersBuilder instance to retrieve the model identifier from a specified environment variable. It reads the identifier from the environment variable and sets it for the builder instance.

Returns:

  • AITransformersBuilder - The instance of the AITransformersBuilder class itself, allowing for method chaining.

Example:

builder.with_env("env_var").set_env_identifier()


build

def build() -> "AITransformersBuilder"

Finalizes the construction of the IoT collection configuration.

This method prepares the builder to execute the collection by ensuring all necessary configurations are set and validates the overall integrity of the build. It should be called before executing the collection to ensure that the configuration is complete and valid.

The build process involves checking that mandatory fields such as the device identifier are set. It also ensures that method calls that are incompatible with each other (like build and build_execute) are not both used.

Returns:

  • AITransformersBuilder - Returns itself to allow for method chaining, enabling further actions like execute.

Raises:

  • ValueError - If required configurations are missing or if incompatible methods are used together.

Example:

builder.build()


build_execute

def build_execute()

Executes the data sets search immediately after building the configuration.

This method is a shortcut that combines building and executing in a single step.

Returns:

  • dict - A dictionary containing the execution response which includes the status code and potentially other metadata about the execution.

Raises:

  • ValueError - If build has already been called on this builder instance.

Example:

builder.build_execute()


execute

def execute() -> requests.Response

Sends the selected operation to the platform.

Which request goes out depends on the operation chosen in the chain: create, find, update, delete, download, evaluate, save, or resolving the identifier from a configuration file or from the environment.

Returns:

requests.Response | dict | str: Whatever the selected operation produces — the transformer payload, the contents of a downloaded file, or a dict carrying status_code and either data or error.

Raises:

  • ValueError - If no operation was selected in the chain.

Example:

builder.with_organization_name("organization").find_all().build().execute()

opengate_data.ai_transformers

Collection

opengate_data.collection.iot_bulk_collection

IotBulkCollectionBuilder Objects

class IotBulkCollectionBuilder()

Collection Bulk Builder


add_device_datastream_datapoints

def add_device_datastream_datapoints(
        device_id: str,
        datastream_id: str,
        datapoints: list[tuple[
            int | float | bool | dict | list | str,
            None | datetime | int,
            None | str,
            None | str,
        ]],
        feed: str | None = None) -> "IotBulkCollectionBuilder"

Add the datastream identifier and a list of datapoints with their value and at for data collection.

add_datastream_datapoints(“datastream_identifier”, [(value, at, source, source_info)])

Multiple datastreams can be grouped under a single identifier

Arguments:

  • device_id str - The identifier of the device the datapoints belong to.
  • datastream_id str - The identifier for the datastream to which the datapoints will be added.
  • datapoints list[tuple[int | float | bool | dict | list, None | datetime | int, None | datetime | int]] - A list of tuples where each tuple represents a datapoint. Each tuple contains the datapoint value and an optional timestamp (‘at’):
  • value - Collected value
  • at - Number with the time in miliseconds from epoch of the measurement. If this field is None, the platform will assign the server current time to the datapoint whe data is received.
  • feed str | None - The feed to collect the datapoints under. Optional.

Returns:

  • IotBulkCollectionBuilder - Returns itself to allow for method chaining.

Example:

builder.add_datastream_datapoints("datastream_identifier_1", [(value1, datetime.now()), (value2, None, "HTTP-Basic", "OK")])
builder.add_datastream_datapoints("datastream_identifier_2", [(value3, None), (value4, 1431602523123)])


add_device_datastream_datapoints_with_from

def add_device_datastream_datapoints_with_from(
        device_id: str,
        datastream_id: str,
        datapoints: list[tuple[
            int | float | bool | dict | list | str,
            None | datetime | int,
            None | datetime | int,
            None | str,
            None | str,
        ]],
        feed: str | None = None) -> "IotBulkCollectionBuilder"

Add the datastream identifier and a list of datapoints with their value, at and from for data collection.

add_datastream_datapoints_with_from(“datastream_identifier”, [(value, at, from, Source, SourceInfo)])

Multiple datastreams can be grouped under a single identifier

Arguments:

  • device_id str - The identifier of the device the datapoints belong to.
  • datastream_id str - The identifier for the datastream to which the datapoints will be added.
  • datapoints list[tuple[int | float | bool | dict, None | datetime | int, None | datetime | int]] - A list of tuples where each tuple represents a datapoint. Each tuple contains the datapoint value and an optional timestamp (‘at’) (‘from):
  • value - Collected value
  • at - Number with the time in miliseconds from epoch of the measurement. If this field is None, the platform will assign the server current time to the datapoint whe data is received.
  • from - Number with the time in miliseconds from epoch of the start period of measurement. This indicates that value is the same within this time interval (from, at).
  • feed str | None - The feed to collect the datapoints under. Optional.

Returns:

  • IotBulkCollectionBuilder - Returns itself to allow for method chaining.

Example:

builder.add_datastream_datapoints_with_from("datastream_identifier_1", [(value, 1431602523123, None), (value, None, None, "HTTP-Basic", "OK")])
builder.add_datastream_datapoints_with_from("datastream_identifier_2", [(value, None, datetime.now()), (value, 1431602523123, datetime.now())])


from_dataframe

def from_dataframe(df: pd.DataFrame) -> "IotBulkCollectionBuilder"

Processes a DataFrame to extract device, data and datapoints, and adds them to the payload.

Arguments:

  • df pd.DataFrame - The DataFrame containing the device data and datapoints. The DataFrame is expected to have columns that match the expected structure for device datastreams and datapoints.

Returns:

  • IotBulkCollectionBuilder - Returns itself to allow for method chaining.

Example:

import pandas as pd

df = pd.DataFrame({
- `'device_id'` - ['device'], ['device2'],
- `'datastream'` - ['1'],['2'],
- `'value'` - [value, value2],
- `'at'` - [datetime.now(), 2000]
})
builder.from_dataframe(df)


from_spreadsheet

def from_spreadsheet(
        path: str, sheet_name_index: int | str) -> "IotBulkCollectionBuilder"

Loads data from a spreadsheet, processes it, and adds the resulting device data and datapoints to the payload. This method is particularly useful for bulk data operations where data is stored in spreadsheet format.

Arguments:

  • path str - The file path to the spreadsheet to load.
  • sheet_name_index int | str - The sheet name or index to load from the spreadsheet.

Returns:

  • IotBulkCollectionBuilder - Returns itself to allow for method chaining.

Example:

builder.from_spreadsheet("file.xslx", "sheet_name)
builder.from_spreadsheet("file.xslx", 1)


build

def build() -> "IotBulkCollectionBuilder"

Finalizes the construction of the entities search configuration.

This method prepares the builder to execute the collection by ensuring all necessary configurations are set and validates the overall integrity of the build. It should be called before executing the collection to ensure that the configuration is complete and valid.

The build process involves checking that mandatory fields such as the device identifier are set. It also ensures that method calls that are incompatible with each other (like build and build_execute) are not both used.

Returns:

  • IotBulkCollectionBuilder - Returns itself to allow for method chaining, enabling further actions like execute.

Raises:

  • ValueError - If required configurations are missing or if incompatible methods are used together.

Example:

builder.build()


build_execute

def build_execute(include_payload=False)

This method is a shortcut that combines building and executing in a single step.

Arguments:

  • include_payload bool - Whether the response should carry the payload that was sent. Defaults to False.

Returns:

  • dict - A dictionary containing the execution response which includes the status code and potentially other metadata about the execution.

Raises:

  • ValueError - If build has already been called on this builder instance.

Example:

import pandas as pd
from datetime import datetime

data = {
- `"device_id"` - ['entity'],
- `"data_stream_id"` - ["device.temperature.value"],
- `"origin_device_identifier"` - ['entity2'],
- `"value"` - [40],
- `"version"` - ["4.0.0"],
- `"path"` - ["entityTesting3"],
- `"at"` - [datetime.now()],
- `"from"` - [datetime.now()],
}
new_iot_bulk_collection_builder().from_dataframe(df).from_spreadsheet("collect.xslx",0).add_device_datastream_datapoints_with_from("device_identifier", "device.temperature.value", [(300, datetime.now(), datetime.now())])
.add_device_datastream_datapoints("entity", "device.temperature.value", [(300, datetime.now())])
.build_execute()


to_dict

def to_dict() -> dict

This method is used to retrieve the entire payload that has been constructed by the builder. The payload includes all devices, their respective datastreams, and the datapoints that have been added to each datastream. This is particularly useful for inspecting the current state of the payload after all configurations and additions have been made, but before any execution actions (like sending data to a server) are taken.

Returns:

  • dict - A dictionary representing the current state of the payload within the IotBulkCollectionBuilder. This dictionary includes all devices, datastreams, and datapoints that have been configured.

Raises:

  • Exception - If the build method was not called before this method.

Example:

builder.to_dict()


execute

def execute(include_payload=False)

Executes the IoT collection based on the current configuration of the builder.

Arguments:

  • include_payload bool - Determine if the payload should be included in the response.

Returns:

  • dict - A dictionary containing the results of the execution, including success messages for each device ID if the data was successfully sent, or error messages detailing what went wrong.

Raises:

  • Exception - If build() has not been called before execute(), or if it was not the last method invoked prior to execute().

Example:

import pandas as pd
from datetime import datetime

data = {
- `"device_id"` - ['entity', entity2],
- `"data_stream_id"` - ["device.temperature.value", "device.name"],
- `"origin_device_identifier"` - ['entity2', None],
- `"value"` - [40, "Name"],
- `"version"` - ["4.0.0", "2.0.0],
- `"path"` - ["entityTesting3", entityTesting4],
- `"at"` - [datetime.now(), datetime.now()],
- `"from"` - [datetime.now(), datetime.now()],
}
builder.new_iot_bulk_collection_builder().from_dataframe(df).from_spreadsheet("collect.xslx",0).add_device_datastream_datapoints_with_from("device_identifier", "device.temperature.value", [(300, datetime.now(), datetime.now())])
.add_device_datastream_datapoints("entity", "device.temperature.value", [(300, datetime.now())])
.build().execute())

opengate_data.collection.iot_collection

IotCollectionBuilder Objects

class IotCollectionBuilder()

Iot Collection Builder


with_device_identifier

def with_device_identifier(device_identifier: str) -> "IotCollectionBuilder"

Add the device identifier to the constructor and validates the type.

Arguments:

  • device_identifier str - The unique identifier for the device.

Returns:

  • IotCollectionBuilder - Returns itself to allow for method chaining.

Example:

builder.with_device_identifier('device_identifier')


with_origin_device_identifier

def with_origin_device_identifier(
        origin_device_identifier: str) -> "IotCollectionBuilder"

Origin Device Identifier in case of be different that the device Identifier that sends information (included in the URI).

Add the origin_device_identifier to the constructor and validates the type.

Arguments:

  • origin_device_identifier str - The unique identifier for the device.

Returns:

  • IotCollectionBuilder - Returns itself to allow for method chaining.

Example:

builder.with_origin_device_identifier('origin_device_identifier')


with_version

def with_version(version: str) -> "IotCollectionBuilder"

Indicates the version of the structure

Add the version to the constructor and validates the type.

Arguments:

  • version str - The version string to be set.

Returns:

  • IotCollectionBuilder - Returns itself to allow for method chaining.

Example:

builder.with_version('1.0.0')


with_path

def with_path(path: list[str]) -> "IotCollectionBuilder"

Identifier of the gateway or gateways that has been used by the asset for sending the information.

This method adds the path gateway to the constructor and validates the type.

Arguments:

  • path list - The list of gateway identifiers.

Returns:

  • IotCollectionBuilder - Returns itself to allow for method chaining.

Example:

builder.with_path(["path"])


with_device

def with_device(device: str) -> "IotCollectionBuilder"

Device Identifier in case of be different that the device Identifier that sends information (included in the URI).

Arguments:

  • device str - The unique identifier for the device.

Returns:

  • IotCollectionBuilder - Returns itself to allow for method chaining.

Example:

builder.with_device("sub-device-001")


with_trustedboot

def with_trustedboot(trustedboot: str) -> "IotCollectionBuilder"

Indicates that a validation of the Trusted_boot type is required, it is not necessary to enter the value of the field but if you enter it, the entire message received by the platform will compare the value of TrustedBoot with the provisioned value, if they are different the message will not be collected.

Add the trustedboot to the constructor and validates the type.

Arguments:

  • trustedboot str - The unique identifier for the device.

Returns:

  • IotCollectionBuilder - Returns itself to allow for method chaining.

Example:

builder.with_trustedboot("trustedboot")


add_datastream_datapoints

def add_datastream_datapoints(
        datastream_id: str,
        datapoints: list[tuple[
            int | float | bool | dict | list | str,
            None | datetime | int,
            None | str,
            None | str,
        ]],
        feed: str | None = None) -> "IotCollectionBuilder"

Add the datastream identifier and a list of datapoints with their value and at for data collection.

add_datastream_datapoints(“datastream_identifier”, [(value, at, source, source_info)])

Multiple datastreams can be grouped under a single identifier

Arguments:

  • datastream_id str - The identifier for the datastream to which the datapoints will be added.
  • datapoints list[tuple[int | float | bool | dict | list, None | datetime | int, None | datetime | int]] - A list of tuples where each tuple represents a datapoint. Each tuple contains the datapoint value and an optional timestamp (‘at’):
  • value - Collected value
  • at - Number with the time in miliseconds from epoch of the measurement. If this field is None, the platform will assign the server current time to the datapoint whe data is received.
  • feed str | None - The feed to collect the datapoints under. Optional.

Returns:

  • IotCollectionBuilder - Returns itself to allow for method chaining.

Example:

builder.add_datastream_datapoints("datastream_identifier_1", [(value1, datetime.now()), (value2, None, "HTTP-Basic", "OK")])
builder.add_datastream_datapoints("datastream_identifier_2", [(value3, None), (value4, 1431602523123)])


add_datastream_datapoints_with_from

def add_datastream_datapoints_with_from(
        datastream_id: str,
        datapoints: list[tuple[
            int | float | bool | dict | list | str,
            None | datetime | int,
            None | datetime | int,
            None | str,
            None | str,
        ]],
        feed: str | None = None) -> "IotCollectionBuilder"

Add the datastream identifier and a list of datapoints with their value, at and from for data collection.

add_datastream_datapoints_with_from(“datastream_identifier”, [(value, at, from, Source, SourceInfo)])

Multiple datastreams can be grouped under a single identifier

Arguments:

  • datastream_id str - The identifier for the datastream to which the datapoints will be added.
  • datapoints list[tuple[int | float | bool | dict, None | datetime | int, None | datetime | int]] - A list of tuples where each tuple represents a datapoint. Each tuple contains the datapoint value and an optional timestamp (‘at’) (‘from):
  • value - Collected value
  • at - Number with the time in miliseconds from epoch of the measurement. If this field is None, the platform will assign the server current time to the datapoint whe data is received.
  • from - Number with the time in miliseconds from epoch of the start period of measurement. This indicates that value is the same within this time interval (from, at).
  • feed str | None - The feed to collect the datapoints under. Optional.

Returns:

  • IotCollectionBuilder - Returns itself to allow for method chaining.

Example:

builder.add_datastream_datapoints_with_from("datastream_identifier_1", [(value, 1431602523123, None), (value, None, None, "HTTP-Basic", "OK")])
builder.add_datastream_datapoints_with_from("datastream_identifier_2", [(value, None, datetime.now()), (value, 1431602523123, datetime.now())])


from_dict

def from_dict(payload: dict[str, Any]) -> "IotCollectionBuilder"

Constructs the collection configuration from a dictionary input.

This method dynamically applies builder methods based on the keys in the input dictionary. It should be used after the build() method has been called to ensure that the builder is in a proper state to accept configuration from a dictionary.

Arguments:

  • payload dict[str, Any] - The dictionary containing the configuration Args.

Returns:

  • IotCollectionBuilder - Returns itself to allow for method chaining.

Raises:

  • ValueError - If required keys are missing in the payload or if the ‘datastreams’ field is empty.

Example:

builder.build().from_dict({
- `'version'` - '1.0.0',
- `'path'` - ["mews"],
- `'trustedBoot'` - "trustedBoot",
- `'origin_device_identifier'` - 'device123',
- `'datastreams'` - [
- `{'id'` - 'temp', 'datapoints': [(22, 1609459200000)]}
]
})


build

def build() -> "IotCollectionBuilder"

Finalizes the construction of the IoT collection configuration.

This method prepares the builder to execute the collection by ensuring all necessary configurations are set and validates the overall integrity of the build. It should be called before executing the collection to ensure that the configuration is complete and valid.

The build process involves checking that mandatory fields such as the device identifier are set. It also ensures that method calls that are incompatible with each other (like build and build_execute) are not both used.

Returns:

  • IotCollectionBuilder - Returns itself to allow for method chaining, enabling further actions like execute.

Raises:

  • ValueError - If required configurations are missing or if incompatible methods are used together.

Notes:

This method should be used as a final step before execute to prepare the IoT collection configuration. It does not modify the state but ensures that the builder’s state is ready for execution.

Example:

builder.build()


to_dict

def to_dict() -> dict

This method is used to retrieve the entire payload that has been constructed by the builder. The payload includes all devices, their respective datastreams, and the datapoints that have been added to each datastream. This is particularly useful for inspecting the current state of the payload after all configurations and additions have been made, but before any execution actions (like sending data to a server) are taken.

Returns:

  • dict - A dictionary representing the current state of the payload within the IotCollectionBuilder. This dictionary includes all devices, datastreams, and datapoints that have been configured.

Raises:

  • Exception - If the build() method was not called before this method.

Example:

builder.build().to_dict()


build_execute

def build_execute(include_payload: bool = False)

Executes the IoT collection immediately after building the configuration.

This method is a shortcut that combines building and executing in a single step. It should be used when you want to build and execute the configuration without modifying the builder state in between these operations.

It first validates the build configuration and then executes the collection if the validation is successful.

Arguments:

  • include_payload bool - Determine if the payload should be included in the response.

Returns:

  • dict - A dictionary containing the execution response which includes the status code and potentially other metadata about the execution.

Raises:

  • ValueError - If build has already been called on this builder instance, indicating that build_execute is being incorrectly used after build.
  • Exception - If there are issues during the execution process, including network or API errors.

Example:

new_iot_collection_builder().with_device_identifier("entity").with_version("2.0.0").add_datastream_datapoints("device.temperature.value", [(100, None), (50, datetime.now())]).build_execute(True)


execute

def execute(include_payload: bool = False)

Executes the IoT collection based on the current configuration of the builder.

Arguments:

  • include_payload bool - Determine if the payload should be included in the response.

Returns:

  • Dict - A dictionary containing the execution response which includes the status code and, optionally, the payload. If an error occurs, a string describing the error is returned.

Raises:

  • Exception - If build() has not been called before execute(), or if it was not the last method invoked prior to execute().

Example:

builder.with_device_identifier("device_identifier").with_version("2.0.0").add_datastream_datapoints("device.temperature.value", [(100, None), (50, datetime.now())]).build().execute(True)

opengate_data.collection.iot_pandas_collection

PandasIotCollectionBuilder Objects

class PandasIotCollectionBuilder()

Builder class to process a pandas DataFrame into IoT collections and send them to a specified endpoint.


from_dataframe

def from_dataframe(df: pd.DataFrame) -> "PandasIotCollectionBuilder"

Set the input DataFrame that contains the IoT data to process.

The DataFrame must include a ‘device_id’ and ‘at’ column. Additional columns are considered as potential datastream values. If ‘at’ is empty or None, a timestamp will be assigned.

Arguments:

  • df pd.DataFrame - The DataFrame with ‘device_id’ and ‘at’ columns.

Returns:

  • PandasIotCollectionBuilder - The current builder instance.

Raises:

  • Exception - If ‘device_id’ or ‘at’ column is missing in the DataFrame.


with_columns

def with_columns(columns: list[str]) -> "PandasIotCollectionBuilder"

Specify the columns from the DataFrame that should be included as datastreams in the IoT payload.

If this method is not called, all available datastream columns (except required/optional ones) are used. If it is called, only the specified columns will be considered.

Arguments:

  • columns list[str] - The list of column names to include as datastreams.

Returns:

  • PandasIotCollectionBuilder - The current builder instance.

Raises:

  • Exception - If any specified column does not exist in the DataFrame.


with_max_bytes_per_request

def with_max_bytes_per_request(max_bytes: int) -> "PandasIotCollectionBuilder"

Set the maximum number of bytes per request for IoT collection.

This controls how the payload is batched when sending to the endpoint.

Arguments:

  • max_bytes int - The maximum request size in bytes.

Returns:

  • PandasIotCollectionBuilder - The current builder instance.


build

def build() -> "PandasIotCollectionBuilder"

Build the request payload after the DataFrame and columns have been configured.

This method processes the DataFrame, converting columns into the appropriate IoT datastream format. It must be called before execute() if not using build_execute().

Returns:

  • PandasIotCollectionBuilder - The current builder instance.

Raises:

  • Exception - If build() and build_execute() are used together.


build_execute

def build_execute(
        include_payload: bool = False) -> dict[str, list[dict[str, Any]]]

Build the payload and execute the request in a single step.

This method is a shortcut for users who want to build and then immediately execute. It cannot be used together with build() or execute().

Arguments:

  • include_payload bool - Whether to include the payload in the result. Defaults to False.

Returns:

dict[str, list[dict[str, Any]]]: The results of the IoT collection request.

Raises:

  • ValueError - If build_execute() is used together with build() or execute().


execute

def execute(include_payload: bool = False) -> Union[str, pd.DataFrame]

Execute the request after building it with build() or build_execute().

If include_payload is True, it returns a JSON string with the payload and results. Otherwise, it returns a pandas DataFrame with a status column summarizing the results.

Arguments:

  • include_payload bool - Whether to include the payload in the result. Defaults to False.

Returns:

Union[str, pd.DataFrame]: The result of the IoT collection request.

Raises:

  • Exception - If the required method invocation order is not respected.

opengate_data.collection

Datasets

opengate_data.datasets.find_datasets

FindDatasetsBuilder Objects

class FindDatasetsBuilder()

Find Datasets Builder


with_organization_name

def with_organization_name(organization_name: str) -> "FindDatasetsBuilder"

Set organization name

Arguments:

  • organization_name str - The name of the organization that owns the data sets.

Returns:

  • FindDatasetsBuilder - Returns itself to allow for method chaining.

Example:

builder.with_organization_name("organization_name")


with_format

def with_format(format_data: str) -> "FindDatasetsBuilder"

Formats the flat entities data based on the specified format (‘dict’, or ‘pandas’). By default, the data is returned as a dictionary.

Arguments:

  • format_data str - The format to use for the data.

Example:

builder.with_format(‘dict’) builder.with_format(‘pandas’)

Returns:

  • FindDatasetsBuilder - Returns itself to allow for method chaining.


with_identifier

def with_identifier(identifier: str) -> "FindDatasetsBuilder"

set the dataset identifier.

Arguments:

  • identifier str - The identifier of the dataset.

Returns:

  • FindDatasetsBuilder - Returns itself to allow for method chaining.

Example:

builder.with_identifier("dataset_id")


with_config_file

def with_config_file(config_file: str,
                     section: str,
                     config_key: str,
                     prefer: str = "auto") -> "FindDatasetsBuilder"

Reads a value from the INI and saves it as a source. ‘prefer’ controls whether the value will be interpreted as identifier, name, or auto (first id, then name).

Arguments:

  • config_file str - Path to the INI file to read.
  • section str - The section of the INI file the value lives in.
  • config_key str - The key holding the value.
  • prefer str - How to read the value: ‘identifier’, ’name’, or ‘auto’ to try the identifier first and fall back to the name. Defaults to ‘auto’.


with_name

def with_name(find_name: str) -> "FindDatasetsBuilder"

Specify the name to find.

Arguments:

  • find_name str - The name of the dataset.

Returns:

  • FindDatasetsBuilder - Returns self for chaining.

Example:

builder.with_name('dataset_name')


with_env

def with_env(env_key: str, prefer: str = "auto") -> "FindDatasetsBuilder"

Use an environment variable as the source. ‘prefer’ can be:

  • ‘identifier’ -> treat the value as an identifier
  • ’name’ -> treat the value as a name
  • ‘auto’ -> try identifier and, if not, name

Arguments:

  • env_key str - The name of the environment variable to read.
  • prefer str - How to read the value: ‘identifier’, ’name’, or ‘auto’ to try the identifier first and fall back to the name. Defaults to ‘auto’.


find_all

def find_all() -> "FindDatasetsBuilder"

Searches for all available data sets resources.

Returns:

  • FindDatasetsBuilder - Returns the current instance to allow method chaining.

Example:

builder.with_organization_name('my_organization').find_all()


find_one

def find_one() -> "FindDatasetsBuilder"

Searches for a single dataset resource by its identifier.

This method prepares the request to find a specific dataset based on its identifier. The identifier is obtained automatically if not explicitly defined or can be obtained from a configuration file or environment variables.

Returns:

  • FindDatasetsBuilder - Returns the current instance to allow method chaining.

Example:

builder.with_organization_name('my_organization').with_organization_name("organization_name").with_format("dict").with_identifier("identifier").find_one().build().execute()


build

def build() -> "FindDatasetsBuilder"

Finalizes the construction of the IoT collection configuration.

This method prepares the builder to execute the collection by ensuring all necessary configurations are set and validates the overall integrity of the build. It should be called before executing the collection to ensure that the configuration is complete and valid.

The build process involves checking that mandatory fields such as the device identifier are set. It also ensures that method calls that are incompatible with each other (like build and build_execute) are not both used.

Returns:

  • FindDatasetsBuilder - Returns itself to allow for method chaining, enabling further actions like execute.

Raises:

  • ValueError - If required configurations are missing or if incompatible methods are used together.

Example:

builder.build()


build_execute

def build_execute()

Executes the data sets search immediately after building the configuration.

This method is a shortcut that combines building and executing in a single step.

Returns:

  • dict - A dictionary containing the execution response which includes the status code and potentially other metadata about the execution.

Raises:

  • ValueError - If build has already been called on this builder instance.

Example:

builder.build_execute()


execute

def execute() -> Response

Execute the configured operation and return the response.

This method executes the operation that has been configured using the builder pattern. It ensures that the build method has been called and that it is the last method invoked before execute. Depending on the configured method (e.g., create, find, update, delete), it calls the appropriate internal execution method.

Returns:

  • requests.Response - The response object from the executed request.

Raises:

  • Exception - If the build method has not been called or if it is not the last method invoked before execute.
  • ValueError - If the configured method is unsupported.

Example:

builder.execute()

opengate_data.datasets

File Connector

opengate_data.file_connector.file_connector

FileConnectorBuilder Objects

class FileConnectorBuilder()

File Connector Builder


with_organization_name

def with_organization_name(organization_name: str) -> "FileConnectorBuilder"

Set organization name

Arguments:

  • organization_name str - The name of the organization the files belong to.

Returns:

  • FileConnectorBuilder - Returns itself to allow for method chaining.

Example:

builder.with_organization_name("organization_name")


with_overwrite_files

def with_overwrite_files(overwrite_files: bool) -> "FileConnectorBuilder"

Set the overwrite file.

Arguments:

  • overwrite_files bool - Whether an upload replaces a file that already exists.

Returns:

  • FileConnectorBuilder - Returns itself to allow for method chaining.


add_local_file

def add_local_file(local_file: str) -> "FileConnectorBuilder"

Add a single local file to be uploaded.

You can call this method multiple times or combine it with add_local_multiple_files().

Arguments:

  • local_file str - Local file path to be uploaded.

Returns:

  • FileConnectorBuilder - Returns itself to allow for method chaining.

Example:

builder.add_local_file("data/file1.csv")


add_local_multiple_files

def add_local_multiple_files(local_files: list[str]) -> "FileConnectorBuilder"

Add multiple local files to be uploaded.

The provided list can include one or more filesystem paths. They will be appended to the same internal collection used by add_local_file, so you can freely combine both methods:

builder.add_local_file(“foo.zip”).add_local_multiple_files([“bar.zip”, “baz.tar”])

Arguments:

  • local_files list[str] - List of file paths to upload.

Returns:

  • FileConnectorBuilder - Returns itself to allow for method chaining.


with_format

def with_format(format_data: str) -> "FileConnectorBuilder"

Formats the flat entities data based on the specified format (‘dict’, or ‘pandas’). By default, the data is returned as a dictionary.

Arguments:

  • format_data str - The format to use for the data.

Example:

builder.with_format(‘dict’) builder.with_format(‘pandas’)

Returns:

  • FileConnectorBuilder - Returns itself to allow for method chaining.


with_destiny_path

def with_destiny_path(path: str) -> "FileConnectorBuilder"

Set destiny path

Arguments:

  • path str - The remote directory the operation works on. A trailing slash is added if missing.

Returns:

  • FileConnectorBuilder - Returns itself to allow for method chaining.

Example:

builder.with_destiny_path("path")


with_find_name

def with_find_name(find_file_name: str) -> "FileConnectorBuilder"

Set find by name

Arguments:

  • find_file_name str - The name of the file to look for.

Returns:

  • FileConnectorBuilder - Returns itself to allow for method chaining.

Example:

builder.with_find_name("file.csv")


with_output_path

def with_output_path(output_path: str) -> "FileConnectorBuilder"

Set output path so that when downloading the file it is saved in that path

Arguments:

  • output_path str - The local directory a download is saved into. A trailing slash is added if missing.

Returns:

  • FileConnectorBuilder - Returns itself to allow for method chaining.

Example:

builder.with_output_path("output_path")


add_remote_file

def add_remote_file(file: str) -> "FileConnectorBuilder"

Adds one remote file to the operation.

Call it as many times as needed, or combine it with add_remote_multiple_files().

Arguments:

  • file str - The name of the remote file.

Returns:

  • FileConnectorBuilder - Returns itself to allow for method chaining.

Example:

builder.add_remote_file("file.csv")


add_remote_multiple_files

def add_remote_multiple_files(files: list) -> "FileConnectorBuilder"

Adds several remote files to the operation at once.

The list is appended to the same collection add_remote_file() fills, so both can be combined.

Arguments:

  • files list - The names of the remote files.

Returns:

  • FileConnectorBuilder - Returns itself to allow for method chaining.

Example:

builder.add_remote_multiple_files(["file1.csv", "file2.csv"])


from_dataframe

def from_dataframe(df: "pd.DataFrame",
                   *,
                   defaults: dict | None = None) -> "FileConnectorBuilder"

Assign a DataFrame that describes operations per row. Expected columns (depending on method):

  • upload: local_file [req], destiny_path [opt], ​​overwrite [opt]
  • If there is no destiny_path, use defaults[‘destiny_path’] or defaults[‘path’] or with_destiny_path(…) or “/”
  • default overwrite = False
  • download: path [req], filename [req], output_path [opt]
  • path can come from column, defaults[‘path’], with_destiny_path(…)
  • delete: path [req], filename [opt] (empty or absent -> delete the entire path)

Supported defaults: {“destiny_path”: str, “path”: str, “overwrite”: bool, “output_path”: str}

NOTE: if you mix from_dataframe with setters in download (path/filenames/output_path), then you must use all THREE setters; if not, use only from_dataframe.

Arguments:

  • df pandas.DataFrame - The DataFrame holding the files to upload.
  • defaults dict | None - Values to fall back on when a row leaves a column out: “destiny_path”, “path”, “overwrite” and “output_path”.


upload

def upload() -> "FileConnectorBuilder"

Configures the builder to upload a file to the specified organization.

This method sets the internal state of the builder to prepare for a file upload operation. It does not execute the operation immediately but prepares the necessary configurations for when the execute method is called.

Returns:

  • FileConnectorBuilder - Returns itself to allow for method chaining.

Example:

builder.upload()


list_all

def list_all() -> "FileConnectorBuilder"

Configures the builder to list files available in the specified organization.

This method sets the internal state of the builder to prepare for a file listing operation. It does not execute the operation immediately but prepares the necessary configurations for when the execute method is called.

Returns:

  • FileConnectorBuilder - Returns itself to allow for method chaining.

Example:

builder.list_all()


list_one

def list_one() -> "FileConnectorBuilder"

Configures the builder to list a single file from the specified organization.

This method sets the internal state of the builder to prepare for a single file listing operation. It does not execute the operation immediately but prepares the necessary configurations for when the execute method is called.

Returns:

  • FileConnectorBuilder - Returns itself to allow for method chaining.

Example:

builder.list_one()


download

def download() -> "FileConnectorBuilder"

Configures the builder to download a file from the specified organization.

This method sets the internal state of the builder to prepare for a file download operation. It does not execute the operation immediately but prepares the necessary configurations for when the execute method is called.

Returns:

  • FileConnectorBuilder - Returns itself to allow for method chaining.

Example:

builder.download()


delete

def delete() -> "FileConnectorBuilder"

Selects the operation that deletes files from the file connector.

Requires with_destiny_path(). Name the files to remove with add_remote_file() or add_remote_multiple_files(); with none named, the whole path is deleted.

Returns:

  • FileConnectorBuilder - Returns itself to allow for method chaining.

Example:

builder.with_organization_name("organization").with_destiny_path(
"/to/delete"
).add_remote_file("file.csv").delete().build().execute()


build

def build() -> "FileConnectorBuilder"

Closes the chain and checks it, without sending the request.

Call it last, immediately before execute(). Use build_execute() instead to do both in one step; mixing the two raises.

Returns:

  • FileConnectorBuilder - Returns itself to allow for method chaining.

Raises:

  • RuntimeError - If called more than once.
  • Exception - If combined with build_execute().
  • ValueError - If the chain is missing a method the selected operation requires, or carries one it forbids.

Example:

builder.upload().build()


build_execute

def build_execute()

Closes the chain, checks it and sends the request in one step.

Returns:

requests.Response | dict | pandas.DataFrame: The same result as execute().

Raises:

  • RuntimeError - If combined with build() or with execute().
  • ValueError - If the chain is missing a method the selected operation requires, or carries one it forbids.

Example:

builder.with_organization_name("organization").with_destiny_path(
"/path"
).add_local_file("file.csv").upload().build_execute()


execute

def execute() -> Response

Sends the selected operation to the file connector.

Which request goes out depends on the operation chosen in the chain: upload(), list_all(), list_one(), download() or delete(). The two listing operations default to the “dict” format when with_format() was not called.

Returns:

requests.Response | dict | str | pandas.DataFrame: The listing in the requested format, the contents of a download, or a dict carrying status_code and either data or error.

Raises:

  • RuntimeError - If build() was not the last call before execute(), or if neither build() nor build_execute() was called.
  • ValueError - If no operation was selected in the chain.

Example:

builder.with_organization_name("organization").with_destiny_path(
"/path"
).list_all().build().execute()

opengate_data.file_connector

Provision

opengate_data.provision.devices.provision_device

ProvisionDeviceBuilder

ProvisionDeviceBuilder Objects

class ProvisionDeviceBuilder()

Class Provision builder


with_organization_name

def with_organization_name(organization_name: str) -> "ProvisionDeviceBuilder"

Specify the organization for the device.

Arguments:

  • organization_name str - The organization for the device.

Returns:

  • ProvisionDeviceBuilder - Returns self for chaining.

Example:

builder.with_organization_name('organization_name')


with_identifier

def with_identifier(identifier: str) -> "ProvisionDeviceBuilder"

Specify the identifier for the device.

Arguments:

  • identifier str - The identifier for the device.

Returns:

  • ProvisionDeviceBuilder - Returns self for chaining.

Example:

builder.with_identifier('identifier')


with_flattened

def with_flattened() -> "ProvisionDeviceBuilder"

Flatten the data

Returns:

  • ProvisionDeviceBuilder - Returns itself to allow for method chaining.

Example:

builder.with_flattened()


with_utc

def with_utc() -> "ProvisionDeviceBuilder"

Set UTC flag

Returns:

  • ProvisionDeviceBuilder - Returns itself to allow for method chaining.

Example:

builder.with_utc()


with_provision_identifier

def with_provision_identifier(identifier: str) -> "ProvisionDeviceBuilder"

Set provision identifier

Arguments:

  • identifier str - The identifier to provision the device with.

Returns:

  • ProvisionDeviceBuilder - Returns itself to allow for method chaining.

Example:

builder.with_provision_identifier("identifier")


with_provision_channel

def with_provision_channel(channel: str) -> "ProvisionDeviceBuilder"

Set provision channel

Arguments:

  • channel str - The channel to provision the device into.

Returns:

  • ProvisionDeviceBuilder - Returns itself to allow for method chaining.

Example:

builder.with_provision_channel("channel")


with_provision_service_group

def with_provision_service_group(
        service_group: str) -> "ProvisionDeviceBuilder"

Set provision servicegroup

Arguments:

  • service_group str - The service group to provision the device into.

Returns:

  • ProvisionDeviceBuilder - Returns itself to allow for method chaining.

Example:

builder.with_provision_service_group("emptyServiceGroup")


with_provision_organization

def with_provision_organization(organization: str) -> "ProvisionDeviceBuilder"

Set provision organization

Arguments:

  • organization str - The organization to provision the device into.

Returns:

  • ProvisionDeviceBuilder - Returns itself to allow for method chaining.

Example:

builder.with_provision_service_group("organization_name")


add_provision_datastream_value

def add_provision_datastream_value(datastream: str,
                                   value: Any) -> "ProvisionDeviceBuilder"

Add a datastream value to the payload.

Arguments:

  • datastream str - The datastream identifier.
  • value Any - The value to be added. It Can be a primitive type or a complex object.

Returns:

  • ProvisionDeviceBuilder - Returns itself to allow for method chaining.

Example:

location_value = {
- `"position"` - {
- `"coordinates"` - [
-3.66131084,
40.458442
]
}
}
builder.add_provision_datastream_value("provision.device.location", location_value)
builder.add_provision_datastream_value("provision.device.name", "Name")


from_dict

def from_dict(dct: dict[str, Any]) -> "ProvisionDeviceBuilder"

Loads data as a python dictionary. If you want to enter the dictionary in flattened mode, you need to use with_flattened().

Arguments:

  • dct dict - The dictionary variable.

Returns:

  • ProvisionDeviceBuilder - Returns itself to allow for method chaining.

Example:

# Mode flattened
builder.with_flattened().from_dict(
{"resourceType":{"_value":{"_current":{"value":"entity.device"}}},
"provision.device.identifier":{"_value":{"_current":{"value":"identifier"}}},
"provision.administration.organization":{"_value":{"_current":{"value":"organization"}}},
"provision.administration.channel":{"_value":{"_current":{"value":"default_channel"}}},
"provision.administration.serviceGroup":{"_value":{"_current":{"value":"emptyServiceGroup"}}},
"provision.device.location":{"_value":{"_current":{"value":{"position":{"coordinates":[-3.66131084,40.458442]}}}}},

# Mode without flattened
builder.from_dict({
- `"resourceType"` - {
- `"_current"` - {
- `"value"` - "entity.device"
}
},
- `"provision"` - {
- `"administration"` - {
- `"channel"` - {
- `"_current"` - {
- `"value"` - "battery_channel"
}
},
- `"organization"` - {
- `"_current"` - {
- `"value"` - "battery_organization"
}
},
- `"serviceGroup"` - {
- `"_current"` - {
- `"value"` - "emptyServiceGroup"
}
}
},
- `"device"` - {
- `"identifier"` - {
- `"_current"` - {
- `"value"` - "worker_battery_id"
}
}
}
}
})


from_dataframe

def from_dataframe(df: pd.DataFrame) -> "ProvisionDeviceBuilder"

Loads data as a pandas DataFrame. Columns must be the names of the datastreams separated with ‘_’ or ‘.’.

Arguments:

  • df pd.DataFrame - The DataFrame variable.

Returns:

  • ProvisionDeviceBuilder - Returns itself to allow for method chaining.

Example:

import pandas as pd
data = {
- `'provision_administration_organization_current_value'` - ['base_organization','test_organization'],
- `'provision_device_location_current_value_position_type'` - ['Point','Other_Point'],
- `'provision_device_location_current_value_position_coordinates'` - [[-3.7028,40.41675],[-5.7028,47.41675]],
- `'provision_device_location_current_value_postal'` - ['28013','28050']
}
df = pd.DataFrame(df)
builder.from_dataframe(df)


find_one

def find_one() -> "ProvisionDeviceBuilder"

Retrieve a single device.

This method sets up the ProvisionDeviceBuilder instance to retrieve a specific assey associated with the specified organization and identifier.

Returns:

  • ProvisionDeviceBuilder - The instance of the ProvisionDeviceBuilder class itself, allowing for method chaining.

Example:

builder.with_organization_name("organization_name").with_identifier("model_identifier").find_one()


create

def create() -> "ProvisionDeviceBuilder"

Initiates the creation process of a new device.

This method prepares the ProvisionDeviceBuilder instance to create a new device.

Returns:

  • ProvisionDeviceBuilder - The instance of the ProvisionDeviceBuilder class itself, allowing for method chaining.

Example:

builder.with_organization_name("organization_name")
.with_provision_identifier("provision_identifier")                    .with_provision_organization("provision_organization")                    .with_provision_channel("provision_channel")                    .with_provision_service_group("provision_service_group")                    .add_provision_datastream_value("provision.device.name", "Name")                    .create()


update

def update() -> "ProvisionDeviceBuilder"

Update an existing device.

This method sets up the ProvisionDeviceBuilder instance to update a specific device associated with the specified organization and identifier.

You can update a device with a flattened format sending a PUT request using the URL above. You must replace {identifier} with the identifier of the device you want to update. Also, it is sent a boolean parameter, flattened, to allow sending a flattened JSON format

Returns:

  • ProvisionDeviceBuilder - The instance of the ProvisionDeviceBuilder class itself, allowing for method chaining.

Example:

dict_flatenned = {“resourceType”:{"_value":{"_current":{“value”:“entity.device”}}}, “provision.device.identifier”:{"_value":{"_current":{“value”:“ManuEntityTests”}}}, “provision.administration.organization”:{"_value":{"_current":{“value”:“orgnization_name”}}}, “provision.administration.channel”:{"_value":{"_current":{“value”:“default_channel”}}}, “provision.administration.serviceGroup”:{"_value":{"_current":{“value”:“emptyServiceGroup”}}},

builder.with_organization_name("organization_name").with_identifier("model_identifier").with_flattened().from_dict(dict_flatenned).update()


delete

def delete() -> "ProvisionDeviceBuilder"

Delete an existing device.

This method sets up the ProvisionDeviceBuilder instance to delete a specific device associated with the specified organization and identifier.

Returns:

  • ProvisionDeviceBuilder - The instance of the ProvisionDeviceBuilder class itself, allowing for method chaining.

Example:

builder().with_organization('organization_name').with_identifier("identifier").delete()


build

def build() -> "ProvisionDeviceBuilder"

Finalizes the construction of the device configuration.

This method prepares the builder to execute the collection by ensuring all necessary configurations are set and validates the overall integrity of the build. It should be called before executing the collection to ensure that the configuration is complete and valid.

The build process involves checking that mandatory fields such as the device identifier are set. It also ensures that method calls that are incompatible with each other (like build and build_execute) are not both used.

Returns:

  • ProvisionDeviceBuilder - Returns itself to allow for method chaining, enabling further actions like execute.

Raises:

  • ValueError - If required configurations are missing or if incompatible methods are used together.

Example:

builder.build()


build_execute

def build_execute()

Executes the data sets search immediately after building the configuration.

This method is a shortcut that combines building and executing in a single step.

Returns:

  • dict - A dictionary containing the execution response which includes the status code and potentially other metadata about the execution.

Raises:

  • ValueError - If build has already been called on this builder instance.

Example:

builder.build_execute()


execute

def execute() -> str | dict[str, str | int]

Execute the configured device and return the response.

This method executes the operation that has been configured using the builder pattern. It ensures that the build method has been called and that it is the last method invoked before execute. Depending on the configured method (e.g., create, find, update, delete), it calls the appropriate internal execution method.

Returns:

  • requests.Response - The response object from the executed request.

Raises:

  • Exception - If the build method has not been called or if it is not the last method invoked before execute.
  • ValueError - If the configured method is unsupported.

Example:

builder.execute()

opengate_data.provision.devices

opengate_data.provision.bulk.provision_bulk

ProvisionBulkBuilder Objects

class ProvisionBulkBuilder()

Provision Bulk Builder

Provisions many entities in a single request, which is the way to go when a per-entity call would mean thousands of them. The payload can come from a file — from_json(), from_csv(), from_excel() — or from memory, with from_dataframe() or from_dict().

with_bulk_action() chooses what to do with the rows — CREATE by default, UPDATE, PATCH or DELETE — and with_bulk_type() what they are, ENTITIES by default or TICKETS. Close the chain with build() and execute(), or with build_execute().

Example:

builder = client.new_provision_bulk_builder()
builder.with_organization_name("organization").from_csv(
"entities.csv"
).with_bulk_action("CREATE").build().execute()


with_organization_name

def with_organization_name(organization_name: str) -> "ProvisionBulkBuilder"

Specify the organization name.

Arguments:

  • organization_name str - The name of the organization name that we want to bulk data.

Returns:

  • ProvisionBulkBuilder - Returns itself to allow for method chaining.

Example:

builder.with_organization_name('organization_name')


with_bulk_action

def with_bulk_action(bulk_action: str) -> "ProvisionBulkBuilder"

Adds the bulk action to the constructor and validates the type.

Arguments:

  • bulk_action str - The bulk action. You can choose between these actions:
    • CREATE (default)
    • UPDATE
    • PATCH
    • DELETE

Returns:

  • ProvisionBulkBuilder - Returns itself to allow for method chaining.

Raises:

  • ValueError - If the bulk action isn’t one of the mentioned above.

Example:

builder.with_bulk_action('bulk_action')


with_bulk_type

def with_bulk_type(bulk_type: str) -> "ProvisionBulkBuilder"

Adds the bulk type to the constructor and validates the type.

Arguments:

  • bulk_type str - The bulk type. You can choose between these types:
    • ENTITIES (default)
    • TICKETS

Returns:

  • ProvisionBulkBuilder - Returns itself to allow for method chaining.

Raises:

  • ValueError - If the bulk type isn’t one of the mentioned above.

Example:

builder.with_bulk_type('bulk_type')


from_json

def from_json(path: str) -> "ProvisionBulkBuilder"

Loads data as a json file.

Arguments:

  • path str - The path to the json file.

Returns:

  • ProvisionBulkBuilder - Returns itself to allow for method chaining.

Raises:

  • FileNotFoundError - If the path isn’t correct or the file doesn’t exist in the selected folder.

Example:

builder.from_json('path_to_json.json')


from_csv

def from_csv(path: str) -> "ProvisionBulkBuilder"

Loads data as a csv file.

Arguments:

  • path str - The path to the csv file.

Returns:

  • ProvisionBulkBuilder - Returns itself to allow for method chaining.

Raises:

  • FileNotFoundError - If the path isn’t correct or the file doesn’t exist in the selected folder.

Example:

builder.from_csv('path_to_csv.csv')


from_excel

def from_excel(path: str) -> "ProvisionBulkBuilder"

Loads data as an Excel file (supports xls and xlsx).

Arguments:

  • path str - The path to the Excel file.

Returns:

  • ProvisionBulkBuilder - Returns itself to allow for method chaining.

Raises:

  • FileNotFoundError - If the path isn’t correct or the file doesn’t exist in the selected folder.

Example:

builder.from_excel('path_to_excel.xls')


from_dataframe

def from_dataframe(df: pd.DataFrame) -> "ProvisionBulkBuilder"

Loads data as a pandas DataFrame. Columns must be the names of the datastreams separated with ‘_’ or ‘.’.

Arguments:

  • df pd.DataFrame - The DataFrame variable.

Returns:

  • ProvisionBulkBuilder - Returns itself to allow for method chaining.

Example:

import pandas as pd
data = {
- `'provision_administration_organization_current_value'` - ['base_organization','test_organization'],
- `'provision_device_location_current_value_position_type'` - ['Point','Other_Point'],
- `'provision_device_location_current_value_position_coordinates'` - [[-3.7028,40.41675],[-5.7028,47.41675]],
- `'provision_device_location_current_value_postal'` - ['28013','28050']
}
df = pd.DataFrame(df)
builder.from_dataframe(df)


from_dict

def from_dict(dct: dict[str, Any]) -> "ProvisionBulkBuilder"

Loads data as a python dictionary (same structure as ‘from_json’).

Arguments:

  • dct dict - The dictionary variable.

Returns:

  • ProvisionBulkBuilder - Returns itself to allow for method chaining.

Example:

builder.from_dict({ … “entities”: [ … { … “provision”: { … “administration”: { … “organization”: {"_current": {“value”: “my_org”}} … }, … “asset”: { … “identifier”: {"_current": {“value”: “asset_123”}} … } … } … } … ] … })


build

def build() -> "ProvisionBulkBuilder"

Finalizes the construction of the provision bulk configuration.

This method prepares the builder to execute the request by ensuring all necessary configurations are set and validates the overall integrity of the build. It should be called before executing the request to ensure that the configuration is complete and valid.

The build process involves checking that mandatory fields such as the organization name are set. It also ensures that method calls that are incompatible with each other (like build and build_execute) are not both used.

Returns:

  • ProvisionBulkBuilder - Returns itself to allow for method chaining, enabling further actions like execute.

Raises:

  • ValueError - If required configurations are missing or if incompatible methods are used together.

Example:

builder.build()


build_execute

def build_execute(include_payload=False)

Executes the provision bulk immediately after building the configuration.

This method is a shortcut that combines building and executing in a single step. It should be used when you want to build and execute the configuration without modifying the builder state in between these operations.

It first validates the build configuration and then executes the request if the validation is successful.

Arguments:

  • include_payload bool - Determine if the payload should be included in the response.

Returns:

  • dict - A dictionary containing the execution response which includes the status code and potentially other metadata about the execution.

Raises:

  • ValueError - If build has already been called on this builder instance, indicating that build_execute is being incorrectly used after build.
  • Exception - If there are issues during the execution process, including network or API errors.

Example:

response = builder.build_execute()


execute

def execute(include_payload=False)

Executes the provision bulk based on the current configuration of the builder.

Arguments:

  • include_payload bool - Determine if the payload should be included in the response.

Returns:

  • Dict - A dictionary containing the execution response which includes the status code and, optionally, the payload. If an error occurs, a string describing the error is returned.

Raises:

  • Exception - If build() has not been called before execute(), or if it was not the last method invoked prior to execute().

Example:

builder.build()
response = builder.execute(True)

opengate_data.provision.bulk

opengate_data.provision.processor

opengate_data.provision.processor.provision_processor

ProvisionProcessorBuilder

ProvisionProcessorBuilder Objects

class ProvisionProcessorBuilder()

Provision Processor Builder


with_organization_name

def with_organization_name(
        organization_name: str) -> "ProvisionProcessorBuilder"

Specify the organization name.

Arguments:

  • organization_name str - The name of the organization.

Returns:

  • ProvisionProcessorBuilder - Returns self for chaining.

Example:

builder.with_organization_name('organization_name')


with_identifier

def with_identifier(
        provision_processor_id: str) -> "ProvisionProcessorBuilder"

Specify the identifier for the provision processor.

Arguments:

  • provision_processor_id str - The identifier for the pipeline.

Returns:

  • ProvisionProcessorBuilder - Returns self for chaining.

Example:

builder.with_identifier('identifier')


with_name

def with_name(provision_processor_name: str) -> "ProvisionProcessorBuilder"

Specify the name for the provision processor.

Arguments:

  • provision_processor_name str - The name for the provision processor.

Returns:

  • ProvisionProcessorBuilder - Returns self for chaining.

Example:

builder.with_name('name')


with_bulk_file

def with_bulk_file(bulk_file: str) -> "ProvisionProcessorBuilder"

Specify the file for bulk processing.

Arguments:

  • bulk_file str - The path to the file to be uploaded for bulk processing.

Returns:

  • ProvisionProcessorBuilder - Returns self for chaining.

Example:

bulk_file_path = os.path.join(os.path.dirname(__file__), 'file.xlsx')
builder.with_bulk_file('bulk_file_path')


with_bulk_process_identitifer

def with_bulk_process_identitifer(
        bulk_process_id: str) -> "ProvisionProcessorBuilder"

Specify the identifier for the bulk process identifier.

Arguments:

  • bulk_process_id str - The identifier for the bulk process.

Returns:

  • ProvisionProcessorBuilder - Returns self for chaining.

Example:

builder.with_bulk_process_identitifer('identifier')


bulk

def bulk() -> "ProvisionProcessorBuilder"

Configure the builder for bulk provisioning.

This method sets the necessary headers and URL for performing a bulk provisioning operation.

Returns:

  • ProvisionProcessorBuilder - Returns self for chaining.

Example:

bulk_file_path = os.path.join(os.path.dirname(__file__), 'file.xlsx')
builder.with_organization_name('organization_name').with_identifier('identifier').with_bulk_file(bulk_file_path).bulk()


find_by_name

def find_by_name() -> "ProvisionProcessorBuilder"

Configure the builder to find a provision processor by name.

This method sets the necessary headers and URL for finding a provision processor by its name.

Returns:

  • ProvisionProcessorBuilder - Returns self for chaining.

Example:

builder.with_organization_name('organization_name').with_name('provision_processor_name').find_by_name()


bulk_status

def bulk_status() -> "ProvisionProcessorBuilder"

Configure the builder to check the status of a bulk process.

This method sets the necessary headers and URL for checking the status of a bulk process.

Returns:

  • ProvisionProcessorBuilder - Returns self for chaining.

Example:

builder.with_organization_name('organization_name').with_bulk_process_identitifer('bulk_process_id').bulk_status()


bulk_details

def bulk_details() -> "ProvisionProcessorBuilder"

Configure the builder to get the details of a bulk process.

This method sets the necessary headers and URL for retrieving the details of a bulk process.

Returns:

  • ProvisionProcessorBuilder - Returns self for chaining.

Example:

builder.with_organization_name('organization_name').with_bulk_process_identitifer('bulk_process_id').bulk_details()


build

def build() -> "ProvisionProcessorBuilder"

Finalizes the construction of the IoT collection configuration.

This method prepares the builder to execute the collection by ensuring all necessary configurations are set and validates the overall integrity of the build. It should be called before executing the collection to ensure that the configuration is complete and valid.

The build process involves checking that mandatory fields such as the device identifier are set. It also ensures that method calls that are incompatible with each other (like build and build_execute) are not both used.

Returns:

  • ProvisionProcessorBuilder - Returns itself to allow for method chaining, enabling further actions like execute.

Raises:

  • ValueError - If required configurations are missing or if incompatible methods are used together.

Example:

builder.build()


build_execute

def build_execute()

Executes the data sets search immediately after building the configuration.

This method is a shortcut that combines building and executing in a single step.

Returns:

  • dict - A dictionary containing the execution response which includes the status code and potentially other metadata about the execution.

Raises:

  • ValueError - If build has already been called on this builder instance.

Example:

builder.build_execute()


execute

def execute() -> requests.Response

Execute the configured operation and return the response.

This method executes the operation that has been configured using the builder pattern. It ensures that the build method has been called and that it is the last method invoked before execute. Depending on the configured method (e.g., create, find, update, delete), it calls the appropriate internal execution method.

Returns:

  • requests.Response - The response object from the executed request.

Raises:

  • Exception - If the build method has not been called or if it is not the last method invoked before execute.
  • ValueError - If the configured method is unsupported.

Example:

builder.build_execute()

opengate_data.provision.asset.provision_asset

ProvisionAssetBuilder Objects

class ProvisionAssetBuilder()

Provision Asset Builder

Provisions assets: creates them, reads one, updates and deletes. Describe the asset with the with_provision_* setters and add_provision_datastream_value(), or hand over a whole payload with from_dict() or from_dataframe(). Then pick the operation — create(), find_one(), update(), delete() — and close the chain with build() and execute(), or with build_execute().

Example:

builder = client.new_provision_asset_builder()
builder.with_organization_name("organization").with_provision_identifier(
"asset_identifier"
).with_provision_channel("channel").create().build().execute()


with_organization_name

def with_organization_name(organization_name: str) -> "ProvisionAssetBuilder"

Specify the organization for the asset.

Arguments:

  • organization_name str - The organization for the asset.

Returns:

  • ProvisionAssetBuilder - Returns self for chaining.

Example:

builder.with_organization_name('organization_name')


with_identifier

def with_identifier(identifier: str) -> "ProvisionAssetBuilder"

Specify the identifier for the asset.

Arguments:

  • identifier str - The identifier for the asset.

Returns:

  • ProvisionAssetBuilder - Returns self for chaining.

Example:

builder.with_identifier('identifier')


with_flattened

def with_flattened() -> "ProvisionAssetBuilder"

Flatten the data

Returns:

  • ProvisionAssetBuilder - Returns itself to allow for method chaining.

Example:

builder.with_flattened()


with_utc

def with_utc() -> "ProvisionAssetBuilder"

Set UTC flag

Returns:

  • ProvisionAssetBuilder - Returns itself to allow for method chaining.

Example:

builder.with_utc()


with_provision_identifier

def with_provision_identifier(identifier: str) -> "ProvisionAssetBuilder"

Set provision identifier

Arguments:

  • identifier str - The identifier to provision the asset with.

Returns:

  • ProvisionAssetBuilder - Returns itself to allow for method chaining.

Example:

builder.with_provision_identifier("identifier")


with_provision_channel

def with_provision_channel(channel: str) -> "ProvisionAssetBuilder"

Set provision channel

Arguments:

  • channel str - The channel to provision the asset into.

Returns:

  • ProvisionAssetBuilder - Returns itself to allow for method chaining.

Example:

builder.with_provision_channel("channel")


with_provision_service_group

def with_provision_service_group(
        service_group: str) -> "ProvisionAssetBuilder"

Set provision servicegroup

Arguments:

  • service_group str - The service group to provision the asset into.

Returns:

  • ProvisionAssetBuilder - Returns itself to allow for method chaining.

Example:

builder.with_provision_service_group("emptyServiceGroup")


with_provision_organization

def with_provision_organization(organization: str) -> "ProvisionAssetBuilder"

Set provision organization

Arguments:

  • organization str - The organization to provision the asset into.

Returns:

  • ProvisionAssetBuilder - Returns itself to allow for method chaining.

Example:

builder.with_provision_service_group("organization_name")


add_provision_datastream_value

def add_provision_datastream_value(datastream: str,
                                   value: Any) -> "ProvisionAssetBuilder"

Add a datastream value to the payload.

Arguments:

  • datastream str - The datastream identifier.
  • value Any - The value to be added. It Can be a primitive type or a complex object.

Returns:

  • ProvisionAssetBuilder - Returns itself to allow for method chaining.

Example:

location_value = {
- `"position"` - {
- `"coordinates"` - [
-3.66131084,
40.458442
]
}
}
builder.add_provision_datastream_value("provision.asset.location", location_value)
builder.add_provision_datastream_value("provision.asset.name", "Name")


from_dict

def from_dict(dct: dict[str, Any]) -> "ProvisionAssetBuilder"

Loads data as a python dictionary. If you want to enter the dictionary in flattened mode, you need to use with_flattened().

Arguments:

  • dct dict - The dictionary variable.

Returns:

  • ProvisionAssetBuilder - Returns itself to allow for method chaining.

Example:

# Mode flattened
builder.with_flattened().from_dict(
{"resourceType":{"_value":{"_current":{"value":"entity.asset"}}},
"provision.asset.identifier":{"_value":{"_current":{"value":"identifier"}}},
"provision.administration.organization":{"_value":{"_current":{"value":"organization"}}},
"provision.asset.description":{"_value":{"_current":{"value":"Descripcion"}}},
"provision.administration.channel":{"_value":{"_current":{"value":"default_channel"}}},
"provision.administration.serviceGroup":{"_value":{"_current":{"value":"emptyServiceGroup"}}},
"provision.asset.location":{"_value":{"_current":{"value":{"position":{"coordinates":[-3.66131084,40.458442]}}}}},
"provision.human.name":{"_value":{"_current":{"value":"Name"}}},
"provision.human.surname":{"_value":{"_current":{"value":"Surname"}}}})

# Mode without flattened
builder.from_dict({
- `"resourceType"` - {
- `"_current"` - {
- `"value"` - "entity.asset"
}
},
- `"provision"` - {
- `"administration"` - {
- `"channel"` - {
- `"_current"` - {
- `"value"` - "battery_channel"
}
},
- `"organization"` - {
- `"_current"` - {
- `"value"` - "battery_organization"
}
},
- `"serviceGroup"` - {
- `"_current"` - {
- `"value"` - "emptyServiceGroup"
}
}
},
- `"asset"` - {
- `"identifier"` - {
- `"_current"` - {
- `"value"` - "worker_battery_id"
}
}
}
}
})


from_dataframe

def from_dataframe(df: pd.DataFrame) -> "ProvisionAssetBuilder"

Loads data as a pandas DataFrame. Columns must be the names of the datastreams separated with ‘_’ or ‘.’.

Arguments:

  • df pd.DataFrame - The DataFrame variable.

Returns:

  • ProvisionAssetBuilder - Returns itself to allow for method chaining.

Example:

import pandas as pd
data = {
- `'provision_administration_organization_current_value'` - ['base_organization','test_organization'],
- `'provision_device_location_current_value_position_type'` - ['Point','Other_Point'],
- `'provision_device_location_current_value_position_coordinates'` - [[-3.7028,40.41675],[-5.7028,47.41675]],
- `'provision_device_location_current_value_postal'` - ['28013','28050']
}
df = pd.DataFrame(df)
builder.from_dataframe(df)


find_one

def find_one() -> "ProvisionAssetBuilder"

Retrieve a single asset.

This method sets up the ProvisionAssetBuilder instance to retrieve a specific assey associated with the specified organization and identifier.

Returns:

  • ProvisionAssetBuilder - The instance of the ProvisionDeviceBuilder class itself, allowing for method chaining.

Example:

builder.with_organization_name("organization_name").with_identifier("model_identifier").find_one()


create

def create() -> "ProvisionAssetBuilder"

Initiates the creation process of a new asset.

This method prepares the ProvisionAssetBuilder instance to create a new asset.

Returns:

  • ProvisionAssetBuilder - The instance of the ProvisionAssetBuilder class itself, allowing for method chaining.

Example:

builder.with_organization_name("organization_name")
.with_provision_identifier("provision_identifier")                    .with_provision_organization("provision_organization")                    .with_provision_channel("provision_channel")                    .with_provision_service_group("provision_service_group")                    .add_provision_datastream_value("provision.asset.name", "Name")                    .create()


update

def update() -> "ProvisionAssetBuilder"

Update an existing asset.

This method sets up the ProvisionAssetBuilder instance to update a specific asset associated with the specified organization and identifier.

You can update an asset with a flattened format sending a PUT request using the URL above. You must replace {identifier} with the identifier of the asset you want to update. Also, it is sent a boolean parameter, flattened, to allow sending a flattened JSON format

Returns:

  • ProvisionAssetBuilder - The instance of the ProvisionAssetBuilder class itself, allowing for method chaining.

Example:

dict_flatenned = {“resourceType”:{"_value":{"_current":{“value”:“entity.asset”}}}, “provision.asset.identifier”:{"_value":{"_current":{“value”:“EntityTest”}}}, “provision.administration.organization”:{"_value":{"_current":{“value”:“orgnization_name”}}}, “provision.administration.channel”:{"_value":{"_current":{“value”:“default_channel”}}}, “provision.administration.serviceGroup”:{"_value":{"_current":{“value”:“emptyServiceGroup” }}},

builder.with_organization_name("organization_name").with_identifier("model_identifier").with_flattened().from_dict(dict_flatenned).update()


delete

def delete() -> "ProvisionAssetBuilder"

Delete an existing asset.

This method sets up the ProvisionAssetBuilder instance to delete a specific asset associated with the specified organization and identifier.

Returns:

  • ProvisionAssetBuilder - The instance of the ProvisionAssetBuilder class itself, allowing for method chaining.

Example:

builder().with_organization('organization_name').with_identifier("identifier").delete()


modify

def modify() -> "ProvisionAssetBuilder"

Modify an existing asset.

This method sets up the ProvisionAssetBuilder instance to update a specific asset associated with the specified organization and identifier.

You can update an asset with a flattened format sending a Patch request using the URL above. You must replace {identifier} with the identifier of the asset you want to update. Also, it is sent a boolean parameter, flattened, to allow sending a flattened JSON format

Returns:

  • ProvisionAssetBuilder - The instance of the ProvisionAssetBuilder class itself, allowing for method chaining.

Example:

dict_flatenned = {"resourceType":{"_value":{"_current":{"value":"entity.asset"}}},
"provision.asset.identifier":{"_value":{"_current":{"value":"EntityTest"}}},
"provision.administration.organization":{"_value":{"_current":{"value":"orgnization_name"}}},
"provision.administration.channel":{"_value":{"_current":{"value":"default_channel"}}},
"provision.administration.serviceGroup":{"_value":{"_current":{"value":"emptyServiceGroup" }}},


builder.with_organization_name("organization_name").with_identifier("model_identifier").with_flattened().from_dict(dict_flatenned).modify()


build

def build() -> "ProvisionAssetBuilder"

Finalizes the construction of the asset configuration.

This method prepares the builder to execute the collection by ensuring all necessary configurations are set and validates the overall integrity of the build. It should be called before executing the collection to ensure that the configuration is complete and valid.

The build process involves checking that mandatory fields such as the device identifier are set. It also ensures that method calls that are incompatible with each other (like build and build_execute) are not both used.

Returns:

  • ProvisionAssetBuilder - Returns itself to allow for method chaining, enabling further actions like execute.

Raises:

  • ValueError - If required configurations are missing or if incompatible methods are used together.

Example:

builder.build()


build_execute

def build_execute()

Executes the data sets search immediately after building the configuration.

This method is a shortcut that combines building and executing in a single step.

Returns:

  • dict - A dictionary containing the execution response which includes the status code and potentially other metadata about the execution.

Raises:

  • ValueError - If build has already been called on this builder instance.

Example:

builder.build_execute()


execute

def execute() -> str | dict[str, str | int]

Execute the configured asset and return the response.

This method executes the operation that has been configured using the builder pattern. It ensures that the build method has been called and that it is the last method invoked before execute. Depending on the configured method (e.g., create, find, update, delete), it calls the appropriate internal execution method.

Returns:

  • requests.Response - The response object from the executed request.

Raises:

  • Exception - If the build method has not been called or if it is not the last method invoked before execute.
  • ValueError - If the configured method is unsupported.

Example:

builder.execute()

opengate_data.provision.asset

opengate_data.provision

Rules

opengate_data.rules.rules

RulesBuilder

RulesBuilder Objects

class RulesBuilder()

Rules builder


with_organization_name

def with_organization_name(organization_name: str) -> "RulesBuilder"

Specify the organization name.

Arguments:

  • organization_name str - The name of the organization.

Returns:

  • RulesBuilder - Returns self for chaining.

Example:

builder.with_organization_name('organization_name')


with_identifier

def with_identifier(identifier: str) -> "RulesBuilder"

Specify the identifier for the rule.

Arguments:

  • identifier str - The identifier for the rules.

Returns:

  • RulesBuilder - Returns self for chaining.

Example:

builder.with_identifier('identifier')


with_actions

def with_actions(actions: dict[str, Any]) -> "RulesBuilder"

Specify the actions in rules.

Arguments:

  • actions dict - Actions

Returns:

  • RulesBuilder - Returns self for chaining.

Example:

rule = {
- `"actions"` - {
- `"close"` - [
{
- `"enabled"` - False,
- `"ruleToClose"` - "rule_name",
- `"alarmToClose"` - "alarmToClose"
}
]
}
}
with_actions = rule["actions"]
builder.with_actions(with_actions)


with_actions_delay

def with_actions_delay(actions_delay: int) -> "RulesBuilder"

Waiting threshold before actions are executed. Allows cancellation of the execution of actions if another rule exists with a subsequent delay cancellation action.

Arguments:

  • actions_delay int - Delay option in milliseconds

Returns:

  • RulesBuilder - Returns self for chaining.

Example:

builder.with_actions(1000)


with_active

def with_active(active: bool) -> "RulesBuilder"

Specify the active in rules.

Arguments:

  • active bool - Activate or deactivate action

Returns:

  • RulesBuilder - Returns self for chaining.

Example:

builder.with_active(False)
builder.with_active(True)


with_channel

def with_channel(channel: str) -> "RulesBuilder"

Specify the channel in rules.

Arguments:

  • channel str - Channel

Returns:

  • RulesBuilder - Returns self for chaining.

Example:

builder.with_channel('default_channel')


with_condition

def with_condition(condition: dict[str, Any]) -> "RulesBuilder"

Specify the condition for the rule. Mandatory for EASY mode and not applicable for ADVANCED mode. JSON filter which follows the same filter structure of the Opengate platform. It can contain rule parameters.

Arguments:

  • condition dict - Specify the identifier for the rule.

Returns:

  • RulesBuilder - Returns self for chaining.

Example:

filter_builder_build = FilterBuilder().and_(FilterBuilder().eq("provision.administration.organization","Organization")).build()
builder.with_condition('filter_builder_build)
builder.with_condition({device.cpu.usage._current.value:
"$datastream:device.cpu.usage._current.value"})


with_mode

def with_mode(mode: str) -> "RulesBuilder"

Specify rule type mode

Arguments:

  • mode str - Advanced or basic.

Returns:

  • RulesBuilder - Returns self for chaining.

Example:

builder.with_mode('EASY')
builder.with_mode('ADVANCED')


with_name

def with_name(name: str) -> "RulesBuilder"

Specify the name for the rule.

Arguments:

  • name str - The identifier for the rules.

Returns:

  • RulesBuilder - Returns self for chaining.

Example:

builder.with_mode('name_rule')


with_description

def with_description(description: str) -> "RulesBuilder"

Specify the description.

Arguments:

  • description str - The description for the rules.

Returns:

  • RulesBuilder - Returns self for chaining.

Example:

builder.with_organization_name('description')


with_type

def with_type(rule_type: dict[str, Any]) -> "RulesBuilder"

Specify the description.

Arguments:

  • rule_type dict - The description for the rules.

Returns:

  • RulesBuilder - Returns self for chaining.

Example:

- `"rule"` - {
- `"type"` - {
- `"datastreams"` - [
{
- `"name"` - "device.cpu.usage",
- `"fields"` - [
{
- `"field"` - "value",
- `"alias"` - "CPU usage"
}
],
- `"prefilter"` - False
}
],
- `"name"` - "DATASTREAM"
}
}
type = rule["type"]
builder.with_type(type)


with_parameters

def with_parameters(parameters: list[dict[str, str]]) -> "RulesBuilder"

Specify the parameters for rules.

Arguments:

  • parameters dict - The parameters for the rules.

Returns:

  • RulesBuilder - Returns self for chaining.

Example:

parameters = [
{
- `"name"` - "name",
- `"schema"` - "string",
- `"value"` - "2"
}
]
builder.with_parameters(parameters)


with_code

def with_code(code: str) -> "RulesBuilder"

Specify the JavaScript code for advanced rules.

Arguments:

  • code str - The JavaScript code to be used in the rule.

Returns:

  • RulesBuilder - Returns self for chaining.

Raises:

  • Exception - If the mode is not set to ‘ADVANCED’.

Example:

code = '''
function add(a, b) {
// This is a comment
return a + b;
}
'''
builder.with_mode('ADVANCED').with_code(code).with_code_file('code')


with_code_file

def with_code_file(code_file: str) -> "RulesBuilder"

Specify the JavaScript code for advanced rules from a file.

This method reads the JavaScript code from a specified file and converts it into a single line to be used in the rule.

Arguments:

  • code_file str - The path to the file containing the JavaScript code.

Returns:

  • RulesBuilder - Returns self for chaining.

Raises:

  • ValueError - If the file does not exist or is not a valid file.
  • ValueError - If the mode is not set to ‘ADVANCED’.

Example:

builder.with_mode('ADVANCED').with_code_file('path/to/code.js')


with_env

def with_env(data_env: str) -> "RulesBuilder"

Specify the environment variable.

Arguments:

  • data_env str - The environment variable.

Returns:

  • RulesBuilder - Returns self for chaining.

Example:

builder.with_env('RULE_ID')


with_config_file

def with_config_file(config_file: str, section: str,
                     config_key: str) -> "RulesBuilder"

Sets up the configuration file (.ini).

This method allows specifying a configuration file, a section within that file, and a key to retrieve a specific value from the section.

Arguments:

  • config_file str - The path to the.ini configuration file.
  • section str - The section name within the.ini file where the desired configuration is located.
  • config_key str - The key within the specified section whose value will be retrieved.

Returns:

  • RulesBuilder - Returns itself to allow for method chaining.

Example:

[id]
rule_id = afe07216-14ec-4134-97ae-c483b11d965a
builder.with_config_file('model_config.ini', 'id', 'rule_id')


with_find_by_name

def with_find_by_name(find_name: str) -> "RulesBuilder"

Specify the name to find.

Arguments:

  • find_name str - The name of the pipeline.

Returns:

  • RulesBuilder - Returns self for chaining.

Example:

builder.with_find_by_name('name_rule')


find_all

def find_all() -> "RulesBuilder"

Retrieve all models.

This method sets up the RulesBuilder instance to retrieve all rules associated with the specified organization.

Returns:

  • RulesBuilder - The instance of the RulesBuilder class itself, allowing for method chaining.

Example:

builder.with_organization_name("organization_name").find_all()


find_one

def find_one() -> "RulesBuilder"

Retrieve all models.

This method sets up the RulesBuilder instance to retrieve all rules associated with the specified organization.

Returns:

  • RulesBuilder - The instance of the RulesBuilder class itself, allowing for method chaining.

Example:

builder().with_organization('organization').with_channel('default_channel').                    with_identifier('4ae733b0-2dc6-4ad4-9d2c-9ab426c9f32d').find_one()


create

def create() -> "RulesBuilder"

Initiates the creation process of a new model.

This method prepares the RulesBuilder instance to create a new model by setting up the necessary parameters such as the organization name and the file to be associated with the model. It also specifies the URL endpoint for creating the model and sets the operation type to ‘create’.

Returns:

  • RulesBuilder - The instance of the RulesBuilder class itself, allowing for method chaining.

Example:

builder.with_organization_name("MyOrganization").add_file("example.onnx").create()


update

def update() -> "RulesBuilder"

Update an existing rule.

This method sets up the RulesBuilder instance to update a specific rule associated with the specified organization and identifier.

Returns:

  • RulesBuilder - The instance of the RulesBuilder class itself, allowing for method chaining.

Example:

rule = {
- `"identifier"` - "9482a13d-ade5-46ec-b6c9-1cfc23f1f2c6",
- `"name"` - "avanzado22",
- `"active"` - False,
- `"mode"` - "ADVANCED",
- `"type"` - {
- `"datastreams"` - [
{
- `"name"` - "device.cpu.usage",
- `"fields"` - [
{
- `"field"` - "value",
- `"alias"` - "CPU usage"
}
],
- `"prefilter"` - False
}
],
- `"name"` - "DATASTREAM"
},
- `"actionsDelay"` - 1000
}

with_type = rule["type"]
with_type(with_type).                    with_actions_delay(rule["actionsDelay"]).                    with_code_file('reglas_update.js').                    update()


delete

def delete() -> "RulesBuilder"

Delete an existing model within the organization.

This method sets up the RulesBuilder instance to delete a specific model associated with the specified organization and identifier. It configures the URL endpoint for the delete operation and sets the operation type to ‘delete’.

Returns:

  • RulesBuilder - The instance of the RulesBuilder class itself, allowing for method chaining.

Example:

builder().with_organization('organization_name').with_channel('default_channel').with_identifier("45ddc1a9-4de2-4d5f-a9fe-7972aa4555a4").delete()


update_parameters

def update_parameters() -> "RulesBuilder"

Updates the parameters of an existing rule.

This function prepares the RulesBuilder instance to update the parameters of a specific rule associated with the specified organization and channel.

Returns:

  • RulesBuilder - The RulesBuilder instance itself, allowing method chaining.

Example:

builder.with_organization_name("organization_name").with_channel("default_channel").                    with_name("rule_name").with_active(True).with_mode("ADVANCED").                    with_parameters({"parameter1": "value1", "parameter2": "value2"}).update_parameters()


catalog

def catalog() -> "RulesBuilder"

Retrieves the rules catalog.

This function prepares the RulesBuilder instance to retrieve the catalog of rules

Returns:

  • RulesBuilder - The RulesBuilder instance itself, allowing method chaining.

Example:

builder.catalog()


save

def save() -> "RulesBuilder"

Selects the create-or-update operation.

It reads the rule identifier from the .env variable set with with_env(), or from the file set with with_config_file(), and then decides on its own: if a rule with that identifier already exists it is updated, and if it does not, it is created and the resulting identifier written back to the same place. Use it when a script has to be safe to run more than once.

Returns:

  • RulesBuilder - Returns itself to allow for method chaining.

Example:

builder.with_organization_name("organization").with_config_file(
"rules_config.ini", "id", "rule_id"
).save().build().execute()


set_config_file_identifier

def set_config_file_identifier() -> "RulesBuilder"

Selects the operation that reads the rule identifier from a configuration file.

It takes the identifier from the section and key given to with_config_file(), so a script can work with a rule without carrying its identifier in the code.

Returns:

  • RulesBuilder - Returns itself to allow for method chaining.

Example:

builder.with_config_file(
'rules_config.ini', 'id', 'rule_id'
).set_config_file_identifier().build().execute()


set_env_identifier

def set_env_identifier() -> "RulesBuilder"

Set the rule identifier from an environment variable.

This method sets up the RulesBuilder instance to retrieve the model identifier from a specified environment variable. It reads the identifier from the environment variable and sets it for the builder instance.

Returns:

  • RulesBuilder - The instance of the RulesBuilder class itself, allowing for method chaining.

Example:

builder.with_env("MODEL_ENV_VAR").set_env_identifier()


build

def build() -> "RulesBuilder"

Finalizes the construction of the IoT collection configuration.

This method prepares the builder to execute the collection by ensuring all necessary configurations are set and validates the overall integrity of the build. It should be called before executing the collection to ensure that the configuration is complete and valid.

The build process involves checking that mandatory fields such as the device identifier are set. It also ensures that method calls that are incompatible with each other (like build and build_execute) are not both used.

Returns:

  • RulesBuilder - Returns itself to allow for method chaining, enabling further actions like execute.

Raises:

  • ValueError - If required configurations are missing or if incompatible methods are used together.

Example:

builder.build()


build_execute

def build_execute()

Executes the data sets search immediately after building the configuration.

This method is a shortcut that combines building and executing in a single step.

Returns:

  • dict - A dictionary containing the execution response which includes the status code and potentially other metadata about the execution.

Raises:

  • ValueError - If build has already been called on this builder instance.

Example:

builder.build_execute()


execute

def execute()

Execute the configured operation and return the response.

This method executes the operation that has been configured using the builder pattern. It ensures that the build method has been called and that it is the last method invoked before execute. Depending on the configured method (e.g., create, find, update, delete), it calls the appropriate internal execution method.

Returns:

  • requests.Response - The response object from the executed request.

Raises:

  • Exception - If the build method has not been called or if it is not the last method invoked before execute.
  • ValueError - If the configured method is unsupported.

Example:

builder.execute()

opengate_data.rules

Searching

opengate_data.searching.filter

FilterBuilder Objects

class FilterBuilder(Expressions)

Filter Builder


and_

def and_(*conditions)

Combines conditions using the logical AND operator.

Arguments:

  • *conditions - The conditions to combine.

Returns:

  • FilterBuilder - Returns itself to allow for method chaining.

Example:

builder.and_(eq(“device.operationalStatus”, “NORMAL”), like(“device.name”, “device_.*”) )


or_

def or_(*conditions)

Combines conditions using the logical OR operator.

Arguments:

  • *conditions - The conditions to combine.

Returns:

  • FilterBuilder - Returns itself to allow for method chaining.

Example:

builder.or_(eq(“device.operationalStatus”, “NORMAL”), like(“device.name”, “device_.*”) )


build

def build()

Builds the final filter.

Returns:

  • dict - The final filter.

Raises:

  • ValueError - If there is an incomplete condition.

Example:

builder.build()

opengate_data.searching.search_base

SearchBuilderBase Objects

class SearchBuilderBase()

Search Base Builder


build

def build()

Finalizes the construction of the search configuration.


build_execute

def build_execute()

Short-cut for build().execute()


with_format

def with_format(format_data: str) -> "SearchBuilderBase"

Formats the flat entities data based on the specified format (‘csv’, ‘dict’, or ‘pandas’).

Arguments:

  • format_data str - The format to use for the data.

Example:

builder.with_format(‘dict’) builder.with_format(‘csv’) builder.with_format(‘pandas’)

Returns:

  • SearchBuilderBase - Returns itself to allow for method chaining.


with_flattened

def with_flattened() -> "SearchBuilderBase"

Flatten the data

Returns:

  • SearchBuilderBase - Returns itself to allow for method chaining.


with_utc

def with_utc() -> "SearchBuilderBase"

Set UTC flag

Returns:

  • SearchBuilderBase - Returns itself to allow for method chaining.


with_summary

def with_summary() -> "SearchBuilderBase"

Set summary flag

Returns:

  • SearchBuilderBase - Returns itself to allow for method chaining.


with_default_sorted

def with_default_sorted() -> "SearchBuilderBase"

Set default sorted flag

Returns:

  • SearchBuilderBase - Returns itself to allow for method chaining.


with_case_sensitive

def with_case_sensitive() -> "SearchBuilderBase"

Set case-sensitive flag

Returns:

  • SearchBuilderBase - Returns itself to allow for method chaining.

opengate_data.searching.select

SelectBuilder Objects

class SelectBuilder()

A flexible builder for constructing SELECT clauses for several OpenGate entities.

This builder supports three independent modes, which cannot be mixed inside the same instance:

  1. Simple mode (Datasets, Timeseries search):
  • .add("field_name")
  • Produces: [“field1”, “field2”, …]
  1. Extended mode (Structured search):
  • .add("path.to.resource", ["field", ("other", "alias")])
  • Produces: [ { “name”: “…”, “fields”: [{ “field”: “…”, “alias”: “…” }] } ]
  1. Column mode (Timeseries EXPORT):
  • .add_column("FIRST")
  • .add_column("bucket_id", output={"parquet": {"type": "INT"}})
  • Produces: [ { “column”: “FIRST” }, { “column”: “bucket_id”, “output”: {…} } ]

You cannot mix modes. Each builder instance must use only one mode.

Examples:

Simple mode: SelectBuilder().add(“Gross”).add(“Temp”)

Extended mode: SelectBuilder().add(“provision.device.identifier”, [(“value”, “id”), “date”])

Column mode (Timeseries Export): SelectBuilder().add_column(“FIRST”).add_column(“LAST”)

Use .build() to retrieve the final SELECT list.


add

def add(name: str, fields=None)

Add a SELECT entry in either simple or extended mode.

Arguments:

  • name str - Field name (simple mode) or entity name (extended mode).
  • fields list, optional - Only for extended mode; list of strings or tuples (field, alias).

Returns:

  • SelectBuilder - fluent API.


add_column

def add_column(column_name: str, output: dict | None = None)

Add a Timeseries Export column entry.

Produces backend-compatible objects like: { “column”: “FIRST” } { “column”: “bucket_id”, “output”: {…} }

Arguments:

  • column_name str - Name of the export column.
  • output dict, optional - Optional output descriptor such as: { “parquet”: { “type”: “INT” } } { “name”: “serial_number”, “parquet”: { “type”: “STRING” } }

Returns:

  • SelectBuilder - fluent API.


build

def build()

Return the constructed SELECT list.

Raises:

  • ValueError - If no select elements were added.

Returns:

  • list - Dicts (column mode), strings (simple mode) or dicts (extended mode).

RulesSearchBuilder

RulesSearchBuilder Objects

class RulesSearchBuilder(SearchBuilderBase, SearchBuilder)

Rules Search Builder


with_format

def with_format(format_data: str) -> "RulesSearchBuilder"

Formats the flat entities data based on the specified format (‘dict’, or ‘pandas’).

Arguments:

  • format_data str - The format to use for the data.

Returns:

  • RulesSearchBuilder - Returns itself to allow for method chaining.

Example:

builder.with_format("dict")
builder.with_format("pandas")


execute

def execute()

Executes the rule search based on the built configuration.

Returns:

  • dict - The response data.

Raises:

  • Exception - If the build() method was not called before execute().

Example:

new_rules_search_builder.with_filter(filter).with_organization_name(organization).with_format("dict").build_execute()
new_rules_search_builder.with_filter(filter).with_organization_name(organization).with_format("pandas").build_execute()

AlarmSearchBuilder

AlarmSearchBuilder Objects

class AlarmSearchBuilder(SearchBuilderBase, SearchBuilder)

Alarm Search Builder

Searches the alarms raised by the platform’s rules, over /v80/search/entities/alarms. Compose the query with the inherited with_filter, with_select, with_limit and with_format methods, then close it with build() and execute(), or with build_execute().

Example:

builder = client.new_alarm_search_builder()
filter_open = client.new_filter_builder().eq("alarm.status", "OPEN").build()
builder.with_filter(filter_open).with_format("pandas").build_execute()


validate_builds

def validate_builds()

Checks the combination of methods called before the search is sent.

Returns:

  • AlarmSearchBuilder - Returns itself to allow for method chaining.

Raises:

  • ValueError - If with_format received something other than “dict”, “csv” or “pandas”.
  • Exception - If “csv” is combined with with_limit, or used without with_select — the CSV output needs to know its columns.


execute

def execute()

Executes the alarm search based on the built configuration.

with_summary() switches the request to /search/entities/alarms/summary and returns the aggregated counters instead of the alarms themselves.

Returns:

str | pandas.DataFrame: A JSON string for the “dict” format, raw text for “csv”, or a DataFrame of flattened records for “pandas”.

Raises:

  • Exception - If build() was not the last call before execute(), or if neither build() nor build_execute() was called.

Example:

builder.with_filter(filter_open).with_format("dict").build().execute()

OperationsBuilder

OperationsSearchBuilder Objects

class OperationsSearchBuilder(SearchBuilderBase, SearchBuilder)

Builder Operations Search


execute

def execute()

Executes the operation search based on the built configuration.

Returns:

dict, csv or dataframe: The response data in the specified format.

Raises:

  • Exception - If the build() method was not called before execute().

Example:

new_operations_search_builder.with_format("csv").with_organization_name(organization).build().execute()
new_operations_search_builder.with_filter(filter).with_organization_name(organization).with_format("pandas").build().execute()
new_operations_search_builder.with_filter(filter).with_organization_name(organization).with_format("dict").build().execute()

DatasetsSearchBuilder

DatasetsSearchBuilder Objects

class DatasetsSearchBuilder(SearchBuilderBase, SearchBuilder)

Dataset Search Builder


with_organization_name

def with_organization_name(organization_name: str) -> "DatasetsSearchBuilder"

Set organization name

Arguments:

  • organization_name str - The name of the organization that owns the data set.

Returns:

  • DatasetsSearchBuilder - Returns itself to allow for method chaining.

Example:

builder.with_organization_name("organization_name")


with_identifier

def with_identifier(identifier: str) -> "DatasetsSearchBuilder"

Set identifier

Arguments:

  • identifier str - The identifier of the data set to query.

Returns:

  • DatasetsSearchBuilder - Returns itself to allow for method chaining.

Example:

builder.with_identifier("identifier")


with_utc

def with_utc() -> "DatasetsSearchBuilder"

Set UTC

Returns:

  • DatasetsSearchBuilder - Returns itself to allow for method chaining.

Example:

builder.with_utc()


with_format

def with_format(format_data: str) -> "DatasetsSearchBuilder"

Formats the flat entities data based on the specified format (‘csv’, ‘dict’, or ‘pandas’).

Arguments:

  • format_data str - The format to use for the data.

Returns:

  • DatasetsSearchBuilder - Returns itself to allow for method chaining.

Example:

builder.with_format("dict")
builder.with_format("pandas")
builder.with_format("csv")


with_sort

def with_sort(sort: str) -> "DatasetsSearchBuilder"

Set the sort identifier.

The value must be the identifier of one of the sorts declared in the dataset definition “sorts” section (the auto-generated reverse sorts are also valid). When omitted, results are sorted by the identifier column ascending.

The sort is sent in the payload for every format. NOTE: the platform currently ignores the sort for ‘csv’ and ‘pandas’ exports (a server/database limitation, not an SDK decision); it is still sent so the SDK stays forward-compatible if the backend starts honoring it.

Arguments:

  • sort str - The sort identifier declared in the dataset definition.

Returns:

  • DatasetsSearchBuilder - Returns itself to allow for method chaining.

Example:

builder.with_sort("sortByProvIdentifierDesc")


add_sort_by

def add_sort_by(field_name: str, order: str) -> "DatasetsSearchBuilder"

Deprecated for datasets. The dataset search API no longer accepts the object-based sort format; sorts are now declared in the dataset definition and referenced by identifier.

Raises:

  • NotImplementedError - Always. Use with_sort() instead.


execute

def execute()

Executes the data set search based on the built configuration.

Returns:

dict, csv or dataframe: The response data in the specified format.

Raises:

  • Exception - If the build() method was not called before execute().

Example:

new_data_sets_search_builder.with_format("csv").with_organization_name(organization).build().execute()
new_data_sets_search_builder.with_filter(filter).with_organization_name(organization).with_format("pandas").build().execute()
new_data_sets_search_builder.with_filter(filter).with_organization_name(organization).with_format("dict").build().execute()

DataPointsSearchBuilder Objects

class DataPointsSearchBuilder(SearchBuilderBase, SearchBuilder)

Datapoints Search Builder


with_transpose

def with_transpose() -> "DataPointsSearchBuilder"

Enables transposing the data in the result.

This function allows the data returned by the search to be transposed, meaning that rows and columns are swapped. This can be useful for certain data analyses where it is preferred to have datastreams as columns and entities as rows.

Notes:

This function can only be used with the ‘pandas’ format.

Returns:

  • DataPointsSearchBuilder - Returns the builder instance to allow for method chaining.

Example:

builder.with_transpose()


with_mapped_transpose

def with_mapped_transpose(
        mapping: dict[str, dict[str, str]]) -> "DataPointsSearchBuilder"

Enables transposing the data with a specific mapping.

This function allows the data returned by the search to be transposed and mapped according to a provided mapping dictionary. The mapping specifies how complex data should be transformed into flat columns.

Arguments:

  • mapping dict[str, dict[str, str]] - The mapping of complex data to flat columns. The main key is the column name, and its value another dictionary defining the mapping of the substructures.

Notes:

This function can only be used with the ‘pandas’ format.

Returns:

  • DataPointsSearchBuilder - Returns the builder instance to allow for method chaining.

Example:

complexData = {
- `'device.communicationModules[].subscription.address'` - {
- `'type'` - 'type',
- `'IP'` - 'value'
}
}
builder.with_mapped_transpose(complexData)


execute

def execute()

Execute the configured operation and return the response.

This method executes the operation that has been configured using the builder pattern. It ensures that the build method has been called and that it is the last method invoked before execute. Depending on the configured method (e.g., create, find, update, delete), it calls the appropriate internal execution method.

Returns:

  • requests.Response - The response object from the executed request.

Raises:

Exception: If the build method has not been called or if it is not the last method invoked before execute.

  • ValueError - If the configured method is unsupported.

Example:

builder.execute()

TimeseriesSearchBuilder Objects

class TimeseriesSearchBuilder(SearchBuilderBase, SearchBuilder)

Timeseries Search Builder


with_organization_name

def with_organization_name(
        organization_name: str) -> "TimeseriesSearchBuilder"

Set organization name

Arguments:

  • organization_name str - The name of the organization that owns the timeseries.


with_identifier

def with_identifier(identifier: str) -> "TimeseriesSearchBuilder"

Set identifier

Arguments:

  • identifier str - The identifier of the timeseries to query.


with_utc

def with_utc() -> "TimeseriesSearchBuilder"

Set UTC flag for date-time parsing


with_format

def with_format(format_data: str) -> "TimeseriesSearchBuilder"

Formats the timeseries data based on the specified format (‘csv’, ‘dict’, or ‘pandas’).

Arguments:

  • format_data str - The format to return the data in: ‘dict’, ‘csv’ or ‘pandas’.


with_sort

def with_sort(sort: str) -> "TimeseriesSearchBuilder"

Set sort identifier

Arguments:

  • sort str - The identifier of a sort declared in the timeseries definition.


execute

def execute()

Executes the timeseries search based on the built configuration.

opengate_data.searching.builder

EntitiesSearchBuilder

EntitiesSearchBuilder Objects

class EntitiesSearchBuilder(SearchBuilderBase, SearchBuilder)

Entities Search Builder


execute

def execute()

Executes the entities search based on the built configuration.

Returns:

dict, csv or dataframe: The response data in the specified format.

Raises:

  • Exception - If the build() method was not called before execute().

Example:

new_entities_search_builder.with_format("csv").with_select(select).with_organization_name(organization).build().execute()
new_entities_search_builder.with_filter(filter).with_organization_name(organization).with_format("pandas").build().execute()
new_entities_search_builder.with_filter(filter).with_organization_name(organization).with_format("dict").build().execute()

opengate_data.searching.search

SearchBuilder

SearchBuilder Objects

class SearchBuilder()

Search Builder


with_filter

def with_filter(filter_data: dict) -> "SearchBuilder"

Adds a filter to the search.

Arguments:

  • filter_data Union[dict, FilterBuilder] - The filter data to apply. Can be a dictionary or a FilterBuilder instance.

Returns:

  • SearchBuilder - Returns itself to allow for method chaining.

Example:

search_builder.with_filter(filter_builder.build()) search_builder.with_filter({

  • "and" - [
  • {"eq" - {“device.operationalStatus”: “NORMAL”}},
  • {"like" - {“device.communicationModules[].mobile.imei”: “351873000102290”}} ] })


with_select

def with_select(select_data: list[dict]) -> "SearchBuilder"

Adds selection criteria to the search.

Arguments:

  • select_data list[dict] | SelectBuilder - The selection criteria to apply. Can be a list of dictionaries or a SelectBuilder instance.

Returns:

  • SearchBuilder - Returns itself to allow for method chaining.


with_limit

def with_limit(size: int, start: int = None) -> "SearchBuilder"

Adds pagination parameters to the search.

Arguments:

  • size int - The number of entities to retrieve per page. Limit size value 1000
  • start int, optional - Page number you request. By default, is 1.

Returns:

  • SearchBuilder - Returns itself to allow for method chaining.

Example:

search_builder.with_limit(1000, 2)


add_by_group

def add_by_group(field_name: str) -> "SearchBuilder"

Adds a field to the group.

Arguments:

  • field_name str - The name of the field to group by.

Returns:

  • SearchBuilder - Returns itself to allow for method chaining.

Example:

builder.add_by_group(“provision.device.model”) builder.add_by_group(“provision.device.software”)


add_sort_by

def add_sort_by(field_name: str, order: str) -> "SearchBuilder"

Adds a field to the sort.

Arguments:

  • field_name str - The name of the field to sort by.
  • order str - The order of sorting, either ‘ASCENDING’ or ‘DESCENDING’.

Returns:

  • SearchBuilder - Returns itself to allow for method chaining.

Example:

builder.add_sort_by(“datapoints._current.at”, “DESCENDING”) builder.add_sort_by(“devices._current.at”, “ASCENDING”)

opengate_data.searching

Timeseries

opengate_data.timeseries.timeseries

Provision Timeseries Builder

TimeseriesBuilder Objects

class TimeseriesBuilder(SearchBuilder)

Timeseries Builder

Exports the data of a timeseries to a file — Parquet unless you ask for another content type — and reports the state of an export already running. Both operations work over the same endpoint, /v80/timeseries/provision/organizations/{organization}/{identifier}/export: export() starts one with a POST, export_status() asks about it with a GET.

Pick the operation, then close the chain with build() and execute(), or with build_execute(). Only one export per timeseries can run at a time.

To read rows instead of exporting them, use client.new_timeseries_search_builder().

Example:

builder = client.new_timeseries_builder()
builder.with_organization_name("organization").with_identifier(
"timeseries_identifier"
).with_output_file("export.parquet").export().build().execute()


with_organization_name

def with_organization_name(organization_name: str) -> "TimeseriesBuilder"

Sets the organization that owns the timeseries. Required.

Arguments:

  • organization_name str - The name of the organization.

Returns:

  • TimeseriesBuilder - Returns itself to allow for method chaining.

Example:

builder.with_organization_name("organization")


with_identifier

def with_identifier(identifier: str) -> "TimeseriesBuilder"

Sets the identifier of the timeseries to export. Required.

Arguments:

  • identifier str - The identifier of the timeseries.

Returns:

  • TimeseriesBuilder - Returns itself to allow for method chaining.

Example:

builder.with_identifier("timeseries_identifier")


with_callback

def with_callback(callback_url: str) -> "TimeseriesBuilder"

Sets a URL to be notified when the export finishes, sent as the callback header. Optional: without it, poll with export_status().

Arguments:

  • callback_url str - The URL to notify.

Returns:

  • TimeseriesBuilder - Returns itself to allow for method chaining.

Example:

builder.with_callback("https://your-application/export-done")


with_output_file

def with_output_file(filename: str,
                     content_type: str | None = None) -> "TimeseriesBuilder"

Names the file the export writes to, and optionally its content type.

Arguments:

  • filename str - The name of the output file.
  • content_type str | None - The content type to produce. Defaults to application/vnd.apache.parquet.

Returns:

  • TimeseriesBuilder - Returns itself to allow for method chaining.

Example:

builder.with_output_file("export.parquet")
builder.with_output_file("export.csv", "text/csv")


with_sort

def with_sort(sort: str) -> "TimeseriesBuilder"

Not supported for the Parquet export. The export endpoint decides the output order internally and cannot be changed, and any ‘sort’ field in the payload makes the platform reject the request as “Json is malformed”.

To read timeseries data in a given order, use the search builder instead: client.new_timeseries_search_builder().with_sort(""), where the identifier is one of the sorts declared in the timeseries definition (or its automatically exposed reverse). Note that sorting is also disabled server-side for CSV output.

Raises:

  • NotImplementedError - Always.


export

def export() -> "TimeseriesBuilder"

Selects the operation that starts an export of the timeseries data.

Returns:

  • TimeseriesBuilder - Returns itself to allow for method chaining.

Example:

builder.with_organization_name("organization").with_identifier(
"timeseries_identifier"
).export().build().execute()


export_status

def export_status() -> "TimeseriesBuilder"

Selects the operation that reports the state of the current export.

Unlike export(), it accepts no request body, so with_filter, with_select, with_limit and with_output_file are rejected here.

Returns:

  • TimeseriesBuilder - Returns itself to allow for method chaining.

Example:

builder.with_organization_name("organization").with_identifier(
"timeseries_identifier"
).export_status().build().execute()


build

def build() -> "TimeseriesBuilder"

Closes the chain and checks it, without sending the request.

Call it last, immediately before execute(). Use build_execute() instead to do both in one step; mixing the two raises.

Returns:

  • TimeseriesBuilder - Returns itself to allow for method chaining.

Raises:

  • Exception - If the chain is incomplete — no operation selected, or a required or forbidden method for that operation.

Example:

builder.export().build()


build_execute

def build_execute()

Closes the chain, checks it and sends the request in one step.

Returns:

dict[str, Any]: The same response as execute().

Raises:

  • ValueError - If combined with build() or with execute().

Example:

builder.with_organization_name("organization").with_identifier(
"timeseries_identifier"
).export().build_execute()


execute

def execute() -> Any

Sends the selected operation to the platform.

Returns:

dict[str, Any]: Always carries status_code, plus data on success or error with the response body on failure. For export(), 202 means the export was accepted and runs in the background, 204 that the timeseries holds no data, and 409 that another process is already exporting it. For export_status(), 200 carries the parsed state of the export; a 406 is retried for up to 20 seconds before being returned.

Raises:

  • Exception - If build() or build_execute() was not called first.
  • ValueError - If no operation was selected.

Example:

builder.with_organization_name("organization").with_identifier(
"timeseries_identifier"
).export().build().execute()

opengate_data.timeseries.find_timeseries

FindTimeseriesBuilder Objects

class FindTimeseriesBuilder(SearchBuilder)

Find time series Builder


with_expand

def with_expand(expand: str) -> "FindTimeseriesBuilder"

With expand, select the data field to show information, columns, context or columns.context.

Arguments:

  • expand str - The extra information to include, “columns” or “context”.

Returns:

  • FindTimeseriesBuilder - Returns itself to allow for method chaining.

Example:

# expand=columns, expand=context, expand=columns.context
builder.with_expand("columns")


with_datastreams

def with_datastreams(datastreams: str) -> "FindTimeseriesBuilder"

With dataStreams, select the dataStreams to filter the Timeseries. To be accept and intepreted by the System the dataStream will be in format URL.

Arguments:

  • datastreams str - The datastreams to filter the timeseries by, as a comma-separated list in URL format.

Returns:

  • FindTimeseriesBuilder - Returns itself to allow for method chaining.

Example:

# example: dataStreams=provision.device.identifier,provision.device.communicationModules.subscription.address
builder.with_datastreams("provision.device.identifier")


with_organization_name

def with_organization_name(organization_name: str) -> "FindTimeseriesBuilder"

Set organization name

Arguments:

  • organization_name str - The name of the organization that owns the timeseries.

Returns:

  • FindTimeseriesBuilder - Returns itself to allow for method chaining.

Example:

builder.with_organization_name("organization_name")


with_format

def with_format(format_data: str) -> "FindTimeseriesBuilder"

Formats the flat entities data based on the specified format (‘csv’, ‘dict’, or ‘pandas’). By default, the data is returned as a dictionary.

Arguments:

  • format_data str - The format to use for the data.

Example:

builder.with_format(‘dict’) builder.with_format(‘pandas’)

Returns:

  • FindTimeseriesBuilder - Returns itself to allow for method chaining.


with_sort

def with_sort(sort: str) -> "FindTimeseriesBuilder"

Set sort identifier

Arguments:

  • sort str - The identifier of a sort declared in the timeseries definition.


with_identifier

def with_identifier(identifier: str) -> "FindTimeseriesBuilder"

set the timeseries identifier.

Arguments:

  • identifier str - The identifier of the timeseries.

Returns:

  • FindTimeseriesBuilder - Returns itself to allow for method chaining.

Example:

builder.with_identifier("timeseries_id")


with_config_file

def with_config_file(config_file: str,
                     section: str,
                     config_key: str,
                     prefer: str = "auto") -> "FindTimeseriesBuilder"

Reads a value from the INI and saves it as a source. ‘prefer’ controls whether the value will be interpreted as identifier, name, or auto (first id, then name).

Arguments:

  • config_file str - Path to the INI file to read.
  • section str - The section of the INI file the value lives in.
  • config_key str - The key holding the value.
  • prefer str - How to read the value: ‘identifier’, ’name’, or ‘auto’ to try the identifier first and fall back to the name. Defaults to ‘auto’.


with_name

def with_name(find_name: str) -> "FindTimeseriesBuilder"

Specify the name to find.

Arguments:

  • find_name str - The name of the timeseries.

Returns:

  • FindTimeseriesBuilder - Returns self for chaining.

Example:

builder.with_name('timeseries_name')


with_env

def with_env(env_key: str, prefer: str = "auto") -> "FindTimeseriesBuilder"

Use an environment variable as the source. ‘prefer’ can be:

  • ‘identifier’ -> treat the value as an identifier
  • ’name’ -> treat the value as a name
  • ‘auto’ -> try identifier and, if not, name

Arguments:

  • env_key str - The name of the environment variable to read.
  • prefer str - How to read the value: ‘identifier’, ’name’, or ‘auto’ to try the identifier first and fall back to the name. Defaults to ‘auto’.


find_all

def find_all() -> "FindTimeseriesBuilder"

Searches for all available timeseries resources.

Returns:

  • FindTimeseriesBuilder - Returns the current instance to allow method chaining.

Example:

builder.with_organization_name('my_organization').find_all()


find_one

def find_one() -> "FindTimeseriesBuilder"

Searches for a single timeseries resource by its identifier.

This method prepares the request to find a specific timeseries based on its identifier. The identifier is obtained automatically if not explicitly defined or can be obtained from a configuration file or environment variables.

Returns:

  • FindTimeseriesBuilder - Returns the current instance to allow method chaining.

Example:

builder.with_organization_name('my_organization').with_organization_name("organization_name").with_format("dict").with_identifier("identifier").find_one().build().execute()


build

def build() -> "FindTimeseriesBuilder"

Finalizes the construction of the IoT collection configuration.

This method prepares the builder to execute the collection by ensuring all necessary configurations are set and validates the overall integrity of the build. It should be called before executing the collection to ensure that the configuration is complete and valid.

The build process involves checking that mandatory fields such as the device identifier are set. It also ensures that method calls that are incompatible with each other (like build and build_execute) are not both used.

Returns:

  • FindTimeseriesBuilder - Returns itself to allow for method chaining, enabling further actions like execute.

Raises:

  • ValueError - If required configurations are missing or if incompatible methods are used together.

Example:

builder.build()


build_execute

def build_execute()

Executes the timeseries search immediately after building the configuration.

This method is a shortcut that combines building and executing in a single step.

Returns:

  • dict - A dictionary containing the execution response which includes the status code and potentially other metadata about the execution.

Raises:

  • ValueError - If build has already been called on this builder instance.

Example:

builder.build_execute()


execute

def execute() -> Response

Execute the configured operation and return the response.

This method executes the operation that has been configured using the builder pattern. It ensures that the build method has been called and that it is the last method invoked before execute. Depending on the configured method (e.g., create, find, update, delete), it calls the appropriate internal execution method.

Returns:

  • requests.Response - The response object from the executed request.

Raises:

  • Exception - If the build method has not been called or if it is not the last method invoked before execute.
  • ValueError - If the configured method is unsupported.

Example:

builder.execute()

opengate_data.timeseries

Utils

opengate_data.utils.expressions

Expressions Objects

class Expressions()

Expressions

The filter conditions a search accepts, as static methods returning plain dicts: eq, neq, like, gt, lt, gte, lte, in_, nin and exists. FilterBuilder extends this class, so in practice you reach them through client.new_filter_builder() and combine them with and_ / or_ before calling build().

Example:

filter = client.new_filter_builder().and_(
Expressions.eq("provision.administration.organization", "organization"),
Expressions.exists("provision.device.identifier", True),
).build()


eq

def eq(field, value)

Adds an equality condition to the filter.

Arguments:

  • field str - The field to compare.
  • value any - The value to compare against.

Returns:

  • dict - The equality condition.

Example:

eq(“device.operationalStatus”, “NORMAL”)


neq

def neq(field, value)

Adds a not-equal condition to the filter.

Arguments:

  • field str - The field to compare.
  • value any - The value to compare against.

Returns:

  • dict - The not-equal condition.

Example:

neq(“device.operationalStatus”, “ERROR”)


like

def like(field, value)

Adds a like condition to the filter.

Arguments:

  • field str - The field to compare.
  • value str - The regex pattern to match.

Returns:

  • dict - The like condition.

Example:

like(“device.name”, “device_.*”)


gt

def gt(field, value)

Adds a greater-than condition to the filter.

Arguments:

  • field str - The field to compare.
  • value any - The value to compare against.

Returns:

  • dict - The greater-than condition.

Example:

gt(“device.batteryLevel”, 50)


lt

def lt(field, value)

Adds a less-than condition to the filter.

Arguments:

  • field str - The field to compare.
  • value any - The value to compare against.

Returns:

  • dict - The less-than condition.

Example:

lt(“device.batteryLevel”, 20)


gte

def gte(field, value)

Adds a greater-than-or-equal condition to the filter.

Arguments:

  • field str - The field to compare.
  • value any - The value to compare against.

Returns:

  • dict - The greater-than-or-equal condition.

Example:

gte(“device.batteryLevel”, 80)


lte

def lte(field, value)

Adds a less-than-or-equal condition to the filter.

Arguments:

  • field str - The field to compare.
  • value any - The value to compare against.

Returns:

  • dict - The less-than-or-equal condition.

Example:

lte(“device.batteryLevel”, 30)


in_

def in_(field, values)

Adds an in condition to the filter.

Arguments:

  • field str - The field to compare.
  • values list - The list of values to compare against.

Returns:

  • dict - The in condition.

Example:

in_(“device.name”, [“device_1”, “device_2”])


nin

def nin(field, values)

Adds a not-in condition to the filter.

Arguments:

  • field str - The field to compare.
  • values list - The list of values to compare against.

Returns:

  • dict - The not-in condition.

Example:

nin(“device.name”, [“device_3”, “device_4”])


exists

def exists(field, value)

Adds an existence condition to the filter.

Arguments:

  • field str - The field to check for existence.
  • value bool - True to match the entities that have the field, False to match the ones that do not.

Returns:

  • dict - The existence condition.

Example:

exists("device.location", True)

opengate_data.utils.utils


validate_type

def validate_type(variable: Any, expected_type: Any,
                  variable_name: str) -> None

Validates that the given variable is of the expected type or types.

This function checks if the variable matches the expected type or any type in a tuple of expected types. It raises a TypeError if the variable does not match the expected type(s).

Arguments:

  • variable Any - The variable to be checked.
  • expected_type Any - The expected type or a tuple of expected types.
  • variable_name str - The name of the variable, used in the error message to identify the variable.

Raises:

  • TypeError - If the variable is not of the expected type(s).

Returns:

  • None - This function does not return a value; it raises an exception if the type check fails.


set_method_call

def set_method_call(method)

Decorates a method to ensure it is properly registered and tracked within the builder’s workflow.

This decorator adds the method’s name to a set that tracks method calls

Arguments:

  • method function - The method to be decorated.

Returns:

  • function - The wrapped method with added functionality to register its call.

Raises:

  • None - This decorator does not raise exceptions by itself but ensures the method call is registered.


parse_json

def parse_json(value)

Attempts to convert a string into a Python object by interpreting it as JSON.

Arguments:

  • value str | Any - The value to attempt to convert. If the value is not a string, it is returned directly without attempting conversion.

Returns:

  • Any - The Python object resulting from the JSON conversion if value is a valid JSON string. If the conversion fails due to a formatting error (ValueError), the original value is returned. If value is not a string, it is returned as is.


send_request

def send_request(method: str,
                 headers: dict | None = None,
                 url: str = "",
                 data: dict[str, Any] | str | None = None,
                 files: Any = None,
                 json_payload: dict[str, Any] | None = None,
                 params: Any = None,
                 verify: bool = False,
                 timeout: int = 3000,
                 stream: bool = False) -> Response | dict[str, Any]

Helper function to make HTTP requests using the requests library.

Arguments:

  • method str - HTTP method (e.g., ‘GET’, ‘POST’, ‘PUT’, ‘DELETE’, ‘PATCH’).
  • headers dict, optional - Request headers.
  • url str - The URL for the request.
  • data dict | str, optional - Payload for the request body.
  • files Any, optional - Files for multipart encoding upload.
  • json_payload dict, optional - JSON payload for the request body.
  • params dict | Any, optional - URL parameters.
  • verify bool - Whether to verify SSL certificates. Defaults to False.
  • timeout int - Request timeout in seconds. Defaults to 3000.

Returns:

Response | dict[str, Any]: The response object if successful, or an error dictionary.


handle_basic_response

def handle_basic_response(response: requests.Response) -> dict[str, Any]

Handle basic HTTP response.

This function processes the HTTP response and returns a dictionary containing the status code. If the response indicates an error, it also includes the error message.

Arguments:

  • response requests.Response - The response object to process.

Returns:

dict[str, Any]: A dictionary containing the status code and, if applicable, the error message.


validate_build

def validate_build(*,
                   method: str,
                   state: dict,
                   spec: dict,
                   used_methods: list[str] | None = None,
                   allowed_method_calls: set[str] | None = None,
                   field_aliases: dict[str, str] | None = None,
                   method_aliases: dict[str, str] | None = None) -> None

Generic builder validator with messages intended for the end user.

  • field_aliases: maps internal fields to public setter names (e.g., ‘path’ → ‘with_path’)
  • method_aliases: maps logical method names to public method names (e.g., ’list_one’ → ’list_one()’)


build_headers

def build_headers(client_headers: dict | None,
                  *,
                  accept: str | None = None,
                  content_type: str | None = None) -> dict

Build request headers starting from client headers (auth preserved) and optionally overriding Accept / Content-Type.

This function NEVER mutates client headers.

opengate_data.utils

OpenGate UX

OpenGate UX

Login

Exploring OpenGate UX Web Console

Discover the powerful and user-friendly OpenGate UX Web Console, a critical aspect of the OpenGate IoT Platform developed by amplía))) soluciones. Our UX team designs this web console to offer seamless interaction with the OpenGate API, providing an extensive range of features and tools to enhance your IoT experience. The console covers every aspect of IoT management and analysis from the initial Login to complex Analytics and Device Emulation.

Explore diverse Workspaces with customizable Dashboards featuring a variety of Widgets from advanced BIM/IFC Widgets to insightful Charts and Maps. Delve into detailed Entity Details, manage multiple entities through comprehensive Listings, and harness the power of Wizards for simplified administration and operations. The console also includes a robust Administration section for efficiently managing entities, organizations, and user settings. With the Devices Emulator, simulate real-world scenarios and utilize Analytics for advanced data analysis and predictive modelling. Lastly, ensure optimal system functionality with Operation System Support, keeping track of entities, notices, and incidents.

The OpenGate UX Web Console is your gateway to mastering IoT operations, offering an intuitive and comprehensive environment for managing the full spectrum of IoT tasks and challenges.


Index

Subsections of OpenGate UX

Login

Login

From the login window, you have the option to enter the website, for which you will need to provide a username and a password.

Login

Within the login window, you can choose which area of the portal you wish to access, among the following:

  • Workspaces and Dashboards
  • OpenGate Web Administration
  • Operations Support System
  • Device Simulator

URL Immutability

You can access the web by copying a URL that identifies a dashboard or section of the website.

If you don’t have an active session at that moment, you will be directed to the login screen to start your session.

Once your session is initiated, the web won’t redirect you to the home page; instead, it will take you to the dashboard or website section indicated in the URL.

Two Factor

Should the user have two-factor authentication enabled, a second step will appear where you will need to enter the validation digits.

TwoFactor

Lost Password

The website offers two mechanisms for password recovery in case it is forgotten or has expired.

Forgotten/Recovery of Password

By clicking on the Have you forgotten your password? link on the login page, you will be directed to a form where you will be asked to provide an email address to which a password recovery email will be sent.

Request password

The received email will contain a link directing you to a page where you can reset your password:

Response password

Change Due to Expired Password

If the validity of the password has expired, instead of allowing you to enter the website, the login process will direct you to a form where you can reset the password.

Expire session

Workspaces

The first thing we encounter when entering the web platform is the workspaces landing page. A workspace is used to group our dashboards.

Workspace

In the workspaces landing page you will see the sections below:

  • favourite dashboards groups all dashboards marked as favourite. Only will be displayed if favourites found. Favourite dashboards

  • workspaces displays workspaces marked to show in home and others shared with user/organization. Collaborative workspace shows dashboards shared with user/organization.

All dashboards
  • all dashboards were you can search any dashboard and access to it directly All dashboards

Workspaces can be displayed in 3 different modes:

  • grid where the user can organize the dashboards Workspace grid

  • carousel dashboards will be displayed in a carousel (no user configuration required) Workspace carousel

  • list dashboards will appears in a list showing its metadata on mouse over (no user configuration required) Workspace list

Creating a Workspace

There are two ways to create a workspace:

  • Click on the ‘NEW WORKSPACE’ button.
  • Access the workspaces and dashboards menu, and click on the ‘+ New workspace’ button. Workspace menu

Configuration

You can:

  • Give it a name and description and choose an identifying icon. Also you can assign a banner image and select if you want to hide workspace in home. Workspace configuration general
  • Enable/disable different actions that can be performed within the context of the workspace. This will determine which wizards are accessible from the various workspace menus and their dashboards. Workspace configuration actions
  • Redirect actions to a specific wizard, as long as more than one wizard can perform that action. Workspace configuration action-routing
  • Manage the templates that will be used within the workspace’s context. Workspace configuration templates

Once you have created your workspace, you can start creating your panels with their various widgets.

Actions

Workspace options
  • + New Dashboard: Create a new dashboard
  • Menú actions:
    • Share: Share the workspace with another user or with the entire organization. From here, you can also stop sharing the workspace if it is already shared with another person or organization Share
    • Export workspace: Export the workspace in zip format. It will contain a JSON file with the workspace configurations that you can later import. You can also configure which elements to export from the workspace. Export
    • Import dashboard: Import a dashboard into the workspace Import dashboard
    • Delete dashboards: Delete the selected dashboards Delete dashboard
    • Delete: Delete the workspace.
    • Information: Information about the workspace Information
  • Reload: Reload the workspace
  • Reorganize: Reorganize the view of dashboards Reorganize
  • Edit: Open the workspace editing wizard

From the home view, you can also perform various actions such as exporting and importing workspaces, configuring certain data related to your user and organization, viewing notifications, and accessing various sections of the web: Opengate Web Management, Operations Support System, Devices emulator, and Analytics.

The following details these actions.

Export/Import Workspaces

The web has the capability to export and import workspaces.

Export

  1. From the actions menu of the home, select the Export workspaces option.
  2. A panel will appear that allows you to export the workspaces in zip format. It will contain a JSON file with the workspace configurations that you can later import. You can also configure which elements to export from the workspace. Export workspace

Import

  1. From the actions menu of the home, select the Import workspaces option.
  2. A panel will appear that allows you to import workspaces. You can also configure which elements to import from the workspaces to import. Import workspace

Web Preferences

User Data

From the actions menu, clicking on the user’s icon will allow you to access a panel that allows you to modify your user’s data:

Home actions
  • Edit: Displays information related to our user User data
  • Password: from here, you can modify your password User password

Actions to Perform on Workspaces in the Home

Organize View

You can organize the order of workspaces:

Organize view

Quick Access to Workspaces

Select workspace

Notifications

You can view notifications related to operations executed in your organization, as well as the progress of bulk operations and their CSV downloads. You can also view (and copy) requests made against the platform. These notifications can be activated to notify you as soon as any changes occur in any of the sections.

Notifications

Operations

Operations

You can view operations executed in your organization or only those performed by you. You can also view information about the executions performed in each of the operations.

Bulk

Bulk

You can view the progress of the bulk operations executed in your organization. You can also access the list of bulk operations and download the response of the bulk operation.

CSV

CSV

You can view the progress of CSV downloads performed on the web.

Requests

Requests

You can view the different requests made to the Opengate platform. You can also copy these requests in CURL format.


Subsections of Workspaces

Dashboards

Dashboards are spaces where we group and organize the widgets we need for our work.

Dashboard

Creating a Dashboard

Similar to workspaces, there are two ways to create a dashboard:

  • In the menu of our workspace, click on the ‘+ New Dashboard’ button.
  • Access the workspace and dashboard menu, select your workspace, and click on the ‘New Dashboard’ button. Workspace menu

Dashboard Configuration

You can:

  • Give it a name and description and configure the card that will be displayed in the workspace.
  • Choose an identifying icon, either from our icon catalog or by uploading one from your computer.
  • Add an image for better identification in workspaces and/or banner image. Dashboard configuration general
  • Configure the behavior of your widgets within the dashboard:
    • Set the refresh interval that will be applied to all widgets. By default, the value is “MANUAL,” and it will only refresh through user interaction with the dashboard.
    • Set the minimum dimensions for widgets contained in the dashboard. Dashboard configuration advanced

Once the website is created, it will display a blank dashboard where you can add all the widgets you need.

It also contains a side menu from which you can access the various wizards you added when creating the workspace (under the “ACTIONS” tab) as well as the dashboard’s own actions:

Dashboard actions

Some of the actions you can perform include:

  • Add widget: Puts the dashboard in editing mode and opens the widget selection panel.
  • Actions:
    • Fullscreen: Displays the dashboard in full-screen mode.
    • Capture screen: Takes a screenshot of the dashboard.
    • Delete: Deletes the dashboard.
  • Reload: Refreshes all widgets contained in the dashboard.
  • Edit: Edit the dashboard to add widgets.
  • Configuration: Opens the dashboard editing wizard.
  • Favourite: Sets de favourite flag in dashboard in order to show in the favourite dashboards section.

The rest of the actions, such as Share, Clone, Move, Information, are explained below.

The “Save as template” action is explained in the “Templates” section.

Export/Import a Dashboard

The website has the capability to export and import dashboards.

Export

  1. In the dashboard’s actions menu, select the “Export dashboard” option.
  2. A panel will appear that allows you to export a dashboard in zip format. It will contain a JSON file with the dashboard’s configuration that you can later import into a workspace. Import dashboard

Import

  1. In the options menu of the workspace where you want to load the dashboard, select the “Import dashboard” option.
  2. A panel will appear that allows you to import a dashboard. Import dashboard

Share a Dashboard

You can share your dashboards with other users within your own organization.

  1. In the dashboard’s actions menu, select the “Share” option.
  2. Choose whom you want to share the dashboard with: a single person within your organization or with your entire organization. From here, you can also stop sharing the dashboard if it is already shared with another person or organization. Dashboard share

Move Dashboard

You can move dashboards between different workspaces.

  1. In the dashboard’s actions menu, select the “Move” option.
  2. Select the workspace to which you want to move the dashboard. Dashboard move

Clone Dashboard

You can clone a dashboard into another workspace.

  1. In the dashboard’s actions menu, select the “Clone” option.
  2. Select the workspace to which you want to move the dashboard. Dashboard move

Information

For quick access to dashboard information.

  1. In the dashboard’s actions menu, select the “Information” option. Dashboard move

Subsections of Dashboards

Widgets

Widgets are the elements of our dashboard that allow us to work and interact with the OpenGate platform.

Create Widgets

Once we have our dashboard created, we can start adding the widgets we will use for work.

By clicking the “ADD WIDGET” button, a panel will appear from which we can add the chosen widget.

Dashboard add widget Dashboard add widget

If the chosen widget requires configuration, a widget configuration wizard will be displayed.

Once all the necessary widgets have been configured and added, we will save the dashboard by pressing the SAVE button.

List of Widgets


Subsections of Widgets

Subsections of Advanced

BIM/IFC Widget

The BIM/IFC widget allows you to configure a 3D model under the BIM/IFC standard and add sensors to the desired elements of the model.

How it Works

BIM/IFC Widget

The widget displays the selected model, covering the widget area. To the left of the widget is a panel with available actions, and to the right are listed the selected and monitored elements.

Actions Panel

BIM/IFC Actions Panel

With the Actions Panel, you can:

  • All elements displays a list of all elements in the model, allowing you to search and select an element quickly
BIM/IFC All Elements
  • Show/Hide list allows you to show/hide the right panel of elements
  • Highlight elements will select all preconfigured elements from the right panel in the model
  • Capture an image downloads a snapshot of only the model in its current state
  • Create clipping plane enables the option to select an element in the model to create a cutting layer that allows you to cut the model and see elements inside
  • Remove clipping plane removes the selected cutting layer
  • Enable/disable clipping planes activates/deactivates the cutting layers without needing to remove and add
  • Clear cache and reload clears the cache and reloads the image to return it to its initial state

Elements Panel

BIM/IFC Elements Panel

With the Elements Panel, you can select an element to highlight it in the model for more precise location.

States are also represented here as established by the configured code.

Configuration

General

  • Boxed: widget will be displayed with background in dahsboard.
  • About: widget description in Markdown format.
  • Title: widget title. It can be configured to remain fixed in the widget or only be displayed when it receives focus.
  • Toolbar: configures the behavior of the widget bar on the dashboard, allowing you to hide it, hide it when not in use, or leave it always visible.
  • Refresh Frequency: allows configuring the data refresh frequency displayed in the list.
  • Extra actions: allows user to add new specific actions to the widget with your own code.

Extra action config

You can add a new one by pressing the New button.

Once you added a custom action it can be modified later by pressing the name in the list.

In order to remove the custom action click the delete icon button on the right.

In extra actions you can write your own code were you can open other dashboards, entities dashboards or execute wizards.

Extra action code

You can find all available functions and methods in Extra parameters

BIM/IFC General Configuration
  • Organization files allows you to select a file to add to our widget

  • Preview here, you can see the loaded model and preselect those elements you want to highlight/monitor

In the preview panel, the following actions are found:

[…The actions are similar to the Actions Panel section…]

Items Tab

From here, you can alter the values of the elements selected in the model preview:

  • Express ID allows you to modify the ID of the selected element if it has changed in the model
  • Alias you can assign an alternative display name
BIM/IFC Items Configuration

Code Tab

Here, you configure the logic needed for the identification of different values and to display them on the elements of the model.

BIM/IFC Code Configuration

IMPORTANT NOTE: Whenever code is modified, it must be evaluated to save the changes

Function

Depending of the configuration receives the following parameters:

  • entityData contains the data of the opened entity NOTE: only available when the user opens an entity dashboard template

Example:

{
  "provision.administration.identifier": {
    "_value": {
      "_current": {
        "value": "device_1"
      }
    }
  },
  "provision.administration.organization": {
    "_value": {
      "_current": {
        "value": "organization_name"
      }
    }
  },
  "provision.administration.channel": {
    "_value": {
      "_current": {
        "value": "channel_name"
      }
    }
  },
  "provision.administration.serviceGroup": {
    "_value": {
      "_current": {
        "value": "service_group_name"
      }
    }
  }
}
  • relatedEntities contains an array of entities related to the entity selected. NOTE: only available when the user opens an entity dashboard template

Example:

[{
  "provision.administration.identifier": {
    "_value": {
      "_current": {
        "value": "related_1"
      }
    }
  },
  "provision.administration.organization": {
    "_value": {
      "_current": {
        "value": "organization_name"
      }
    }
  },
  "provision.administration.channel": {
    "_value": {
      "_current": {
        "value": "channel_name"
      }
    }
  },
  "provision.administration.serviceGroup": {
    "_value": {
      "_current": {
        "value": "service_group_name"
      }
    }
  }
}]
  • timeserieData contains info about the timeserie opened by the user
    • config timeserie configuration
    • data timeserie row selected

NOTE: only available when the user opens an entity dashboard template from timeserie table widget

An example:

{
  "config": {
    "identifier": "69281dc43545e97df66c42a1",
    "name": "Battery charge history",
    "timeBucket": 3600,
    "bucketColumn": "bucketEnd",
    "bucketInitColumn": "bucketInit",
    "identifierColumn": "EntityID",
    "retention": 2592000,
    "origin": "2025-11-26T23:00:00Z",
    "context": [
      {
        "path": "provision.device.administrativeState",
        "name": "Administrative state",
        "sort": "true",
        "filter": "YES",
        "type": "string"
      }
    ],
    "columns": [
      {
        "path": "device.powersupply.battery.charge._current.value",
        "name": "Powersupply battery charge Current Value",
        "filter": "NO",
        "type": "number",
        "sort": false,
        "aggregationFunction": "FIRST"
      }
    ]
  },
  "data": {
    "bucketEnd": "2025-12-11T13:00:00+01:00",
    "bucketInit": "2025-12-11T12:00:00+01:00",
    "EntityID": "entity_1",
    "Powersupply battery charge Current Value": 34
  }
}
  • alarmData contains the data of the alarm opened in template
{
  "identifier": "270dd9f9-1396-4660-bb5f-8d8b471e1dcd",
  "name": "activityForbidden",
  "rule": "activityForbidden",
  "description": "Activity detected for an entity with administrative state disabled",
  "severity": "INFORMATIVE",
  "priority": "LOW",
  "organization": "organization_name",
  "channel": "default_channel",
  "entityIdentifier": "A_WORKER_1",
  "subEntityIdentifier": "A_WORKER_1",
  "resourceType": "ENTITY_ASSET",
  "status": "CLOSED",
  "openingDate": "2019-06-27T08:57:36+02:00",
  "closureDate": "2019-06-27T08:57:51+02:00"
}
  • callback (optional) function used to send data to the widget (only when the api/http petitions are promised, use return instead)
callback();

or

return;

Available utils

$api -> use it to create http petitions to OpenGate Api Rest doc

$user -> Logged user

Example:

{
    "email": "email@amplia.es",
    "workgroup": "workgroup",
    "domain": "domain",
    "profile": "profile",
    "countryCode": "ES",
    "langCode": "en",
    "timezone": "Europe/Madrid"
}

$moment -> use it to format date doc

console -> display messages in navigator console

Promise -> allows easy execution of multiple promises

http -> javascript encapsulation of useFetch (Nuxt 4) library doc

alert -> alert navigator method

setValueToItem -> Sets a value to the selected item

setValueToItem(itemID, alias, value [,style, datetime, deviceId, datastreamId])

setItemStatus -> Sets an special status

setItemStatus(itemID, [rgbColor(string format)|null])

Final code structure build by the application

async function main(entityData, relatedEntitiesData, timeserieData, alarmData,callback) {
  // YOUR CODE HERE WITH RETURN OR CALLBACK
}

Examples


Subsections of BIM/IFC Widget

Change Item Status by Battery Charge

Code

/**
 * Logic:
 * 1. Queries a sample of maximum 50 entities.
 * 2. Calculates the average of the `device.powersupply.battery.charge` values.
 * 3. Update "VentanaPrincipal" value with the average.
 * 4. If the floor of average is even, changes "VentanaPrincipal" status to Red (#FF0000).
 * 5. If the floor of average is odd, changes "VentanaPrincipal" status to Green (#00FF00).
 */

// 1. Create the builder to search for entities, limiting to 50
var builder = $api.entitiesSearchBuilder()
    .limit(50)
    .flattened();

// 2. Execute the query
var response = await builder.build().execute();

var totalCharge = 0;
var count = 0;

// 3. Iterate through the results and sum the battery charge
if (response && response.data && response.data.entities) {
    response.data.entities.forEach(function(entity) {
        // Access the battery charge field
        // Field: device.powersupply.battery.charge
        var batteryField = entity['device.powersupply.battery.charge'];
        
        if (batteryField && batteryField._value && batteryField._value._current && batteryField._value._current.value) {
            var val = parseFloat(batteryField._value._current.value);
            if (!isNaN(val)) {
                totalCharge += val;
                count++;
            }
        }
    });
}

// 4. Calculate Average
var average = count > 0 ? totalCharge / count : 0;

// 5. Determine color based on parity of the floor of the average
// Even -> Red "#FF0000"
// Odd -> Green "#00FF00"
var floorAvg = Math.floor(average);
var isEven = floorAvg % 2 === 0;
var color = isEven ? "#FF0000" : "#00FF00";

// 6. Set the item status and value
// setItemStatus(itemID, [rgbColor(string format)|null])
setItemStatus("VentanaPrincipal", color);

// setValueToItem(itemID, alias, value)
setValueToItem("VentanaPrincipal", "Battery Avg", average.toFixed(2));

// Use return as the function is async
return;

All Entities Average Battery

Code

/**
 * Logic:
 * 1. Iterates through ALL entities in the platform using `executeWithAsyncPaging` (efficient pagination).
 * 2. Calculates the average of the `device.powersupply.battery.charge` values across all entities.
 * 3. Update "VentanaPrincipal" value with the global average.
 * 4. If the floor of average is even, changes "VentanaPrincipal" status to Red (#FF0000).
 * 5. If the floor of average is odd, changes "VentanaPrincipal" status to Green (#00FF00).
 */

var totalCharge = 0;
var count = 0;

// 1. Create the builder
var builder = $api.entitiesSearchBuilder()
    .limit(2000) // Max limit per page
    .flattened();

// 2. Execute with async paging
// executeWithAsyncPaging(resourceName) returns a Promise
return builder.build().executeWithAsyncPaging('entities').then(
    // Success Callback (called when all pages are processed)
    function() {
        // 4. Calculate Average
        var average = count > 0 ? totalCharge / count : 0;

        // 5. Determine color based on parity of the floor of the average
        var floorAvg = Math.floor(average);
        var isEven = floorAvg % 2 === 0;
        var color = isEven ? "#FF0000" : "#00FF00";

        // 6. Set the item status and value
        setItemStatus("VentanaPrincipal", color);
        setValueToItem("VentanaPrincipal", "Battery Avg", average.toFixed(2));
    },
    // Error Callback
    function(err) {
        console.error("Error in paging:", err);
    },
    // Notify Callback (called for each page of results)
    function(pageData) {
        if (pageData && pageData.length > 0) {
            pageData.forEach(function(entity) {
                // Access the battery charge field
                var batteryField = entity['device.powersupply.battery.charge'];
                
                if (batteryField && batteryField._value && batteryField._value._current && batteryField._value._current.value) {
                    var val = parseFloat(batteryField._value._current.value);
                    if (!isNaN(val)) {
                        totalCharge += val;
                        count++;
                    }
                }
            });
        }
    }
);

Custom Action

Custom action widgets allow you to code an action to be performed, which will be triggered by a button or a form.

How it Works

Custom action widget

This widget will display a form or button that will execute the user-coded action.

In the case of using a form, the action will receive the form values and any desired logic can be applied to them.

Additionally, this widget can be configured so that the action executes within a dialog box as an independent form.

Custom action execution result

Once the execution is initiated, a progress box will appear displaying the result of the action.

The execution will be successful as long as no exception is thrown in the source code.

Configuration

General

  • Boxed: widget will be displayed with background in dahsboard.
  • About: widget description in Markdown format.
  • Title: widget title. It can be configured to remain fixed in the widget or only be displayed when it receives focus.
  • Toolbar: configures the behavior of the widget bar on the dashboard, allowing you to hide it, hide it when not in use, or leave it always visible.
  • Refresh Frequency: allows configuring the data refresh frequency displayed in the list.
  • Extra actions: allows user to add new specific actions to the widget with your own code.

Extra action config

You can add a new one by pressing the New button.

Once you added a custom action it can be modified later by pressing the name in the list.

In order to remove the custom action click the delete icon button on the right.

In extra actions you can write your own code were you can open other dashboards, entities dashboards or execute wizards.

Extra action code

You can find all available functions and methods in Extra parameters

  • Description here you will write what action will be executed when the corresponding button is pressed
  • Icon determines the type of desired visualization: a button with an icon, an image, or a custom form. In the case of a form, it can also be specified if you want to display it as a dialog box.
Custom action general configuration

If it’s a form, you must enter a JSON schema that determines what will be drawn.

Custom action schema configuration

Expert

Custom action expert configuration

Here you can configure source code that will run before the widget is loaded, allowing for the dynamic construction of the JSON schema of the form to be displayed, thereby facilitating the construction of dynamic forms based on platform data.

Available utils

$api -> use it to create http petitions to OpenGate Api Rest doc

$user -> Logged user

Example:

{
    "email": "email@amplia.es",
    "workgroup": "workgroup",
    "domain": "domain",
    "profile": "profile",
    "countryCode": "ES",
    "langCode": "en",
    "timezone": "Europe/Madrid"
}

$moment -> use it to format date doc

console -> display messages in navigator console

Promise -> allows easy execution of multiple promises

http -> javascript encapsulation of useFetch (Nuxt 4) library doc

Function

Depending of the configuration receives the following parameters:

  • entityData contains the data of the opened entity NOTE: only available when the user opens an entity dashboard template

Example:

{
  "provision.administration.identifier": {
    "_value": {
      "_current": {
        "value": "device_1"
      }
    }
  },
  "provision.administration.organization": {
    "_value": {
      "_current": {
        "value": "organization_name"
      }
    }
  },
  "provision.administration.channel": {
    "_value": {
      "_current": {
        "value": "channel_name"
      }
    }
  },
  "provision.administration.serviceGroup": {
    "_value": {
      "_current": {
        "value": "service_group_name"
      }
    }
  }
}
  • relatedEntities contains an array of entities related to the entity selected. NOTE: only available when the user opens an entity dashboard template

Example:

[{
  "provision.administration.identifier": {
    "_value": {
      "_current": {
        "value": "related_1"
      }
    }
  },
  "provision.administration.organization": {
    "_value": {
      "_current": {
        "value": "organization_name"
      }
    }
  },
  "provision.administration.channel": {
    "_value": {
      "_current": {
        "value": "channel_name"
      }
    }
  },
  "provision.administration.serviceGroup": {
    "_value": {
      "_current": {
        "value": "service_group_name"
      }
    }
  }
}]
  • timeserieData contains info about the timeserie opened by the user
    • config timeserie configuration
    • data timeserie row selected

NOTE: only available when the user opens an entity dashboard template from timeserie table widget

An example:

{
  "config": {
    "identifier": "69281dc43545e97df66c42a1",
    "name": "Battery charge history",
    "timeBucket": 3600,
    "bucketColumn": "bucketEnd",
    "bucketInitColumn": "bucketInit",
    "identifierColumn": "EntityID",
    "retention": 2592000,
    "origin": "2025-11-26T23:00:00Z",
    "context": [
      {
        "path": "provision.device.administrativeState",
        "name": "Administrative state",
        "sort": "true",
        "filter": "YES",
        "type": "string"
      }
    ],
    "columns": [
      {
        "path": "device.powersupply.battery.charge._current.value",
        "name": "Powersupply battery charge Current Value",
        "filter": "NO",
        "type": "number",
        "sort": false,
        "aggregationFunction": "FIRST"
      }
    ]
  },
  "data": {
    "bucketEnd": "2025-12-11T13:00:00+01:00",
    "bucketInit": "2025-12-11T12:00:00+01:00",
    "EntityID": "entity_1",
    "Powersupply battery charge Current Value": 34
  }
}
  • alarmData contains the data of the alarm opened in template
{
  "identifier": "270dd9f9-1396-4660-bb5f-8d8b471e1dcd",
  "name": "activityForbidden",
  "rule": "activityForbidden",
  "description": "Activity detected for an entity with administrative state disabled",
  "severity": "INFORMATIVE",
  "priority": "LOW",
  "organization": "organization_name",
  "channel": "default_channel",
  "entityIdentifier": "A_WORKER_1",
  "subEntityIdentifier": "A_WORKER_1",
  "resourceType": "ENTITY_ASSET",
  "status": "CLOSED",
  "openingDate": "2019-06-27T08:57:36+02:00",
  "closureDate": "2019-06-27T08:57:51+02:00"
}

Action code specific parameters

  • value is the value, in string format, entered in value field when enabled

  • model contains the custom form values data

Example:

{
    "your.datastream.name": "datastreamvalue",
    "field1": "value1",
    "field2": "value2"
}
Final code structure build by the application
async function main(entityData,alarmData,relatedEntities,timeserieData,value, model) {
  // YOUR CODE HERE WITH RETURN OR CALLBACK
}

Expert code specific parameters

  • config receives the configuration object of the widget in order to modify it
  • callback function used to send the new configuration to the widget

Example:

callback(newConfig);

or

return newConfig;
Final code structure build by the application
async function main(entityData,alarmData,relatedEntities,timeserieData,config,callback) {
  // YOUR CODE HERE WITH RETURN OR CALLBACK
}

Examples


Subsections of Custom Action

Custom Action Example

Code

// Check if a value is provided
if (!value) {
  console.warn("No value provided for search.");
  return;
}

// Define the API endpoint (JSONPlaceholder)
// We'll filter todos by userId based on the input value
var apiUrl = "https://jsonplaceholder.typicode.com/todos?userId=" + value;

console.log("Fetching data from: " + apiUrl);

try {
  // Perform the request using the platform's http utility (encapsulation of Nuxt 4 useFetch)
  // useFetch typically parses JSON automatically.
  // We await the result. 
  // Note: useFetch in Nuxt returns { data, error, ... }
  const { data, error } = await http(apiUrl);

  if (error && error.value) {
    throw new Error("Generic Error: " + error.value);
  }

  // Access the data (Ref value if it's a ref, or direct if the utility un-refs it)
  // Assuming standard Nuxt composition API behavior where top level properties are Refs
  const results = data.value || data;

  console.log("--- Search Results (User ID: " + value + ") ---");
  // Check if we got any results
  if (results && results.length > 0) {
    console.table(results); // Display as a table for better readability
    console.log("Total records found: " + results.length);
  } else {
    console.log("No records found for User ID: " + value);
  }

} catch (err) {
  console.error("Fetch error:", err);
}

Custom Action Entity Search Example

Code

// Check if model is provided
if (!model) {
  console.warn("No form data (model) provided.");
  return;
}

const { name, specificType } = model;
console.log("Searching entities with Name:", name, "and Specific Type:", specificType);

// Create the builder
var builder = $api.entitiesSearchBuilder().flattened();

// Define filters based on model values
var filter = {
  and: [
    {
      eq: {
        'resourceType': 'entity.device'
      }
    }
  ]
};

if (name) {
  filter.and.push({
    like: {
      'provision.administration.identifier': name // Assuming 'name' maps to identifier for this example, or use 'provision.device.name' if appropriate
    }
  });
}

if (specificType) {
  filter.and.push({
    eq: {
      'provision.device.specificType': specificType
    }
  });
}

// Apply filter if any conditions were added
if (filter.and.length > 0) {
  builder.filter(filter);
}

try {
  // Execute the search
  // await is supported in this context
  const response = await builder.build().execute();

  if (response.statusCode === 200) {
    console.log("--- Entity Search Results ---");
    const entities = response.data.entities;
    if (entities && entities.length > 0) {
      console.table(entities.map(e => ({
        id: e['provision.administration.identifier']._value._current.value,
        specificType: e['provision.device.specificType'] ? e['provision.device.specificType']._value._current.value : 'N/A'
      })));
      console.log("Total entities found:", entities.length);
    } else {
      console.log("No entities match the criteria.");
    }
  } else {
    console.error("Search failed with status:", response.statusCode);
  }

} catch (err) {
  console.error("Error executing entity search:", err);
}

Custom Chart

Custom charts allow for the display of data in graphical format based on user-defined logic.

How it Works

Custom chart widget

Once the logic for data retrieval is entered, the data will be displayed on the widget.

What sets the custom chart apart from others is that the data source can be external, internal, both, or even fabricated. Moreover, multiple charts can be combined within the same widget.

This widget is compatible with eCharts library version 5. Multiple examples can be accessed via the following link: eCharts

Configuration

General

  • Boxed: widget will be displayed with background in dahsboard.
  • About: widget description in Markdown format.
  • Title: widget title. It can be configured to remain fixed in the widget or only be displayed when it receives focus.
  • Toolbar: configures the behavior of the widget bar on the dashboard, allowing you to hide it, hide it when not in use, or leave it always visible.
  • Refresh Frequency: allows configuring the data refresh frequency displayed in the list.
  • Extra actions: allows user to add new specific actions to the widget with your own code.

Extra action config

You can add a new one by pressing the New button.

Once you added a custom action it can be modified later by pressing the name in the list.

In order to remove the custom action click the delete icon button on the right.

In extra actions you can write your own code were you can open other dashboards, entities dashboards or execute wizards.

Extra action code

You can find all available functions and methods in Extra parameters

  • Show widget filters instructs the widget to display its filters. These filters will be passed as an additional parameter to the data retrieval function.
Custom chart code configuration

Here, you input the necessary code to obtain the information to be displayed.

Depending on the selected options, the parameters received by the function will be displayed.

The function must always return a JSON object that is compatible with eCharts’ chart configuration.

Every time the code is updated, it must be evaluated where a preview of the result can be seen.

Custom chart code preview

Function

Depending of the configuration receives the following parameters:

  • entityData contains the data of the opened entity NOTE: only available when the user opens an entity dashboard template

Example:

{
  "provision.administration.identifier": {
    "_value": {
      "_current": {
        "value": "device_1"
      }
    }
  },
  "provision.administration.organization": {
    "_value": {
      "_current": {
        "value": "organization_name"
      }
    }
  },
  "provision.administration.channel": {
    "_value": {
      "_current": {
        "value": "channel_name"
      }
    }
  },
  "provision.administration.serviceGroup": {
    "_value": {
      "_current": {
        "value": "service_group_name"
      }
    }
  }
}
  • relatedEntities contains an array of entities related to the entity selected. NOTE: only available when the user opens an entity dashboard template

Example:

[{
  "provision.administration.identifier": {
    "_value": {
      "_current": {
        "value": "related_1"
      }
    }
  },
  "provision.administration.organization": {
    "_value": {
      "_current": {
        "value": "organization_name"
      }
    }
  },
  "provision.administration.channel": {
    "_value": {
      "_current": {
        "value": "channel_name"
      }
    }
  },
  "provision.administration.serviceGroup": {
    "_value": {
      "_current": {
        "value": "service_group_name"
      }
    }
  }
}]
  • timeserieData contains info about the timeserie opened by the user
    • config timeserie configuration
    • data timeserie row selected

NOTE: only available when the user opens an entity dashboard template from timeserie table widget

An example:

{
  "config": {
    "identifier": "69281dc43545e97df66c42a1",
    "name": "Battery charge history",
    "timeBucket": 3600,
    "bucketColumn": "bucketEnd",
    "bucketInitColumn": "bucketInit",
    "identifierColumn": "EntityID",
    "retention": 2592000,
    "origin": "2025-11-26T23:00:00Z",
    "context": [
      {
        "path": "provision.device.administrativeState",
        "name": "Administrative state",
        "sort": "true",
        "filter": "YES",
        "type": "string"
      }
    ],
    "columns": [
      {
        "path": "device.powersupply.battery.charge._current.value",
        "name": "Powersupply battery charge Current Value",
        "filter": "NO",
        "type": "number",
        "sort": false,
        "aggregationFunction": "FIRST"
      }
    ]
  },
  "data": {
    "bucketEnd": "2025-12-11T13:00:00+01:00",
    "bucketInit": "2025-12-11T12:00:00+01:00",
    "EntityID": "entity_1",
    "Powersupply battery charge Current Value": 34
  }
}
  • alarmData contains the data of the alarm opened in template
{
  "identifier": "270dd9f9-1396-4660-bb5f-8d8b471e1dcd",
  "name": "activityForbidden",
  "rule": "activityForbidden",
  "description": "Activity detected for an entity with administrative state disabled",
  "severity": "INFORMATIVE",
  "priority": "LOW",
  "organization": "organization_name",
  "channel": "default_channel",
  "entityIdentifier": "A_WORKER_1",
  "subEntityIdentifier": "A_WORKER_1",
  "resourceType": "ENTITY_ASSET",
  "status": "CLOSED",
  "openingDate": "2019-06-27T08:57:36+02:00",
  "closureDate": "2019-06-27T08:57:51+02:00"
}
  • filters introduced by the user. These filters are:
    • generic widget generic filter
    • period widget date period filter
    • inherit json object with inherited filter if ‘shared filter’ is enabled. This filter is composed by ‘and’ filter that contains standar filter, private/template filter and headers filters from the source widget.

An example:

{
    "filters": {
        "generic": "filter introduced by the user",
        "period": {"from":"2023-03-27T10:59:27+02:00","to":null},
        "inherit": {
            "and": [
              { "eq": {"field.identifier._current.value": "value"}},
              { "eq": {"field2.identifier._current.value": "value2"}}
            ]
        }
    }
}
  • callback (optional) function used to send chart data (only when the api/http petitions are promised, use return instead)
callback(chartConfig);

or

callback({
  title: {
    text: 'Referer of a Website',
    subtext: 'Fake Data',
    left: 'center'
  },
  tooltip: {
    trigger: 'item'
  },
  legend: {
    orient: 'vertical',
    left: 'left'
  },
  series: [
    {
      name: 'Access From',
      type: 'pie',
      radius: '50%',
      data: [
        { value: 1048, name: 'Search Engine' },
        { value: 735, name: 'Direct' },
        { value: 580, name: 'Email' },
        { value: 484, name: 'Union Ads' },
        { value: 300, name: 'Video Ads' }
      ]
    }
  ]
});

or

return chartConfig;

Available utils

$api -> use it to create http petitions to OpenGate Api Rest doc

$user -> Logged user

Example:

{
    "email": "email@amplia.es",
    "workgroup": "workgroup",
    "domain": "domain",
    "profile": "profile",
    "countryCode": "ES",
    "langCode": "en",
    "timezone": "Europe/Madrid"
}

$moment -> use it to format date doc

console -> display messages in navigator console

Promise -> allows easy execution of multiple promises

http -> javascript encapsulation of useFetch (Nuxt 4) library doc

echarts -> echarts core library

ecStat -> echarts stats library

addChartEvent -> (event, handler[(event, chartInstance) => {}] [, query]) - adds an event handler doc

Final code structure build by the application

async function main(entityData,timeserieData,filters,page,pageElements,callback) {
  // YOUR CODE HERE WITH RETURN OR CALLBACK
}

Examples


Subsections of Custom Chart

Custom Chart Examples

Code

return {
  title: {
    text: 'Referer of a Website',
    subtext: 'Fake Data',
    left: 'center'
  },
  tooltip: {
    trigger: 'item'
  },
  legend: {
    orient: 'vertical',
    left: 'left'
  },
  series: [
    {
      name: 'Access From',
      type: 'pie',
      radius: '50%',
      data: [
        { value: 1048, name: 'Search Engine' },
        { value: 735, name: 'Direct' },
        { value: 580, name: 'Email' },
        { value: 484, name: 'Union Ads' },
        { value: 300, name: 'Video Ads' }
      ],
      emphasis: {
        itemStyle: {
          shadowBlur: 10,
          shadowOffsetX: 0,
          shadowColor: 'rgba(0, 0, 0, 0.5)'
        }
      }
    }
  ]
};

Custom HeatMap Chart Example

Code

const getDaysArray = function (start, end) {
  const arr = [];
  var curMonth;
  var monthData = {};
  var days = [];
  for (const dt = new Date(start); dt <= new Date(end); dt.setDate(dt.getDate() + 1)) {
    var curDate = new Date(dt);

    var newMonth = (curDate.getMonth() + 1) + '/' + curDate.getFullYear();

    if (curMonth && curMonth !== newMonth) {
      monthData = {
        value: curMonth,
        children: days
      };
      arr.push(monthData);
      days = [];
    }

    days.push(curDate.getDate() + '/' + (curDate.getMonth() + 1) + '/' + curDate.getFullYear());


    curMonth = newMonth;
  }

  if (days.length) {
    monthData = {
      value: curMonth,
      children: days
    };
    arr.push(monthData);
  }
  return arr;
};

const chartConfig = {
  visualMap: {
    type: 'continuous',
    min: 0,
    max: 1,
    dimension: 2,
    calculable: true,
    orient: 'horizontal',
    top: 5,
    left: 'center',
    color: ['#0f0', '#f00']
  },
  legend: {
    show: true,
    bottom: 10
  },
  matrix: {
    x: {
      data: [],
      levelSize: 40,
    },
    y: {
      label: {
        show: true,
        width: 150
      },
      levelSize: 150,
      data: []
    },
    top: 70,
    bottom: 40,
    left: 2,
    right: 2
  },
  series: {
    type: 'heatmap',
    coordinateSystem: 'matrix',
    data: [],
    label: {
      show: false
    }
  },
  tooltip: {
    show: true
  }
};

// busqueda de todas las entidades
var entitiesBuilder = $api.entitiesSearchBuilder().limit(1000, 1);
var entitiesFilter = {
  and: [{
    eq: {
      'provision.device.specificType': 'METER'
    }
  }]
};
if (filters && filters.generic) {
  entitiesFilter.and.push({
    eq: {
      'provision.administration.identifier': filters.generic
    }
  });
}

entitiesBuilder.filter(entitiesFilter);

const tempData = {};

var initDate = new Date(new Date().getDate() - 30);
var endDate = new Date();

var filter = {
  and: [{
    eq: {
      "datapoints.datastreamId": "volTot"
    }
  }]
};


if (filters && filters.period) {
  if (filters.period.from) {
    initDate = new Date(filters.period.from);
    filter.and.push({
      gte: {
        'datapoints._current.at': filters.period.from
      }
    });
  }

  if (filters.period.to) {
    endDate = new Date(filters.period.to);
    filter.and.push({
      lt: {
        'datapoints._current.at': filters.period.to
      }
    });
  }
}

chartConfig.matrix.x.data = getDaysArray(initDate, endDate);

var response = await entitiesBuilder.flattened().build().execute();

if (response && response.data && response.data.entities && response.data.entities.length > 0) {
  response.data.entities.forEach((entityDataTmp) => {
    const entityIdentifier = entityDataTmp['provision.administration.identifier']._value._current.value;

    if (!tempData[entityIdentifier]) {
      tempData[entityIdentifier] = [];

      chartConfig.matrix.x.data.forEach((monthData) => {
        monthData.children.forEach((dayData) => {
          tempData[entityIdentifier].push([dayData, entityIdentifier, 0]);
        });
      });
    }
  });
}


var builder = $api.datapointsSearchBuilder().limit(2000, 1).addSortBy('datapoints._current.at', 'DESCENDING');


builder.filter(filter).build().executeWithAsyncPaging('datapoints').then(
  function endFunction() {
    //drawChart(datapointsBuffer, true)
    chartConfig.matrix.y.data = Object.keys(tempData);

    let finalData = [];
    chartConfig.matrix.y.data.forEach((deviceId) => {
      finalData = finalData.concat(tempData[deviceId]);
    });
    chartConfig.series.data = finalData;
    callback(chartConfig);
  },
  function cancelado(err) {
    console.error(err);
    //drawChart(datapointsBuffer, true)
    callback(chartConfig);
  },
  function notify(notifyData) {
    if (notifyData && notifyData.length > 0) {
      notifyData.forEach((datapoint) => {
        if (!tempData[datapoint.entityIdentifier]) {
          tempData[datapoint.entityIdentifier] = [];

          chartConfig.matrix.x.data.forEach((monthData) => {
            monthData.children.forEach((dayData) => {
              tempData[datapoint.entityIdentifier].push([dayData, datapoint.entityIdentifier, 0]);
            });
          });
        }

        const currentAt = new Date(datapoint._current.at);
        const currentAtTxt = currentAt.getDate() + '/' + (currentAt.getMonth() + 1) + '/' + currentAt.getFullYear();
        const atIndex = tempData[datapoint.entityIdentifier].findIndex((element) => element[0] === currentAtTxt);
        tempData[datapoint.entityIdentifier][atIndex][2] = 1;
      });
    }
  }
).catch(function (err) {
  console.error(err);
});

Custom Table

Custom tables allow you to display data in a list format based on logic encoded by the user.

How it Works

Custom table widget

Once the logic for data retrieval is entered, the data will be displayed in the table.

What sets the custom table apart is that the data source can be external, internal, both, or even fabricated. Moreover, custom charts can be mixed in, and additional information can be included in the expandable panel.

Custom table expanded row

Configuration

General

  • Boxed: widget will be displayed with background in dahsboard.
  • About: widget description in Markdown format.
  • Title: widget title. It can be configured to remain fixed in the widget or only be displayed when it receives focus.
  • Toolbar: configures the behavior of the widget bar on the dashboard, allowing you to hide it, hide it when not in use, or leave it always visible.
  • Refresh Frequency: allows configuring the data refresh frequency displayed in the list.
  • Extra actions: allows user to add new specific actions to the widget with your own code.

Extra action config

You can add a new one by pressing the New button.

Once you added a custom action it can be modified later by pressing the name in the list.

In order to remove the custom action click the delete icon button on the right.

In extra actions you can write your own code were you can open other dashboards, entities dashboards or execute wizards.

Extra action code

You can find all available functions and methods in Extra parameters

  • Pagination type allows you to specify the kind of pagination you want. There may be no pagination, pagination handled by the table component (local), or server-side pagination.

If server-side pagination is chosen, the script will receive parameters like the number of elements and the page, allowing the user to decide.

  • Page elements specifies the number of elements to show per page.
  • Allow data grouping enables the table to group items by elements in a column.
  • Show widget filters instructs the widget to display its filters. These filters will be passed as an additional parameter to the data retrieval function.
  • Compact the size of the table rows will make the table rows more compact to save vertical space.
  • Expandable rows enables an information button for expanded data on each row. The code must fill this information, or an empty space will be displayed.
Custom table general configuration

Column Configuration

Custom table column configuration

The data that will be displayed in table. In order to finish the configuration for this you must add one column at least and select a primary key. For every column you can define the next data:

  • Name to show in headers
  • JSON field is the field to read in data returned by the function. Primary key use that field
  • Sortable permits sorting for this column
  • Groupable allow group by this field in table
  • Filterable allow filter by this field in table
  • Data type of the filter (only when filterable)
  • Divisor draws a separator between this column and the next
  • Show entity actions enables context menu for the column allowing to perform some actions depending of the item value.

Columns supports drag&drop in order to determine the position in the table.

Code Tab

This is where you input the necessary code to retrieve the data to be displayed.

Custom table code configuration

Depending on the options selected in the general tab, the parameters received by the function will be displayed.

The function must always return an array of JSON objects compatible with the specified configuration for the component to be able to render them.

Each time the code is updated, it must be evaluated where a preview of the result can be seen. Finally you MUST return an array with a json that matches the columns configuration.

Custom table code preview

Function

Depending of the configuration receives the following parameters:

  • entityData contains the data of the opened entity NOTE: only available when the user opens an entity dashboard template

Example:

{
  "provision.administration.identifier": {
    "_value": {
      "_current": {
        "value": "device_1"
      }
    }
  },
  "provision.administration.organization": {
    "_value": {
      "_current": {
        "value": "organization_name"
      }
    }
  },
  "provision.administration.channel": {
    "_value": {
      "_current": {
        "value": "channel_name"
      }
    }
  },
  "provision.administration.serviceGroup": {
    "_value": {
      "_current": {
        "value": "service_group_name"
      }
    }
  }
}
  • relatedEntities contains an array of entities related to the entity selected. NOTE: only available when the user opens an entity dashboard template

Example:

[{
  "provision.administration.identifier": {
    "_value": {
      "_current": {
        "value": "related_1"
      }
    }
  },
  "provision.administration.organization": {
    "_value": {
      "_current": {
        "value": "organization_name"
      }
    }
  },
  "provision.administration.channel": {
    "_value": {
      "_current": {
        "value": "channel_name"
      }
    }
  },
  "provision.administration.serviceGroup": {
    "_value": {
      "_current": {
        "value": "service_group_name"
      }
    }
  }
}]
  • timeserieData contains info about the timeserie opened by the user
    • config timeserie configuration
    • data timeserie row selected

NOTE: only available when the user opens an entity dashboard template from timeserie table widget

An example:

{
  "config": {
    "identifier": "69281dc43545e97df66c42a1",
    "name": "Battery charge history",
    "timeBucket": 3600,
    "bucketColumn": "bucketEnd",
    "bucketInitColumn": "bucketInit",
    "identifierColumn": "EntityID",
    "retention": 2592000,
    "origin": "2025-11-26T23:00:00Z",
    "context": [
      {
        "path": "provision.device.administrativeState",
        "name": "Administrative state",
        "sort": "true",
        "filter": "YES",
        "type": "string"
      }
    ],
    "columns": [
      {
        "path": "device.powersupply.battery.charge._current.value",
        "name": "Powersupply battery charge Current Value",
        "filter": "NO",
        "type": "number",
        "sort": false,
        "aggregationFunction": "FIRST"
      }
    ]
  },
  "data": {
    "bucketEnd": "2025-12-11T13:00:00+01:00",
    "bucketInit": "2025-12-11T12:00:00+01:00",
    "EntityID": "entity_1",
    "Powersupply battery charge Current Value": 34
  }
}
  • alarmData contains the data of the alarm opened in template
{
  "identifier": "270dd9f9-1396-4660-bb5f-8d8b471e1dcd",
  "name": "activityForbidden",
  "rule": "activityForbidden",
  "description": "Activity detected for an entity with administrative state disabled",
  "severity": "INFORMATIVE",
  "priority": "LOW",
  "organization": "organization_name",
  "channel": "default_channel",
  "entityIdentifier": "A_WORKER_1",
  "subEntityIdentifier": "A_WORKER_1",
  "resourceType": "ENTITY_ASSET",
  "status": "CLOSED",
  "openingDate": "2019-06-27T08:57:36+02:00",
  "closureDate": "2019-06-27T08:57:51+02:00"
}
  • filters introduced by the user. These filters are:
    • generic widget generic filter
    • period widget date period filter
    • column json object with each column filter
    • sort an array containing every sorted column with its direction sorted by user preferences
    • inherit json object with inherited filter if ‘shared filter’ is enabled. This filter is composed by ‘and’ filter that contains standar filter, private/template filter and headers filters from the source widget.

An example:

{
    "filters": {
        "generic": "filter introduced by the user",
        "period": {"from":"2023-03-27T10:59:27+02:00","to":null},
        "column": {
            [column value field]: {
                operator: "eq",
                value: "filter introduced by the user in colum"
            },
            [column value field]: {
                operator: "gt",
                value: "filter introduced by the user in colum"
            }
        },
        "sort": [
            {
                column: "column value field",
                direction: "asc" or "desc"
            },
            {
                column: "column value field",
                direction: "asc" or "desc"
            }
        ],
        "inherit": {
            "and": [
              { "eq": {"field.identifier._current.value": "value"}},
              { "eq": {"field2.identifier._current.value": "value2"}}
            ]
        }
    }
}
  • pageElements and page that determines the current page to display. Only enabled when server pagination enabled in table parameters. Disabling server pagination quits this parameters and function must be evaluated again.

  • callback function used to send table data only when the api/http petitions are promised

callback(data);

or

callback([{
  "field1": "value1",
  "field2": "value2"
}]);

Available utils

$api -> use it to create http petitions to OpenGate Api Rest doc

$user -> Logged user

Example:

{
    "email": "email@amplia.es",
    "workgroup": "workgroup",
    "domain": "domain",
    "profile": "profile",
    "countryCode": "ES",
    "langCode": "en",
    "timezone": "Europe/Madrid"
}

$moment -> use it to format date doc

console -> display messages in navigator console

Promise -> allows easy execution of multiple promises

http -> javascript encapsulation of useFetch (Nuxt 4) library doc

openDashboard -> (workspaceId, dashboardId, newPage) -> Opens the selected dashboard in selected workspace

openEntityDashboard -> (entityIdentifier[, organization[user if empty], resourceType[’entity.device’ if empty] , newPage]) -> Opens the entity’s temporary dashboard

Data format

Returned data must have one of the following formats (per item):

  • simple json data
{
    "jsonfield": "value to display. It can be HTML."
}
  • ‘complex’ json data
{
    "jsonfield": {
        "value": "value to display. It can be HTML",
        "_style": "cell custom style",
        "_chart": "displays an echarts chart. Overrides others in this item",
        "_extension": "jsonfield like (value, _style, _chart)  plus _table. Only enabled when expandable rows enabled"
    }
}

NOTE _extension field can combine _chart and _table elements in the same item

  • Element _chart Must have an echarts config json.

  • Element _table Displays a table inside the column and overrides others in this item.

{
    columns: ['each', 'item', 'is', 'a', 'column],
    data: [
        ['data 1', 'in', 'columns', 'order', { jsonfield (without _extension is supported) }],
        ['data 2', 'in', 'columns', 'order', { jsonfield (without _extension is supported) }]
    ]

}

Examples


Subsections of Custom Table

Custom Table Example

Code

function baState(value) {
  if (value) {
    var newValor;
    var style;
    var title;
    switch (value) {
      case "0":
        newValor = "(OK)🟢";
        style = 'color:green;';
        title = "Bateria OK";
        break;
      case "1":
        newValor = "(BAJA)🟡";
        style = 'color:yellow;';
        title = "Bateria BAJA";
        break;
      case "2":
        newValor = "(MUY BAJA)🟠";
        style = 'color:orange;';
        title = "Bateria MUY BAJA";
        break;
      case "3":
        newValor = "(AGOTADA)🔴";
        style = 'color:red;';
        title = "Bateria AGOTADA";
        break;
      default:
        newValor = "Error en el campo";
        break;
    }
    return {
      _style: style,
      value: "<div title='" + title + ">" + newValor + "</div>"
    };
  } else {
    return 'N/A';
  }
}

function bpaState(value) {
  var newValor;
  var title;
  var style;
  if (value) {
    switch (value) {
      case "0":
        newValor = "(OK)🟢";
        title = "Protección no activa";
        style = 'color:green;';
        break;
      case "1":
        newValor = "(ACTIVADA)🔴";
        title = "Protección activada";
        style = 'color:red;';

        break;
      default:
        newValor = "Error en el campo";
        break;
    }
    return {
      value: "<div title='" + title + "'>" + newValor + "</div>",
      _style: style
    };
  }
}

function boolState(value) {
  var newValor;
  var title;
  var style;
  if (value === true || value === false) {
    if (value) {
      newValor = "🔴";
      title = "TRUE";
      style = 'color:red;';
    } else {
      newValor = "🟢";
      title = "FALSE";
      style = 'color:green;';
    }
    return {
      value: "<div title='" + title + "'>" + newValor + "</div>",
      _style: style
    };
  }
}


console.log("--------------------------------------------");
var builder = $api.entitiesSearchBuilder().limit(1000).flattened();

var filter = {
  and: [
    {
      neq: {
        'provision.device.specificType': 'CONCENTRATOR'
      }
    }
  ]
};

if (entityData && entityData['provision.administration.identifier']) {
  var entityKey = entityData['provision.administration.identifier']._value._current.value;
  filter.and.push({
    eq: {
      'provision.Sector': entityKey
    }
  });
}

builder.filter(filter);

const response = await builder.build().execute();

var entities = [];
if (response.statusCode === 200) {
  response.data.entities.forEach(function (entityTmp) {
    var finalData;
    if (entityTmp['ba']) {
      finalData = {
        identifier: {
          value: entityTmp['provision.administration.identifier']._value._current.value,
          _style: 'margin-left: 4px;'
        }
      };
      finalData.tipo_alerta = 'Batería';
      finalData.estado = baState(entityTmp['ba']._value._current.value);
      finalData.fecha = new Date(entityTmp['ba']._value._current.at).toLocaleString();
      entities.push(finalData);
    }

    if (entityTmp['bpA']) {
      finalData = {
        identifier: {
          value: entityTmp['provision.administration.identifier']._value._current.value,
          _style: 'margin-left: 4px;'
        }
      };
      finalData.tipo_alerta = 'Protección Batería';
      finalData.estado = bpaState(entityTmp['bpA']._value._current.value);
      finalData.fecha =  new Date(entityTmp['bpA']._value._current.at).toLocaleString();
      entities.push(finalData);
    }

    if (entityTmp['ta']) {
      finalData = {
        identifier: {
          value: entityTmp['provision.administration.identifier']._value._current.value,
          _style: 'margin-left: 4px;'
        }
      };
      finalData.tipo_alerta = 'Tampering';
      finalData.estado = boolState(entityTmp['ta']._value._current.value);
      finalData.fecha = new Date( entityTmp['ta']._value._current.at).toLocaleString();
      entities.push(finalData);
    }

    if (entityTmp['fa']) {
      finalData = {
        identifier: {
          value: entityTmp['provision.administration.identifier']._value._current.value,
          _style: 'margin-left: 4px;'
        }
      };
      finalData.tipo_alerta = 'Fuga';
      finalData.estado = boolState(entityTmp['fa']._value._current.value);
      finalData.fecha =  new Date(entityTmp['fa']._value._current.at).toLocaleString();
      entities.push(finalData);
    }

  });
}

return entities;

External API (USGS Earthquakes)

Static content

This example demonstrates how to fetch data from the USGS Earthquake Hazards Program API. This service supports server-side date filtering, which aligns perfectly with the widget’s Period Filter.

Function Explanation

  1. Date Filtering: The code checks the filters.period object.
    • If from and to are present, they are formatted to ISO 8601 strings (YYYY-MM-DD) and sent as starttime and endtime parameters.
    • If no period is selected, it defaults to the last 24 hours.
  2. Name/Text Filtering: The filters.generic (search text) is used to filter the results client-side (searching within the place field), as the API does not support a direct “text search” parameter for this endpoint.

Code

// Main function executed by the Custom Table widget
// parameters: entityData, filters, page, pageElements, callback

// Base URL for USGS Earthquake API (GeoJSON format)
let url = 'https://earthquake.usgs.gov/fdsnws/event/1/query?format=geojson&limit=200';

// 1. Handle Date Filters (Server-Side)
if (filters && filters.period && filters.period.from && filters.period.to) {
  // Helper to format date as YYYY-MM-DD
  const formatDate = (dateStr) => new Date(dateStr).toISOString().split('T')[0];
  
  const start = formatDate(filters.period.from);
  const end = formatDate(filters.period.to);
  
  url += `&starttime=${start}&endtime=${end}`;
} else {
  // Default to 'now' if no filter (API defaults to last 30 days usually, let's limit to recent)
  // Actually, let's explicitely ask for last 2 days to keep data manageable if no filter
  // But for simplicity, we rely on the API defaults or a 'limit' param already added above.
}

try {
  // 2. Fetch Data
  const response = await http(url);
  
  let features = [];
  if (response && response.features) {
      features = response.features;
  } else if (response && response.json) {
      const json = await response.json();
      features = json.features || [];
  }

  // 3. Handle Name/Text Filter (Client-Side)
  // filtering by 'place' property
  if (filters && filters.generic && filters.generic.length > 0) {
    const search = filters.generic.toLowerCase();
    features = features.filter(f => 
      f.properties.place && f.properties.place.toLowerCase().includes(search)
    );
  }

  // 4. Map to Table Columns
  // Configured Columns hint: 'place', 'magnitude', 'time', 'status'
  const tableData = features.map(f => {
    const props = f.properties;
    const dateObj = new Date(props.time);
    
    // Determine color based on magnitude
    let magColor = 'green';
    if (props.mag >= 5) magColor = 'red';
    else if (props.mag >= 3) magColor = 'orange';

    return {
      place: props.place,
      magnitude: {
          value: props.mag ? props.mag.toFixed(1) : '0.0',
          _style: `font-weight:bold; color: ${magColor};`
      },
      time: dateObj.toLocaleString(),
      status: `<a href="${props.url}" target="_blank">Ver Detalles</a>`
    };
  });

  callback(tableData);

} catch (error) {
  console.error("Error fetching earthquake data:", error);
  callback([]);
}

Filtered Entity Retrieval

Description

This example shows how to retrieve entities filtering by a parameter and sorting by name.

Code

/**
 * Main function to retrieve and display entities
 * @param {Object} entityData - Context entity data
 * @param {Object} filters - Filters passed from the widget
 */

var builder = $api.entitiesSearchBuilder().limit(100).flattened();

// 1. Filter by parameter (assuming it comes in filters.generic or a specific field)
// Here we assume filters.generic contains a string to filter by name
if (filters && filters.generic) {
    builder.filter({
        like: {
            'provision.asset.name': filters.generic // Adjust field as needed (e.g., provision.device.name)
        }
    });
}

// 2. Sort by name
builder.sort([
    {
        column: 'provision.asset.name',
        direction: 'asc'
    }
]);

// 3. Execute query
var response = await builder.build().execute();

// 4. Transform results
var results = [];
if (response && response.data && response.data.entities) {
    response.data.entities.forEach(function(entity) {
            // Extract identifier (using bracket notation for flattened keys)
        var id = entity['provision.administration.identifier'] ? entity['provision.administration.identifier']._value._current.value : "Unknown";
        
        // Extract name (handle if it doesn't exist)
        var name = "N/A";
        if (entity['provision.asset.name']) {
            name = entity['provision.asset.name']._value._current.value;
        }

        results.push({
            identifier: id,
            name: name
        });
    });
}

return results;

Server Pagination Example (Reqres)

Static content

This example demonstrates how to implement server-side pagination using an external API (reqres.in). When “Server Pagination” is enabled in the widget configuration, the script receives page and pageElements parameters.

Function Explanation

  1. Page Parameters: The page and pageElements arguments act as the current page number and the page size (limit), respectively.
  2. API Request: The code constructs a request to reqres.in passing page and per_page query parameters.
  3. Callback: The function processes the response and sends the array of users to the widget via the callback.

Code

// Main function executed by the Custom Table widget
// parameters: entityData, filters, page, pageElements, callback

// 1. Prepare Pagination Parameters
// Ensure we have defaults if arguments are missing (safeguard)
const currentPage = page || 1;
const perPage = pageElements || 5;

// 2. Construct URL with pagination params
// reqres.in uses 'page' (1-based) and 'per_page'
const url = `https://reqres.in/api/users?page=${currentPage}&per_page=${perPage}`;

try {
  // 3. Fetch Data
  const response = await http(url);
  
  // 4. Extract Data
  // reqres.in returns: { page: 1, per_page: 6, total: 12, total_pages: 2, data: [...] }
  let users = [];
  
  // Check various response wrappers as 'http' might auto-parse JSON
  if (response && response.data && Array.isArray(response.data)) {
      users = response.data;
  } else if (response && response.json) {
      const json = await response.json();
      users = json.data || [];
  } else if (response && Array.isArray(response)) {
      users = response;
  }

  // 5. Format for Table
  // Configured Columns hint: 'id', 'avatar', 'first_name', 'last_name'
  const tableData = users.map(user => {
    return {
      id: user.id,
      avatar: `<img src="${user.avatar}" style="width: 30px; border-radius: 50%;">`,
      first_name: user.first_name,
      last_name: user.last_name,
      email: user.email
    };
  });

  // 6. Return Data
  // We return the array of items for the current page.
  callback(tableData);

} catch (error) {
  console.error("Error fetching paged data:", error);
  callback([]);
}

Battery Level Pie Chart

Description

This example shows how to retrieve entities and display their battery level as a Pie Chart within the table row.

Code

var builder = $api.entitiesSearchBuilder().limit(100).flattened();

// Handle generic filter if present
if (filters && filters.generic) {
    builder.filter({
        like: {
            'provision.administration.identifier': filters.generic
        }
    });
}

var response = await builder.build().execute();

var results = [];
if (response && response.data && response.data.entities) {
    response.data.entities.forEach(function(entity) {
        // Get identifier
        var id = entity['provision.administration.identifier'] ? entity['provision.administration.identifier']._value._current.value : "Unknown";
        
        // Get battery charge (default to 0 if not present)
        var charge = 0;
        if (entity['device.powersupply.battery.charge']) {
            charge = entity['device.powersupply.battery.charge']._value._current.value;
        }

        // Create the chart configuration
        var pieOption = {
            color: ['#91c7ae', '#c23531'],
            series: [
                {
                    type: 'pie',
                    radius: ['50%', '70%'],
                    avoidLabelOverlap: false,
                    label: {
                        show: false,
                        position: 'center'
                    },
                    emphasis: {
                        label: {
                            show: true,
                            fontSize: '10',
                            fontWeight: 'bold'
                        }
                    },
                    labelLine: {
                        show: false
                    },
                    data: [
                        { value: charge, name: 'Charge' },
                        { value: 100 - charge, name: 'Empty' }
                    ]
                }
            ]
        };

        results.push({
            identifier: id,
            battery: {
                "_chart": pieOption,
                "_style": "height: 50px; width: 50px;" // Optional styling for the cell
            }
        });
    });
}

return results;

Open HMI/Custom Image

Programmable HMIs allow for the construction and modification of the interface.

How it Works

Open HMI widget

Once the logic for data retrieval and SVG painting/modification has been entered, it will be displayed on the widget.

What distinguishes this widget from the original HMI is that data sources can be external, and the widget’s content is built/modified through coding.

Configuration

General

  • Boxed: widget will be displayed with background in dahsboard.
  • About: widget description in Markdown format.
  • Title: widget title. It can be configured to remain fixed in the widget or only be displayed when it receives focus.
  • Toolbar: configures the behavior of the widget bar on the dashboard, allowing you to hide it, hide it when not in use, or leave it always visible.
  • Refresh Frequency: allows configuring the data refresh frequency displayed in the list.
  • Extra actions: allows user to add new specific actions to the widget with your own code.

Extra action config

You can add a new one by pressing the New button.

Once you added a custom action it can be modified later by pressing the name in the list.

In order to remove the custom action click the delete icon button on the right.

In extra actions you can write your own code were you can open other dashboards, entities dashboards or execute wizards.

Extra action code

You can find all available functions and methods in Extra parameters

  • SVG Content allows you to input the source code of an SVG as a starting point. The SVG content can be manipulated with the svgDom object of the editor. Content can either be entered directly or by selecting a file.
  • CSS Content allows you to apply styles to the SVG. Content can be entered directly or by selecting a file.
  • Preview shows a live preview resulting from the combination of the previously entered values, without running any code.
Open HMI general configuration

Code Tab

This is where you enter the code required for SVG manipulation. It is not necessary to enter code, but you must at least return the svgDom object for it to be able to render.

Open HMI code configuration

For SVG manipulation, standard HTML manipulation libraries will be used. Interactions can also be added to the SVG itself to integrate it with the platform’s data, linking it to device data and providing access to it.

Every time the code is updated, it must be evaluated, where a preview of the result will be shown. For this preview, the entered code is indeed evaluated, so the outcome will vary based on its execution.

Open HMI code preview

Available utils

$api -> use it to create http petitions to OpenGate Api Rest doc

$user -> Logged user

Example:

{
    "email": "email@amplia.es",
    "workgroup": "workgroup",
    "domain": "domain",
    "profile": "profile",
    "countryCode": "ES",
    "langCode": "en",
    "timezone": "Europe/Madrid"
}

$moment -> use it to format date doc

console -> display messages in navigator console

Promise -> allows easy execution of multiple promises

http -> javascript encapsulation of useFetch (Nuxt 4) library doc

alert -> javascript alert function

document -> javascript document object

domParser -> javascript DOMParser object

showPopup -> shows options for the selected entity: showPopup(entityId[,datastreamId])

Function

Depending of the configuration receives the following parameters:

  • entityData contains the data of the opened entity NOTE: only available when the user opens an entity dashboard template

Example:

{
  "provision.administration.identifier": {
    "_value": {
      "_current": {
        "value": "device_1"
      }
    }
  },
  "provision.administration.organization": {
    "_value": {
      "_current": {
        "value": "organization_name"
      }
    }
  },
  "provision.administration.channel": {
    "_value": {
      "_current": {
        "value": "channel_name"
      }
    }
  },
  "provision.administration.serviceGroup": {
    "_value": {
      "_current": {
        "value": "service_group_name"
      }
    }
  }
}
  • relatedEntities contains an array of entities related to the entity selected. NOTE: only available when the user opens an entity dashboard template

Example:

[{
  "provision.administration.identifier": {
    "_value": {
      "_current": {
        "value": "related_1"
      }
    }
  },
  "provision.administration.organization": {
    "_value": {
      "_current": {
        "value": "organization_name"
      }
    }
  },
  "provision.administration.channel": {
    "_value": {
      "_current": {
        "value": "channel_name"
      }
    }
  },
  "provision.administration.serviceGroup": {
    "_value": {
      "_current": {
        "value": "service_group_name"
      }
    }
  }
}]
  • timeserieData contains info about the timeserie opened by the user
    • config timeserie configuration
    • data timeserie row selected

NOTE: only available when the user opens an entity dashboard template from timeserie table widget

An example:

{
  "config": {
    "identifier": "69281dc43545e97df66c42a1",
    "name": "Battery charge history",
    "timeBucket": 3600,
    "bucketColumn": "bucketEnd",
    "bucketInitColumn": "bucketInit",
    "identifierColumn": "EntityID",
    "retention": 2592000,
    "origin": "2025-11-26T23:00:00Z",
    "context": [
      {
        "path": "provision.device.administrativeState",
        "name": "Administrative state",
        "sort": "true",
        "filter": "YES",
        "type": "string"
      }
    ],
    "columns": [
      {
        "path": "device.powersupply.battery.charge._current.value",
        "name": "Powersupply battery charge Current Value",
        "filter": "NO",
        "type": "number",
        "sort": false,
        "aggregationFunction": "FIRST"
      }
    ]
  },
  "data": {
    "bucketEnd": "2025-12-11T13:00:00+01:00",
    "bucketInit": "2025-12-11T12:00:00+01:00",
    "EntityID": "entity_1",
    "Powersupply battery charge Current Value": 34
  }
}
  • alarmData contains the data of the alarm opened in template
{
  "identifier": "270dd9f9-1396-4660-bb5f-8d8b471e1dcd",
  "name": "activityForbidden",
  "rule": "activityForbidden",
  "description": "Activity detected for an entity with administrative state disabled",
  "severity": "INFORMATIVE",
  "priority": "LOW",
  "organization": "organization_name",
  "channel": "default_channel",
  "entityIdentifier": "A_WORKER_1",
  "subEntityIdentifier": "A_WORKER_1",
  "resourceType": "ENTITY_ASSET",
  "status": "CLOSED",
  "openingDate": "2019-06-27T08:57:36+02:00",
  "closureDate": "2019-06-27T08:57:51+02:00"
}
  • svgDom DOMElement object that contains the root element of the SVG (this object always will be a clean svg element)

If SVG content not filled in configuration you may consider that default viewPort for svg will be: 0 0 100 100 (upgradable)

Every svg will be setted with width and height to 100% and auto respectively

  • callback function used to return data when the api/http petitions are promised. Use “return” if not using promises.

Example:

callback(svgDom);

or

return svgDom;
Final code structure build by the application
async function main(entityData,alarmData,relatedEntities,timeserieData,svgDom,callback) {
  // YOUR CODE HERE WITH RETURN OR CALLBACK
}

Examples


Subsections of Open HMI/Custom Image

Time-based SVG

Code

// Determine shape and color based on current milliseconds
const now = new Date();
const milliseconds = now.getMilliseconds();

// If milliseconds is even, draw a green circle. Else, a crimson rectangle.
const isEven = milliseconds % 2 === 0;
const color = isEven ? 'green' : 'crimson';
const shapeType = isEven ? 'circle' : 'rect';

console.log(`Milliseconds: ${milliseconds}. Drawing ${color} ${shapeType}.`);

try {
    // 1. Clear existing SVG content
    while (svgDom.firstChild) {
        svgDom.removeChild(svgDom.firstChild);
    }

    // 2. Create the new geometric shape
    const shape = document.createElementNS("http://www.w3.org/2000/svg", shapeType);

    if (shapeType === 'circle') {
        shape.setAttribute('cx', '50');
        shape.setAttribute('cy', '50');
        shape.setAttribute('r', '40');
    } else {
        shape.setAttribute('x', '10');
        shape.setAttribute('y', '10');
        shape.setAttribute('width', '80');
        shape.setAttribute('height', '80');
    }

    shape.setAttribute('fill', color);
    shape.setAttribute('stroke', 'black');
    shape.setAttribute('stroke-width', '2');

    // 3. Add text label
    const text = document.createElementNS("http://www.w3.org/2000/svg", "text");
    text.setAttribute('x', '50');
    text.setAttribute('y', '50');
    text.setAttribute('dominant-baseline', 'middle');
    text.setAttribute('text-anchor', 'middle');
    text.setAttribute('fill', 'white');
    text.setAttribute('font-family', 'Arial');
    text.setAttribute('font-size', '12');
    text.textContent = `ms: ${milliseconds}`;

    // 4. Append elements to SVG
    svgDom.appendChild(shape);
    svgDom.appendChild(text);

} catch (err) {
    console.error("Error in Open HMI script:", err);
    
    // Fallback display in SVG
    const text = document.createElementNS("http://www.w3.org/2000/svg", "text");
    text.setAttribute('x', '10');
    text.setAttribute('y', '20');
    text.setAttribute('fill', 'red');
    text.textContent = "Error executing script";
    svgDom.appendChild(text);
}

// Return the modified DOM
return svgDom;

Browsers

Subsections of Browsers

Certificates Browser

The certificate browser allows you to view/manage the different certificates available to my organization.

How it works

From the browser, you can view the certificates provided by Opengate as well as those managed directly by my organization.

Certificates Browser

Widget Menu

Certificates Browser Actions

From the action menu of the widget, you can perform the following:

  • New certificate: launches the certificate configuration wizard as long as you have the necessary permissions.
  • Capture screen: Takes a screenshot of the widget.
  • Duplicate widget: Creates a duplicate of the widget on the dashboard.
  • Copy widget: Copies the widget to another dashboard.
  • Change widget location: Moves the widget to another dashboard.

Certificate Details

Certificate Details

To view the details of a certificate, clicking on the arrow located to the right of each will enable the details panel.

Actions per Certificate

Certificate Actions

The following are the possible actions to perform for each of the organization’s own certificates.

  • Download allows you to download the selected certificate
  • Edit enables the editing of a certificate, including uploading an updated version of it
  • Delete deletes the selected certificate

Configuration

General

  • Boxed: widget will be displayed with background in dahsboard.
  • About: widget description in Markdown format.
  • Title: widget title. It can be configured to remain fixed in the widget or only be displayed when it receives focus.
  • Toolbar: configures the behavior of the widget bar on the dashboard, allowing you to hide it, hide it when not in use, or leave it always visible.
  • Refresh Frequency: allows configuring the data refresh frequency displayed in the list.
  • Extra actions: allows user to add new specific actions to the widget with your own code.

Extra action config

You can add a new one by pressing the New button.

Once you added a custom action it can be modified later by pressing the name in the list.

In order to remove the custom action click the delete icon button on the right.

In extra actions you can write your own code were you can open other dashboards, entities dashboards or execute wizards.

Extra action code

You can find all available functions and methods in Extra parameters


Configured Operations Navigator

The Operation Types browser allows you to view and manage the operations that have been configured for your organization.

How it Works

Each of the configured operations will be displayed in the browser along with some details about them, such as the type of operation and the types of entities to which they apply.

Operation Types Browser

Widget Menu

Operation Types Browser Actions

From the action menu of the widget, it will be possible to do the following:

  • Operations wizard: allows you to run the creation wizard for a new type of operation (provided you have the necessary permissions).
  • Capture screen: Takes a screenshot of the widget.
  • Duplicate widget: Creates a duplicate of the widget on the dashboard.
  • Copy widget: Copies the widget to another dashboard.
  • Change widget location: Moves the widget to another dashboard.

Actions by Operation Type

Operation Type Actions

The following are the possible actions that can be performed for each of the configured operations:

  • Edit: Opens the operation configurator to change various parameters.
  • Remove: Deletes the selected operation.

Configuration

General

  • Boxed: widget will be displayed with background in dahsboard.
  • About: widget description in Markdown format.
  • Title: widget title. It can be configured to remain fixed in the widget or only be displayed when it receives focus.
  • Toolbar: configures the behavior of the widget bar on the dashboard, allowing you to hide it, hide it when not in use, or leave it always visible.
  • Refresh Frequency: allows configuring the data refresh frequency displayed in the list.
  • Extra actions: allows user to add new specific actions to the widget with your own code.

Extra action config

You can add a new one by pressing the New button.

Once you added a custom action it can be modified later by pressing the name in the list.

In order to remove the custom action click the delete icon button on the right.

In extra actions you can write your own code were you can open other dashboards, entities dashboards or execute wizards.

Extra action code

You can find all available functions and methods in Extra parameters


Connector functions browser

In this widget, you will find the connector functions configured for your organization.

How it works

Connector Functions Browser

In the browser, you will find a list of connector functions along with the actions available for each one, depending on the permissions you have.

Next to the name, you can find the type of connector function as well as its operational status.

By pressing expand button you can see criteria selectors for each item.

Widget Menu

Connector Functions Browser Actions

From the action menu of the widget, it will be possible to do the following:

  • New connector function: allows you to run the creation wizard for connector functions (provided you have the necessary permissions).
  • Capture screen: Takes a screenshot of the widget.
  • Duplicate widget: Creates a duplicate of the widget on the dashboard.
  • Copy widget: Copies the widget to another dashboard.
  • Change widget location: Moves the widget to another dashboard.

Channel Selector

A user can manage connector functions for those channels that are dependent on the user’s organization. To switch between channels, you can use the selector available at the top of the widget.

Actions on Connector Functions

Connector Functions Browser Connector Functions Actions

For each connector function, you can perform the following actions:

  • Logger: opens a new window showing execution logs for the connector function.
  • Edit: opens the editing wizard to change the parameters of the element.
  • Clone: opens the creation wizard with a copy of the element’s data.
  • Delete: removes the element.
  • Expand: toggle criteria selectors display.

Configuration

General

  • Boxed: widget will be displayed with background in dahsboard.
  • About: widget description in Markdown format.
  • Title: widget title. It can be configured to remain fixed in the widget or only be displayed when it receives focus.
  • Toolbar: configures the behavior of the widget bar on the dashboard, allowing you to hide it, hide it when not in use, or leave it always visible.
  • Refresh Frequency: allows configuring the data refresh frequency displayed in the list.
  • Extra actions: allows user to add new specific actions to the widget with your own code.

Extra action config

You can add a new one by pressing the New button.

Once you added a custom action it can be modified later by pressing the name in the list.

In order to remove the custom action click the delete icon button on the right.

In extra actions you can write your own code were you can open other dashboards, entities dashboards or execute wizards.

Extra action code

You can find all available functions and methods in Extra parameters


Data models Browser

From the data models browser, you can view/modify the data models of your organization, allowing for customization of entity data on the platform.

How it Works

Data Models Browser

Widget Menu

Data Models Browser Actions

The following actions can be performed directly from the widget:

  • New Datamodel: Launches the data models configuration wizard, provided the necessary permissions are available.
  • Editable/All: Toggles between displaying all data models (both inherited from catalog and own) or only the editable ones (those owned by you, which can be deleted).
  • Capture screen: Takes a screenshot of the widget.
  • Duplicate widget: Creates a duplicate of the widget on the dashboard.
  • Copy widget: Copies the widget to another dashboard.
  • Change widget location: Moves the widget to another dashboard.

Data Model Details

Data Model Tree

To view the data streams of a data model, click on the arrow located to the right of each one to enable the navigation panel. The first level will display the categories followed by the data streams assigned to each of them.

Actions per Data Model

Data Model Actions

The following are the possible actions that can be performed for each of the organization’s own data models:

  • Download: Allows downloading of the selected data model.
  • Edit: Enables editing of a data model.
  • Remove: Deletes the selected data model (only those that are not inherited).

Configuration

Data Model Configuration

General

  • Boxed: widget will be displayed with background in dahsboard.
  • About: widget description in Markdown format.
  • Title: widget title. It can be configured to remain fixed in the widget or only be displayed when it receives focus.
  • Toolbar: configures the behavior of the widget bar on the dashboard, allowing you to hide it, hide it when not in use, or leave it always visible.
  • Refresh Frequency: allows configuring the data refresh frequency displayed in the list.
  • Extra actions: allows user to add new specific actions to the widget with your own code.

Extra action config

You can add a new one by pressing the New button.

Once you added a custom action it can be modified later by pressing the name in the list.

In order to remove the custom action click the delete icon button on the right.

In extra actions you can write your own code were you can open other dashboards, entities dashboards or execute wizards.

Extra action code

You can find all available functions and methods in Extra parameters

  • Items Per Page: Indicates the number of data models that will be displayed per page while navigating.
  • Search by All Organizations: When enabled, the widget will display all data models from all my organizations.

Data sets Browser

In this widget, you will find the data sets configured for your organization.

How it Works

Data Sets Browser

In the browser, you will find a list of data sets along with the available actions for each, based on the permissions you have.

Widget Menu

Data Sets Browser Actions

From the action menu of the widget, you can perform the following:

  • New Data Set: This allows you to run the data set creation wizard (provided you have the necessary permissions).
  • Capture screen: Takes a screenshot of the widget.
  • Duplicate widget: Creates a duplicate of the widget on the dashboard.
  • Copy widget: Copies the widget to another dashboard.
  • Change widget location: Moves the widget to another dashboard.

Organization Selector

A user can manage the data sets for those organizations that are dependent on the user’s own organization. To switch between organizations, you must select it from the selector available at the top of the widget.

Actions on Data Set

Data Sets Browser Data Set Actions

For each data set, you can perform the following actions:

  • View Data: This will open a list widget where you can view the data of the selected data set.
  • Edit: Allows you to initiate a data set update wizard with the configuration data of the current one.
  • Clone: Allows you to initiate a data set creation wizard with the configuration data of the current one.
  • Columns: Displays, within the widget itself, the columns configured for the data set.
  • Delete: Removes the selected data set and all its associated data.

Configuration

General

  • Boxed: widget will be displayed with background in dahsboard.
  • About: widget description in Markdown format.
  • Title: widget title. It can be configured to remain fixed in the widget or only be displayed when it receives focus.
  • Toolbar: configures the behavior of the widget bar on the dashboard, allowing you to hide it, hide it when not in use, or leave it always visible.
  • Refresh Frequency: allows configuring the data refresh frequency displayed in the list.
  • Extra actions: allows user to add new specific actions to the widget with your own code.

Extra action config

You can add a new one by pressing the New button.

Once you added a custom action it can be modified later by pressing the name in the list.

In order to remove the custom action click the delete icon button on the right.

In extra actions you can write your own code were you can open other dashboards, entities dashboards or execute wizards.

Extra action code

You can find all available functions and methods in Extra parameters


Device Plans Browser

In this widget, you can navigate through different device plans within your organization. Actions can be performed on each of the identifying elements within each organization.

How it Works

By selecting an organization, the plans belonging to it will be displayed in the browser, showing some details about them.

Device Plans Browser

Widget Menu

Device Plans Actions

From the widget’s action menu, you can perform the following:

  • New Device Plan: Allows the execution of the wizard for creating a new plan (provided the necessary permissions are available).
  • Capture screen: Takes a screenshot of the widget.
  • Duplicate widget: Creates a duplicate of the widget on the dashboard.
  • Copy widget: Copies the widget to another dashboard.
  • Change widget location: Moves the widget to another dashboard.

Device Plans Actions

Device Plans Actions

The following are the actions that can be performed on each plan:

  • Edit: Opens device plans wizard in order to edit the selected plan.
  • Clone: Opens device plans wizard in order to clone the selected plan.
  • Remove: Removes the selected plan.

Configuration

General

  • Boxed: widget will be displayed with background in dahsboard.
  • About: widget description in Markdown format.
  • Title: widget title. It can be configured to remain fixed in the widget or only be displayed when it receives focus.
  • Toolbar: configures the behavior of the widget bar on the dashboard, allowing you to hide it, hide it when not in use, or leave it always visible.
  • Refresh Frequency: allows configuring the data refresh frequency displayed in the list.
  • Extra actions: allows user to add new specific actions to the widget with your own code.

Extra action config

You can add a new one by pressing the New button.

Once you added a custom action it can be modified later by pressing the name in the list.

In order to remove the custom action click the delete icon button on the right.

In extra actions you can write your own code were you can open other dashboards, entities dashboards or execute wizards.

Extra action code

You can find all available functions and methods in Extra parameters


Entities Software Browser

Here, you can consult and/or manage the software of your organizations.

How it Works

Organization Software Widget

Widget Menu

Organization Software Actions

From the action menu of the widget, it will be possible to do the following:

  • New software: allows you to run the creation wizard for organization software (provided you have the necessary permissions).
  • Capture screen: Takes a screenshot of the widget.
  • Duplicate widget: Creates a duplicate of the widget on the dashboard.
  • Copy widget: Copies the widget to another dashboard.
  • Change widget location: Moves the widget to another dashboard.

Actions by Software

Organization Software item Actions

The following are the possible actions to be taken for each software:

  • Edit: Opens the organization software wizard where you can change the software details.
  • Remove: Deletes the selected software. This action allows you to delete references in devices by selecting “Delete all”. Another confirmation popup will be opened.

Configuration

General

  • Boxed: widget will be displayed with background in dahsboard.
  • About: widget description in Markdown format.
  • Title: widget title. It can be configured to remain fixed in the widget or only be displayed when it receives focus.
  • Toolbar: configures the behavior of the widget bar on the dashboard, allowing you to hide it, hide it when not in use, or leave it always visible.
  • Refresh Frequency: allows configuring the data refresh frequency displayed in the list.
  • Extra actions: allows user to add new specific actions to the widget with your own code.

Extra action config

You can add a new one by pressing the New button.

Once you added a custom action it can be modified later by pressing the name in the list.

In order to remove the custom action click the delete icon button on the right.

In extra actions you can write your own code were you can open other dashboards, entities dashboards or execute wizards.

Extra action code

You can find all available functions and methods in Extra parameters

  • Items per Page: Configures the number of software items to be displayed per page.
Organization Software Configuration

Image Execution Scheduler Browser

The Image Execution Scheduler Browser allows you to view/manage the image execution schedulers configured in your organization.

How it Works

Each image execution scheduler will be displayed in the browser, showing some details about them such as the type of image execution scheduler and the configuration mode used.

Image Execution Scheduler Browser

Widget Menu

Image Execution Scheduler Actions

From the widget’s action menu, you can perform the following:

  • Executions history: Shows the executions history for all image execution scheduled.
  • Image Execution Scheduler wizard: Allows the execution of the wizard for creating a new image execution scheduler (provided the necessary permissions are available).
  • Capture screen: Takes a screenshot of the widget.
  • Duplicate widget: Creates a duplicate of the widget on the dashboard.
  • Copy widget: Copies the widget to another dashboard.
  • Change widget location: Moves the widget to another dashboard.

Actions per Image Execution Scheduler

Image Execution Scheduler Actions

The following are the possible actions to be performed for each of the schedulers:

  • History opens image execution executions history in a modal.
  • Clone will open the image execution scheduler wizard for creating a new image execution scheduler that will contain the configuration of the selected one.
  • Remove deletes the selected scheduler.

Configuration

General

  • Boxed: widget will be displayed with background in dahsboard.
  • About: widget description in Markdown format.
  • Title: widget title. It can be configured to remain fixed in the widget or only be displayed when it receives focus.
  • Toolbar: configures the behavior of the widget bar on the dashboard, allowing you to hide it, hide it when not in use, or leave it always visible.
  • Refresh Frequency: allows configuring the data refresh frequency displayed in the list.
  • Extra actions: allows user to add new specific actions to the widget with your own code.

Extra action config

You can add a new one by pressing the New button.

Once you added a custom action it can be modified later by pressing the name in the list.

In order to remove the custom action click the delete icon button on the right.

In extra actions you can write your own code were you can open other dashboards, entities dashboards or execute wizards.

Extra action code

You can find all available functions and methods in Extra parameters


Manufacturers and Models Browser

Here, you can consult and/or manage the manufacturers and models on the platform.

How it Works

Manufacturers and Models Widget

Widget Menu

Manufacturers and Models Actions

From the action menu of the widget, it will be possible to do the following:

  • New manufacturer: allows you to run the creation wizard for manufacturer (provided you have the necessary permissions).
  • New model: allows you to run the creation wizard for manufacturer model (provided you have the necessary permissions).
  • Capture screen: Takes a screenshot of the widget.
  • Duplicate widget: Creates a duplicate of the widget on the dashboard.
  • Copy widget: Copies the widget to another dashboard.
  • Change widget location: Moves the widget to another dashboard.

Any changes made will affect all organizations; therefore, maintenance is restricted to platform administrators.

Actions by Manufacturer

Manufacturers and Models Actions

The following are the possible actions to be taken for each manufacturer:

  • Images: If the manufacturer has attached images, this option will be displayed to view them in full screen.
  • New Model: Opens the model creation wizard with the selected manufacturer pre-filled.
  • Edit: Opens the manufacturer wizard where you can change the manufacturer’s details.
  • Remove: Deletes the selected manufacturer as well as all the models associated with it.

By clicking the expand button, you can see the manufacturer’s details as well as a list of all available models, if any exist.

Actions by Model

Manufacturers and Models Model Actions

The following are the possible actions for each of the available models for the manufacturer:

  • Change Manufacturer: Allows you to directly move the model to another manufacturer.
  • Edit: Opens the model configuration wizard to change its parameters.
  • Remove: Deletes the selected item.

Configuration

General

  • Boxed: widget will be displayed with background in dahsboard.
  • About: widget description in Markdown format.
  • Title: widget title. It can be configured to remain fixed in the widget or only be displayed when it receives focus.
  • Toolbar: configures the behavior of the widget bar on the dashboard, allowing you to hide it, hide it when not in use, or leave it always visible.
  • Refresh Frequency: allows configuring the data refresh frequency displayed in the list.
  • Extra actions: allows user to add new specific actions to the widget with your own code.

Extra action config

You can add a new one by pressing the New button.

Once you added a custom action it can be modified later by pressing the name in the list.

In order to remove the custom action click the delete icon button on the right.

In extra actions you can write your own code were you can open other dashboards, entities dashboards or execute wizards.

Extra action code

You can find all available functions and methods in Extra parameters

  • Items per Page: Configures the number of manufacturers to be displayed per page.
Manufacturers and Models Code Configuration

Notebooks scheduler

The notebooks scheduler allows you to execute and manage schedulers for datalab notebooks

How it works

From the browser, you can view the notebooks created in Opengate Data lab

Notebooks Scheduler

Widget Menu

Notebooks Scheduler Actions

From the action menu of the widget, it will be possible to do the following:

  • New notebook scheduler: allows you to run the notebook scheduler wizard
  • Open Opengate Datalab: allows you to open the Opengate Datalab tool if available
  • Capture screen: Takes a screenshot of the widget.
  • Duplicate widget: Creates a duplicate of the widget on the dashboard.
  • Copy widget: Copies the widget to another dashboard.
  • Change widget location: Moves the widget to another dashboard.

Notebook actions

Notebooks Scheduler Actions

The following are the possible actions to perform for each of the organization’s own certificates.

  • Execute allows you to execute once the selected notebook (same as scheduler but without time settings)
  • Open in datalab opens notebook in the Opengate Datalab tool
  • Schedule opens notebook scheduler wizard in order to create a new schedule
  • Schedulers lists available schedulers for the selected notebook

For each scheduler you can do the following

  • Scheduler identifier for scheduler
  • Report shows if execution generates report
  • Report retention days days to expire report
  • Parameters list of configured parameters
  • Last execution date last time scheduler runs
  • Next execution date date for the next execution
  • Cron pattern

Configuration

General

  • Boxed: widget will be displayed with background in dahsboard.
  • About: widget description in Markdown format.
  • Title: widget title. It can be configured to remain fixed in the widget or only be displayed when it receives focus.
  • Toolbar: configures the behavior of the widget bar on the dashboard, allowing you to hide it, hide it when not in use, or leave it always visible.
  • Refresh Frequency: allows configuring the data refresh frequency displayed in the list.
  • Extra actions: allows user to add new specific actions to the widget with your own code.

Extra action config

You can add a new one by pressing the New button.

Once you added a custom action it can be modified later by pressing the name in the list.

In order to remove the custom action click the delete icon button on the right.

In extra actions you can write your own code were you can open other dashboards, entities dashboards or execute wizards.

Extra action code

You can find all available functions and methods in Extra parameters


Organization Plans Browser

In this widget, you can navigate through different plans within your organization. Actions can be performed on each of the identifying elements within each organization.

How it Works

By selecting an organization, the plans belonging to it will be displayed in the browser, showing some details about them.

Organization Plans Browser

Widget Menu

Organization Plans Actions

From the widget’s action menu, you can perform the following:

  • New Organization Plan: Allows the execution of the wizard for creating a new plan (provided the necessary permissions are available).
  • Capture screen: Takes a screenshot of the widget.
  • Duplicate widget: Creates a duplicate of the widget on the dashboard.
  • Copy widget: Copies the widget to another dashboard.
  • Change widget location: Moves the widget to another dashboard.

Organization Plans Actions

Organization Plans Actions

The following are the actions that can be performed on each plan:

  • Edit: Opens organization plans wizard in order to edit the selected plan.
  • Clone: Opens organization plans wizard in order to clone the selected plan.
  • Remove: Removes the selected plan.

Configuration

General

  • Boxed: widget will be displayed with background in dahsboard.
  • About: widget description in Markdown format.
  • Title: widget title. It can be configured to remain fixed in the widget or only be displayed when it receives focus.
  • Toolbar: configures the behavior of the widget bar on the dashboard, allowing you to hide it, hide it when not in use, or leave it always visible.
  • Refresh Frequency: allows configuring the data refresh frequency displayed in the list.
  • Extra actions: allows user to add new specific actions to the widget with your own code.

Extra action config

You can add a new one by pressing the New button.

Once you added a custom action it can be modified later by pressing the name in the list.

In order to remove the custom action click the delete icon button on the right.

In extra actions you can write your own code were you can open other dashboards, entities dashboards or execute wizards.

Extra action code

You can find all available functions and methods in Extra parameters


Organizations Browser

In this widget, you can navigate through different organizations within your own. Actions can be performed on each of the identifying elements within each organization.

How it Works

Organization Actions

Organization Actions

The following are the actions that can be performed on the selected organization:

  • Edit: Allows management of the organization data.
  • New Suborganization: Creates a new organization under the current organization.
  • New Workgroup: Opens the workgroup wizard filtered by the selected organization.
  • New Channel: Opens the channels wizard filtered by the selected organization.
  • Open Users List: Opens a user list widget in a popup, filtered by the selected organization.
  • Open Entities List: Opens an entities list widget in a popup, filtered by the selected organization.
  • Remove: Deletes the current organization.

Channels

From the Channels tab, you can see which channels exist for that organization and perform actions on them.

Organization Channels

The following are the actions that can be performed:

Organization Channels Actions
  • Edit: Allows management of the channel data.
  • New Entity: Opens the entity wizard to create a new one in this channel.
  • New Asset: Opens the asset wizard to create a new one in this channel.
  • Remove: Deletes the current channel.

Workgroups

From the Workgroups tab, you can see which workgroups exist for that organization and perform actions on them.

Organization Workgroups

The following are the actions that can be performed:

Organization Workgroups Actions
  • Edit: Allows management of the workgroup data.
  • Open Users List: Opens a user list widget in a popup, filtered by the selected organization.
  • New User: Opens the users wizard to create a new one in this workgroup.
  • Remove: Deletes the current workgroup.

You can navigate directly to the desired organization in the organizations tree.

Organization Tree

Configuration

General

  • Boxed: widget will be displayed with background in dahsboard.
  • About: widget description in Markdown format.
  • Title: widget title. It can be configured to remain fixed in the widget or only be displayed when it receives focus.
  • Toolbar: configures the behavior of the widget bar on the dashboard, allowing you to hide it, hide it when not in use, or leave it always visible.
  • Refresh Frequency: allows configuring the data refresh frequency displayed in the list.
  • Extra actions: allows user to add new specific actions to the widget with your own code.

Extra action config

You can add a new one by pressing the New button.

Once you added a custom action it can be modified later by pressing the name in the list.

In order to remove the custom action click the delete icon button on the right.

In extra actions you can write your own code were you can open other dashboards, entities dashboards or execute wizards.

Extra action code

You can find all available functions and methods in Extra parameters


Periodic Operations Browser

In this widget, you can view/manage the periodic operations configured within the organization.

How it Works

Periodic Operations Browser

The browser will display the name assigned to the periodic operation as well as its current status and the type of operation it performs.

Widget Menu

Periodic Operations Browser Actions

From the action menu of the widget, the following activities can be performed:

  • Download: Allows you to download the list of available periodic operations.
  • Download Page: Enables you to download the list of periodic operations that are visible at that moment.
  • Execute Operation: Opens the wizard to execute a new operation, provided the necessary permissions are available.
  • Toggle Selection: Allows you to toggle the selection of tasks using checkboxes. This enables you to view in other compatible widgets the content filtered by this information.
  • Capture screen: Takes a screenshot of the widget.
  • Duplicate widget: Creates a duplicate of the widget on the dashboard.
  • Copy widget: Copies the widget to another dashboard.
  • Change widget location: Moves the widget to another dashboard.

At the top of the widget, the following options are available:

  • Selection Edit: Displays the elements selected by the user and allows for their quick removal.
  • Show Active (Toggle): Instructs the widget to display only those operations that are currently active, rather than all of them.

Actions on Periodic Operations

Periodic Operations Actions

For each periodic operation, you can perform the following actions:

  • Active Switch: Enables you to activate/deactivate the periodic operation (required for changing its parameters).
  • Summary: Displays a panel containing details of the periodic operation.
  • Operations List: Opens a widget that lists operations executed by the selected periodic operation.
  • Cancel: Cancels the periodic operation so that it will not be executed again. This requires it to be deactivated.

Configuration

Periodic Operations Configuration

General

  • Boxed: widget will be displayed with background in dahsboard.
  • About: widget description in Markdown format.
  • Title: widget title. It can be configured to remain fixed in the widget or only be displayed when it receives focus.
  • Toolbar: configures the behavior of the widget bar on the dashboard, allowing you to hide it, hide it when not in use, or leave it always visible.
  • Refresh Frequency: allows configuring the data refresh frequency displayed in the list.
  • Extra actions: allows user to add new specific actions to the widget with your own code.

Extra action config

You can add a new one by pressing the New button.

Once you added a custom action it can be modified later by pressing the name in the list.

In order to remove the custom action click the delete icon button on the right.

In extra actions you can write your own code were you can open other dashboards, entities dashboards or execute wizards.

Extra action code

You can find all available functions and methods in Extra parameters

  • Items per Page: Specifies the number of elements to be displayed per page.

Periodic operations calendar

In this widget, you can view the executions of periodic operations in a calendar format.

How it Works

Periodic Operations Calendar

The calendar for periodic operations will display the operations that correspond to the selected periodicities.

Widget Menu

Periodic Operations Calendar Actions

From the widget’s action menu, it will be possible to perform the following:

  • Execute Operation: Opens the wizard to execute a new operation, provided the necessary permissions are available.
  • Capture screen: Takes a screenshot of the widget.
  • Duplicate widget: Creates a duplicate of the widget on the dashboard.
  • Copy widget: Copies the widget to another dashboard.
  • Change widget location: Moves the widget to another dashboard.

In the widget’s toolbar, we find the following options (in order of appearance):

Periodic Operations Calendar Actions
  • Today (Button): Allows quick navigation to the current day on the calendar.
  • Previous/Next Arrows (Buttons): Navigate to the previous/next item in the current calendar depending on its type.
  • Current Month: Displays the month and year of the calendar being viewed.
  • Selected Tasks List: A list of tasks selected for display on the calendar.
  • Tasks List: Opens a widget with a list of configured periodic operations. This is used to select what to display on the calendar.
  • Zoom In/Out (Buttons): Controls the zoom level of the displayed data.
  • Period Selector: Allows the selection of the period to be displayed.
Periodic Operations Calendar Actions

The different periods to be displayed are:

  • Day: Displays all planned and executed operations for the selected periodic operations.
  • Day/Operation: Displays all planned and executed operations for the selected periodic operations, allocating a column for each periodicity.
  • Week: Displays all operations planned for the selected week.
  • Month: Displays all operations planned for the selected month.

Actions on Periodic Operations

Periodic Operations Calendar Actions

By clicking on an operation, you can view its configuration data.

The displayed information is categorized as follows:

  • Execution Details: Here the summary of the selected operation is shown.
  • Parameters: Displays the operation’s parameters.
  • Configured Times: Details the times set for the operation.
  • Scheduled: Displays the periodicity settings for the operation.

If the selected item has already been executed, the following additional data will be displayed:

  • Execution Details: Here the summary of the executed operation is shown.
  • Parameters: Displays the operation’s parameters.
  • Timing: Details the timing of the operation.
  • Result: Provides a summary of how the operation has transpired.

Configuration

General

  • Boxed: widget will be displayed with background in dahsboard.
  • About: widget description in Markdown format.
  • Title: widget title. It can be configured to remain fixed in the widget or only be displayed when it receives focus.
  • Toolbar: configures the behavior of the widget bar on the dashboard, allowing you to hide it, hide it when not in use, or leave it always visible.
  • Refresh Frequency: allows configuring the data refresh frequency displayed in the list.
  • Extra actions: allows user to add new specific actions to the widget with your own code.

Extra action config

You can add a new one by pressing the New button.

Once you added a custom action it can be modified later by pressing the name in the list.

In order to remove the custom action click the delete icon button on the right.

In extra actions you can write your own code were you can open other dashboards, entities dashboards or execute wizards.

Extra action code

You can find all available functions and methods in Extra parameters


Pipeline Scheduler Browser

The Pipeline Scheduler Browser allows you to view/manage the pipeline schedulers configured in your organization.

How it Works

Each pipeline scheduler will be displayed in the browser, showing some details about them such as the type of pipeline scheduler and the configuration mode used.

Pipeline Scheduler Browser

Widget Menu

Pipeline Scheduler Actions

From the widget’s action menu, you can perform the following:

  • Executions history: Shows the executions history for all pipeline scheduled.
  • Pipeline Scheduler wizard: Allows the execution of the wizard for creating a new pipeline scheduler (provided the necessary permissions are available).
  • Capture screen: Takes a screenshot of the widget.
  • Duplicate widget: Creates a duplicate of the widget on the dashboard.
  • Copy widget: Copies the widget to another dashboard.
  • Change widget location: Moves the widget to another dashboard.

Actions per Pipeline Scheduler

Pipeline Scheduler Actions

The following are the possible actions to be performed for each of the schedulers:

  • History opens pipeline executions history in a modal.
  • Clone will open the pipeline scheduler wizard for creating a new pipeline scheduler that will contain the configuration of the selected one.
  • Remove deletes the selected scheduler.

Configuration

General

  • Boxed: widget will be displayed with background in dahsboard.
  • About: widget description in Markdown format.
  • Title: widget title. It can be configured to remain fixed in the widget or only be displayed when it receives focus.
  • Toolbar: configures the behavior of the widget bar on the dashboard, allowing you to hide it, hide it when not in use, or leave it always visible.
  • Refresh Frequency: allows configuring the data refresh frequency displayed in the list.
  • Extra actions: allows user to add new specific actions to the widget with your own code.

Extra action config

You can add a new one by pressing the New button.

Once you added a custom action it can be modified later by pressing the name in the list.

In order to remove the custom action click the delete icon button on the right.

In extra actions you can write your own code were you can open other dashboards, entities dashboards or execute wizards.

Extra action code

You can find all available functions and methods in Extra parameters


Provisioning Functions Navigator

In this widget, you will find the provisioning functions configured for your organization.

How it Works

Provision Processors Browser

In the browser, you will find a list of provisioning functions along with the available actions for each, depending on the permissions you hold.

Widget Menu

Provision Processors Browser Actions

From the widget’s action menu, you can perform the following:

  • New provision function: Allows the execution of the wizard for creating provisioning functions (provided the necessary permissions are available).
  • Capture screen: Takes a screenshot of the widget.
  • Duplicate widget: Creates a duplicate of the widget on the dashboard.
  • Copy widget: Copies the widget to another dashboard.
  • Change widget location: Moves the widget to another dashboard.

Organization Selector

A user can manage the provisioning functions for organizations that are dependent on the user’s own organization. To switch between organizations, you must use the selector available at the top of the widget.

Actions on Time Series

Provision Processors Browser Provision Processors Actions

For each time series, you can perform the following actions:

  • Edit: Opens the editing wizard to modify the parameters of the provisioning function.
  • Summary: Displays information on the configuration of the provisioning function within the widget itself.
  • Delete: Removes the selected item.

Configuration

General

  • Boxed: widget will be displayed with background in dahsboard.
  • About: widget description in Markdown format.
  • Title: widget title. It can be configured to remain fixed in the widget or only be displayed when it receives focus.
  • Toolbar: configures the behavior of the widget bar on the dashboard, allowing you to hide it, hide it when not in use, or leave it always visible.
  • Refresh Frequency: allows configuring the data refresh frequency displayed in the list.
  • Extra actions: allows user to add new specific actions to the widget with your own code.

Extra action config

You can add a new one by pressing the New button.

Once you added a custom action it can be modified later by pressing the name in the list.

In order to remove the custom action click the delete icon button on the right.

In extra actions you can write your own code were you can open other dashboards, entities dashboards or execute wizards.

Extra action code

You can find all available functions and methods in Extra parameters


Rest Request Scheduler Browser

The Rest Request Scheduler Browser allows you to view/manage the rest request schedulers configured in your organization.

How it Works

Each rest request scheduler will be displayed in the browser, showing some details about them such as the type of rest request scheduler and the configuration mode used.

Rest Request Scheduler Browser

Widget Menu

Rest Request Scheduler Actions

From the widget’s action menu, you can perform the following:

  • Executions history: Shows the executions history for all rest request scheduled.
  • Rest Request Scheduler wizard: Allows the execution of the wizard for creating a new rest request scheduler (provided the necessary permissions are available).
  • Capture screen: Takes a screenshot of the widget.
  • Duplicate widget: Creates a duplicate of the widget on the dashboard.
  • Copy widget: Copies the widget to another dashboard.
  • Change widget location: Moves the widget to another dashboard.

Actions per RestRequest

Rest Request Scheduler Actions

The following are the possible actions to be performed for each of the schedulers:

  • History opens rest request executions history in a modal.
  • Clone will open the rest request scheduler wizard for creating a new rest request scheduler that will contain the configuration of the selected one.
  • Remove deletes the selected scheduler.

Configuration

General

  • Boxed: widget will be displayed with background in dahsboard.
  • About: widget description in Markdown format.
  • Title: widget title. It can be configured to remain fixed in the widget or only be displayed when it receives focus.
  • Toolbar: configures the behavior of the widget bar on the dashboard, allowing you to hide it, hide it when not in use, or leave it always visible.
  • Refresh Frequency: allows configuring the data refresh frequency displayed in the list.
  • Extra actions: allows user to add new specific actions to the widget with your own code.

Extra action config

You can add a new one by pressing the New button.

Once you added a custom action it can be modified later by pressing the name in the list.

In order to remove the custom action click the delete icon button on the right.

In extra actions you can write your own code were you can open other dashboards, entities dashboards or execute wizards.

Extra action code

You can find all available functions and methods in Extra parameters


Rules Configuration Browser

The Rules Browser allows you to view/manage the rules configured in your organization.

How it Works

Each rule will be displayed in the browser, showing some details about them such as the type of rule and the configuration mode used.

Rules Browser

Widget Menu

Rules Browser Actions

From the widget’s action menu, you can perform the following:

  • Rules wizard: Allows the execution of the wizard for creating a new rule (provided the necessary permissions are available).
  • Capture screen: Takes a screenshot of the widget.
  • Duplicate widget: Creates a duplicate of the widget on the dashboard.
  • Copy widget: Copies the widget to another dashboard.
  • Change widget location: Moves the widget to another dashboard.

Additionally, you can toggle between active and inactive rules to facilitate sampling according to needs.

Channel Selector

A user can manage the connector functions for those channels that depend on the user’s organization. To switch between channels, you must use the selector available at the top of the widget.

Actions per Rule

Rule Actions

The following are the possible actions to be performed for each of the rules:

  • Activation toggle allows the immediate activation and deactivation of the rule.
  • Edit opens the rules configurator to modify the parameters of the rule.
  • Clone will open the rules configurator for creating a new rule that will contain the configuration of the selected one.
  • Remove deletes the selected rule.

Configuration

General

  • Boxed: widget will be displayed with background in dahsboard.
  • About: widget description in Markdown format.
  • Title: widget title. It can be configured to remain fixed in the widget or only be displayed when it receives focus.
  • Toolbar: configures the behavior of the widget bar on the dashboard, allowing you to hide it, hide it when not in use, or leave it always visible.
  • Refresh Frequency: allows configuring the data refresh frequency displayed in the list.
  • Extra actions: allows user to add new specific actions to the widget with your own code.

Extra action config

You can add a new one by pressing the New button.

Once you added a custom action it can be modified later by pressing the name in the list.

In order to remove the custom action click the delete icon button on the right.

In extra actions you can write your own code were you can open other dashboards, entities dashboards or execute wizards.

Extra action code

You can find all available functions and methods in Extra parameters


Specific types Browser

In this widget, you will find the Specific types configured for your organization.

How it Works

In the browser, you will find a list of Specific types along with the available actions for each, based on the permissions you have.

Browser allows to view the data in 2 different modes:

  • Grid: shows the complete list of specific types with the resource types supported in a grid of checkboxes (default view) Specific types Browser Grid

  • List: shows a list with the different resource types and their supported specific types. Specific types Browser List

Widget Menu

Specific types Browser Actions

From the action menu of the widget, you can perform the following:

  • Capture screen: Takes a screenshot of the widget.

  • Duplicate widget: Creates a duplicate of the widget on the dashboard.

  • Copy widget: Copies the widget to another dashboard.

  • Change widget location: Moves the widget to another dashboard.

  • Edit opens Specific Type manager modal.

Organization Selector

A user can manage the Specific types for those organizations that are dependent on the user’s own organization. To switch between organizations, you must select it from the selector available at the top of the widget.

Actions on Specific types

Specific types Browser Edit

A user with privileges can add new Specific Types and edit and/or delete existing ones. Every Specific Type must have one resource type selected and cannot be duplicated.

Configuration

General

  • Boxed: widget will be displayed with background in dahsboard.
  • About: widget description in Markdown format.
  • Title: widget title. It can be configured to remain fixed in the widget or only be displayed when it receives focus.
  • Toolbar: configures the behavior of the widget bar on the dashboard, allowing you to hide it, hide it when not in use, or leave it always visible.
  • Refresh Frequency: allows configuring the data refresh frequency displayed in the list.
  • Extra actions: allows user to add new specific actions to the widget with your own code.

Extra action config

You can add a new one by pressing the New button.

Once you added a custom action it can be modified later by pressing the name in the list.

In order to remove the custom action click the delete icon button on the right.

In extra actions you can write your own code were you can open other dashboards, entities dashboards or execute wizards.

Extra action code

You can find all available functions and methods in Extra parameters


Time Series Browser

In this widget, you will find the time series configured for your organization.

How it Works

Time Series Browser

In the browser, you will find a list of time series along with the available actions for each, depending on the permissions you hold.

Widget Menu

Time Series Browser Actions

From the widget’s action menu, you can perform the following:

  • New time series: Allows the execution of the wizard for creating new time series (provided the necessary permissions are available).
  • Capture screen: Takes a screenshot of the widget.
  • Duplicate widget: Creates a duplicate of the widget on the dashboard.
  • Copy widget: Copies the widget to another dashboard.
  • Change widget location: Moves the widget to another dashboard.

Organization Selector

A user can manage the time series for organizations that are dependent on the user’s own organization. To switch between organizations, you must use the selector available at the top of the widget.

Actions on Time Series

Time Series Browser Time Series Actions

For each time series, you can perform the following actions:

  • View data: Opens a time series listing widget where you can view the data of the selected time series.
  • Edit: Initiates a wizard for editing the time series using the configuration data of the current one.
  • Clone: Initiates a wizard for creating a new time series using the configuration data of the current one.
  • Columns: Displays within the widget itself information on the time series configuration as well as the configured columns.
  • Delete: Removes the selected time series and all its data.

Configuration

General

  • Boxed: widget will be displayed with background in dahsboard.
  • About: widget description in Markdown format.
  • Title: widget title. It can be configured to remain fixed in the widget or only be displayed when it receives focus.
  • Toolbar: configures the behavior of the widget bar on the dashboard, allowing you to hide it, hide it when not in use, or leave it always visible.
  • Refresh Frequency: allows configuring the data refresh frequency displayed in the list.
  • Extra actions: allows user to add new specific actions to the widget with your own code.

Extra action config

You can add a new one by pressing the New button.

Once you added a custom action it can be modified later by pressing the name in the list.

In order to remove the custom action click the delete icon button on the right.

In extra actions you can write your own code were you can open other dashboards, entities dashboards or execute wizards.

Extra action code

You can find all available functions and methods in Extra parameters


Time series function Browser

In this widget, you will find the time series functions configured for your organization.

How it Works

Time Series function Browser

In the browser, you will find a list of time series functions along with the available actions for each, based on the permissions you have.

You can see this information for each function:

  • Name: function name
  • Origin: who provides the function. It can be PLATFORM (product preconfigured) and ORGANIZATION (user created).
  • Value Types: input value types allowed by the function
  • Description: the function algorithm description

Widget Menu

Time Series function Browser Actions

From the action menu of the widget, you can perform the following:

  • New Time Series Function: This allows you to run the time series function creation wizard (provided you have the necessary permissions).
  • Capture screen: Takes a screenshot of the widget.
  • Duplicate widget: Creates a duplicate of the widget on the dashboard.
  • Copy widget: Copies the widget to another dashboard.
  • Change widget location: Moves the widget to another dashboard.

Organization Selector

A user can manage the time series functions for those organizations that are dependent on the user’s own organization. To switch between organizations, you must select it from the selector available at the top of the widget.

Actions on Time Series Function

Time Series function Browser time series function Actions

For each time series function, you can perform the following actions:

  • Clone: Allows you to initiate a time series function creation wizard with the configuration data of the current one.
  • Edit: Allows you to initiate a time series function update wizard with the configuration data of the current one. Only ORGANIZATION functions.
  • Delete: Removes the selected time series function and all its associated data. Only ORGANIZATION functions.

Configuration

General

  • Boxed: widget will be displayed with background in dahsboard.
  • About: widget description in Markdown format.
  • Title: widget title. It can be configured to remain fixed in the widget or only be displayed when it receives focus.
  • Toolbar: configures the behavior of the widget bar on the dashboard, allowing you to hide it, hide it when not in use, or leave it always visible.
  • Refresh Frequency: allows configuring the data refresh frequency displayed in the list.
  • Extra actions: allows user to add new specific actions to the widget with your own code.

Extra action config

You can add a new one by pressing the New button.

Once you added a custom action it can be modified later by pressing the name in the list.

In order to remove the custom action click the delete icon button on the right.

In extra actions you can write your own code were you can open other dashboards, entities dashboards or execute wizards.

Extra action code

You can find all available functions and methods in Extra parameters


Subsections of Charts

Data Stream history

Graphical representation of data stream information

How it works

Data Streams History widget

Widget Menu

Data Streams History Actions

From here, the following actions can be performed:

  • Open device information allows for the opening of a temporary dashboard associated with the selected entity
  • Edit allows the editing of the selected entity
  • Historical data displays the chart data in a list format (requires selecting a grouping parameter)
  • Download downloads the data displayed in the chart in CSV format
  • Visualization toggles between different data visualization options on the chart
  • Capture screen: Takes a screenshot of the widget.
  • Duplicate widget: Creates a duplicate of the widget on the dashboard.
  • Copy widget: Copies the widget to another dashboard.
  • Change widget location: Moves the widget to another dashboard.

Configuration

General

  • Boxed: widget will be displayed with background in dahsboard.
  • About: widget description in Markdown format.
  • Title: widget title. It can be configured to remain fixed in the widget or only be displayed when it receives focus.
  • Toolbar: configures the behavior of the widget bar on the dashboard, allowing you to hide it, hide it when not in use, or leave it always visible.
  • Refresh Frequency: allows configuring the data refresh frequency displayed in the list.
  • Extra actions: allows user to add new specific actions to the widget with your own code.

Extra action config

You can add a new one by pressing the New button.

Once you added a custom action it can be modified later by pressing the name in the list.

In order to remove the custom action click the delete icon button on the right.

In extra actions you can write your own code were you can open other dashboards, entities dashboards or execute wizards.

Extra action code

You can find all available functions and methods in Extra parameters

  • Resource Type + EntityKey(s) specifies the resource type and identifier of the entities to be queried (not required)

Columns from which to extract data to display on the graph must be configured. A graph will be generated for each column.

For each piece of data, the following can be configured:

  • Alias a representative name for the column data on the chart
  • Color to distinguish it on the graph
  • Intensity allows for the graph to change shades depending on the value
  • Unit indicates the measurement being displayed on the corresponding axis
  • Chart Type toggles between different data visualization possibilities. Can also be configured globally for all metrics.
  • Axis editor enables the configuration of the Y-axis on the chart to assign discrete values to specific values
  • Formatter tool is a utility that processes each data point, allowing for its modification and/or calculation before it is displayed on the graph. For instance, it can convert discrete data into numerical data for representation.
  • Reduce tool allows code-based reformulation of series data by grouping and similar operations.
  • Remove removes the data stream from the chart
Datastreams History General Configuration

Advanced

From here, you can configure the widget’s behavior while plotting the graph as well as when it is opened within a temporary dashboard.

Datastreams History Advanced Configuration
  • Prevent interpolation allows the avoidance of data interpolation where possible
  • Statistical data graph displays a panel with basic statistical values
  • Data Stream template activates the override of the EntityKey in the widget when the dashboard is opened in a device template, taking a data stream from the entity itself at the time of loading

Visualization

Datastreams History Visualization

From here, you can change some visual aspects of the widget.

  • Background color allows setting a distinctive color for the widget
  • Hide details header panel hides the upper information panel of the widget, freeing up that space
  • Show basic stats in chart displays basic statistics on the chart data as long as only one series is being represented

Data Stream timeline

Graphical representation of the timeline of historical data from a data stream

How it works

Data Stream Timeline widget

This widget facilitates the visualization of value changes in a field over time.

Each timeline will display the name of the data stream along with the represented value, arranged as follows:

  • field
  • value

Grouping

Data Stream Timeline grouped information

By enabling the grouping of timelines, one can view all represented states on a single timeline (without separation).

When data are grouped, the representation of the timeline will change, displaying the value on the same timeline, and each bar will contain the following:

  • field

Summary

Data Stream Timeline information summary

The summary panel allows you to observe the total time each value has been maintained.

Widget Menu

Data Stream Timeline Actions

From here, the following actions can be performed:

  • Open device information opens the corresponding temporary panel with the selected entity
  • Edit opens the wizard corresponding to the selected entity
  • Generate QR generates a QR code that will return basic information about the asset
  • Execute operation opens the pre-configured operation launcher for the selected entity
  • Capture screen: Takes a screenshot of the widget.
  • Duplicate widget: Creates a duplicate of the widget on the dashboard.
  • Copy widget: Copies the widget to another dashboard.
  • Change widget location: Moves the widget to another dashboard.

Configuration

General

  • Boxed: widget will be displayed with background in dahsboard.
  • About: widget description in Markdown format.
  • Title: widget title. It can be configured to remain fixed in the widget or only be displayed when it receives focus.
  • Toolbar: configures the behavior of the widget bar on the dashboard, allowing you to hide it, hide it when not in use, or leave it always visible.
  • Refresh Frequency: allows configuring the data refresh frequency displayed in the list.
  • Extra actions: allows user to add new specific actions to the widget with your own code.

Extra action config

You can add a new one by pressing the New button.

Once you added a custom action it can be modified later by pressing the name in the list.

In order to remove the custom action click the delete icon button on the right.

In extra actions you can write your own code were you can open other dashboards, entities dashboards or execute wizards.

Extra action code

You can find all available functions and methods in Extra parameters

  • Entity key of the desired entity to obtain the data
Data Stream Timeline General Configuration

Finally, those columns from which to extract data to display on the graph must be configured. A timeline will be generated for each of them.

For each piece of data, the following can be configured:

  • Alias a representative name for the column data on the graph
  • Color to distinguish it within the graph
  • Formatter tool is a tool that will process each piece of data, allowing for its modification and/or any calculation to ultimately display it on the graph. For example, it can convert numerical data into discrete data for representation.
  • Remove will remove the column from the configuration

Visualization

Data Stream Timeline Visualization

From here, some visual aspects of the widget can be changed.

  • Background color allows you to set a distinctive color for the widget
  • Hide details header panel hides the upper information panel of the widget, freeing up that space

Devices data stream history

Graphical representation of data from a data stream for multiple devices simultaneously

How it works

Data Streams Devices widget

Widget Menu

Data Streams Devices Actions

From here, the following actions can be executed:

  • Download allows for downloading the data displayed on the chart in CSV format
  • Capture screen: Takes a screenshot of the widget.
  • Duplicate widget: Creates a duplicate of the widget on the dashboard.
  • Copy widget: Copies the widget to another dashboard.
  • Change widget location: Moves the widget to another dashboard.

Configuration

General

  • Boxed: widget will be displayed with background in dahsboard.
  • About: widget description in Markdown format.
  • Title: widget title. It can be configured to remain fixed in the widget or only be displayed when it receives focus.
  • Toolbar: configures the behavior of the widget bar on the dashboard, allowing you to hide it, hide it when not in use, or leave it always visible.
  • Refresh Frequency: allows configuring the data refresh frequency displayed in the list.
  • Extra actions: allows user to add new specific actions to the widget with your own code.

Extra action config

You can add a new one by pressing the New button.

Once you added a custom action it can be modified later by pressing the name in the list.

In order to remove the custom action click the delete icon button on the right.

In extra actions you can write your own code were you can open other dashboards, entities dashboards or execute wizards.

Extra action code

You can find all available functions and methods in Extra parameters

  • Data Stream Id is the data stream you wish to represent on the chart for various entities

  • Axis formatter allows for the representation of discrete values on the Y-axis of the chart Data Streams Devices Axis Formatter

  • Values formatter enables alteration of the obtained values for the chart. This allows for the representation of discrete values by assigning them a numerical value. Data Streams Devices Values Formatter

  • Chart type is the kind of charts to display

  • EntityKey(s) type of resource and identifier of the entities you wish to consult (not required)

For each entity, the following options are available:

  • Color an identifying color on the chart
  • Remove deletes the configuration of the entity from the widget
Data Streams Devices General Configuration

Advanced

From here, you can configure how the widget behaves when rendering the chart.

Data Streams Devices Advanced Configuration
  • Prevent interpolation allows for avoiding data interpolation when possible
  • Statistical data graph displays a panel with basic statistical values

Visualization

Data Streams Devices Visualization

From this point, some visual aspects of the widget can be changed.

  • Background color allows for setting a distinctive color for the widget
  • Hide details header panel hides the top information panel of the widget, freeing up that space

Multiple Time Series history

Graphical representation of data from multiple time series.

How it works

Multiple Time Series History widget

Widget Menu

Multiple Time Series History Actions

From this section, the following actions can be performed:

  • Open device information allows opening the temporary dashboard of the selected entity

  • Edit enables the editing of the selected entity

  • Historical data displays the graph data in list format

  • Visualization allows toggling between different data visualization options in the graph.

  • Capture screen: Takes a screenshot of the widget.

  • Duplicate widget: Creates a duplicate of the widget on the dashboard.

  • Copy widget: Copies the widget to another dashboard.

  • Change widget location: Moves the widget to another dashboard.

Configuration

General

  • Boxed: widget will be displayed with background in dahsboard.
  • About: widget description in Markdown format.
  • Title: widget title. It can be configured to remain fixed in the widget or only be displayed when it receives focus.
  • Toolbar: configures the behavior of the widget bar on the dashboard, allowing you to hide it, hide it when not in use, or leave it always visible.
  • Refresh Frequency: allows configuring the data refresh frequency displayed in the list.
  • Extra actions: allows user to add new specific actions to the widget with your own code.

Extra action config

You can add a new one by pressing the New button.

Once you added a custom action it can be modified later by pressing the name in the list.

In order to remove the custom action click the delete icon button on the right.

In extra actions you can write your own code were you can open other dashboards, entities dashboards or execute wizards.

Extra action code

You can find all available functions and methods in Extra parameters

  • Resource Type + EntityKey(s) specifies the resource type and identifiers for the entities to be queried.
  • Chart type (outside of time series) forces same chart type to all series
  • Tooltip type determines how chart tooltip values will be displayed on mouse over
  • New timeserie allows user the addition of a new time serie configuration with its values.

For each time series you must configure the next:

  • Preferred organization allows user to configure how the time series organization will be selected
    • Selected organization selected by the user is the valid
    • User user organization will be used for the timeserie (important for shared dashboards)
    • Entity the organization of the opened entity in templates will be used for the timeserie, user’s otherwise
  • Organization + Time Series provides data of the time series to be queried
  • Identifier field tells the widget which column to use for data grouping
  • Date field specifies which column will serve as the temporal indicator for the data.

Lastly, columns must be configured to extract data to display on the graph. For each of these and the identifier, a graph will be generated.

For each piece of data, the following can be configured:

  • Alias specifies a representative name for the column data on the graph.
  • Color provides a way to distinguish data within the graph.
  • Intensity allows the graph to change shades depending on the value.
  • Unit indicates the measurement being displayed on the corresponding axis.
  • Chart type switches between different data visualization options. This can also be set globally for all measurements.
  • Axis editor allows configuring the Y-axis to assign discrete values to specific data points.
  • Formatter tool is a tool that treats each piece of data individually, allowing modifications and/or calculations to be performed before displaying it on the graph.
  • Reduce tool permits data reshaping through code, allowing for grouping and similar operations.
Time Series History General Configuration

Advanced

From this section, the widget’s behavior when rendering the graph as well as when it is opened within a temporary dashboard can be configured.

Time Series History Advanced Configuration
  • Prevent interpolation avoids data interpolation when possible.
  • Statistical data graph displays a panel with basic statistical values.
  • Datastream template enables the overriding of the EntityKey in the widget when the dashboard is opened in a device template, using a datastream from the entity at the time of loading.

Visualization

Time Series History Visualization

From this section, some visual aspects of the widget can be modified.

  • Background color allows setting a distinctive color for the widget.
  • Hide details header panel hides the top information panel of the widget, freeing up that space.

Summary Chart

This widget displays graphs of summaries provided by the platform.

How it works

Summary Chart widget

This widget facilitates the graphical visualization of summarized data.

Data can be displayed graphically, in table form, or both simultaneously.

Widget Menu

Summary Chart Actions

From this section, the following actions can be performed:

  • Capture screen: Takes a screenshot of the widget.
  • Duplicate widget: Creates a duplicate of the widget on the dashboard.
  • Copy widget: Copies the widget to another dashboard.
  • Change widget location: Moves the widget to another dashboard.

Widget Filter

Summary Chart Filters

With the filter, one can narrow down the number of results and obtain new metrics.

There are three types of filters: basic, advanced, or linked.

  • Basic allows the entry of any text and will filter by predetermined fields.
  • Advanced allows configuring a custom filter based on the displayed graph.
  • Linked ties the filter with that of another compatible widget, inheriting its query and refreshing both simultaneously.

Configuration

General

  • Boxed: widget will be displayed with background in dahsboard.
  • About: widget description in Markdown format.
  • Title: widget title. It can be configured to remain fixed in the widget or only be displayed when it receives focus.
  • Toolbar: configures the behavior of the widget bar on the dashboard, allowing you to hide it, hide it when not in use, or leave it always visible.
  • Refresh Frequency: allows configuring the data refresh frequency displayed in the list.
  • Extra actions: allows user to add new specific actions to the widget with your own code.

Extra action config

You can add a new one by pressing the New button.

Once you added a custom action it can be modified later by pressing the name in the list.

In order to remove the custom action click the delete icon button on the right.

In extra actions you can write your own code were you can open other dashboards, entities dashboards or execute wizards.

Extra action code

You can find all available functions and methods in Extra parameters

  • Summary type allows selection among different types of summaries.
  • Summary format specifies the type of representation: graphical, table, or mixed (both simultaneously).
  • Table position allows specifying the table’s position in mixed mode.
  • Legend enables or disables the display of graph legends and their position.
  • Columns number tells the widget into how many columns the graphs should be distributed.
  • Style pie chart instructs the widget whether to display pie charts in donut format or regular (no format).
Summary Chart General Configuration

Finally, one must configure the data streams to summarize. The following must be indicated for each:

  • Column 1 specifies the type of graph to represent for the selected data stream.
  • Column 2, field allows choosing a field within a complex data stream.
  • Column 3, alias allows specifying the name of the data stream on the graph.
  • Formatter tool is a tool that allows formatting and altering the information returned by the platform to meet specific needs.
  • Remove will remove the column from the configuration.

When the summary type is “Entities Values,” additional configuration parameters will be activated. This is because this option calculates graph data based on a sample of the overall entities.

Summary Chart Entities Values summary

The global chart type field will be activated, and a new panel appears where the following will be configured:

  • Generated summary title is the name to display on the generated graph.
  • Statistics: count strategy specifies the operation to perform on the read data: total, median, mean, maximum, minimum, variance, and standard deviation.
  • Statistics: max samples specifies the number of samples to take for generating the graph.

The list of data streams will indicate on which data the indicated count strategy will act.

Advanced

From here, internal filters that would always apply regardless of user actions can be configured.

Summary Chart Advanced
  • Private filter will always execute unless there is a template filter.
  • Template filter allows configuring a filter that will overwrite the private one when the dashboard opens in a temporary template.
  • Share filter tells the widget to share the private/template filter when this widget is selected in another widget via linked filter.

Time Series data timeline

Graphical representation of a time series data timeline.

How it works

Time Series Timeline widget

This widget facilitates the visualization of value changes in a field over time within a time series.

Each timeline will display the group, the field, and the represented value, arranged as follows:

  • Group
  • Field
  • Value

Grouping

Time Series Timeline grouped information

By enabling the grouping of timelines, you can view all represented states on a single timeline (without separation).

When the data is grouped, the representation of the timeline changes, displaying the value on the same timeline, and each bar will contain the following:

  • Group
  • Field

Resume

Time Series Timeline information resume

With the summary panel, you can observe the total time each value has been maintained.

Widget Menu

Time Series Timeline Actions

From here, the following actions can be performed:

  • Capture screen: Takes a screenshot of the widget.
  • Duplicate widget: Creates a duplicate of the widget on the dashboard.
  • Copy widget: Copies the widget to another dashboard.
  • Change widget location: Moves the widget to another dashboard.

Configuration

General

  • Boxed: widget will be displayed with background in dahsboard.
  • About: widget description in Markdown format.
  • Title: widget title. It can be configured to remain fixed in the widget or only be displayed when it receives focus.
  • Toolbar: configures the behavior of the widget bar on the dashboard, allowing you to hide it, hide it when not in use, or leave it always visible.
  • Refresh Frequency: allows configuring the data refresh frequency displayed in the list.
  • Extra actions: allows user to add new specific actions to the widget with your own code.

Extra action config

You can add a new one by pressing the New button.

Once you added a custom action it can be modified later by pressing the name in the list.

In order to remove the custom action click the delete icon button on the right.

In extra actions you can write your own code were you can open other dashboards, entities dashboards or execute wizards.

Extra action code

You can find all available functions and methods in Extra parameters

  • Organization + Time Series provides data of the time series to be queried.
  • Start date field specifies which date-type column should be used to indicate the beginning of the period (*).
  • End date field specifies which date-type column should be used to indicate the end of the period (*).
  • Identifier field tells the widget which column to use for data grouping.

(*) If both dates use the same field, the start of the next state will be used to calculate the period.

Time Series Timeline General Configuration

Lastly, columns must be configured to extract data to display on the graph. For each of these and the group/identifier, a graph will be generated.

For each piece of data, the following can be configured:

  • Alias specifies a representative name for the column data on the graph.
  • Color provides a way to distinguish data within the graph.
  • Formatter tool is a tool that treats each piece of data individually, allowing for modifications and/or calculations before displaying it on the graph. For example, you can convert numerical data into discrete data for representation.
  • Remove will remove the column from the configuration.

Advanced

In this section, various filters that will be applied to queries will be configured, regardless of what the user may wish to filter subsequently.

Time Series Timeline Advanced Configuration

Visualization

Time Series Timeline Visualization

From here, some visual aspects of the widget can be modified.

  • Background color allows setting a distinctive color for the widget.
  • Hide details header panel hides the top information panel of the widget, freeing up that space.

Time Series history

Graphical representation of data from a time series.

How it works

Time Series History widget

Widget Menu

Time Series History Actions

From this section, the following actions can be performed:

  • Open device information allows opening the temporary dashboard associated with the selected entity (only available when entities have been preselected).

  • Edit enables the editing of the selected entity (only available when entities have been preselected).

  • Historical data displays the graph data in list format (requires selecting a grouping field).

  • Visualization allows toggling between different data visualization options in the graph.

  • Capture screen: Takes a screenshot of the widget.

  • Duplicate widget: Creates a duplicate of the widget on the dashboard.

  • Copy widget: Copies the widget to another dashboard.

  • Change widget location: Moves the widget to another dashboard.

Configuration

General

  • Boxed: widget will be displayed with background in dahsboard.
  • About: widget description in Markdown format.
  • Title: widget title. It can be configured to remain fixed in the widget or only be displayed when it receives focus.
  • Toolbar: configures the behavior of the widget bar on the dashboard, allowing you to hide it, hide it when not in use, or leave it always visible.
  • Refresh Frequency: allows configuring the data refresh frequency displayed in the list.
  • Extra actions: allows user to add new specific actions to the widget with your own code.

Extra action config

You can add a new one by pressing the New button.

Once you added a custom action it can be modified later by pressing the name in the list.

In order to remove the custom action click the delete icon button on the right.

In extra actions you can write your own code were you can open other dashboards, entities dashboards or execute wizards.

Extra action code

You can find all available functions and methods in Extra parameters

  • Chart type (outside of series) forces same chart type to all series
  • Tooltip type determines how chart tooltip values will be displayed on mouse over
  • Preferred organization allows user to configure how the time series organization will be selected
    • Selected organization selected by the user is the valid
    • User user organization will be used for the timeserie (important for shared dashboards)
    • Entity the organization of the opened entity in templates will be used for the timeserie, user’s otherwise
  • Organization + Time Series provides data of the time series to be queried.
  • Resource Type + EntityKey(s) specifies the resource type and identifiers for the entities to be queried (not required).
  • Grouping/Identifier field tells the widget which column to use for data grouping. If none is selected, all data will be grouped as one.
  • Date field specifies which column will serve as the temporal indicator for the data.

Lastly, columns must be configured to extract data to display on the graph. For each of these and the grouping/identifier, a graph will be generated.

For each piece of data, the following can be configured:

  • Alias specifies a representative name for the column data on the graph.
  • Color provides a way to distinguish data within the graph.
  • Intensity allows the graph to change shades depending on the value.
  • Unit indicates the measurement being displayed on the corresponding axis.
  • Chart type switches between different data visualization options. This can also be set globally for all measurements.
  • Axis editor allows configuring the Y-axis to assign discrete values to specific data points.
  • Formatter tool is a tool that treats each piece of data individually, allowing modifications and/or calculations to be performed before displaying it on the graph.
  • Reduce tool permits data reshaping through code, allowing for grouping and similar operations.
Time Series History General Configuration

Advanced

From this section, the widget’s behavior when rendering the graph as well as when it is opened within a temporary dashboard can be configured.

Time Series History Advanced Configuration
  • Prevent interpolation avoids data interpolation when possible.
  • Statistical data graph displays a panel with basic statistical values.
  • Datastream template enables the overriding of the EntityKey in the widget when the dashboard is opened in a device template, using a datastream from the entity at the time of loading.

Visualization

Time Series History Visualization

From this section, some visual aspects of the widget can be modified.

  • Background color allows setting a distinctive color for the widget.
  • Hide details header panel hides the top information panel of the widget, freeing up that space.
  • Show basic stats in chart displays basic statistics on the graph itself when only one series is represented.

Subsections of Entity Details

Asset Related

In this widget, you will be able to see the devices related to an asset.

How it works

Asset Related

Widget Menu

Menu Action List

The following actions can be performed:

  • Open entity information: Opens a temporary dashboard with information about the asset.
  • Edit: Opens the asset wizard.
  • Generate QR: Generates a QR code that will provide basic information about the asset.
  • Capture screen: Takes a screenshot of the widget.
  • Duplicate widget: Creates a duplicate of the widget on the dashboard.
  • Copy widget: Copies the widget to another dashboard.
  • Change widget location: Moves the widget to another dashboard.

Configuration

Configuration

General

  • Boxed: widget will be displayed with background in dahsboard.
  • About: widget description in Markdown format.
  • Title: widget title. It can be configured to remain fixed in the widget or only be displayed when it receives focus.
  • Toolbar: configures the behavior of the widget bar on the dashboard, allowing you to hide it, hide it when not in use, or leave it always visible.
  • Refresh Frequency: allows configuring the data refresh frequency displayed in the list.
  • Extra actions: allows user to add new specific actions to the widget with your own code.

Extra action config

You can add a new one by pressing the New button.

Once you added a custom action it can be modified later by pressing the name in the list.

In order to remove the custom action click the delete icon button on the right.

In extra actions you can write your own code were you can open other dashboards, entities dashboards or execute wizards.

Extra action code

You can find all available functions and methods in Extra parameters

Asset Select

Selection of the asset to display.

Visualization

Asset Select

Settings that can be configured:

  • Background color: Sets the background color of the widget.
  • Hide details header panel: Hides the title with the asset identifier.

Data stream Last Value

Widget that displays the last value obtained for a data stream.

How it works

Entity last value

The information can be displayed in various formats: graphically, symbolically, and textually.

We can also check its history and statistics: trend, maximum and minimum, percentile, mean, and median.

Widget Menu

Menu action list

The following actions can be performed:

  • Open device information: opens a temporary dashboard with device information
  • Edit: opens the device wizard
  • Open device details: opens the device information wizard
  • Generate QR: generates a QR code that will return basic information about the device
  • Historical data: “Data Points” widget in table format, showing the data stream’s history
  • View Chart: “Data Stream history” widget that displays the evolution of the data stream
  • Execute operation: opens the operation execution wizard to perform an operation on the device
  • Capture screen: Takes a screenshot of the widget.
  • Duplicate widget: Creates a duplicate of the widget on the dashboard.
  • Copy widget: Copies the widget to another dashboard.
  • Change widget location: Moves the widget to another dashboard.

Configuration

Configuration

General

  • Boxed: widget will be displayed with background in dahsboard.
  • About: widget description in Markdown format.
  • Title: widget title. It can be configured to remain fixed in the widget or only be displayed when it receives focus.
  • Toolbar: configures the behavior of the widget bar on the dashboard, allowing you to hide it, hide it when not in use, or leave it always visible.
  • Refresh Frequency: allows configuring the data refresh frequency displayed in the list.
  • Extra actions: allows user to add new specific actions to the widget with your own code.

Extra action config

You can add a new one by pressing the New button.

Once you added a custom action it can be modified later by pressing the name in the list.

In order to remove the custom action click the delete icon button on the right.

In extra actions you can write your own code were you can open other dashboards, entities dashboards or execute wizards.

Extra action code

You can find all available functions and methods in Extra parameters

General
  • Entity key: Device to display

  • DatastreamId: Data stream whose last value (and its statistics) will be displayed

    • Name: Alias for the selected field to display
    • Test Value: If this data is filled in, a preview of how the widget will look with the value given to the datastream will be displayed in the configuration.
    • Symbol: Unit for the value
    • View mode: Type of data visualization
    Conf chart
    • Value: Value in text format (default mode).

    • Icon: Display an icon (Symbol field) along with the value in text mode.

    • Battery (Percent): Display the value within a battery. Reference values will be configured in the “Chart colors” panel.

    • Bar (Percent/Range): Display the value in a bar. Reference values will be configured in the “Chart colors” panel.

    • Gauge (Percent/Range): Display the value in a gauge-type graph. Reference values will be configured in the “Chart colors” panel.

    • Choose an icon: Icon to display (for Icon mode).

    • Choose color: Icon color.

    • Alignment: Alignment of the value (Value and Icon modes) in the widget.

    • Size: Value size.

    • Extra information: Extra information to display in the widget along with the value.

    • FORMATTER: Opens a panel where you can format the value. Formatter

Advanced

General
  • Historical data graph: Display a graph showing the value’s evolution over time
  • Statistical data graph: Display statistical data
  • Choose a period: Time frame for sampling the statistical data and its visualization in the value evolution graph
  • Trend: Assign a color based on the value’s trend

Visualization

Visualization

We can configure certain elements of the graphs displayed in the widget:

  • Background color
  • Hide details header panel: Removes the menu allowing for the modification of the type of visualization as well as the type of value to display.

Device Hierarchy Graph

In this widget, you will be able to graphically view the hierarchy of a device within the organization.

How it works

Asset related

You will be able to view its communication modules, related assets, and its topology.

You can choose between displaying:

  • provisioned values
  • collected values
  • both types of values

Communications Module

Communications module

In this view, you will be able to see the communication modules available on the device.

By clicking on the device card, you can:

  • view pre-configured information in the widget
  • perform actions on the device
Communications module

In this view, you can see the assets related to the device.

By clicking on either the device card or the asset cards, you can:

  • view pre-configured information in the widget
  • perform actions on the device or asset

Topology

Topology

In this view, you can see the topology of the device.

A panel will be available to indicate the relationships between different entities.

Widget Menu

Menu action list

The following actions can be performed:

  • Open device information: Opens a temporary dashboard with the device information
  • Edit: Opens the device wizard
  • Generate QR: Generates a QR code that will provide basic information about the device
  • Execute operation: Opens an operation execution wizard to perform an operation on the device
  • Capture screen: Takes a screenshot of the widget.
  • Duplicate widget: Creates a duplicate of the widget on the dashboard.
  • Copy widget: Copies the widget to another dashboard.
  • Change widget location: Moves the widget to another dashboard.

Configuration

Configuration

General

  • Boxed: widget will be displayed with background in dahsboard.
  • About: widget description in Markdown format.
  • Title: widget title. It can be configured to remain fixed in the widget or only be displayed when it receives focus.
  • Toolbar: configures the behavior of the widget bar on the dashboard, allowing you to hide it, hide it when not in use, or leave it always visible.
  • Refresh Frequency: allows configuring the data refresh frequency displayed in the list.
  • Extra actions: allows user to add new specific actions to the widget with your own code.

Extra action config

You can add a new one by pressing the New button.

Once you added a custom action it can be modified later by pressing the name in the list.

In order to remove the custom action click the delete icon button on the right.

In extra actions you can write your own code were you can open other dashboards, entities dashboards or execute wizards.

Extra action code

You can find all available functions and methods in Extra parameters

General
  • Entity key: Device to display
  • View: Default view to display
  • Relations type: Type of values to display: collected, provisioned, or both
Popup

You can configure the information to display in the popup that appears when clicking on the cards displayed in the widget, selecting values from the available data streams.

Visualization

Visualization

You can configure certain elements of the graphs displayed in the widget:

  • Background color
  • Hide details header panel: Removes the menu that allows changing the type of visualization as well as the type of value to display.
  • Provision elements color
  • Collection elements color

Entity Information Details

A widget that displays information about each of the data streams that make up the entity in a card format.

How it works

Asset related

On each card, you will be able to see:

  • the current value
  • the date when the value was taken
  • the source of the information
  • the type of provisioning (for provisioned data)
  • identifying icon

Target menu

Target menu

From each of the cards, you can open various widgets (varying depending on the type of data stream value):

  • Stream status: “Last Value” widget displaying datastream information, such as the last value and trends.
  • Historical data: “Data Points” widget in table format, showing the data stream’s historical data.
  • View Chart: “Data Stream history” widget displaying the data stream’s evolution in chart form.
  • View tracking data: “Tracking” widget showing the entity’s location on a map (only applicable if it’s a location-type data stream).
  • Change value (provision datastreams only): Allows the user to change the value of the datastream without having to open the corresponding wizard.

Grouping

Grouping

Choice of type of grouping.

Depending on its configuration, it can be by:

  • data model
  • categories of a data model
  • tags
  • whether the value is provisioned or collected

Performance

Performance

Graph showing the performance of the data stream.

Widget Menu

Menu action list

The following actions can be performed:

  • Open device information: Opens a temporary dashboard with device information
  • Edit: Opens the device wizard
  • Execute operation: Opens an operation execution wizard to perform an operation on the device
  • Capture screen: Takes a screenshot of the widget.
  • Duplicate widget: Creates a duplicate of the widget on the dashboard.
  • Copy widget: Copies the widget to another dashboard.
  • Change widget location: Moves the widget to another dashboard.

Configuration

Configuration

General

  • Boxed: widget will be displayed with background in dahsboard.
  • About: widget description in Markdown format.
  • Title: widget title. It can be configured to remain fixed in the widget or only be displayed when it receives focus.
  • Toolbar: configures the behavior of the widget bar on the dashboard, allowing you to hide it, hide it when not in use, or leave it always visible.
  • Refresh Frequency: allows configuring the data refresh frequency displayed in the list.
  • Extra actions: allows user to add new specific actions to the widget with your own code.

Extra action config

You can add a new one by pressing the New button.

Once you added a custom action it can be modified later by pressing the name in the list.

In order to remove the custom action click the delete icon button on the right.

In extra actions you can write your own code were you can open other dashboards, entities dashboards or execute wizards.

Extra action code

You can find all available functions and methods in Extra parameters

General
  • Entity key: Device to display
  • Extra information: Choice of data to display within the card
  • Grouping: Choice of type of grouping:
    • data model
    • categories of a data model
    • tags
    • whether the value is provisioned or collected
  • DatastreamId: Choice and format of the displayed data streams ConfDatastreamId
    • Choose whether to only view the selected data streams
    • Format the selected data streams
      • Alias
      • Category: a new category can be created for grouping the data streams
      • Position: position of the value on the card
      • Icon: representative icon that will be displayed on the card
      • Format: format the value of the displayed data stream

Advanced

General

Visualization

Visualization

Certain elements of the graphs displayed in the widget can be configured:

  • Background color
  • Hide details header panel: Removes the menu that allows modifying the type of visualization and the type of value to display.
  • Default alignment: position of the value on the cards

Image Widget

The widget allows you to upload and configure an image with data icons overlaid on it.

How it works

Image

Once the widget is configured, an image will be displayed with the configured data.

Icon Menu

Data can be viewed as icons positioned over the image, which we can interact with to view information about them:

  • Stream status: “Last Value” widget displaying datastream information, such as the last value and trends.
  • Historical data: “Data Points” widget in table format, showing the data stream’s historical data.
  • View Chart: “Data Stream history” widget displaying the data stream’s evolution in chart form.
  • View tracking data: “Tracking” widget showing the entity’s location on a map (only applicable if it’s a location-type data stream).
  • Change value (provision datastreams only): Allows the user to change the value of the datastream without having to open the corresponding wizard.

Widget Menu

Image menu action

The following actions can be performed:

  • Capture screen: Takes a screenshot of the widget.
  • Duplicate widget: Creates a duplicate of the widget on the dashboard.
  • Copy widget: Copies the widget to another dashboard.
  • Change widget location: Moves the widget to another dashboard.

Configuration

Configuration

Image Upload

General

From here, we can upload the image to display and its format.

Icon Configuration

Icon

Using the + button, we can add icons to the image.

Existing icons can also be edited by clicking on them.

We can configure:

  • General:

    Icon general
    • Entity key: Device from which we will obtain the data
    • DatastreamId: Data stream whose value will be displayed on the icon
  • View:

    Icon view
    • Name: Alias for the selected field to display
    • Test Value: If this data is filled in, a preview of how the widget will look with the value given to the datastream will be displayed in the configuration.
    • Symbol: Unit for the value
    • View mode: Type of data visualization
    View mode
    • Value: Value in text format (default mode).

    • Icon: Display an icon (Symbol field) along with the value in text mode.

    • Battery (Percent): Display the value within a battery. Reference values will be configured in the “Chart colors” panel.

    • Bar (Percent/Range): Display the value in a bar. Reference values will be configured in the “Chart colors” panel.

    • Gauge (Percent/Range): Display the value in a gauge-type graph. Reference values will be configured in the “Chart colors” panel.

    • Choose an icon: Icon to display (for Icon mode).

    • Choose color: Icon color.

    • Alignment: Alignment of the value (Value and Icon modes) in the widget.

    • Size: Value size.

    • Extra information: Extra information to display in the widget along with the value.

    • FORMATTER: Opens a panel where you can format the value. Formatter

  • Advanced: View mode

    • Prevent override entity identifier in templates

Ticket Data stream Last value

Widget that displays the last value obtained for a data stream.

How it works

Ticket last value

The information can be displayed in various ways: graphical, symbolic, and text-based.

We can also review its history and statistics: trend, maximum and minimum, percentile, mean, and median.

Widget Menu

Menu action list

The following actions can be performed:

  • Open ticket information: opens a temporary dashboard with information on the ticket.
  • Edit: opens the ticket wizard.
  • Capture screen: Takes a screenshot of the widget.
  • Duplicate widget: Creates a duplicate of the widget on the dashboard.
  • Copy widget: Copies the widget to another dashboard.
  • Change widget location: Moves the widget to another dashboard.

Configuration

Configuration

General

  • Boxed: widget will be displayed with background in dahsboard.
  • About: widget description in Markdown format.
  • Title: widget title. It can be configured to remain fixed in the widget or only be displayed when it receives focus.
  • Toolbar: configures the behavior of the widget bar on the dashboard, allowing you to hide it, hide it when not in use, or leave it always visible.
  • Refresh Frequency: allows configuring the data refresh frequency displayed in the list.
  • Extra actions: allows user to add new specific actions to the widget with your own code.

Extra action config

You can add a new one by pressing the New button.

Once you added a custom action it can be modified later by pressing the name in the list.

In order to remove the custom action click the delete icon button on the right.

In extra actions you can write your own code were you can open other dashboards, entities dashboards or execute wizards.

Extra action code

You can find all available functions and methods in Extra parameters

General
  • Ticket: The ticket to display.

  • DatastreamId: Data stream whose last value (and its statistics) will be displayed.

    • Name: Alias for the selected field to display
    • Test Value: If this data is filled in, a preview of how the widget will look with the value given to the datastream will be displayed in the configuration.
    • Symbol: Unit for the value
    • View mode: Type of data visualization
    View mode
    • Value: Value in text format (default mode).

    • Icon: Display an icon (Symbol field) along with the value in text mode.

    • Battery (Percent): Display the value within a battery. Reference values will be configured in the “Chart colors” panel.

    • Bar (Percent/Range): Display the value in a bar. Reference values will be configured in the “Chart colors” panel.

    • Gauge (Percent/Range): Display the value in a gauge-type graph. Reference values will be configured in the “Chart colors” panel.

    • Choose an icon: Icon to display (for Icon mode).

    • Choose color: Icon color.

    • Alignment: Alignment of the value (Value and Icon modes) in the widget.

    • Size: Value size.

    • Extra information: Extra information to display in the widget along with the value.

    • FORMATTER: Opens a panel where you can format the value. Formatter

Advanced

General
  • Historical data graph: Display a graph showing the value’s evolution over time.
  • Statistical data graph: Display statistical data.

Visualization

Visualization

We can configure certain elements of the graphs displayed in the widget:

  • Background color
  • Hide details header panel: Removes the menu allowing for the modification of the type of visualization as well as the type of value to display.

Ticket Information Details

Widget that displays the information for each of the data streams that make up the ticket in card format.

How it works

Ticket details

On each card, we can see:

  • the current value
  • the date the value was taken
  • the source of the information
  • the type of provision (for provisioned data)
  • identifying icon

Target Menu

Target menu

From each card, we can open various widgets (varying depending on the type of value of the data stream):

  • Stream status: “Last Value” widget displaying datastream information, such as the last value and trends.
  • Historical data: “Data Points” widget in table format, showing the data stream’s historical data.
  • View Chart: “Data Stream history” widget displaying the data stream’s evolution in chart form.
  • View tracking data: “Tracking” widget showing the entity’s location on a map (only applicable if it’s a location-type data stream).
  • Change value (provision datastreams only): Allows the user to change the value of the datastream without having to open the corresponding wizard.

Grouping

Grouping

Selection of the type of grouping.

Depending on its configuration, it could be by:

  • data model
  • categories of a data model
  • tags
  • whether the value is provisioned or collected

Widget Menu

Menu action list

The following actions can be performed:

  • Open ticket information: opens a temporary dashboard with ticket information
  • Edit: opens the ticket wizard
  • Capture screen: Takes a screenshot of the widget.
  • Duplicate widget: Creates a duplicate of the widget on the dashboard.
  • Copy widget: Copies the widget to another dashboard.
  • Change widget location: Moves the widget to another dashboard.

Configuration

Configuration

General

  • Boxed: widget will be displayed with background in dahsboard.
  • About: widget description in Markdown format.
  • Title: widget title. It can be configured to remain fixed in the widget or only be displayed when it receives focus.
  • Toolbar: configures the behavior of the widget bar on the dashboard, allowing you to hide it, hide it when not in use, or leave it always visible.
  • Refresh Frequency: allows configuring the data refresh frequency displayed in the list.
  • Extra actions: allows user to add new specific actions to the widget with your own code.

Extra action config

You can add a new one by pressing the New button.

Once you added a custom action it can be modified later by pressing the name in the list.

In order to remove the custom action click the delete icon button on the right.

In extra actions you can write your own code were you can open other dashboards, entities dashboards or execute wizards.

Extra action code

You can find all available functions and methods in Extra parameters

General
  • Ticket: Ticket to display
  • Extra Information: Selection of data to be displayed within the card
  • Grouping: Selection of the type of grouping:
    • data model
    • categories of a data model
    • tags
    • whether the value is provisioned or collected
  • DatastreamId: Selection and format of displayed data streams ConfDatastreamId
    • Choose whether to view only the selected data streams
    • Format the selected data streams
      • Alias
      • Category: a new category can be created to group the data streams
      • Position: placement of the value on the card
      • Icon: representative icon to be displayed on the card
      • Format: formatting the value of the data stream to be displayed

Advanced

General

Visualization

Visualization

We can configure certain elements of the graphs displayed in the widget:

  • Background color
  • Hide details header panel: Removes the menu allowing the modification of the type of visualization as well as the type of value to display.
  • Default alignment: placement of the value on the cards

Time series last value

Widget that displays the last value obtained in a time series.

How it works

Time Series last value

The information can be displayed in various formats: graphically, symbolically, and textually.

We can also check its history and statistics: trend, maximum and minimum, percentile, mean, and median.

Widget Menu

Menu action list

The following actions can be performed:

  • Open device information: opens a temporary dashboard with device information
  • Edit: opens the device wizard
  • Open device details: opens the device information wizard
  • Generate QR: generates a QR code that will return basic information about the device
  • Historical data: “Time Series data list” widget in table format, showing the time series’ history
  • View Chart: “Time Series history” widget that displays the evolution of the time series
  • Execute operation: opens the operation execution wizard to perform an operation on the device
  • Capture screen: Takes a screenshot of the widget.
  • Duplicate widget: Creates a duplicate of the widget on the dashboard.
  • Copy widget: Copies the widget to another dashboard.
  • Change widget location: Moves the widget to another dashboard.

Configuration

General

  • Boxed: widget will be displayed with background in dahsboard.
  • About: widget description in Markdown format.
  • Title: widget title. It can be configured to remain fixed in the widget or only be displayed when it receives focus.
  • Toolbar: configures the behavior of the widget bar on the dashboard, allowing you to hide it, hide it when not in use, or leave it always visible.
  • Refresh Frequency: allows configuring the data refresh frequency displayed in the list.
  • Extra actions: allows user to add new specific actions to the widget with your own code.

Extra action config

You can add a new one by pressing the New button.

Once you added a custom action it can be modified later by pressing the name in the list.

In order to remove the custom action click the delete icon button on the right.

In extra actions you can write your own code were you can open other dashboards, entities dashboards or execute wizards.

Extra action code

You can find all available functions and methods in Extra parameters

  • Organization: Organization of the desired time series
  • Time Series: Time Series source
  • Value column: Column to read the value
  • Date column: Column to read the date of the value and for stats
  • Entity key: Device to display
  • DatastreamId: Data stream whose last value (and its statistics) will be displayed
Configuration General
  • Name: Alias for the selected field to display
  • Test Value: If this data is filled in, a preview of how the widget will look with the value given to the datastream will be displayed in the configuration.
  • Symbol: Unit for the value
  • View mode: Type of data visualization
Conf chart
  • Value: Value in text format (default mode).

  • Icon: Display an icon (Symbol field) along with the value in text mode.

  • Battery (Percent): Display the value within a battery. Reference values will be configured in the “Chart colors” panel.

  • Bar (Percent/Range): Display the value in a bar. Reference values will be configured in the “Chart colors” panel.

  • Gauge (Percent/Range): Display the value in a gauge-type graph. Reference values will be configured in the “Chart colors” panel.

  • Choose an icon: Icon to display (for Icon mode).

  • Choose color: Icon color.

  • Alignment: Alignment of the value (Value and Icon modes) in the widget.

  • Size: Value size.

  • Extra information: Extra information to display in the widget along with the value.

  • FORMATTER: Opens a panel where you can format the value. Formatter

Advanced

Configuration Advanced
  • Historical data graph: Display a graph showing the value’s evolution over time
  • Statistical data graph: Display statistical data
  • Choose a period: Time frame for sampling the statistical data and its visualization in the value evolution graph
  • Trend: Assign a color based on the value’s trend

Visualization

Configuration Visualization

We can configure certain elements of the graphs displayed in the widget:

  • Background color background color for the widget
  • Hide details header panel: Removes the menu allowing for the modification of the type of visualization as well as the type of value to display.

Listings

The website features listings, widgets that will display information in a table format.

Columns to display and the format of the data can be configured. One can filter by content, dates, and perform various actions such as executing operations on the displayed entities.

Widgets


Subsections of Listings

Areas List

The listing of areas allows you to view/manage the areas within the organization.

How it works

Below are the actions that can be performed both within the widget and on the displayed data.

Entity List

Filter by Columns

Column filter

Basic Filter

Basic filter

Perform a basic search by entering text that will filter by predefined fields.

Advanced Filter

Advanced filter

Perform a search by selecting the fields to filter by and how to filter by them.

Save and Restore Filters

Basic and Advanced filters can be saved in order to preconfigure a list of filters and restore them at any time. This feature is only available in own dashboards but can be shared with other users.

You can save a filter by fullfilling the filter name in the field at the bottom of the filter panel and clicking on the save button. When a filter is saved, it is stored in the widget’s filter list and can be restored at any time by selecting it from the saved filters list located at the top of the filter panel.

Filters can be saved only when a new filter is created.

This can be useful when you want to save a list of filters that you use frequently and restore them at any time.

Widget Menu

Menu action list

The following actions can be performed:

  • New area: Opens the area creation wizard
  • Capture screen: Takes a screenshot of the widget.
  • Duplicate widget: Creates a duplicate of the widget on the dashboard.
  • Copy widget: Copies the widget to another dashboard.
  • Change widget location: Moves the widget to another dashboard.

Temporarily Sort and Hide Column

Sort menu

Actions Per Entity

Row actions

The following actions can be performed:

  • Edit: Opens the area editing wizard
  • Delete: Deletes the user

Configuration

Configuration

General

  • Boxed: widget will be displayed with background in dahsboard.
  • About: widget description in Markdown format.
  • Title: widget title. It can be configured to remain fixed in the widget or only be displayed when it receives focus.
  • Toolbar: configures the behavior of the widget bar on the dashboard, allowing you to hide it, hide it when not in use, or leave it always visible.
  • Refresh Frequency: allows configuring the data refresh frequency displayed in the list.
  • Extra actions: allows user to add new specific actions to the widget with your own code.

Extra action config

You can add a new one by pressing the New button.

Once you added a custom action it can be modified later by pressing the name in the list.

In order to remove the custom action click the delete icon button on the right.

In extra actions you can write your own code were you can open other dashboards, entities dashboards or execute wizards.

Extra action code

You can find all available functions and methods in Extra parameters

Cell Configuration

Column configuration
  • Alias: Modify the column name. If nothing is added, it will use the default configured name.

  • Show entity actions: Allow displaying the actions menu when selecting its value in the cell. If the column is an identifier, this field will be enabled.

  • Hidden column: Enabling this option will hide the column from the user. This is useful when you need the data for formatting purposes, as only the data required in the list will be available.

  • Options:

    • Modify the cell’s width and horizontal alignment of its content. Column width
    • Format the cell’s value. Column formatter
  • Pagination: Configure the number of rows to display per page. Table pagination

Virtual columns

Also you can add virtual columns to lists.

Virtual Column config

These columns do not have their own values ​​and must be configured in the column formatter once added.

Virtual Column Formatter

Please note that the contents of this column will never be output to CSV, as it is calculated on the fly and does not rely on any native platform resources.

Virtual Column

Button columns

Also you can add button columns to lists in order to execute some custom action related with the row data.

Button Column config

Button label can be setted in normal or virtual columns. Label will be the value.

Button action code receives the complete rowData and you can open other dashboards, entities dashboards or execute wizards.

Button Column Formatter

You can find all available functions and methods in Extra parameters

Advanced

In this section, you will configure various filters that will be applied to queries regardless of the user’s specific filtering preferences.

Advanced Configuration

Widget Filters Configuration

Here you can define how widget filters should behave when sharing the dashboard with other users/organizations. This means that when sharing, a user opens these dashboards and won’t see the filters applied to the original dashboard in the specified widgets, preventing the information displayed from changing after a dashboard refresh.

The three possible options are:

  • Don’t share the widget’s general filter
  • Don’t share header filters in lists
  • Don’t share sorting in lists

Bulk List

The listing of bulks allows you to view the executed bulks within the organization and their outcomes.

How it works

Below are the actions that can be performed both within the widget and on the displayed data.

Entity List

Widget Menu

Menu action list

The following actions can be undertaken:

  • Upload Bulk File: Opens the bulk upload wizard
  • Capture screen: Takes a screenshot of the widget.
  • Duplicate widget: Creates a duplicate of the widget on the dashboard.
  • Copy widget: Copies the widget to another dashboard.
  • Change widget location: Moves the widget to another dashboard.

Download Result

Row actions

From here, you can download the result of the bulk operation.

Configuration

Configuration

General

  • Boxed: widget will be displayed with background in dahsboard.
  • About: widget description in Markdown format.
  • Title: widget title. It can be configured to remain fixed in the widget or only be displayed when it receives focus.
  • Toolbar: configures the behavior of the widget bar on the dashboard, allowing you to hide it, hide it when not in use, or leave it always visible.
  • Refresh Frequency: allows configuring the data refresh frequency displayed in the list.
  • Extra actions: allows user to add new specific actions to the widget with your own code.

Extra action config

You can add a new one by pressing the New button.

Once you added a custom action it can be modified later by pressing the name in the list.

In order to remove the custom action click the delete icon button on the right.

In extra actions you can write your own code were you can open other dashboards, entities dashboards or execute wizards.

Extra action code

You can find all available functions and methods in Extra parameters

Cell Configuration

Column configuration
  • Alias: Modify the column name. If nothing is added, it will use the default configured name.

  • Show entity actions: Allow displaying the actions menu when selecting its value in the cell. If the column is an identifier, this field will be enabled.

  • Hidden column: Enabling this option will hide the column from the user. This is useful when you need the data for formatting purposes, as only the data required in the list will be available.

  • Options:

    • Modify the cell’s width and horizontal alignment of its content. Column width
    • Format the cell’s value. Column formatter
  • Pagination: Configure the number of rows to display per page. Table pagination

Virtual columns

Also you can add virtual columns to lists.

Virtual Column config

These columns do not have their own values ​​and must be configured in the column formatter once added.

Virtual Column Formatter

Please note that the contents of this column will never be output to CSV, as it is calculated on the fly and does not rely on any native platform resources.

Virtual Column

Button columns

Also you can add button columns to lists in order to execute some custom action related with the row data.

Button Column config

Button label can be setted in normal or virtual columns. Label will be the value.

Button action code receives the complete rowData and you can open other dashboards, entities dashboards or execute wizards.

Button Column Formatter

You can find all available functions and methods in Extra parameters

Advanced

In this section, you will configure various filters that will be applied to queries regardless of the user’s specific filtering preferences.

Advanced Configuration

Widget Filters Configuration

Here you can define how widget filters should behave when sharing the dashboard with other users/organizations. This means that when sharing, a user opens these dashboards and won’t see the filters applied to the original dashboard in the specified widgets, preventing the information displayed from changing after a dashboard refresh.

The three possible options are:

  • Don’t share the widget’s general filter
  • Don’t share header filters in lists
  • Don’t share sorting in lists

Bulk List (Advanced)

The listing of advanced bulks allows you to view executed bulks, using provisioning features, within the organization and their outcomes.

How it works

Below are the actions that can be performed both within the widget and on the displayed data.

Entity List

Widget Menu

Menu action list

The following actions can be taken:

  • Upload Bulk File (Advanced): Opens the advanced bulk upload wizard, utilizing provisioning features.
  • Capture screen: Takes a screenshot of the widget.
  • Duplicate widget: Creates a duplicate of the widget on the dashboard.
  • Copy widget: Copies the widget to another dashboard.
  • Change widget location: Moves the widget to another dashboard.

Download Result

Row actions

From here, you can download the result of the bulk operation.

Configuration

Configuration

General

  • Boxed: widget will be displayed with background in dahsboard.
  • About: widget description in Markdown format.
  • Title: widget title. It can be configured to remain fixed in the widget or only be displayed when it receives focus.
  • Toolbar: configures the behavior of the widget bar on the dashboard, allowing you to hide it, hide it when not in use, or leave it always visible.
  • Refresh Frequency: allows configuring the data refresh frequency displayed in the list.
  • Extra actions: allows user to add new specific actions to the widget with your own code.

Extra action config

You can add a new one by pressing the New button.

Once you added a custom action it can be modified later by pressing the name in the list.

In order to remove the custom action click the delete icon button on the right.

In extra actions you can write your own code were you can open other dashboards, entities dashboards or execute wizards.

Extra action code

You can find all available functions and methods in Extra parameters

Cell Configuration

Column configuration
  • Alias: Modify the column name. If nothing is added, it will use the default configured name.

  • Show entity actions: Allow displaying the actions menu when selecting its value in the cell. If the column is an identifier, this field will be enabled.

  • Hidden column: Enabling this option will hide the column from the user. This is useful when you need the data for formatting purposes, as only the data required in the list will be available.

  • Options:

    • Modify the cell’s width and horizontal alignment of its content. Column width
    • Format the cell’s value. Column formatter
  • Pagination: Configure the number of rows to display per page. Table pagination

Virtual columns

Also you can add virtual columns to lists.

Virtual Column config

These columns do not have their own values ​​and must be configured in the column formatter once added.

Virtual Column Formatter

Please note that the contents of this column will never be output to CSV, as it is calculated on the fly and does not rely on any native platform resources.

Virtual Column

Button columns

Also you can add button columns to lists in order to execute some custom action related with the row data.

Button Column config

Button label can be setted in normal or virtual columns. Label will be the value.

Button action code receives the complete rowData and you can open other dashboards, entities dashboards or execute wizards.

Button Column Formatter

You can find all available functions and methods in Extra parameters

Advanced

In this section, you will configure various filters that will be applied to queries regardless of the user’s specific filtering preferences.

Advanced Configuration

Widget Filters Configuration

Here you can define how widget filters should behave when sharing the dashboard with other users/organizations. This means that when sharing, a user opens these dashboards and won’t see the filters applied to the original dashboard in the specified widgets, preventing the information displayed from changing after a dashboard refresh.

The three possible options are:

  • Don’t share the widget’s general filter
  • Don’t share header filters in lists
  • Don’t share sorting in lists

Bundles List

The listing of bundles allows you to view/manage the bundles within an organization.

How it works

Below are the actions that can be performed both within the widget and on the displayed data.

Entity List

Filter by Columns

column filter

Basic Filter

Basic filter

Perform a basic search by entering text that will filter by predefined fields.

Advanced Filter

Advanced filter

Perform a search by selecting the fields to filter by and how to filter by them.

Save and Restore Filters

Basic and Advanced filters can be saved in order to preconfigure a list of filters and restore them at any time. This feature is only available in own dashboards but can be shared with other users.

You can save a filter by fullfilling the filter name in the field at the bottom of the filter panel and clicking on the save button. When a filter is saved, it is stored in the widget’s filter list and can be restored at any time by selecting it from the saved filters list located at the top of the filter panel.

Filters can be saved only when a new filter is created.

This can be useful when you want to save a list of filters that you use frequently and restore them at any time.

Widget Menu

Menu action list

The following actions can be performed:

  • New bundle: Opens the bundle creation wizard.
  • Capture screen: Takes a screenshot of the widget.
  • Duplicate widget: Creates a duplicate of the widget on the dashboard.
  • Copy widget: Copies the widget to another dashboard.
  • Change widget location: Moves the widget to another dashboard.

Sort and Temporarily Hide Columns

Sort menu

Entity Actions

Row actions

The following actions can be performed:

  • Edit: Opens the bundle editing wizard. Only if the bundle is deactivated.
  • Activate/Deactivate: Activates or deactivates the bundle.
  • Delete: Deletes the bundle.

Configuration

Configuration

General

  • Boxed: widget will be displayed with background in dahsboard.
  • About: widget description in Markdown format.
  • Title: widget title. It can be configured to remain fixed in the widget or only be displayed when it receives focus.
  • Toolbar: configures the behavior of the widget bar on the dashboard, allowing you to hide it, hide it when not in use, or leave it always visible.
  • Refresh Frequency: allows configuring the data refresh frequency displayed in the list.
  • Extra actions: allows user to add new specific actions to the widget with your own code.

Extra action config

You can add a new one by pressing the New button.

Once you added a custom action it can be modified later by pressing the name in the list.

In order to remove the custom action click the delete icon button on the right.

In extra actions you can write your own code were you can open other dashboards, entities dashboards or execute wizards.

Extra action code

You can find all available functions and methods in Extra parameters

Cell Configuration

Column configuration
  • Alias: Modify the column name. If nothing is added, it will use the default configured name.

  • Show entity actions: Allow displaying the actions menu when selecting its value in the cell. If the column is an identifier, this field will be enabled.

  • Hidden column: Enabling this option will hide the column from the user. This is useful when you need the data for formatting purposes, as only the data required in the list will be available.

  • Options:

    • Modify the cell’s width and horizontal alignment of its content. Column width
    • Format the cell’s value. Column formatter
  • Pagination: Configure the number of rows to display per page. Table pagination

Virtual columns

Also you can add virtual columns to lists.

Virtual Column config

These columns do not have their own values ​​and must be configured in the column formatter once added.

Virtual Column Formatter

Please note that the contents of this column will never be output to CSV, as it is calculated on the fly and does not rely on any native platform resources.

Virtual Column

Button columns

Also you can add button columns to lists in order to execute some custom action related with the row data.

Button Column config

Button label can be setted in normal or virtual columns. Label will be the value.

Button action code receives the complete rowData and you can open other dashboards, entities dashboards or execute wizards.

Button Column Formatter

You can find all available functions and methods in Extra parameters

Advanced

In this section, you will configure various filters that will be applied to queries regardless of the user’s specific filtering preferences.

Advanced Configuration

Widget Filters Configuration

Here you can define how widget filters should behave when sharing the dashboard with other users/organizations. This means that when sharing, a user opens these dashboards and won’t see the filters applied to the original dashboard in the specified widgets, preventing the information displayed from changing after a dashboard refresh.

The three possible options are:

  • Don’t share the widget’s general filter
  • Don’t share header filters in lists
  • Don’t share sorting in lists

Data Points List

The listing of data points allows you to view the data of various entities within an organization.

How it works

Below are the actions that can be performed both within the widget and on the displayed data.

Entity List

Filter by Columns

column filter

Basic Filter

Basic filter

Perform a basic search by entering text that will filter by predefined fields.

Advanced Filter

Advanced filter

Perform a search by selecting the fields to filter by and how to filter by them.

Save and Restore Filters

Basic and Advanced filters can be saved in order to preconfigure a list of filters and restore them at any time. This feature is only available in own dashboards but can be shared with other users.

You can save a filter by fullfilling the filter name in the field at the bottom of the filter panel and clicking on the save button. When a filter is saved, it is stored in the widget’s filter list and can be restored at any time by selecting it from the saved filters list located at the top of the filter panel.

Filters can be saved only when a new filter is created.

This can be useful when you want to save a list of filters that you use frequently and restore them at any time.

Widget Menu

Menu action list

The following actions can be performed:

  • Download: Download data in CSV format.
  • Capture screen: Takes a screenshot of the widget.
  • Duplicate widget: Creates a duplicate of the widget on the dashboard.
  • Copy widget: Copies the widget to another dashboard.
  • Change widget location: Moves the widget to another dashboard.

Sort and Temporarily Hide Columns

Sort menu

Configuration

Configuration

General

  • Boxed: widget will be displayed with background in dahsboard.
  • About: widget description in Markdown format.
  • Title: widget title. It can be configured to remain fixed in the widget or only be displayed when it receives focus.
  • Toolbar: configures the behavior of the widget bar on the dashboard, allowing you to hide it, hide it when not in use, or leave it always visible.
  • Refresh Frequency: allows configuring the data refresh frequency displayed in the list.
  • Extra actions: allows user to add new specific actions to the widget with your own code.

Extra action config

You can add a new one by pressing the New button.

Once you added a custom action it can be modified later by pressing the name in the list.

In order to remove the custom action click the delete icon button on the right.

In extra actions you can write your own code were you can open other dashboards, entities dashboards or execute wizards.

Extra action code

You can find all available functions and methods in Extra parameters

Cell Configuration

Column configuration
  • Alias: Modify the column name. If nothing is added, it will use the default configured name.

  • Show entity actions: Allow displaying the actions menu when selecting its value in the cell. If the column is an identifier, this field will be enabled.

  • Hidden column: Enabling this option will hide the column from the user. This is useful when you need the data for formatting purposes, as only the data required in the list will be available.

  • Options:

    • Modify the cell’s width and horizontal alignment of its content. Column width
    • Format the cell’s value. Column formatter
  • Pagination: Configure the number of rows to display per page. Table pagination

Virtual columns

Also you can add virtual columns to lists.

Virtual Column config

These columns do not have their own values ​​and must be configured in the column formatter once added.

Virtual Column Formatter

Please note that the contents of this column will never be output to CSV, as it is calculated on the fly and does not rely on any native platform resources.

Virtual Column

Button columns

Also you can add button columns to lists in order to execute some custom action related with the row data.

Button Column config

Button label can be setted in normal or virtual columns. Label will be the value.

Button action code receives the complete rowData and you can open other dashboards, entities dashboards or execute wizards.

Button Column Formatter

You can find all available functions and methods in Extra parameters

Advanced

In this section, you will configure various filters that will be applied to queries regardless of the user’s specific filtering preferences.

Advanced Configuration

Widget Filters Configuration

Here you can define how widget filters should behave when sharing the dashboard with other users/organizations. This means that when sharing, a user opens these dashboards and won’t see the filters applied to the original dashboard in the specified widgets, preventing the information displayed from changing after a dashboard refresh.

The three possible options are:

  • Don’t share the widget’s general filter
  • Don’t share header filters in lists
  • Don’t share sorting in lists

Data Set data List

The listing allows us to view the values provided by a data set and manage the entities related to it.

How it works

Below are the actions that can be performed both within the widget and on the displayed data.

Entity List

Filter by Columns

column filter

Advanced Filter

Advanced filter

Perform a search by selecting the fields to filter by and how to filter by them.

Save and Restore Filters

Basic and Advanced filters can be saved in order to preconfigure a list of filters and restore them at any time. This feature is only available in own dashboards but can be shared with other users.

You can save a filter by fullfilling the filter name in the field at the bottom of the filter panel and clicking on the save button. When a filter is saved, it is stored in the widget’s filter list and can be restored at any time by selecting it from the saved filters list located at the top of the filter panel.

Filters can be saved only when a new filter is created.

This can be useful when you want to save a list of filters that you use frequently and restore them at any time.

Widget Menu

Menu action list

The following actions can be performed:

  • Download: Download data in CSV format
  • Capture screen: Takes a screenshot of the widget.
  • Duplicate widget: Creates a duplicate of the widget on the dashboard.
  • Copy widget: Copies the widget to another dashboard.
  • Change widget location: Moves the widget to another dashboard.

Sort

Sort menu

If data set has sorting columns configured, the sort menu will display the configured sorting columns.

You can apply the sorting configuration by clicking on the sorting configuration desired and remove with the clean button.

Entity Actions

Row actions

The actions to be performed will depend on the type of entity configured as the identifying column:

  • Edit: Edit the entity by opening the corresponding wizard for that entity type
  • Execute operation: Perform an operation on the displayed entity
  • Collect: Simulate data collection on an entity (if the entity type supports this action)
  • Open device/asset/subscriber/subscription information: Opens a temporary dashboard that will display information related to the entity
  • Open device/asset/subscriber/subscription details: Opens the information widget of an entity with the data of the entity
  • View hierarchy of the entity: Opens the hierarchy widget to display the hierarchy of the entity (if the entity type supports this action)
  • Delete: Delete the entity

Configuration

Configuration

General

  • Boxed: widget will be displayed with background in dahsboard.
  • About: widget description in Markdown format.
  • Title: widget title. It can be configured to remain fixed in the widget or only be displayed when it receives focus.
  • Toolbar: configures the behavior of the widget bar on the dashboard, allowing you to hide it, hide it when not in use, or leave it always visible.
  • Refresh Frequency: allows configuring the data refresh frequency displayed in the list.
  • Extra actions: allows user to add new specific actions to the widget with your own code.

Extra action config

You can add a new one by pressing the New button.

Once you added a custom action it can be modified later by pressing the name in the list.

In order to remove the custom action click the delete icon button on the right.

In extra actions you can write your own code were you can open other dashboards, entities dashboards or execute wizards.

Extra action code

You can find all available functions and methods in Extra parameters

Data Set and Column Selection

Data set select
  • Organization: Select the organization to which the data set belongs
  • Data set: Select the data set
  • Columns: Select columns configured in the data set

Column Identifier Selection

Data set row identifier

Selection of the identifying column. Based on the value of this column, the table will display different actions to perform on each of its rows.

Cell Configuration

Column configuration
  • Alias: Modify the column name. If nothing is added, it will use the default configured name.

  • Show entity actions: Allow displaying the actions menu when selecting its value in the cell. If the column is an identifier, this field will be enabled.

  • Hidden column: Enabling this option will hide the column from the user. This is useful when you need the data for formatting purposes, as only the data required in the list will be available.

  • Options:

    • Modify the cell’s width and horizontal alignment of its content. Column width
    • Format the cell’s value. Column formatter
  • Pagination: Configure the number of rows to display per page. Table pagination

Virtual columns

Also you can add virtual columns to lists.

Virtual Column config

These columns do not have their own values ​​and must be configured in the column formatter once added.

Virtual Column Formatter

Please note that the contents of this column will never be output to CSV, as it is calculated on the fly and does not rely on any native platform resources.

Virtual Column

Button columns

Also you can add button columns to lists in order to execute some custom action related with the row data.

Button Column config

Button label can be setted in normal or virtual columns. Label will be the value.

Button action code receives the complete rowData and you can open other dashboards, entities dashboards or execute wizards.

Button Column Formatter

You can find all available functions and methods in Extra parameters

Advanced

In this section, you will configure various filters that will be applied to queries regardless of the user’s specific filtering preferences.

Advanced Configuration

Widget Filters Configuration

Here you can define how widget filters should behave when sharing the dashboard with other users/organizations. This means that when sharing, a user opens these dashboards and won’t see the filters applied to the original dashboard in the specified widgets, preventing the information displayed from changing after a dashboard refresh.

The three possible options are:

  • Don’t share the widget’s general filter
  • Don’t share header filters in lists
  • Don’t share sorting in lists

Entities Alarms List

The alarm list allows you to view/manage alarms generated by the system in your organization.

How it works

Below are the actions that can be performed both within the widget and on the displayed data.

Entity List

Filter by Columns

Column filter

Basic Filter

Basic filter

Perform a basic search by entering text that will filter by predefined fields.

Advanced Filter

Advanced filter

Perform a search by selecting the fields to filter by and how to filter by them.

Save and Restore Filters

Basic and Advanced filters can be saved in order to preconfigure a list of filters and restore them at any time. This feature is only available in own dashboards but can be shared with other users.

You can save a filter by fullfilling the filter name in the field at the bottom of the filter panel and clicking on the save button. When a filter is saved, it is stored in the widget’s filter list and can be restored at any time by selecting it from the saved filters list located at the top of the filter panel.

Filters can be saved only when a new filter is created.

This can be useful when you want to save a list of filters that you use frequently and restore them at any time.

Widget Menu

Menu action list

The following actions can be performed:

  • Download: Data download in CSV format
  • Capture screen: Takes a screenshot of the widget.
  • Duplicate widget: Creates a duplicate of the widget on the dashboard.
  • Copy widget: Copies the widget to another dashboard.
  • Change widget location: Moves the widget to another dashboard.

Selection and Operations on Entities

Selection

The following actions can be performed on the selected alarm entities:

  • Filter: Data will be displayed after filtering on the selected alarm entities
  • Execute Operations: Perform an operation on the selected alarm entities

Temporarily Sort and Hide Column

Sort menu

Actions Per Entity

Row actions

The following actions can be performed:

  • Alarm detail: Opens the information widget for an alarm
  • Execute operation: Perform an operation on the selected alarm entity
  • Close: Opens the alarm wizard to close the selected alarm
  • Attend: Opens the alarm wizard to address the selected alarm
  • Open alarm information: Opens a temporary dashboard that will display information related to the alarm
  • Open device details: Opens the information widget for an entity with the entity’s data
  • Edit entity: Edits the entity by opening the corresponding wizard for the type of alarm entity selected
  • Open device information: Opens a temporary dashboard that will display information related to the alarm entity

Configuration

Configuration

General

  • Boxed: widget will be displayed with background in dahsboard.
  • About: widget description in Markdown format.
  • Title: widget title. It can be configured to remain fixed in the widget or only be displayed when it receives focus.
  • Toolbar: configures the behavior of the widget bar on the dashboard, allowing you to hide it, hide it when not in use, or leave it always visible.
  • Refresh Frequency: allows configuring the data refresh frequency displayed in the list.
  • Extra actions: allows user to add new specific actions to the widget with your own code.

Extra action config

You can add a new one by pressing the New button.

Once you added a custom action it can be modified later by pressing the name in the list.

In order to remove the custom action click the delete icon button on the right.

In extra actions you can write your own code were you can open other dashboards, entities dashboards or execute wizards.

Extra action code

You can find all available functions and methods in Extra parameters

Cell Configuration

Column configuration
  • Alias: Modify the column name. If nothing is added, it will use the default configured name.

  • Show entity actions: Allow displaying the actions menu when selecting its value in the cell. If the column is an identifier, this field will be enabled.

  • Hidden column: Enabling this option will hide the column from the user. This is useful when you need the data for formatting purposes, as only the data required in the list will be available.

  • Options:

    • Modify the cell’s width and horizontal alignment of its content. Column width
    • Format the cell’s value. Column formatter
  • Pagination: Configure the number of rows to display per page. Table pagination

Virtual columns

Also you can add virtual columns to lists.

Virtual Column config

These columns do not have their own values ​​and must be configured in the column formatter once added.

Virtual Column Formatter

Please note that the contents of this column will never be output to CSV, as it is calculated on the fly and does not rely on any native platform resources.

Virtual Column

Button columns

Also you can add button columns to lists in order to execute some custom action related with the row data.

Button Column config

Button label can be setted in normal or virtual columns. Label will be the value.

Button action code receives the complete rowData and you can open other dashboards, entities dashboards or execute wizards.

Button Column Formatter

You can find all available functions and methods in Extra parameters

Advanced

In this section, you will configure various filters that will be applied to queries regardless of the user’s specific filtering preferences.

Advanced Configuration

Widget Filters Configuration

Here you can define how widget filters should behave when sharing the dashboard with other users/organizations. This means that when sharing, a user opens these dashboards and won’t see the filters applied to the original dashboard in the specified widgets, preventing the information displayed from changing after a dashboard refresh.

The three possible options are:

  • Don’t share the widget’s general filter
  • Don’t share header filters in lists
  • Don’t share sorting in lists

Entities List

The list of entities allows you to view and manage various types of entities: asset, device, subscriber, subscription; created within your organization.

How it works

Below are the actions that can be performed both within the widget and on the displayed data.

Entity List

Filter by Columns

column filter

Basic Filter

Basic filter

Perform a basic search by entering text that will filter by predefined fields.

Advanced Filter

Advanced filter

Perform a search by selecting the fields to filter by and how to filter by them.

Save and Restore Filters

Basic and Advanced filters can be saved in order to preconfigure a list of filters and restore them at any time. This feature is only available in own dashboards but can be shared with other users.

You can save a filter by fullfilling the filter name in the field at the bottom of the filter panel and clicking on the save button. When a filter is saved, it is stored in the widget’s filter list and can be restored at any time by selecting it from the saved filters list located at the top of the filter panel.

Filters can be saved only when a new filter is created.

This can be useful when you want to save a list of filters that you use frequently and restore them at any time.

Widget Menu

Menu action list

The following actions can be performed:

  • Download: Download data in CSV format
  • Create Device: Opens the device creation wizard
  • Create Asset: Opens the asset creation wizard
  • Create Subscription: Opens the subscription creation wizard
  • Create Subscriber: Opens the subscriber creation wizard
  • View in map: Opens the Maps widget, displaying the location of the entities shown in the table
  • Capture screen: Takes a screenshot of the widget.
  • Duplicate widget: Creates a duplicate of the widget on the dashboard.
  • Copy widget: Copies the widget to another dashboard.
  • Change widget location: Moves the widget to another dashboard.

Selection and Operations on Entities

Selection

The following actions can be performed on the selected entities:

  • Filter: Will display data filtered based on the selected entities
  • Execute operations: Execute an operation on the selected entities
  • Delete: Delete all selected entities and entities related to them

Sort and Temporarily Hide Columns

Sort menu

Actions per Entity

Row actions

The following actions can be performed:

  • Edit: Edit the entity by opening the corresponding wizard for the type of entity
  • Execute operation: Execute an operation on the displayed entity
  • Collect: Simulate data collection on an entity
  • Open device information: Opens a temporary dashboard displaying information related to the entity
  • Open device details: Opens the information widget of an entity with the entity’s data
  • View hierarchy of the entity: Opens the hierarchy widget to display the hierarchy of the entity
  • Delete: Deletes the entity

Configuration

Configuration

General

  • Boxed: widget will be displayed with background in dahsboard.
  • About: widget description in Markdown format.
  • Title: widget title. It can be configured to remain fixed in the widget or only be displayed when it receives focus.
  • Toolbar: configures the behavior of the widget bar on the dashboard, allowing you to hide it, hide it when not in use, or leave it always visible.
  • Refresh Frequency: allows configuring the data refresh frequency displayed in the list.
  • Extra actions: allows user to add new specific actions to the widget with your own code.

Extra action config

You can add a new one by pressing the New button.

Once you added a custom action it can be modified later by pressing the name in the list.

In order to remove the custom action click the delete icon button on the right.

In extra actions you can write your own code were you can open other dashboards, entities dashboards or execute wizards.

Extra action code

You can find all available functions and methods in Extra parameters

Column Selection

Data Stream select

Steps to select and configure the value of a datastream in a column:

  • Select one or more data streams.
  • Choose which values from these data streams to display; these will become different columns.
  • Once selected, click the + button.

Cell Configuration

Column configuration
  • Alias: Modify the column name. If nothing is added, it will use the default configured name.

  • Show entity actions: Allow displaying the actions menu when selecting its value in the cell. If the column is an identifier, this field will be enabled.

  • Hidden column: Enabling this option will hide the column from the user. This is useful when you need the data for formatting purposes, as only the data required in the list will be available.

  • Options:

    • Modify the cell’s width and horizontal alignment of its content. Column width
    • Format the cell’s value. Column formatter
  • Pagination: Configure the number of rows to display per page. Table pagination

Virtual columns

Also you can add virtual columns to lists.

Virtual Column config

These columns do not have their own values ​​and must be configured in the column formatter once added.

Virtual Column Formatter

Please note that the contents of this column will never be output to CSV, as it is calculated on the fly and does not rely on any native platform resources.

Virtual Column

Button columns

Also you can add button columns to lists in order to execute some custom action related with the row data.

Button Column config

Button label can be setted in normal or virtual columns. Label will be the value.

Button action code receives the complete rowData and you can open other dashboards, entities dashboards or execute wizards.

Button Column Formatter

You can find all available functions and methods in Extra parameters

Advanced

In this section, you will configure various filters that will be applied to queries regardless of the user’s specific filtering preferences.

Advanced Configuration

Widget Filters Configuration

Here you can define how widget filters should behave when sharing the dashboard with other users/organizations. This means that when sharing, a user opens these dashboards and won’t see the filters applied to the original dashboard in the specified widgets, preventing the information displayed from changing after a dashboard refresh.

The three possible options are:

  • Don’t share the widget’s general filter
  • Don’t share header filters in lists
  • Don’t share sorting in lists

Executions List

The list of operation executions allows you to view and manage the operation executions performed on various types of OpenGate entities: devices, subscribers, and subscriptions.

How it works

Below are the actions that can be performed both within the widget and on the displayed data.

Entity List

Filter by Columns

column filter

Basic Filter

Basic filter

Perform a basic search by entering text that will filter by predefined fields.

Advanced Filter

Advanced filter

Perform a search by selecting the fields to filter by and how to filter by them.

Save and Restore Filters

Basic and Advanced filters can be saved in order to preconfigure a list of filters and restore them at any time. This feature is only available in own dashboards but can be shared with other users.

You can save a filter by fullfilling the filter name in the field at the bottom of the filter panel and clicking on the save button. When a filter is saved, it is stored in the widget’s filter list and can be restored at any time by selecting it from the saved filters list located at the top of the filter panel.

Filters can be saved only when a new filter is created.

This can be useful when you want to save a list of filters that you use frequently and restore them at any time.

Widget Menu

Menu action list

The following actions can be performed:

  • Download: Download data in CSV format
  • Execute operation: Opens the operation execution wizard
  • Show history operation: A switch that allows viewing either in-progress or completed executions.
  • Capture screen: Takes a screenshot of the widget.
  • Duplicate widget: Creates a duplicate of the widget on the dashboard.
  • Copy widget: Copies the widget to another dashboard.
  • Change widget location: Moves the widget to another dashboard.

Selection and Operations on Entities

Selection

The following actions can be performed on the selected entities of the executions:

  • Filter: Data will be displayed filtered based on the selected entities
  • Execute operations: Execute an operation on the entities

Sort and Temporarily Hide Columns

Sort menu

Actions per Entity

Row actions

The following actions can be performed:

  • Execute operation: Execute an operation on the execution’s entity
  • Open device information: Opens a temporary dashboard displaying information related to the execution’s entity
  • Open device details: Opens the information widget of an entity with the execution entity’s data
  • Execution details: Opens the execution information widget
  • Edit entity: Edit the entity by opening the corresponding wizard for the type of the execution’s entity

Configuration

Configuration

General

  • Boxed: widget will be displayed with background in dahsboard.
  • About: widget description in Markdown format.
  • Title: widget title. It can be configured to remain fixed in the widget or only be displayed when it receives focus.
  • Toolbar: configures the behavior of the widget bar on the dashboard, allowing you to hide it, hide it when not in use, or leave it always visible.
  • Refresh Frequency: allows configuring the data refresh frequency displayed in the list.
  • Extra actions: allows user to add new specific actions to the widget with your own code.

Extra action config

You can add a new one by pressing the New button.

Once you added a custom action it can be modified later by pressing the name in the list.

In order to remove the custom action click the delete icon button on the right.

In extra actions you can write your own code were you can open other dashboards, entities dashboards or execute wizards.

Extra action code

You can find all available functions and methods in Extra parameters

Cell Configuration

Column configuration
  • Alias: Modify the column name. If nothing is added, it will use the default configured name.

  • Show entity actions: Allow displaying the actions menu when selecting its value in the cell. If the column is an identifier, this field will be enabled.

  • Hidden column: Enabling this option will hide the column from the user. This is useful when you need the data for formatting purposes, as only the data required in the list will be available.

  • Options:

    • Modify the cell’s width and horizontal alignment of its content. Column width
    • Format the cell’s value. Column formatter
  • Pagination: Configure the number of rows to display per page. Table pagination

Virtual columns

Also you can add virtual columns to lists.

Virtual Column config

These columns do not have their own values ​​and must be configured in the column formatter once added.

Virtual Column Formatter

Please note that the contents of this column will never be output to CSV, as it is calculated on the fly and does not rely on any native platform resources.

Virtual Column

Button columns

Also you can add button columns to lists in order to execute some custom action related with the row data.

Button Column config

Button label can be setted in normal or virtual columns. Label will be the value.

Button action code receives the complete rowData and you can open other dashboards, entities dashboards or execute wizards.

Button Column Formatter

You can find all available functions and methods in Extra parameters

Resource Configuration

Resource

Execution listings will be displayed for only one type of entity.

By default, entities of the type Device will be displayed.

Advanced

In this section, you will configure various filters that will be applied to queries regardless of the user’s specific filtering preferences.

Advanced Configuration

Widget Filters Configuration

Here you can define how widget filters should behave when sharing the dashboard with other users/organizations. This means that when sharing, a user opens these dashboards and won’t see the filters applied to the original dashboard in the specified widgets, preventing the information displayed from changing after a dashboard refresh.

The three possible options are:

  • Don’t share the widget’s general filter
  • Don’t share header filters in lists
  • Don’t share sorting in lists

Operations List

The list of operations allows you to view/manage operations performed on various types of entities: device, subscriber, and subscription.

How it works

Below are the actions that can be performed both within the widget and on the displayed data.

Entity List

Filter by Columns

column filter

Basic Filter

Basic filter

Perform a basic search by entering text that will filter by predefined fields.

Advanced Filter

Advanced filter

Perform a search by selecting the fields to filter by and how to filter by them.

Save and Restore Filters

Basic and Advanced filters can be saved in order to preconfigure a list of filters and restore them at any time. This feature is only available in own dashboards but can be shared with other users.

You can save a filter by fullfilling the filter name in the field at the bottom of the filter panel and clicking on the save button. When a filter is saved, it is stored in the widget’s filter list and can be restored at any time by selecting it from the saved filters list located at the top of the filter panel.

Filters can be saved only when a new filter is created.

This can be useful when you want to save a list of filters that you use frequently and restore them at any time.

Widget Menu

Menu action list

The following actions can be performed:

  • Download: Download data in CSV format

  • Execute operation: Opens the operation execution wizard

  • Toggle selection: Allows toggling the selection of operations via check. This enables viewing in other compatible widgets the content filtered by this information.

  • Capture screen: Takes a screenshot of the widget.

  • Duplicate widget: Creates a duplicate of the widget on the dashboard.

  • Copy widget: Copies the widget to another dashboard.

  • Change widget location: Moves the widget to another dashboard.

Sort and Temporarily Hide Columns

Sort menu

Actions per Entity

Row actions

The following actions can be performed:

  • Device execution list: Opens the execution listing widget, filtering by the operation and selecting the entity type ‘device’
  • Subscription execution list: Opens the execution listing widget, filtering by the operation and selecting the entity type ‘subscription’
  • Subscriber execution list: Opens the execution listing widget, filtering by the operation and selecting the entity type ‘subscriber’

Configuration

Configuration

General

  • Boxed: widget will be displayed with background in dahsboard.
  • About: widget description in Markdown format.
  • Title: widget title. It can be configured to remain fixed in the widget or only be displayed when it receives focus.
  • Toolbar: configures the behavior of the widget bar on the dashboard, allowing you to hide it, hide it when not in use, or leave it always visible.
  • Refresh Frequency: allows configuring the data refresh frequency displayed in the list.
  • Extra actions: allows user to add new specific actions to the widget with your own code.

Extra action config

You can add a new one by pressing the New button.

Once you added a custom action it can be modified later by pressing the name in the list.

In order to remove the custom action click the delete icon button on the right.

In extra actions you can write your own code were you can open other dashboards, entities dashboards or execute wizards.

Extra action code

You can find all available functions and methods in Extra parameters

Cell Configuration

Column configuration
  • Alias: Modify the column name. If nothing is added, it will use the default configured name.

  • Show entity actions: Allow displaying the actions menu when selecting its value in the cell. If the column is an identifier, this field will be enabled.

  • Hidden column: Enabling this option will hide the column from the user. This is useful when you need the data for formatting purposes, as only the data required in the list will be available.

  • Options:

    • Modify the cell’s width and horizontal alignment of its content. Column width
    • Format the cell’s value. Column formatter
  • Pagination: Configure the number of rows to display per page. Table pagination

Virtual columns

Also you can add virtual columns to lists.

Virtual Column config

These columns do not have their own values ​​and must be configured in the column formatter once added.

Virtual Column Formatter

Please note that the contents of this column will never be output to CSV, as it is calculated on the fly and does not rely on any native platform resources.

Virtual Column

Button columns

Also you can add button columns to lists in order to execute some custom action related with the row data.

Button Column config

Button label can be setted in normal or virtual columns. Label will be the value.

Button action code receives the complete rowData and you can open other dashboards, entities dashboards or execute wizards.

Button Column Formatter

You can find all available functions and methods in Extra parameters

Advanced

In this section, you will configure various filters that will be applied to queries regardless of the user’s specific filtering preferences.

Advanced Configuration

Widget Filters Configuration

Here you can define how widget filters should behave when sharing the dashboard with other users/organizations. This means that when sharing, a user opens these dashboards and won’t see the filters applied to the original dashboard in the specified widgets, preventing the information displayed from changing after a dashboard refresh.

The three possible options are:

  • Don’t share the widget’s general filter
  • Don’t share header filters in lists
  • Don’t share sorting in lists

Schedulers History List

The schedulers history list allows you to view the execution history of the schedulers configured in your organization.

How it works

Below are the actions that can be performed both within the widget and on the displayed data.

Schedulers History List

Filter by Columns

Column filter

Basic Filter

Basic filter

Perform a basic search by entering text that will filter by predefined fields.

Widget Menu

Menu action list

The following actions can be performed:

  • Capture screen: Takes a screenshot of the widget.
  • Duplicate widget: Creates a duplicate of the widget on the dashboard.
  • Copy widget: Copies the widget to another dashboard.
  • Change widget location: Moves the widget to another dashboard.

Configuration

Configuration

General

  • Boxed: widget will be displayed with background in dahsboard.
  • About: widget description in Markdown format.
  • Title: widget title. It can be configured to remain fixed in the widget or only be displayed when it receives focus.
  • Toolbar: configures the behavior of the widget bar on the dashboard, allowing you to hide it, hide it when not in use, or leave it always visible.
  • Refresh Frequency: allows configuring the data refresh frequency displayed in the list.
  • Extra actions: allows user to add new specific actions to the widget with your own code.

Extra action config

You can add a new one by pressing the New button.

Once you added a custom action it can be modified later by pressing the name in the list.

In order to remove the custom action click the delete icon button on the right.

In extra actions you can write your own code were you can open other dashboards, entities dashboards or execute wizards.

Extra action code

You can find all available functions and methods in Extra parameters

Cell Configuration

Column configuration
  • Alias: Modify the column name. If nothing is added, it will use the default configured name.

  • Show entity actions: Allow displaying the actions menu when selecting its value in the cell. If the column is an identifier, this field will be enabled.

  • Hidden column: Enabling this option will hide the column from the user. This is useful when you need the data for formatting purposes, as only the data required in the list will be available.

  • Options:

    • Modify the cell’s width and horizontal alignment of its content. Column width
    • Format the cell’s value. Column formatter
  • Pagination: Configure the number of rows to display per page. Table pagination

Virtual columns

Also you can add virtual columns to lists.

Virtual Column config

These columns do not have their own values ​​and must be configured in the column formatter once added.

Virtual Column Formatter

Please note that the contents of this column will never be output to CSV, as it is calculated on the fly and does not rely on any native platform resources.

Virtual Column

Button columns

Also you can add button columns to lists in order to execute some custom action related with the row data.

Button Column config

Button label can be setted in normal or virtual columns. Label will be the value.

Button action code receives the complete rowData and you can open other dashboards, entities dashboards or execute wizards.

Button Column Formatter

You can find all available functions and methods in Extra parameters

Advanced

In this section, you will configure various filters that will be applied to queries regardless of the user’s specific filtering preferences.

Advanced Configuration

Widget Filters Configuration

Here you can define how widget filters should behave when sharing the dashboard with other users/organizations. This means that when sharing, a user opens these dashboards and won’t see the filters applied to the original dashboard in the specified widgets, preventing the information displayed from changing after a dashboard refresh.

The three possible options are:

  • Don’t share the widget’s general filter
  • Don’t share header filters in lists
  • Don’t share sorting in lists

Tickets List

The list of tickets allows you to view/manage the tickets created within your organization.

How it works

Below are the actions that can be performed both within the widget and on the displayed data.

Entity List

Filter by Columns

column filter

Basic Filter

Basic filter

Perform a basic search by entering text that will filter by predefined fields.

Advanced Filter

Advanced filter

Perform a search by selecting the fields to filter by and how to filter by them.

Save and Restore Filters

Basic and Advanced filters can be saved in order to preconfigure a list of filters and restore them at any time. This feature is only available in own dashboards but can be shared with other users.

You can save a filter by fullfilling the filter name in the field at the bottom of the filter panel and clicking on the save button. When a filter is saved, it is stored in the widget’s filter list and can be restored at any time by selecting it from the saved filters list located at the top of the filter panel.

Filters can be saved only when a new filter is created.

This can be useful when you want to save a list of filters that you use frequently and restore them at any time.

Widget Menu

Menu action list

The following actions can be performed:

  • Download: Download data in CSV format
  • Create Ticket: Opens the ticket creation wizard
  • View in map: Opens the Maps widget, displaying the locations of the entities shown in the table
  • Capture screen: Takes a screenshot of the widget.
  • Duplicate widget: Creates a duplicate of the widget on the dashboard.
  • Copy widget: Copies the widget to another dashboard.
  • Change widget location: Moves the widget to another dashboard.

Sort and Temporarily Hide Columns

Sort menu

Actions per Entity

Row actions

The following actions can be performed:

  • Open ticket information: Opens a temporary dashboard displaying information related to the ticket
  • Open ticket details: Opens the widget with ticket information and details
  • Edit ticket: Opens the ticket wizard to edit the ticket
  • Open device information: Opens a temporary dashboard displaying information related to the device associated with the ticket
  • Open device details: Opens the widget with information about the entity and details of the device associated with the ticket
  • Edit device: Opens the device wizard to edit the device associated with the entity
  • Execute operation: Executes an operation on the device associated with the ticket
  • Delete: Deletes the ticket

Configuration

Configuration

General

  • Boxed: widget will be displayed with background in dahsboard.
  • About: widget description in Markdown format.
  • Title: widget title. It can be configured to remain fixed in the widget or only be displayed when it receives focus.
  • Toolbar: configures the behavior of the widget bar on the dashboard, allowing you to hide it, hide it when not in use, or leave it always visible.
  • Refresh Frequency: allows configuring the data refresh frequency displayed in the list.
  • Extra actions: allows user to add new specific actions to the widget with your own code.

Extra action config

You can add a new one by pressing the New button.

Once you added a custom action it can be modified later by pressing the name in the list.

In order to remove the custom action click the delete icon button on the right.

In extra actions you can write your own code were you can open other dashboards, entities dashboards or execute wizards.

Extra action code

You can find all available functions and methods in Extra parameters

Column Selection

Data Stream select

Steps to select and configure the value of a datastream in a column:

  • Select one or more data streams.
  • Choose which values from these data streams to display; these will become different columns.
  • Once selected, click the + button.

Cell Configuration

Column configuration
  • Alias: Modify the column name. If nothing is added, it will use the default configured name.

  • Show entity actions: Allow displaying the actions menu when selecting its value in the cell. If the column is an identifier, this field will be enabled.

  • Hidden column: Enabling this option will hide the column from the user. This is useful when you need the data for formatting purposes, as only the data required in the list will be available.

  • Options:

    • Modify the cell’s width and horizontal alignment of its content. Column width
    • Format the cell’s value. Column formatter
  • Pagination: Configure the number of rows to display per page. Table pagination

Virtual columns

Also you can add virtual columns to lists.

Virtual Column config

These columns do not have their own values ​​and must be configured in the column formatter once added.

Virtual Column Formatter

Please note that the contents of this column will never be output to CSV, as it is calculated on the fly and does not rely on any native platform resources.

Virtual Column

Button columns

Also you can add button columns to lists in order to execute some custom action related with the row data.

Button Column config

Button label can be setted in normal or virtual columns. Label will be the value.

Button action code receives the complete rowData and you can open other dashboards, entities dashboards or execute wizards.

Button Column Formatter

You can find all available functions and methods in Extra parameters

Advanced

In this section, you will configure various filters that will be applied to queries regardless of the user’s specific filtering preferences.

Advanced Configuration

Widget Filters Configuration

Here you can define how widget filters should behave when sharing the dashboard with other users/organizations. This means that when sharing, a user opens these dashboards and won’t see the filters applied to the original dashboard in the specified widgets, preventing the information displayed from changing after a dashboard refresh.

The three possible options are:

  • Don’t share the widget’s general filter
  • Don’t share header filters in lists
  • Don’t share sorting in lists

Time Series data List

The listing allows us to see the values provided by a time series and manage the entities related to it.

How it works

Below are the actions that can be performed both within the widget and on the displayed data.

Entity List

Filter by Columns

column filter

Advanced Filter

Advanced filter

Perform a search by selecting the fields to filter by and how to filter by them.

Save and Restore Filters

Basic and Advanced filters can be saved in order to preconfigure a list of filters and restore them at any time. This feature is only available in own dashboards but can be shared with other users.

You can save a filter by fullfilling the filter name in the field at the bottom of the filter panel and clicking on the save button. When a filter is saved, it is stored in the widget’s filter list and can be restored at any time by selecting it from the saved filters list located at the top of the filter panel.

Filters can be saved only when a new filter is created.

This can be useful when you want to save a list of filters that you use frequently and restore them at any time.

Widget Menu

Menu action list

The following actions can be performed:

  • Download: Data download in CSV format
  • Capture screen: Takes a screenshot of the widget.
  • Duplicate widget: Creates a duplicate of the widget on the dashboard.
  • Copy widget: Copies the widget to another dashboard.
  • Change widget location: Moves the widget to another dashboard.

Sorting

Sort menu

If time series has sorting columns configured, the sort menu will display the configured sorting columns.

You can apply the sorting configuration by clicking on the sorting configuration desired and remove with the clean button.

Actions by Entity

Row actions

The actions to be performed will depend on the type of entity that is set as the identifying column:

  • Edit: Edit the entity by opening the corresponding wizard for that entity type
  • Execute operation: Perform an operation on the displayed entity
  • Collect: Simulate data collection on an entity (if the entity type supports this action)
  • Open device/asset/subscriber/subscription information: Open a temporary dashboard that will display information related to the entity
  • Open device/asset/subscriber/subscription details: Open the information widget for an entity with the entity’s details
  • View hierarchy of the entity: Open the hierarchy widget to display the hierarchy of the entity (if the entity type supports this action)
  • Delete: Delete the entity

Configuration

Configuration

General

  • Boxed: widget will be displayed with background in dahsboard.
  • About: widget description in Markdown format.
  • Title: widget title. It can be configured to remain fixed in the widget or only be displayed when it receives focus.
  • Toolbar: configures the behavior of the widget bar on the dashboard, allowing you to hide it, hide it when not in use, or leave it always visible.
  • Refresh Frequency: allows configuring the data refresh frequency displayed in the list.
  • Extra actions: allows user to add new specific actions to the widget with your own code.

Extra action config

You can add a new one by pressing the New button.

Once you added a custom action it can be modified later by pressing the name in the list.

In order to remove the custom action click the delete icon button on the right.

In extra actions you can write your own code were you can open other dashboards, entities dashboards or execute wizards.

Extra action code

You can find all available functions and methods in Extra parameters

Dataset and Column Selection

Data set select
  • Organization: Select the organization to which the dataset belongs
  • Data set: Select the dataset
  • Columns: Select the configured columns in the dataset

Column Identifier Selection

Data set row identifier

Select the identifying column. Based on the value of this column, the table will display different actions to be performed on each of its rows.

Cell Configuration

Column configuration
  • Alias: Modify the column name. If nothing is added, it will use the default configured name.

  • Show entity actions: Allow displaying the actions menu when selecting its value in the cell. If the column is an identifier, this field will be enabled.

  • Hidden column: Enabling this option will hide the column from the user. This is useful when you need the data for formatting purposes, as only the data required in the list will be available.

  • Options:

    • Modify the cell’s width and horizontal alignment of its content. Column width
    • Format the cell’s value. Column formatter
  • Pagination: Configure the number of rows to display per page. Table pagination

Virtual columns

Also you can add virtual columns to lists.

Virtual Column config

These columns do not have their own values ​​and must be configured in the column formatter once added.

Virtual Column Formatter

Please note that the contents of this column will never be output to CSV, as it is calculated on the fly and does not rely on any native platform resources.

Virtual Column

Button columns

Also you can add button columns to lists in order to execute some custom action related with the row data.

Button Column config

Button label can be setted in normal or virtual columns. Label will be the value.

Button action code receives the complete rowData and you can open other dashboards, entities dashboards or execute wizards.

Button Column Formatter

You can find all available functions and methods in Extra parameters

Advanced

In this section, you will configure various filters that will be applied to queries regardless of the user’s specific filtering preferences.

Advanced Configuration

Widget Filters Configuration

Here you can define how widget filters should behave when sharing the dashboard with other users/organizations. This means that when sharing, a user opens these dashboards and won’t see the filters applied to the original dashboard in the specified widgets, preventing the information displayed from changing after a dashboard refresh.

The three possible options are:

  • Don’t share the widget’s general filter
  • Don’t share header filters in lists
  • Don’t share sorting in lists

Users List

The user listing allows for viewing/managing the users of the organization.

How it works

Below are the actions that can be performed both within the widget and on the displayed data.

Entity List

Filter by Columns

column filter

Basic Filter

Basic filter

Perform a basic search by entering text that will filter by predefined fields.

Advanced Filter

Advanced filter

Perform a search by selecting the fields to filter by and how to filter by them.

Save and Restore Filters

Basic and Advanced filters can be saved in order to preconfigure a list of filters and restore them at any time. This feature is only available in own dashboards but can be shared with other users.

You can save a filter by fullfilling the filter name in the field at the bottom of the filter panel and clicking on the save button. When a filter is saved, it is stored in the widget’s filter list and can be restored at any time by selecting it from the saved filters list located at the top of the filter panel.

Filters can be saved only when a new filter is created.

This can be useful when you want to save a list of filters that you use frequently and restore them at any time.

Widget Menu

Menu action list

The following actions can be performed:

  • New user: Opens the user creation wizard
  • Capture screen: Takes a screenshot of the widget.
  • Duplicate widget: Creates a duplicate of the widget on the dashboard.
  • Copy widget: Copies the widget to another dashboard.
  • Change widget location: Moves the widget to another dashboard.

Sort and Temporarily Hide Columns

Sort menu

Actions by Entity

Row actions

The following actions can be performed:

  • Edit: Opens the user editing wizard
  • Delete: Deletes the user

Configuration

Configuration

General

  • Boxed: widget will be displayed with background in dahsboard.
  • About: widget description in Markdown format.
  • Title: widget title. It can be configured to remain fixed in the widget or only be displayed when it receives focus.
  • Toolbar: configures the behavior of the widget bar on the dashboard, allowing you to hide it, hide it when not in use, or leave it always visible.
  • Refresh Frequency: allows configuring the data refresh frequency displayed in the list.
  • Extra actions: allows user to add new specific actions to the widget with your own code.

Extra action config

You can add a new one by pressing the New button.

Once you added a custom action it can be modified later by pressing the name in the list.

In order to remove the custom action click the delete icon button on the right.

In extra actions you can write your own code were you can open other dashboards, entities dashboards or execute wizards.

Extra action code

You can find all available functions and methods in Extra parameters

Cell Configuration

Column configuration
  • Alias: Modify the column name. If nothing is added, it will use the default configured name.

  • Show entity actions: Allow displaying the actions menu when selecting its value in the cell. If the column is an identifier, this field will be enabled.

  • Hidden column: Enabling this option will hide the column from the user. This is useful when you need the data for formatting purposes, as only the data required in the list will be available.

  • Options:

    • Modify the cell’s width and horizontal alignment of its content. Column width
    • Format the cell’s value. Column formatter
  • Pagination: Configure the number of rows to display per page. Table pagination

Virtual columns

Also you can add virtual columns to lists.

Virtual Column config

These columns do not have their own values ​​and must be configured in the column formatter once added.

Virtual Column Formatter

Please note that the contents of this column will never be output to CSV, as it is calculated on the fly and does not rely on any native platform resources.

Virtual Column

Button columns

Also you can add button columns to lists in order to execute some custom action related with the row data.

Button Column config

Button label can be setted in normal or virtual columns. Label will be the value.

Button action code receives the complete rowData and you can open other dashboards, entities dashboards or execute wizards.

Button Column Formatter

You can find all available functions and methods in Extra parameters

Advanced

In this section, you will configure various filters that will be applied to queries regardless of the user’s specific filtering preferences.

Advanced Configuration

Widget Filters Configuration

Here you can define how widget filters should behave when sharing the dashboard with other users/organizations. This means that when sharing, a user opens these dashboards and won’t see the filters applied to the original dashboard in the specified widgets, preventing the information displayed from changing after a dashboard refresh.

The three possible options are:

  • Don’t share the widget’s general filter
  • Don’t share header filters in lists
  • Don’t share sorting in lists

Subsections of Maps

Areas Map

Widget that displays the areas provisioned for an organization.

How it works

Map

The popup will display relevant information about the area as well as certain actions:

  • edit area
  • delete area

Basic Filter

Basic filter

Perform a basic search by entering text that will filter by predefined fields.

Advanced Filter

Advanced filter

Perform a search by selecting the fields to filter by and how to filter by them.

Save and Restore Filters

Basic and Advanced filters can be saved in order to preconfigure a list of filters and restore them at any time. This feature is only available in own dashboards but can be shared with other users.

You can save a filter by fullfilling the filter name in the field at the bottom of the filter panel and clicking on the save button. When a filter is saved, it is stored in the widget’s filter list and can be restored at any time by selecting it from the saved filters list located at the top of the filter panel.

Filters can be saved only when a new filter is created.

This can be useful when you want to save a list of filters that you use frequently and restore them at any time.

Widget Menu

Menu action list

The following actions can be performed:

  • New area: will open the area wizard to create a new area
  • Capture screen: Takes a screenshot of the widget.
  • Duplicate widget: Creates a duplicate of the widget on the dashboard.
  • Copy widget: Copies the widget to another dashboard.
  • Change widget location: Moves the widget to another dashboard.

Configuration

Configuration

General

  • Boxed: widget will be displayed with background in dahsboard.
  • About: widget description in Markdown format.
  • Title: widget title. It can be configured to remain fixed in the widget or only be displayed when it receives focus.
  • Toolbar: configures the behavior of the widget bar on the dashboard, allowing you to hide it, hide it when not in use, or leave it always visible.
  • Refresh Frequency: allows configuring the data refresh frequency displayed in the list.
  • Extra actions: allows user to add new specific actions to the widget with your own code.

Extra action config

You can add a new one by pressing the New button.

Once you added a custom action it can be modified later by pressing the name in the list.

In order to remove the custom action click the delete icon button on the right.

In extra actions you can write your own code were you can open other dashboards, entities dashboards or execute wizards.

Extra action code

You can find all available functions and methods in Extra parameters


Maps

Widget that displays entities with location, both provisioned and collected.

How it works

Map

Basic Filter

Basic filter

Perform a basic search by entering text that will filter by predefined fields.

Advanced Filter

Advanced filter

Perform a search by selecting the fields to filter by and how to filter by them.

Save and Restore Filters

Basic and Advanced filters can be saved in order to preconfigure a list of filters and restore them at any time. This feature is only available in own dashboards but can be shared with other users.

You can save a filter by fullfilling the filter name in the field at the bottom of the filter panel and clicking on the save button. When a filter is saved, it is stored in the widget’s filter list and can be restored at any time by selecting it from the saved filters list located at the top of the filter panel.

Filters can be saved only when a new filter is created.

This can be useful when you want to save a list of filters that you use frequently and restore them at any time.

Advanced filter

The popup will display relevant information about the device as well as certain actions:

  • edit entity
  • view entity details
  • open a temporary dashboard with information about the entity

Widget Menu

Menu action list

The following actions can be performed:

  • Capture screen: Takes a screenshot of the widget.
  • Duplicate widget: Creates a duplicate of the widget on the dashboard.
  • Copy widget: Copies the widget to another dashboard.
  • Change widget location: Moves the widget to another dashboard.

Configuration

Configuration

General

  • Boxed: widget will be displayed with background in dahsboard.
  • About: widget description in Markdown format.
  • Title: widget title. It can be configured to remain fixed in the widget or only be displayed when it receives focus.
  • Toolbar: configures the behavior of the widget bar on the dashboard, allowing you to hide it, hide it when not in use, or leave it always visible.
  • Refresh Frequency: allows configuring the data refresh frequency displayed in the list.
  • Extra actions: allows user to add new specific actions to the widget with your own code.

Extra action config

You can add a new one by pressing the New button.

Once you added a custom action it can be modified later by pressing the name in the list.

In order to remove the custom action click the delete icon button on the right.

In extra actions you can write your own code were you can open other dashboards, entities dashboards or execute wizards.

Extra action code

You can find all available functions and methods in Extra parameters

General
  • View Devices
  • Show Heat Map
  • Override colors with qRating performance
  • Override colors with entity alarms
  • Trackers: each of the points to display can be configured based on the data streams from which the location is retrieved. It is selected from the Datastream Id combo Trackers - alias: modification of the popup title for the pin - icon: pin icon - color: pin color - formatter: pin formatter

Areas

Areas

Configuration of area display and management.

Popup

Configuration of the data to be displayed in the popup.

External resources

External resources

Advanced

Advanced

Editing of clusters and configuring various filters that will be applied to queries regardless of what the user may wish to filter later on.


Tracking

Widget for tracking an entity on the map.

How it works

Map

Trackers

Trackers

Allows us to select a tracker from the list of configured trackers.

Basic Filter

Basic filter

Searches can be conducted by date.

Widget Menu

Menu action list

The following actions can be performed:

  • Open device information: opens the temporary panel corresponding to the selected entity
  • Edit: opens the wizard corresponding to the selected entity
  • Execute operation: opens the pre-configured operation launcher for the selected entity
  • Capture screen: Takes a screenshot of the widget.
  • Duplicate widget: Creates a duplicate of the widget on the dashboard.
  • Copy widget: Copies the widget to another dashboard.
  • Change widget location: Moves the widget to another dashboard.

Configuration

Configuration

General

  • Boxed: widget will be displayed with background in dahsboard.
  • About: widget description in Markdown format.
  • Title: widget title. It can be configured to remain fixed in the widget or only be displayed when it receives focus.
  • Toolbar: configures the behavior of the widget bar on the dashboard, allowing you to hide it, hide it when not in use, or leave it always visible.
  • Refresh Frequency: allows configuring the data refresh frequency displayed in the list.
  • Extra actions: allows user to add new specific actions to the widget with your own code.

Extra action config

You can add a new one by pressing the New button.

Once you added a custom action it can be modified later by pressing the name in the list.

In order to remove the custom action click the delete icon button on the right.

In extra actions you can write your own code were you can open other dashboards, entities dashboards or execute wizards.

Extra action code

You can find all available functions and methods in Extra parameters

General
  • Entity key: entity to be displayed on the map
  • Trackers: configuration of each of the data streams from which we retrieve the collected and/or provisioned location information Trackers - alias: modification of the title of the pin’s popup - color: color of the tracker - route simulation: route simulation

Areas

Areas

Configuration of the area display and management.


Subsections of Miscellaneous

Clock

Allows viewing the time and day on the website.

How it works

Clock

Widget Menu

Menu action list
  • Capture screen: Takes a screenshot of the widget.
  • Duplicate widget: Creates a duplicate of the widget on the dashboard.
  • Copy widget: Copies the widget to another dashboard.
  • Change widget location: Moves the widget to another dashboard.

Configuration

Configuration

General

  • Boxed: widget will be displayed with background in dahsboard.
  • About: widget description in Markdown format.
  • Title: widget title. It can be configured to remain fixed in the widget or only be displayed when it receives focus.
  • Toolbar: configures the behavior of the widget bar on the dashboard, allowing you to hide it, hide it when not in use, or leave it always visible.
  • Refresh Frequency: allows configuring the data refresh frequency displayed in the list.
  • Extra actions: allows user to add new specific actions to the widget with your own code.

Extra action config

You can add a new one by pressing the New button.

Once you added a custom action it can be modified later by pressing the name in the list.

In order to remove the custom action click the delete icon button on the right.

In extra actions you can write your own code were you can open other dashboards, entities dashboards or execute wizards.

Extra action code

You can find all available functions and methods in Extra parameters

  • Time format: Time format, following the format of the tool momentjs
  • Date format: Date format, following the format of the tool momentjs

Iframe

Widget that allows embedding a page within the website.

How it works

Iframe
Content from file

From the file manager, you can copy the URL of a file that you can insert into this widget.

Widget Menu

Menu action list
  • Capture screen: Takes a screenshot of the widget.
  • Duplicate widget: Creates a duplicate of the widget on the dashboard.
  • Copy widget: Copies the widget to another dashboard.
  • Change widget location: Moves the widget to another dashboard.

Configuration

Configuration

General

  • Boxed: widget will be displayed with background in dahsboard.
  • About: widget description in Markdown format.
  • Title: widget title. It can be configured to remain fixed in the widget or only be displayed when it receives focus.
  • Toolbar: configures the behavior of the widget bar on the dashboard, allowing you to hide it, hide it when not in use, or leave it always visible.
  • Refresh Frequency: allows configuring the data refresh frequency displayed in the list.
  • Extra actions: allows user to add new specific actions to the widget with your own code.

Extra action config

You can add a new one by pressing the New button.

Once you added a custom action it can be modified later by pressing the name in the list.

In order to remove the custom action click the delete icon button on the right.

In extra actions you can write your own code were you can open other dashboards, entities dashboards or execute wizards.

Extra action code

You can find all available functions and methods in Extra parameters

  • URL: URL of the page or file to load

Markdown

Displays text in markdown format.

How it works

Markdown

Widget Menu

Menu action list
  • Capture screen: Takes a screenshot of the widget.
  • Duplicate widget: Creates a duplicate of the widget on the dashboard.
  • Copy widget: Copies the widget to another dashboard.
  • Change widget location: Moves the widget to another dashboard.

Configuration

Configuration

General

  • Boxed: widget will be displayed with background in dahsboard.
  • About: widget description in Markdown format.
  • Title: widget title. It can be configured to remain fixed in the widget or only be displayed when it receives focus.
  • Toolbar: configures the behavior of the widget bar on the dashboard, allowing you to hide it, hide it when not in use, or leave it always visible.
  • Refresh Frequency: allows configuring the data refresh frequency displayed in the list.
  • Extra actions: allows user to add new specific actions to the widget with your own code.

Extra action config

You can add a new one by pressing the New button.

Once you added a custom action it can be modified later by pressing the name in the list.

In order to remove the custom action click the delete icon button on the right.

In extra actions you can write your own code were you can open other dashboards, entities dashboards or execute wizards.

Extra action code

You can find all available functions and methods in Extra parameters

  • Markdown: Text in markdown format. A preview of the entered text is displayed.

Wizards

Subsections of Wizards

Administration

Subsections of Administration

Create Manufacturer

Allows the creation of hardware manufacturers, used for associating entities and for being able to attach files to models, such as images or logos.

Steps

Manufacturer Wizard

Essential data for the registration and identification of a manufacturer on the platform.

Creation

NOTE: There is the possibility to configure the manufacturer by organization by selecting the equivalent wizard

Create manufacturer model

Allows for the creation of hardware models and the ability to associate files with these models, such as images or logos.

Steps

Creating a Model

Essential data for the registration and identification of a model on the platform.

Creation

Create new Area

This wizard allows us to create areas.

Steps

Administration Info

Information for the registration and identification for the creation of a new area.

AdministrationInfo

Area Design

In this step, you can build or import the area itself.

Allowed actions:

  • Import GeoJSON file - Imports a file from the computer
  • Paste GeoJSON file - Opens the paste tool where you can paste the content of a GeoJSON file from your favorite editor.

In the map, you can see the following tools:

  • Polyline tool: You can draw a line on the map without an area
  • Polygon tool: Allows you to create a free form that contains an area on the map
  • Rectangle tool: Allows you to create a rectangle that contains an area on the map
  • Circle tool: This tool draws circles that contain an area on the map
AdministrationInfo

Import/Export Configuration

Allows you to import and export the wizard’s configuration via JSON.

btnJson

When accessing the import and export functionality, it displays a window with various actions. Additionally, it presents the configuration of the wizard in JSON format.

The available actions are as follows:

  • Upload Json: Uploads a JSON file and replaces the previous JSON configuration.
  • Paste from clipboard: Pastes JSON data from the clipboard and replaces the previous JSON configuration.
  • Download Json: Downloads the JSON configuration as a file with the wizard’s name.
  • Copy to clipboard: Copies the JSON configuration to the clipboard.
items

Create new Channel

This wizard allows us to create channels to group devices within the same organization.

Steps

Channel Creation

Essential data for the registration and identification of a channel on the platform.

Creation

Import/Export Configuration

Allows you to import and export the wizard’s configuration via JSON.

btnJson

When accessing the import and export functionality, it displays a window with various actions. Additionally, it presents the configuration of the wizard in JSON format.

The available actions are as follows:

  • Upload Json: Uploads a JSON file and replaces the previous JSON configuration.
  • Paste from clipboard: Pastes JSON data from the clipboard and replaces the previous JSON configuration.
  • Download Json: Downloads the JSON configuration as a file with the wizard’s name.
  • Copy to clipboard: Copies the JSON configuration to the clipboard.
items

Create new Data Model

This wizard allows us to create data models for customizing data within the platform’s entities.

Steps

Data Model

Data for registration and identification for creating a data model on the platform.

Creation

Category

Data for the data model. We will add a category by clicking the + button. We will enter an identifier and optionally a name. Then we click the add button.

Category

General

  • Boxed: widget will be displayed with background in dahsboard.
  • About: widget description in Markdown format.
  • Title: widget title. It can be configured to remain fixed in the widget or only be displayed when it receives focus.
  • Toolbar: configures the behavior of the widget bar on the dashboard, allowing you to hide it, hide it when not in use, or leave it always visible.
  • Refresh Frequency: allows configuring the data refresh frequency displayed in the list.
  • Extra actions: allows user to add new specific actions to the widget with your own code.

Extra action config

You can add a new one by pressing the New button.

Once you added a custom action it can be modified later by pressing the name in the list.

In order to remove the custom action click the delete icon button on the right.

In extra actions you can write your own code were you can open other dashboards, entities dashboards or execute wizards.

Extra action code

You can find all available functions and methods in Extra parameters

We can add a data stream, and the data stream creation wizard will open. We will select the type of data stream we are going to create, either collection or provision.

AddDatastream

Qrating

If a version number is entered, a series of fields for filling out the Qrating will appear.

Qrating

Storage

By default, the storage period will appear in DAYS, but it can be changed to SECONDS, MINUTES, or NEVER.

Storage

Import/Export Configuration

Allows you to import and export the wizard’s configuration via JSON.

btnJson

When accessing the import and export functionality, it displays a window with various actions. Additionally, it presents the configuration of the wizard in JSON format.

The available actions are as follows:

  • Upload Json: Uploads a JSON file and replaces the previous JSON configuration.
  • Paste from clipboard: Pastes JSON data from the clipboard and replaces the previous JSON configuration.
  • Download Json: Downloads the JSON configuration as a file with the wizard’s name.
  • Copy to clipboard: Copies the JSON configuration to the clipboard.
items

Create new Device Plan

This wizard allows us to manage device plans.

Steps

Device Plan Creation

Essential data for the registration and identification of a device plan on the platform.

Creation

Import/Export Configuration

Allows you to import and export the wizard’s configuration via JSON.

btnJson

When accessing the import and export functionality, it displays a window with various actions. Additionally, it presents the configuration of the wizard in JSON format.

The available actions are as follows:

  • Upload Json: Uploads a JSON file and replaces the previous JSON configuration.
  • Paste from clipboard: Pastes JSON data from the clipboard and replaces the previous JSON configuration.
  • Download Json: Downloads the JSON configuration as a file with the wizard’s name.
  • Copy to clipboard: Copies the JSON configuration to the clipboard.
items

Create new notebook scheduler

This wizard allows us to create schedulers for the previously created Opengate data lab notebooks

Steps

Configuration

Essential data for the scheduler

Notebooks Scheduler Wizard

You need the next in order to schedule the execution of a notebook:

  • Notebook: notebook to be executed periodically
  • Report: enables saving for report generated by the notebook execution
  • Report retention days: days to be stored report in Opengate data lab
  • Cron pattern: pattern to configure when the notebook will be executed
  • Params: list of a pair of names and values to be passed to the notebook execution

Create new Organization

Allows for the creation of organizations.

Steps

Administrative Data

Data for registration and identification for data collection on the platform.

Administration

Location

Information about the organization’s location.

Location

Security

Configuration of passwords, policies, and authentication through external servers.

It allows the following configurations:

Default Authentication Method: Default authentication. LDAP: Authentication via LDAP.

Security Security Security

Advanced

Enables the copying of data models, channels, actions, views, data sets, and time series from the parent organization if they have been created previously.

Advanced

Import/Export Configuration

Allows you to import and export the wizard’s configuration via JSON.

btnJson

When accessing the import and export functionality, it displays a window with various actions. Additionally, it presents the configuration of the wizard in JSON format.

The available actions are as follows:

  • Upload Json: Uploads a JSON file and replaces the previous JSON configuration.
  • Paste from clipboard: Pastes JSON data from the clipboard and replaces the previous JSON configuration.
  • Download Json: Downloads the JSON configuration as a file with the wizard’s name.
  • Copy to clipboard: Copies the JSON configuration to the clipboard.
items

Create new Organization Plan

This wizard allows us to manage organization plans.

Steps

Organization Plan Creation

Essential data for the registration and identification of an organization plan on the platform.

Creation

Import/Export Configuration

Allows you to import and export the wizard’s configuration via JSON.

btnJson

When accessing the import and export functionality, it displays a window with various actions. Additionally, it presents the configuration of the wizard in JSON format.

The available actions are as follows:

  • Upload Json: Uploads a JSON file and replaces the previous JSON configuration.
  • Paste from clipboard: Pastes JSON data from the clipboard and replaces the previous JSON configuration.
  • Download Json: Downloads the JSON configuration as a file with the wizard’s name.
  • Copy to clipboard: Copies the JSON configuration to the clipboard.
items

Create new pipeline processor

This wizard allows us to create pipeline processors.

Steps

Administrative Data

Essential data for registration and identification of a pipeline in the platform.

Administration Data

Transformer and AI Model Configuration

Select transformers or models to execute.

Transformer and AI Model Configuration

Create new Provision Function

A Provision function will have JavaScript code that takes inbound data and calculates the actions to be performed for correct provisioning of entities (Assets, Devices, Subscriptions, and Subscribers).

Steps

Administrative Data

Essential data for the registration and identification of a provisioning function in the platform.

Creation

Definition

Processor configuration parameters and JavaScript processor specification.

Additionally, the definition of provisioning functions has a menu on the left side that allows for different actions:

- FullScreen
- Add Function
- Validate Code

FullScreen

Expands to occupy the entire screen, making it easier for visualization.

Creation

Add Function

Provides the option to add different functions.

Creation

Let’s add the “New entity” function.

Creation

Validate Code

Checks the JavaScript code; if it’s correct, it enables the Next button.

Creation

Summary

Summary of the data entered previously.

Creation

Create new WorkGroup

Allows the creation of work groups to group different channels and grant administration permissions to different user roles.

Steps

Data

Essential data for the registration and identification of a work group on the platform.

Creation

Import/Export Configuration

Allows you to import and export the wizard’s configuration via JSON.

btnJson

When accessing the import and export functionality, it displays a window with various actions. Additionally, it presents the configuration of the wizard in JSON format.

The available actions are as follows:

  • Upload Json: Uploads a JSON file and replaces the previous JSON configuration.
  • Paste from clipboard: Pastes JSON data from the clipboard and replaces the previous JSON configuration.
  • Download Json: Downloads the JSON configuration as a file with the wizard’s name.
  • Copy to clipboard: Copies the JSON configuration to the clipboard.
items

Dataset creation wizard

Allows for the creation of data sets.

Steps

Configuration

Data for the registration and identification for the creation of a new data set on the platform.

Configuration

Definition Columns

You need to select one or more data streams for the configuration of columns. Identifier Column is the name of the identification column. Once the data stream is selected, we will press the add button.

DefinitionColumns

The following data will then appear:

Path: if the data stream value field is selected and its type is not a basic type, then a data path must be selected until you reach a field with a basic type. Alias: Alias of the dataset. Apply Filter:

  • Always: Will always have to be filtered.
  • Yes: It can be filtered or not.
  • No: It will not be possible to filter.

Additionally, we can delete or close the dataset to improve visualization.

ColumnDataset

Here you can see a dataset in collapse format, with options for editing and deleting the dataset.

collapseDataset

Finally, we have a summary of the data set, where the following data will appear:

Name: name of the organization Organization: name of the organization Columns: columns with configured settings

collapseDataset

Sorting Columns

In this step you can define the columns that will be used to sort the time series. You can have multiple sorting configurations, each one with multiple columns.

Sorting Columns
  • Alias: Identifier for the sorting configuration.
  • Description: Description of the sorting configuration.
  • Columns: List of columns to be used for sorting.
    • Column: Column from the time series to be used for sorting.
    • Order: Order to be used for sorting.
      • Ascending: Ascending order.
      • Descending: Descending order.

Clone Data Set Configuration

In addition to creating a new data set, we can also clone an existing one and configure it.

collapseDataset

Clone Data Set Definition Columns

Having cloned the data set from a previously existing one, the previously configured columns will appear by default.

collapseDataset

Import/Export Configuration

Allows you to import and export the wizard’s configuration via JSON.

btnJson

When accessing the import and export functionality, it displays a window with various actions. Additionally, it presents the configuration of the wizard in JSON format.

The available actions are as follows:

  • Upload Json: Uploads a JSON file and replaces the previous JSON configuration.
  • Paste from clipboard: Pastes JSON data from the clipboard and replaces the previous JSON configuration.
  • Download Json: Downloads the JSON configuration as a file with the wizard’s name.
  • Copy to clipboard: Copies the JSON configuration to the clipboard.
items

Entities software wizard

Allows the management of the entities software, used for associating entities and for being able to configure in them.

Steps

Entitites Software Wizard

Essential data for the registration and identification of a software in your organization.

Creation

Here you can configure the following:

Organization: Organization were the software will be configured

Name: Visible name for the software

Version: Version of software

Type: The purpose of this piece of software. This can be SOFTWARE or FIRMWARE

Model: Models where this software can be selectable

Update related entities: by checking this allows the user to update related entities with the new information introduced (only available in edit mode)

Operations Management

Allows for the creation of new or cloned operations on the platform.

Steps

Administration

Essential data for the registration and identification of an operation on the platform.

Operations can either be new or cloned. However, existing operations will predominantly be used for cloning and subsequent modification.

New Operation

Creates a customized operation, and in this case, there is the option to import and export JSON. In a cloned operation, the JSON option will not be available.

NewOperation

Clone Operation

In this case, we will clone an operation to change the state of administration.

CloneOperation

Configuration

Parameters that define the operation’s configuration. By default, for a cloned operation, the JSON Schema field is already filled. You can view the field’s configuration.

Schema

In the Preview section, the result of the JSON Schema configuration will be displayed.

Schema

Import/Export Configuration

Allows you to import and export the wizard’s configuration via JSON. Clone operations do not allow the use of json import and export.

btnJson

When accessing the import and export functionality, it displays a window with various actions. Additionally, it presents the configuration of the wizard in JSON format.

The available actions are as follows:

  • Upload Json: Uploads a JSON file and replaces the previous JSON configuration.
  • Paste from clipboard: Pastes JSON data from the clipboard and replaces the previous JSON configuration.
  • Download Json: Downloads the JSON configuration as a file with the wizard’s name.
  • Copy to clipboard: Copies the JSON configuration to the clipboard.
items

Provision Wizards

This wizard allows us to create provision wizards.

Steps

Provision Wizard

Allows you to view and edit a created wizard view. From this wizard, you can create a new one, which will open the Wizard: New window.

NewProvision

Administrative Data

Essential data for the registration and identification of a provision wizard in the platform.

AdministrativeData

Set Your Fields

Add the customized steps that the wizard will have.

AddStep ListStep

In this case, select the steps admin and security.

For example, for the Admin step, select administrative state and operational status.

AdminStep

And for the Security step, select certificates.

Certificates

Set Your Default Values

See how the wizard would look graphically with the new steps added, and select default values if needed.

setDefaultValues

Previous Validations

Create validations that will be executed before the main action.

PreviousValidations

Post Actions

Create validations that will be executed after the main action.

PostActions

Import/Export Configuration

Allows you to import and export the wizard’s configuration via JSON.

btnJson

When accessing the import and export functionality, it displays a window with various actions. Additionally, it presents the configuration of the wizard in JSON format.

The available actions are as follows:

  • Upload Json: Uploads a JSON file and replaces the previous JSON configuration.
  • Paste from clipboard: Pastes JSON data from the clipboard and replaces the previous JSON configuration.
  • Download Json: Downloads the JSON configuration as a file with the wizard’s name.
  • Copy to clipboard: Copies the JSON configuration to the clipboard.
items

Rules

This wizard allows us to create rules.

Steps

Administration

Essential data for registration and identification for creating a rule in the platform.

Rules consist of Easy rules and Advanced rules, which are created differently in the second step.

We can configure a rule with the following options:

New rules: Create a new rule from scratch. From catalog: Create a rule from the catalog. Clone existing rule: Create a rule from a previously created one.

Easy rule

Build a rule using basic concepts for evaluation. You must select the rule type depending on whether you want a data stream collection, the operation result, or an event. When selecting Data Stream collection, the Data Stream button above will be enabled.

Administration

Clicking the Data Stream button will open a menu where you can search for and add the data stream, along with adding an alias.

Menu

However, if you select Operation result or Event as the rule type, the Data Stream button will not be visible.

For all three rule types, you need to select a parameter, which consists of an identifier, type, and value.

Parameters

Within the parameter menu, you will enter an identifier, type (string, integer, number, or boolean), and value.

Parameters

Rule Definition (Easy)

Build a rule using basic concepts for evaluation.

Rule Conditions

This will trigger the rule when the rule meets the filter conditions.

Select a data stream to compose the filter.

Condition

You can also add a group to add another condition to the filter.

Add Resource

Perform the following actions

Actions will be executed when the configured conditions are met.

There are different options within the New Action menu:

Actions

You can delay the action by a specified number of milliseconds, creating a wait threshold before executing the actions. In this case, creating a new alarm has been selected.

RuleCondition

Advanced rule

Build a rule using basic concepts for evaluation.

AdvancedRule

Just like easy rules, the same options exist. You need to select the rule type depending on whether you want a data stream collection, the operation result, or an event. When selecting Data Stream collection, the Data Stream button above will be enabled.

MenuDatastream

Rule Definition (Advanced)

Allows you to write the JavaScript code of the rule for evaluation. It also allows you to delay the execution of actions with a wait threshold.

DefinitionRule

Time Series

Allows you to create time series for collecting data from a device. It stores rows with columns and maintains aggregated values by column, grouped by configurable time periods.

Steps

Configuration

Essential data for registration and identification of a time series in the platform.

Configuration

Time Bucket

In time series, the data is grouped by time buckets (time intervals), and all received data columns in each bucket are updated using the selected aggregated function. To understand which bucket each row represents, you will have an additional column to view the end/init date of the selected bucket.

  • Retention: Column to view the end date of the selected bucket.
  • Time Bucket: Time interval taken as a reference for data grouping.
  • Bucket Column: Column to view the end date of the selected bucket (disabled if the time bucket is 0).
  • Bucket Init Column: Column to view the init date of the selected bucket (disabled if the time bucket is 0).
  • Origin: Date from which the time series starts.
Bucket

Data Columns

You need to select one or more data streams for the configuration of columns.

Identifier Column: Name for the column representing provision.administration.identifier._current.value path with filter=YES.

AddDatastreamData

Columns: These can be expanded or collapsed depending on the desired view.

  • Alias: Alias for the selected column.
  • Aggregation Field: Aggregation function applied to the current column.
  • Apply Filter: The dataset filter:
    • Always: Will always have to be filtered.
    • Yes: It can be filtered or not.
    • No: It will not be possible to filter.
Expand Collapse

Context Columns

You can add some columns as context information, and these columns will be added to the time series to be used in searching resources.

AddDatastreamContext
  • Columns:
    • Input Name: Name of the dataset.
    • Apply Filter: The dataset filter:
      • Always: Will always have to be filtered.
      • Yes: It can be filtered or not.
      • No: It will not be possible to filter.
    • Path: If a data stream value field is selected and its type is not a basic type, then the data path must be selected until you reach a field with a basic type.

Sorting Columns

In this step you can define the columns that will be used to sort the time series. You can have multiple sorting configurations, each one with multiple columns.

Sorting Columns
  • Alias: Identifier for the sorting configuration.
  • Description: Description of the sorting configuration.
  • Columns: List of columns to be used for sorting.
    • Column: Column from the time series to be used for sorting.
    • Order: Order to be used for sorting.
      • Ascending: Ascending order.
      • Descending: Descending order.

Summary

This step contains the summary of the time series to be created:

  • New Time series Data: Configuration data.
  • Bucket Info: Bucket configuration data.
  • Columns: Configured columns.
  • Context: Configured context columns.
Summary

Clone

In addition to creating a new dataset, you can clone a dataset from an existing one that has default data.

Clone

Import/Export Configuration

Allows you to import and export the wizard’s configuration using JSON.

btnJson

When accessing import and export, it shows a window with different actions. It also displays the wizard’s configuration in JSON format.

The available actions are as follows:

Upload JSON: Uploads a JSON file and replaces the previous JSON. Paste from clipboard: Pastes JSON from the clipboard and replaces the previous JSON. Download JSON: Downloads the JSON in a file with the name of the wizard. Copy to clipboard: Copies the JSON to the clipboard.

Items

Time series functions wizard

Allows for the creation of time series functions.

Steps

Administration

Data for the registration and identification of the time series function on the platform.

Administration

Here you can select the organization, name, description and value types allowed by the function.

Definition

This is the code of the time series function.

Definition

Here you can modify the code and test it simulating the input data using the receivedValues, extra and currentValue simulated params.

Received values Extra Current value

Summary

Finally you can review changes (except the code) in order to proceed.

Summary

Once you finish you may be able to select the function in a time series column.


Upload new data transformer

Allows you to upload files for the execution of a transformer.

Steps

Administration data

In this step, you must enter the administrative information for the transformer. The form contains the following fields: Organization - organizational location (required)

AdministrationData

Files

Here, you can upload the necessary Python files for the execution of the transformation. The first file will be the main execution file. Additional files can be Python library files necessary for the correct execution.

Files

Upload new predictive model

Allows you to upload files for the execution of a model.

Steps

Administration data

In this step, you must enter the administrative information for the predictive model. The form contains the following fields: Organization - organizational location (required)

Creation

Files

Here, you can upload the necessary Python files for the execution of the transformation. It’s necessary to use files with extensions PMML or ONNX.

Creation

User

Allows the creation of users on the platform.

Steps

User Data

Essential information for the registration and identification of a user on the platform.

All fields are mandatory.

Email: The email address must be valid. Password: The “Password” and “Password Repeat” fields must match. Profile: User profile to be assigned to the user. Organization: Administrative organization associated with the user. Workgroup: Workgroup indicating the management scope assigned to this user. This means the list of entities that the user can manage through the web and API interfaces.

Creation

Import/Export Configuration

Allows you to import and export the wizard’s configuration via JSON.

btnJson

When accessing the import and export functionality, it displays a window with various actions. Additionally, it presents the configuration of the wizard in JSON format.

The available actions are as follows:

  • Upload Json: Uploads a JSON file and replaces the previous JSON configuration.
  • Paste from clipboard: Pastes JSON data from the clipboard and replaces the previous JSON configuration.
  • Download Json: Downloads the JSON configuration as a file with the wizard’s name.
  • Copy to clipboard: Copies the JSON configuration to the clipboard.
items

Subsections of Operations

Create new Operation

With this wizard, you can execute an operation on devices.

Steps

Target and Type

Add the entities over which the operation is performed. You could already finish setting up the operation.

Target

Targets type:

  • Entities: Add identified entities by their entity-key separated by commas.
  • Tag: Add a single label containing entities. See Tags and entity tagging.
  • Filter: The operation will run on entities resulting from applying the current filter of the web (quick/advanced filter). This one requires an extra confirmation by the user before execution.
  • Choose an entity: Select the type of entity to recover by the filter executed. For example: Run the operation on all entities of type gateway result of applying the filter. See Job Request: Target List attributes and Creating a job, sorry, I meant execute a job (Using filters).

Choose Operation

Select the operation to execute. If the operation has specific parameters, they will be shown in the next step.

See Available Operation Types.

Parameters

Here you can set specific parameters of the selected operation in the previous step.

Parameters

See Available Operation Types.

The helper option allows you to add previously created packages and datastreams, in addition to enabling or disabling the Loading entity/operation information.

Helper HelperModal

Scheduled

Set when the operation will be executed.

Planning

The following sections show the different options available.

Now

The operation will be executed immediately.

Later

Set the time to pass (in minutes) before executing the operation.

Each option:

Set the frequency with which the operation will be executed.

Fields:

  • Number of minutes: Set the number of minutes to pass until the next execution.

For example: I want to run the operation every 3 minutes.

Periodically

Configure the periodic execution.

Fields:

  • Name of periodicity: Give a name to the execution.
  • Date when the operation will be executed: Set the date on which the execution will start.
  • Date when the operation will be executed:
  • Date: Set the date on which the execution will start.
  • Hour: Set the time at which each execution will start.
  • By repetitions: Set the number of repetitions of execution. If left empty, the execution will be repeated indefinitely.

Advanced Options

Here you can manage advanced features for execution like timers, scattering, and others.

Advanced

Timers

In this step, you can set different timers for the operation.

You could already finish setting up the operation.

  • Execution timeout: In seconds. Timeout for the execution of the operation on a single entity configured in step “Select target”. If the timeout is exceeded, the operation will be canceled for that entity.
  • Timeout in minutes: Timeout for the execution of the operation on the set of all entities set in step “Select target”. If the timeout is exceeded, the operation will be canceled for the entire group of entities.
  • Retries: Number of retries before canceling the operation of a single entity when it has expired the timeout operation.
  • Retries delay in seconds: Waiting time between retries.
  • Ack timeout in seconds: Timeout for a single entity to accept the execution of the operation. If the operation has not been accepted by the entity at the end of the timeout, it will be canceled.

Other options

In this step, you can set other options of the operation.

  • Response types: Response types that will trigger a retry of the operation.

  • Callback: URI format defined in RFC 3986. Only HTTP transport supported. Allows enabling Notifications to be sent to an application. The platform will add to this URI the name of the specific callback.

  • User notes: Space to write anything about the operation.

  • Max spread: represents a percentage of the timeout job, will be a value between 0 and 90, where 0 is the minimum time, i.e., operations run as fast as possible and 90 is the maximum time i.e., operations will spread throughout the time available to run the job, the job time out, the default value is 0. NOTE: This option is only available when a operation is executed using a filter.

Summary

Here you can review the configuration of the execution before the launch.

Advanced

Import/Export Configuration

Allows you to import and export the wizard’s configuration via JSON.

btnJson

When accessing the import and export functionality, it displays a window with various actions. Additionally, it presents the configuration of the wizard in JSON format.

The available actions are as follows:

  • Upload Json: Uploads a JSON file and replaces the previous JSON configuration.
  • Paste from clipboard: Pastes JSON data from the clipboard and replaces the previous JSON configuration.
  • Download Json: Downloads the JSON configuration as a file with the wizard’s name.
  • Copy to clipboard: Copies the JSON configuration to the clipboard.
items

Data collection

Allows collecting data from data points.

Steps

Collection Form

Essential data for registering and identifying data collection in the platform.

In the Unique identifier field, you can select an entity.device. In addition, it opens a menu when you click on the three dots.

Menu

The menu allows you to perform the following actions:

Exact search: Enables an exact search for the identifier. Case sensitive: The search is case-sensitive. New: Opens the device wizard and allows its creation. Execute operation: Opens the wizard for creating a new operation. You need to have selected a unique identifier for this to be available.

Options

You can fill out the wizard with the following fields, which are not mandatory:

  • Feed: Used to label a data point.
  • Data Stream id: Select one or more data streams for data collection. Depending on the selected data stream, different fields will appear for filling out and collecting data.
Creation

Image Execution Scheduler

Allows scheduling the execution of an image.

Steps

Image Execution Form

Essential data for registering and identifying an image execution in the platform.

Not all fields are mandatory.

Identifier: The email address must be valid.

Name: The name of the image.

Tag: The tag of the image.

Max time for execution: The maximum time to wait for the execution to complete.

Max wait for callback: The maximum time to wait for the callback to complete. This value must be greater than the max time for execution.

Environment variables: Environment variables to be used for the execution.

Planification

There is two options for planification:

Cron Expression

Cron expression: The cron expression to be followed.

Timezone: The timezone to be used for the cron expression.

Interval

Interval (minutes): The interval in minutes to be followed.

Both options are mutually exclusive. Also you can define a start and end date for the schedule.

From Date: The date when the schedule should start.

To Date: The date when the schedule should end.

Finally you can mark the Execute now checkbox to execute the request immediately after creation apart from the schedule.

Creation

Import/Export Configuration

Allows you to import and export the wizard’s configuration via JSON.

btnJson

When accessing the import and export functionality, it displays a window with various actions. Additionally, it presents the configuration of the wizard in JSON format.

The available actions are as follows:

  • Upload Json: Uploads a JSON file and replaces the previous JSON configuration.
  • Paste from clipboard: Pastes JSON data from the clipboard and replaces the previous JSON configuration.
  • Download Json: Downloads the JSON configuration as a file with the wizard’s name.
  • Copy to clipboard: Copies the JSON configuration to the clipboard.
items

Pipeline Processor Scheduler

Allows scheduling a Pipeline Processor. With a pipeline processor you can execute multiple pipelines and rest requests in a scheduled way.

Steps

Pipeline Processor Form

Essential data for registering and identifying a pipeline processor in the platform.

Identifier: The identifier of the pipeline processor.

Image Executions: The images to be executed.

Rest Requests: The rest requests to be executed.

Each one will be executed in sequence. You can reorder the sequence by dragging and dropping the items. It requires at least 2 items in pipeline.

Planification

There is two options for planification:

Cron Expression

Cron expression: The cron expression to be followed.

Timezone: The timezone to be used for the cron expression.

Interval

Interval (minutes): The interval in minutes to be followed.

Both options are mutually exclusive. Also you can define a start and end date for the schedule.

From Date: The date when the schedule should start.

To Date: The date when the schedule should end.

Finally you can mark the Execute now checkbox to execute the request immediately after creation apart from the schedule.

Creation

Import/Export Configuration

Allows you to import and export the wizard’s configuration via JSON.

btnJson

When accessing the import and export functionality, it displays a window with various actions. Additionally, it presents the configuration of the wizard in JSON format.

The available actions are as follows:

  • Upload Json: Uploads a JSON file and replaces the previous JSON configuration.
  • Paste from clipboard: Pastes JSON data from the clipboard and replaces the previous JSON configuration.
  • Download Json: Downloads the JSON configuration as a file with the wizard’s name.
  • Copy to clipboard: Copies the JSON configuration to the clipboard.
items

Rest Request Scheduler

Allows scheduling a Rest Request.

Steps

Rest Request Form

Essential data for registering and identifying a rest request in the platform.

Not all fields are mandatory.

Identifier: The email address must be valid.

Url: The url to be called.

Method: The method to be called.

Max wait for request: The maximum time to wait for the request to complete (excludes the time to wait for the callback).

Max wait for callback: The maximum time to wait for the callback to complete (excludes the time to wait for the request).

Headers: Headers to be sent with the request.

Body: Body to be sent with the request.

Planification

There is two options for planification:

Cron Expression

Cron expression: The cron expression to be followed.

Timezone: The timezone to be used for the cron expression.

Interval

Interval (minutes): The interval in minutes to be followed.

Both options are mutually exclusive. Also you can define a start and end date for the schedule.

From Date: The date when the schedule should start.

To Date: The date when the schedule should end.

Finally you can mark the Execute now checkbox to execute the request immediately after creation apart from the schedule.

Creation

Import/Export Configuration

Allows you to import and export the wizard’s configuration via JSON.

btnJson

When accessing the import and export functionality, it displays a window with various actions. Additionally, it presents the configuration of the wizard in JSON format.

The available actions are as follows:

  • Upload Json: Uploads a JSON file and replaces the previous JSON configuration.
  • Paste from clipboard: Pastes JSON data from the clipboard and replaces the previous JSON configuration.
  • Download Json: Downloads the JSON configuration as a file with the wizard’s name.
  • Copy to clipboard: Copies the JSON configuration to the clipboard.
items

Subsections of Resources

Connector Functions

This wizard allows us to create connector functions.

Steps

Administration

Essential data for registration and identification of a connector function in the platform.

Administration

Criteria

Criteria selector

CnfCriteria Criteria

Definition

Allows you to write the connector function code using JavaScript to be evaluated.

In Payload type, there are the following options:

  • TEXT
  • JSON
  • BINARY
ListPayload

The action menu provides different options:

  • Maximize: Full screen for better viewing of the step.
  • Basic functions: Default basic functions.
  • Validate Code: Validates the function code.
ListActionsButtons

Summary

Summary of the complete connector function information.

It allows the options of Disabled, Test, and Production.

BasicFunctions Summary

Import/Export configuration

Allows you to import and export the wizard’s configuration using JSON.

btnJson

When you access import and export, it displays a window with different actions. It also displays the wizard’s configuration in JSON format.

The available actions are as follows:

  • Upload JSON: Uploads a JSON file and replaces the previous JSON.
  • Paste from clipboard: Pastes JSON from the clipboard and replaces the previous JSON.
  • Download JSON: Downloads the JSON in a file with the wizard’s name.
  • Copy to clipboard: Copies the JSON to the clipboard.
items

Create new Asset

This wizard allows us to create entities of type entity.asset. All the data entered will be provisioning data.

Steps

Administration

Essential data for the registration and identification of the asset in the platform.

Administration

Location

Initial location of the device. Location

Customization

Custom data based on the data models created for the user’s organization. Data from the default platform data models are not included. Inventory

Import/Export Configuration

Allows you to import and export the wizard’s configuration via JSON.

btnJson

When accessing the import and export functionality, it displays a window with various actions. Additionally, it presents the configuration of the wizard in JSON format.

The available actions are as follows:

  • Upload Json: Uploads a JSON file and replaces the previous JSON configuration.
  • Paste from clipboard: Pastes JSON data from the clipboard and replaces the previous JSON configuration.
  • Download Json: Downloads the JSON configuration as a file with the wizard’s name.
  • Copy to clipboard: Copies the JSON configuration to the clipboard.
items

Create new Bundle

This wizard allows us to create bundles, which can update software, firmware, or configuration files on your remote devices.

Steps

Pre-actions

You can choose to include pre-actions or not to perform before executing the bundle operation.

Pre-actions

Configuration

Data for bundle configuration.

Configuration

Deployment Elements

If needed, you can add a deployment element to attach to the bundle.

DeploymentElement

If you add the deployment element, a modal window will appear with different types of operations:

  • INSTALL
  • UNINSTALL
  • UPGRADE

This allows you to install, uninstall, or upgrade an implementation on a device.

There are two options:

  • MANDATORY
  • OPTIONAL

A bundle can contain four types of files, as seen in the type selector:

  • SOFTWARE
  • CONFIGURATION
  • PARAMETERS
  • FIRMWARE
DeployElementConfiguration

Additionally, you can add validators if desired:

AddNewValidator AddValidator

After adding deployment elements, you will return to the previous “Deployment Elements” step, where you can see the deployment element you just added. You will also notice that the “Active Bundle” checkbox is now enabled, allowing you to activate or deactivate the bundle.

DeployElement

Post-actions

In the final step, you can choose to include post-actions or not to perform after the bundle operation has executed.

DeployElement

Create new Certificate

This wizard allows you to create certificates for your organization.

Steps

Configuration

Essential data for registration and identification.

Configuration

Previously to create new certificates it is neccesary to know the next tips:

  • An user can upload in the platform a certificate in her organization and in the organizations with low hierarchy managed by the user

  • A certificate can only be signed by a certificate uploaded in the platform with usage CERT_SIGN and this certificate must be in the same organization or in a organization with visible upper hierarchy

  • You can upload the same certificate to the platform a lot of times but always with different identificator

  • If you change the organization of a certificate, the trust chain will be updated keeping in this, only those certificates belonging to visible organizations for the new organization.

Fields

Name : Certificate Name. Description : This field contain the certificate description Administrative State : This field will contain the Name Administrative State, valid values are [ NOT_ACTIVE, ACTIVE, REVOKED, EXPIRED]. Usages : This field will contain the usages, valid values are [FILE_VALIDATION, DEVICE_COMMUNICATIONS, DEVICE_ACCESS, CERT_SIGN]. Tags : This field will contain the tags. Organizations : This field will contain the organizations, Organizations inside list must exist.

Upload

Upload the certification file.

Upload

Only administrative information can be updated. If you need to change the certificate file, you have to delete the existing and add a new one.

Import/Export Configuration

Allows you to import and export the wizard’s configuration via JSON.

btnJson

When accessing the import and export functionality, it displays a window with various actions. Additionally, it presents the configuration of the wizard in JSON format.

The available actions are as follows:

  • Upload Json: Uploads a JSON file and replaces the previous JSON configuration.
  • Paste from clipboard: Pastes JSON data from the clipboard and replaces the previous JSON configuration.
  • Download Json: Downloads the JSON configuration as a file with the wizard’s name.
  • Copy to clipboard: Copies the JSON configuration to the clipboard.
items

Create new Entity

This wizard allows us to create entities of type entity.device. All the data entered will be provisioning data.

More detailed information about entities

Steps

Administration

Essential data for the registration and identification of the device on the platform.

Administration

You could already finish setting up the device.

Fields

Unique identifier of entity Each entity have a unique identifier all over the platform.

Organization The entity will associate with one of the organizations selected from the list of organizations that have access.

Channel The entity will associate with one of the channels selected from the list of channels that have access. This list depends on the selected organization.

Default feed The entity will store data related to this when no other supplied on collection

Plan Defines the usage limits for the entity (More info)

Service group Determines how OpenGate behaves when managing the entity (More info)

Administrative state

  • Requested - Entity requested to the supplier
  • Ready - Entity ready for installation
  • Repair - Entity under repair
  • Testing - Entity in tests
  • Active - Field deployed entity
  • Suspended - Suspended its operation
  • Deleted - Entity removed from available stock
  • Retired - Field entity withdrawal
  • Banned - Entity banned, It means that received information of this entity is not going to be collected

Operational status

  • Unknown - Not known
  • Normal- Normal Operation
  • Alarm - The device has active alarms
  • Down - The device is not operative. Could be running but it is not performing its operation
  • Safe mode - The device is in Safe Mode (Sleeping, etc.)
  • Tamper - The device was tampered
  • Test - The device is working in test mode

Related entity Datastreams collected by this device will be copied to the related entity

Inventory

Data with inventory information. Inventory

Fields

You could already finish setting up the device.

Name of entity Each M2M entity have a unique identifier all over the platform.

Description of entity Using the name attribute and the description attribute, you can set up an alias for your favourite entity and you can write down any detail you want about an entity or its state.

Serial number An identification number of device.

Hardware Choose, from the list of hardware allowed by the platform, the hardware of the device.

Software Choose, from the list of software allowed by the platform, the software of the device.

Location

Initial location of the device. Location

You could already finish setting up the device.

Fields

Latitude, longitude To set latitude and longitude of the device, click show map to open map and drag the point to the desired position.

Address, Postal code, Province, Region and Town extra information for the location.

Security

From here, you can associate a certificate with the device. Security

You could already finish setting up the device.

Fields

Trusted boot Secure boot configuration When you create a device with a trusted boot field, this action has consequence in the collection actions, that is, when collect an event from device with the “trusted boot” field, if the event has secure boot the platform will compare the collected value with the provisioned value and can define an alarm rule for automatically change the administrative status to banned if both values are different.

Certificate Used for secure communication between device and platform. Can select multiple certificates from the list.

Interfaces

Creation of different types of communication interfaces associated with the device. Interfaces

From here, you can configure several types of communication interfaces: Generic Interfaces

Customization

Custom data based on the data models created for the user’s organization. Default platform data model is not included. Inventory

Import/Export Configuration

Allows you to import and export the wizard’s configuration via JSON.

btnJson

When accessing the import and export functionality, it displays a window with various actions. Additionally, it presents the configuration of the wizard in JSON format.

The available actions are as follows:

  • Upload Json: Uploads a JSON file and replaces the previous JSON configuration.
  • Paste from clipboard: Pastes JSON data from the clipboard and replaces the previous JSON configuration.
  • Download Json: Downloads the JSON configuration as a file with the wizard’s name.
  • Copy to clipboard: Copies the JSON configuration to the clipboard.
items

Create new Subscriber

This wizard allows us to create subscribers.

Steps

Type

Select the type of subscriber to manage.

Type

Admin

Data for registration and identification for creating a subscriber on the platform.

Admin

Inventory

Define inventory information.

Inventory

Custom

Allows the selection of a custom data model.

Custom

Import/Export Configuration

Allows you to import and export the wizard’s configuration via JSON.

btnJson

When accessing the import and export functionality, it displays a window with various actions. Additionally, it presents the configuration of the wizard in JSON format.

The available actions are as follows:

  • Upload Json: Uploads a JSON file and replaces the previous JSON configuration.
  • Paste from clipboard: Pastes JSON data from the clipboard and replaces the previous JSON configuration.
  • Download Json: Downloads the JSON configuration as a file with the wizard’s name.
  • Copy to clipboard: Copies the JSON configuration to the clipboard.
items

Create new Subscription

This wizard allows us to create subscriptions.

Steps

Type

Select the type of subscription to manage.

Type

Admin

Data for registration and identification for creating a subscription on the platform.

Admin

Inventory

Define inventory information.

Inventory

Custom

Allows the selection of a custom data model.

Custom

Import/Export Configuration

Allows you to import and export the wizard’s configuration via JSON.

btnJson

When accessing the import and export functionality, it displays a window with various actions. Additionally, it presents the configuration of the wizard in JSON format.

The available actions are as follows:

  • Upload Json: Uploads a JSON file and replaces the previous JSON configuration.
  • Paste from clipboard: Pastes JSON data from the clipboard and replaces the previous JSON configuration.
  • Download Json: Downloads the JSON configuration as a file with the wizard’s name.
  • Copy to clipboard: Copies the JSON configuration to the clipboard.
items

Create new Ticket

Here you can initiate a new ticket on the platform.

Steps

Administration

Essential data for the registration and identification of the ticket on the platform.

Administration

Inventory

Inventory

Location

Information about the ticket’s location.

Location

Custom

Custom data based on data models created for the user’s organization. Default platform data model information is not included.

Custom

Import/Export Configuration

Allows you to import and export the wizard’s configuration via JSON.

btnJson

When accessing the import and export functionality, it displays a window with various actions. Additionally, it presents the configuration of the wizard in JSON format.

The available actions are as follows:

  • Upload Json: Uploads a JSON file and replaces the previous JSON configuration.
  • Paste from clipboard: Pastes JSON data from the clipboard and replaces the previous JSON configuration.
  • Download Json: Downloads the JSON configuration as a file with the wizard’s name.
  • Copy to clipboard: Copies the JSON configuration to the clipboard.
items

Upload Bulk File

You can attach a file to create new entities.

Here, the user can create, update, and delete entities. To do this, the user must choose the type of action to execute and the type of file to upload.

Steps

Bulk Wizard

Available actions:

  • Create
  • Delete: This option allows deleting the device. If the device subscriptions or subscribers exist, this entity will not be deleted.
  • Delete All: This option allows deleting the complete device with subscriptions and subscribers.
  • Update

Resource: We will have the options of Entities or Tickets.

Creation

Type of file:

It allows the selection of a file with the following types:

  • Csv
  • Json
  • Flattened: A data file format that simplifies the structure, presenting information in a flat list, which can be beneficial in some data analysis and processing situations.

CSV

In the CSV section, we will add the different options: Escape Char, Line separator, Null Value, and Quote Char. Once this is done, we will add the CSV file, and the simulation button will be enabled. This button is only available for the CSV file type.

Creation

When you press the simulation button, a window will open where you can see the attached CSV file.

ModalSimulate

JSON

Attach a JSON file.

Json

JSON Flattened

Attach a JSON Flattened file.

JsonFlattened

Import/Export Configuration

Allows you to import and export the wizard’s configuration via JSON.

btnJson

When accessing the import and export functionality, it displays a window with various actions. Additionally, it presents the configuration of the wizard in JSON format.

The available actions are as follows:

  • Upload Json: Uploads a JSON file and replaces the previous JSON configuration.
  • Paste from clipboard: Pastes JSON data from the clipboard and replaces the previous JSON configuration.
  • Download Json: Downloads the JSON configuration as a file with the wizard’s name.
  • Copy to clipboard: Copies the JSON configuration to the clipboard.
items

Upload bulk file (Advanced)

This wizard allows us to create, delete, or update entities in bulk using an Excel file and a provisioning function previously created in the provisioning function wizard.

Steps

Provision functions

  • Provision Function: Name of the provisioning function. A provisioning function will have JavaScript code that takes inbound data and calculates the actions to be performed for correct provisioning of entities (Assets, Devices, Subscriptions, and Subscribers).
  • Sheet Name: Name of the selected sheet when creating the provisioning function.
  • Header row: The row where the header is located in the file.
  • Column result name: The column where it will return the results obtained when executing this wizard.
Provision Functions

Select and upload file

Bulk files allow you to upload and transform their content data through provisioning functions. Only xlsx and xls files are allowed. It is necessary that the file contains the name of the sheet to be able to visualize it. The preview will only be made of the first 5 rows.

Input upload file Select upload file

Preview

Result of the execution of the selected provisioning function with the uploaded file. This preview takes the first 5 rows.

PreviewRow Preview

Clicking on “view details” will open a modal window showing all the details along with their values.

View details row Modal Details

Summary and Execute

Displays a brief summary of:

Selected file: The file selected in the first step.

Provision function: The data of the provisioning function selected in the first step.

Summary of results: Result of the selected rows, executed rows, and rows that will be skipped.

Summary

Since this is a potentially irreversible operation, it is necessary to check the checkbox in order to execute the bulk wizard advanced.

Summary Execute

Templates

Templates are preconfigured dashboards designed to display relevant information about an entity: device, asset, subscriber, subscription, and tickets.

Creating a Template

In the dashboard actions menu, select the “Save as template” option.

Dashboard actions

You’ll be presented with a wizard to configure your template:

Template wizard
  • Dashboard: Choose the dashboard for the template.
  • Workspace: Choose the workspace or workspaces where the template will be saved.
  • Name: Choose the name for the template.
  • Priority: Choose the priority for displaying different templates if you configure more than one for the same conditions.

Conditions

  • Allowed resource type: Choose the type of resource it will open.
  • Specific type: Choose the specific type or specific types of resource.
  • Datastreams: (optional) Choose datastreams witch preferred values.

Template Management

You can manage templates within a workspace from the Workspaces wizard:

Workspace template

Also you can manage it in the Templates configuration section:

Templates configuration section

You can delete and modify the templates configured for a workspace.

Templates configuration filters

Open Templates

From most widgets displaying information about an entity, you can access these templates to view the information of that device on a dashboard referred to as a “temporary” dashboard.

Template Menu

Once you click on the link, you’ll be shown the “temporary/template” dashboard with the information from the entity you opened it from. There, you can choose which template you want to use to view the information for that entity:

Dashboard template

These dashboards can’t be managed, and any changes to filters won’t be saved. They can only be cloned within a workspace. A cloned dashboard will then function like any other dashboard.


Administration

The Administration website contains pre-configured panels with which you can perform provisioning tasks on the platform elements.

Administration Section Home

The home screen will display the most commonly used panels, making it easier to access the various configurations.

The menu can be collapsed to gain screen space by clicking on the bottom navigation menu.

Administration Section Collapsed menu

Panels

Each panel has one or more widgets already available in dashboards, so you can configure and use them in a unified way.

You can access the equivalent documentation from each page that will take you to the corresponding widgets.

Sections

Within the configurations, you can distinguish three main sections:

  • Entities here, you can browse the different types of entities.
  • Organizations contains those items that you can can provision related to your organizations.
  • Workspaces & Dashboards allows you to manage everything related to the use of the web tool.

Configurations

Subsections of Administration

Subsections of Entities

Assets Administration

You can view and manage your organization’s assets from this location.

How it Works

Assets Administration

This panel is comprised of the following widgets:

The navigation bar contains the actions that can be performed:

  • Filter allows you to apply a filter to the list.
  • Refresh refreshes the content of the list.
  • Asset Creation provides quick access to the asset creation wizard.
  • Actions Menu displays all available actions (the same as those in the widget).
Assets Administration Actions

Section Configuration

From the Action Menu, you can access the configuration of the widget corresponding to the section.

  • Configuration opens the widget’s configuration.
  • Default allows resetting the configuration to its initial state.

Devices Administration

From this location, you can view and manage the devices within your organization.

How it Works

Devices Administration

This panel is comprised of the following widget:

The navigation bar contains the actions that can be performed:

  • Filter allows you to apply a filter to the list.
  • Refresh refreshes the content of the list.
  • Create Device provides quick access to the device creation wizard.
  • Actions Menu displays all available actions (the same as those in the widget).
Devices Administration Actions

Section Configuration

From the Action Menu, you can access the configuration of the widget corresponding to the section.

  • Configuration opens the widget’s configuration.
  • Default allows resetting the configuration to its initial state.

Specific Types Administration

From this location, you can view and manage the specific types within your organization.

How it Works

Specific Types Administration

This panel is comprised of the following widget:

The navigation bar contains the actions that can be performed:

  • Refresh refreshes the content of the list.
  • Actions Menu displays all available actions (the same as those in the widget).
  • Edit opens Specific Type manager modal.
Specific Types Administration Actions

Section Configuration

From the Action Menu, you can access the configuration of the widget corresponding to the section.

  • Configuration opens the widget’s configuration.
  • Default allows resetting the configuration to its initial state.

Subscribers Administration

From this location, you can view and manage the subscribers within your organization.

How it Works

Subscribers Administration

This panel is comprised of the following widget:

The navigation bar contains the actions that can be performed:

  • Filter allows you to apply a filter to the list.
  • Refresh refreshes the content of the list.
  • Create Subscriber provides quick access to the subscriber creation wizard.
  • Actions Menu displays all available actions (the same as those in the widget).
Subscribers Administration Actions

Section Configuration

From the Action Menu, you can access the configuration of the widget corresponding to the section.

  • Configuration opens the widget’s configuration.
  • Default allows resetting the configuration to its initial state.

Subscriptions Administration

From this location, you can view and manage the subscriptions within your organization.

How it Works

Subscriptions Administration

This panel is comprised of the following widget:

The navigation bar contains the actions that can be performed:

  • Filter allows you to apply a filter to the list.
  • Refresh refreshes the content of the list.
  • Create Subscription provides quick access to the subscription creation wizard.
  • Actions Menu displays all available actions (the same as those in the widget).
Subscriptions Administration Actions

Section Configuration

From the Action Menu, you can access the configuration of the widget corresponding to the section.

  • Configuration opens the widget’s configuration.
  • Default allows resetting the configuration to its initial state.

Organization

Subsections of Organization

Advanced bulks administration

From this location, you can view and manage the advanced bulks within your organization.

How it Works

Bulks Advanced Administration

This panel is comprised of the following widget:

The navigation bar contains the actions that can be performed:

  • Refresh refreshes the content of the list.
  • Actions Menu displays all available actions (the same as those in the widget).
Bulks Advanced Administration Actions

Section Configuration

From the Action Menu, you can access the configuration of the widget corresponding to the section.

  • Configuration opens the widget’s configuration.
  • Default allows resetting the configuration to its initial state.

Areas Administration

From this location, you can view and manage the map areas within your organization.

How it Works

Areas Administration

This panel is comprised of the following widgets:

The navigation bar contains the actions that can be performed:

  • Filter allows you to apply a filter to the list.
  • Refresh refreshes the content of the list.
  • Actions Menu displays all available actions (the same as those in the widget).
Areas Administration Actions

By toggling Map/List, you can switch between the list view and the map view.

Areas Administration Map

Section Configuration

From the Action Menu, you can access the configuration of the widget corresponding to the section.

  • Configuration opens the widget’s configuration.
  • Default allows resetting the configuration to its initial state.

Bulk Administration

From this location, you can view and manage the bulks within your organization.

How it Works

Bulks Administration

This panel is comprised of the following widget:

The navigation bar contains the actions that can be performed:

  • Refresh refreshes the content of the list.
  • Actions Menu displays all available actions (the same as those in the widget).
Bulks Administration Actions

Section Configuration

From the Action Menu, you can access the configuration of the widget corresponding to the section.

  • Configuration opens the widget’s configuration.
  • Default allows resetting the configuration to its initial state.

Bundles Administration

From this location, you can view and manage the bundles within your organization.

How it Works

Bundles Administration

This panel is comprised of the following widget:

The navigation bar contains the actions that can be performed:

  • Filter allows you to apply a filter to the list.
  • Refresh refreshes the content of the list.
  • Actions Menu displays all available actions (the same as those in the widget).
Bundles Administration Actions

Section Configuration

From the Action Menu, you can access the configuration of the widget corresponding to the section.

  • Configuration opens the widget’s configuration.
  • Default allows resetting the configuration to its initial state.

Certificates Administration

From this location, you can view and manage your organization’s certificates.

How it Works

Certificates Administration

This panel is comprised of the following widget:

The navigation bar contains the actions that can be performed:

  • Filter allows you to apply a filter to the list.
  • Refresh refreshes the content of the list.
  • Actions Menu displays all available actions (the same as those in the widget).
Certificates Administration Actions

Section Configuration

From the Action Menu, you can access the configuration of the widget corresponding to the section.

  • Configuration opens the widget’s configuration.
  • Default allows resetting the configuration to its initial state.

Connector Functions Administration

From this location, you can view and manage the connector functions of your organization.

How it Works

Connector Functions Administration

This panel is comprised of the following widget:

The navigation bar contains the actions that can be performed:

  • Refresh updates the content of the list.
  • Actions Menu displays all available actions (the same as those in the widget).
Connector Functions Administration Actions

Section Configuration

From the Action Menu, you can access the configuration of the widget corresponding to the section.

  • Configuration opens the widget’s configuration.
  • Default allows resetting the configuration to its initial state.

Data models Administration

From this location, you can view and manage the data models of your organization.

How it Works

Data models Administration

This panel is comprised of the following widget:

The navigation bar contains the actions that can be performed:

  • Filter allows you to apply a filter on the list.
  • Refresh updates the content of the list.
  • Actions Menu displays all available actions (the same as those in the widget).
Data models Administration Actions

Section Configuration

From the Action Menu, you can access the configuration of the widget corresponding to the section.

  • Configuration opens the widget’s configuration.
  • Default allows resetting the configuration to its initial state.

Data Sets Administration

From here, you can view and manage the datasets of your organization.

How it Works

Data Sets Administration

This panel is made up of the following widget:

The navigation bar provides a range of actions that can be performed:

  • Filter allows for the application of a filter on the data set list.
  • Refresh updates the content of the list.
  • Actions Menu displays all available actions (identical to those found in the widget).
Data Sets Administration Actions

Section Configuration

From the Action Menu, you can access the configuration of the widget corresponding to the section.

  • Configuration opens the widget’s configuration.
  • Default allows resetting the configuration to its initial state.

Manufacturers Administration

Here you can view and manage the manufacturers and models within your organization.

How it Works

Manufacturers Administration

This panel consists of the following widget:

NOTE: There is the possibility to view manufacturers by organization by selecting the equivalent widget

The navigation bar includes several actions that can be executed:

  • Filter allows you to apply a filter to the list.
  • Refresh updates the content of the list.
  • Actions Menu displays all available actions (the same as those in the widget).
Manufacturers Administration Actions

Section Configuration

From the Action Menu, you can access the configuration of the widget corresponding to the section.

  • Configuration opens the widget’s configuration.
  • Default allows resetting the configuration to its initial state.

Operation Types Administration

From here, you can view and manage the operation types within your organization.

How it Works

Operation Types Administration

This panel consists of the following widget:

Every operation type includes its custom view if exists. An operation type cannot be deleted while custom views are configured for it.

The navigation bar contains various actions that can be performed:

  • Refresh updates the content of the list.
  • Actions Menu displays all available actions (the same as those in the widget).
Operation Types Administration Actions

Section Configuration

From the Action Menu, you can access the configuration of the widget corresponding to the section.

  • Configuration opens the widget’s configuration.
  • Default allows resetting the configuration to its initial state.

Organizations Administration

From here, you can view and manage the elements of our organization.

How it Works

Organizations Administration

This panel is comprised of the following widget:

The navigation bar outlines the actions that can be performed:

  • Refresh updates the content of the list.
  • Actions Menu displays all the available actions.
Organizations Administration Actions

Section Configuration

From the Action Menu, you can access the configuration of the widget corresponding to the section.

  • Configuration opens the widget’s configuration.
  • Default allows resetting the configuration to its initial state.

Provision Functions Administration

From this panel, you can view and manage the provision functions of our organization.

How it Works

Provision Functions Administration

This panel is comprised of the following widget:

Within the navigation bar are the actions that can be performed:

  • Refresh updates the content of the listing.
  • Actions Menu displays all available actions (identical to those available in the widget).
Provision Functions Administration Actions

Section Configuration

From the Action Menu, you can access the configuration of the widget corresponding to the section.

  • Configuration opens the widget’s configuration.
  • Default allows resetting the configuration to its initial state.

Rules Administration

From this panel, you can view and manage the rules of our organization.

How it Works

Rules Administration

This panel is comprised of the following widget:

Within the navigation bar are the actions that can be performed:

  • Refresh updates the content of the listing.
  • Actions Menu displays all available actions (identical to those available in the widget).
Rules Administration Actions

Section Configuration

From the Action Menu, you can access the configuration of the widget corresponding to the section.

  • Configuration opens the widget’s configuration.
  • Default allows resetting the configuration to its initial state.

Time series Administration

From this panel, you can view and manage the time series data of our organization.

How it Works

Timeseries Administration

This panel is composed of the following widget:

The navigation bar contains the following actionable items:

  • Filter allows you to apply a filter to the list.
  • Refresh updates the content of the list.
  • Actions Menu displays all the available actions (the same as those in the widget).
Timeseries Administration Actions

Section Configuration

From the Action Menu, you can access the configuration of the widget corresponding to the section.

  • Configuration opens the widget’s configuration.
  • Default allows resetting the configuration to its initial state.

Time series functions Administration

From this panel, you can view and manage the time series functions of our organization.

How it Works

Timeseries Functions Administration

This panel is composed of the following widget:

The navigation bar contains the following actionable items:

  • Filter allows you to apply a filter to the list.
  • Refresh updates the content of the list.
  • Actions Menu displays all the available actions (the same as those in the widget).
Timeseries Functions Administration Actions

Section Configuration

From the Action Menu, you can access the configuration of the widget corresponding to the section.

  • Configuration opens the widget’s configuration.
  • Default allows resetting the configuration to its initial state.

User Administration

From here, you can view and manage the users of your organization.

How it Works

User Administration

This panel consists of the following widget:

The navigation bar contains the actions that can be performed:

  • Filter allows you to apply a filter to the list
  • Refresh refreshes the content of the list
  • Action Menu displays all available actions (the same as those in the widget)
User Administration Actions

Section Configuration

From the Action Menu, you can access the configuration of the widget corresponding to the section.

  • Configuration opens the widget’s configuration.
  • Default allows resetting the configuration to its initial state.

Subsections of Workspaces & Dashboards

Custom Operations Views

This wizard allows us to manage custom operation views for the existing operation types.

Section

Below you can see the list of the configured views.

Custom Operations Views

Every operation view has his own actions in order to manage independently:

Views actions

You can edit, launch and remove the custom view.

Operations Views Wizards

In this section you can create, edit and delete custom operation views. By pressing Create Operation View wizard wizard will be opened.

Steps

Administrative Data

Principal and administrative data for the Custom Operation View. Title and icon will be the visible parts in menus.

AdministrativeData

Set Your Default Values

Here you can configure default values for the operation that will be executed within this custom view.

Default values

Set Your Fields

Here you can configure visible steps and fields for the operation execution wizard.

Steps and Fields

Previous Validations

Create validations that will be executed before the execution of the operation.

Previous Validations

Callback must be called in order to validate the introduced data:

callback(boolean result, array messages)

  • result must be true or false in order to determine if continue the execution
  • messages contains strings to be shown to the execution log

Custom Organization Labels

In this section you can customize labels for your organization. This labels can be used for table headers, datastreams, custom sections and as title for widgets, dashboards and workspaces.

Section

Below you can see the list of the configured labels.

Organization Labels

Configuration

You can add a new custom label by clicking in the + New button:

Organization Labels Edit/New

Custom labels have 3 fields and all of them are required:

  • Key is the unique identifier for your label
  • Spanish is the desired translation for this language
  • English is the desired translation for this language

If you type an existing internal label during the creation Spanish and English fields will be fulfilled with the internal translations. This changes only applies to your organization until you remove the custom label.

Labels actions

Organization Labels actions
  • Edit You can update translation for your custom labels and changes will be applied immediately

  • Delete Also you can remove your custom labels but a browser restart is required. A warning is shown in order to remind you to restart.


Widgets Defaults

In this configuration section you can configure widgets behaviour when opened from others.

Section

Below you can see the list of the available configurable widgets. List can be filtered by category and/or widget name

Widgets defaults

You can add, edit and remove the configuration for every available widget in this list.

These configurations will be available for the user organization.

Widget defaults actions

Every listed widget has actions shown below:

New action is shown while no previous configuration saved and allows to configure new defaults for the selected widget

Widgets default new configuration

When widget is configured an actions menu will be available with these options:

Edit that allows change previously configured defaults

Delete quits the current configurations once you confirm the operation

Widgets default actions

Preview and configuration

A preview window will be opened were you can see how is opened the selected widget.

From this you can configure as you consider using own widget configuration panel.

Widgets default preview

Workspaces templates

Templates are preconfigured dashboards designed to display relevant information about an entity: device, asset, subscriber, subscription, and tickets. Here you can find all the preconfigured templates for your account in every workspaces.

Templates configuration section

Creating a Template

By clicking in the Actions Menu -> Create new template template wizard will be opened to configure your template:

Template wizard
  • Dashboard: Choose the dashboard for the template.
  • Workspace: Choose the workspace or workspaces where the template will be saved.
  • Name: Choose the name for the template.
  • Priority: Choose the priority for displaying different templates if you configure more than one for the same conditions.

Conditions

  • Allowed resource type: Choose the type of resource it will open.
  • Specific type: Choose the specific type or specific types of resource.
  • Datastreams: (optional) Choose datastreams witch preferred values.

Template Management

You can filter, delete and modify the templates configured for a workspace.

Templates configuration filters

Collection Wizard

Here you can view/configure new collection wizards for your organization’s website.

How it works

Configure Collection Wizard

The collection wizard listing displays the created wizards along with their Title, Wizard type, and Specific Type.

Actions on the wizard

Actions Menu

You can perform the following actions for each item in the listing:

  • Edit opens the collection wizard’s configuration for modification.
  • Delete removes the selected wizard.

Collection Wizard

Collection wizard Collection wizard

When editing an item from the listing, you will see the collection wizard with its previously entered data.


Organization Files

From here, you can manage the files uploaded to the private storage of the organization.

How it Works

Organization Files

The file listing displays information for each of the stored files.

Files are grouped into 4 categories, which help the user identify the type of files and where they can be used. These categories are as follows:

  • BIM/IFC files in this category contain 3D models compatible with the BIM/IFC standard and are ready to be used in the corresponding widget.
  • SVG vector files that can be used in image widgets or any configuration that allows image import.
  • Image image files that can be used in image widgets or in any configuration that allows image import.
  • Documents any type of documentation files can be placed here, especially to be used in iframe widgets and to be displayed.

The following information is shown in the listing:

  • Unique Identifier the unique identifier of the file.
  • Name the name of the file.
  • Owner the organization where this file is located.
  • Category indicates the category where the file is placed.
  • Size (KB) the size of the file in kilobytes.
  • Updated date and time of the last file update.
  • Shared displays the number of users and organizations the file is shared with.

File Actions

Organization Files Actions

For each item in the listing, the following actions can be performed:

  • Download opens the file for downloading.
  • Copy to Clipboard copies the unique URL of the file for use on the platform.
  • Share allows viewing and sharing the script for other users to use.
Organization Files Share
  • Choose File to Upload allows updating the uploaded file with another. This does not affect the generated link, so the change will be reflected wherever it was being used.

  • Delete removes the selected file.

In the navigation bar, the following actions can be performed:

  • Category Selector allows selecting a category to filter the listing.
  • Search allows applying a filter on the listing.
  • New File opens the file selection dialog. IMPORTANT NOTE: To add a new file, it is necessary to select a category first.

Provision Wizard

Here you can view/configure new provision wizards for your organization’s website.

How it works

Config Provision Wizard

The provision wizard listing displays the created wizards along with their Title, Wizard type, and Specific Type.

Actions on the wizard

Actions Menu

For each item in the listing, you can perform the following actions:

  • Edit opens the provision wizard’s configuration for modification.
  • Delete removes the selected wizard.

Provision Wizard

Wizard provision

When editing an item from the listing, you will see the wizard with its previously entered data.


Scripts Formatters

From here, you can manage the formatting scripts saved by the widgets.

How it Works

Scripts Formatters

The list of scripts displays the necessary information to locate where it is used and for what purpose. The following information is detailed:

  • Name identifier of the script
  • Version a number identifying the versioning
  • Description descriptive text of what the script does
  • Widget type of widget compatible with this script

Expanding the row reveals in which dashboards, and by which users, the said script is being used.

Scripts Formatters Expanded

Actions on Scripts

Scripts Formatters Actions

For each item on the list, the following actions can be performed:

  • Share allows viewing and sharing the script for use by other users on their dashboards
Scripts Formatters Share
  • Edit opens the script’s editing form for modification
Scripts Formatters Edit
  • Delete removes the selected script

In the navigation bar, the following actions can be performed:

  • Search allows applying a filter to the list
  • Refresh refreshes the content of the list

Web Areas & Sections

From here, you can add new areas and sections to your left panel sections menu for the organization.

How it Works

Web Sections

Web Sections list displays information of custom configured areas in domain.

The following information is shown in the list:

  • Icon representative icon for the area in menu.
  • Name the name displayed in menu.
  • Description the description for the area.
  • Priority the display priority for the area when displayed in menu.
  • Categories show total categories availables area.

Web Section Actions

For each item in the list, the following actions can be performed:

  • Edit opens the Areas & Sections wizard in order to manage selected option.
  • Delete removes the selected area and all its contents.

In the navigation bar, the following actions can be performed:

  • Filter allows filtering of areas by name.
  • Create new area opens Areas & Sections wizard in order to create a new one.

Configuring a section

When you opened the section wizard you can see the area information step.

Area Information Step

Web Section Definition

Here you can configure the next information about the area:

  • Identifier unique identifier for the area (autogenerated but modifiable).
  • Title the name displayed in menu.
  • Description the description for the area.
  • Priority the display priority for the area when displayed in menu.
  • Web profile manages who can view this area in menu. If no one is seleted everyone can see it.
  • Icon representative icon for the area in menu.
  • Image background image for the area in the its home page.

Categories and Sections Step

Once you complete the required fields in previous step you can continue to this step.

Categories and Sections

Here you can see current provisioned categories and sections for the area and manage categories order.

Also you can add new categories by pressing New Category or new sections for each category by pressing the conventient New section button.

Categories can be created, edited or deleted. Also you can manage sections from this panel.

Category modal

A category is the sections grouper in left menu once you opened Area menu. Every category has their own sections.

Category modal

You can configure the next in a category:

  • Identifier unique identifier for the category (autogenerated but modifiable).
  • Name the name displayed in menu.

If sections available in category you can manage the display order by dragging then.

Section modal

Section represents the final menu leaf and the opened window.

Section modal

You can configure the next in a section:

  • Identifier unique identifier for the section (autogenerated but modifiable).
  • Name the name displayed in menu.
  • Icon the icon that identify the section.
  • Show in home makes the sections appear at area’s home.
  • Web profile manages who can view this section in menu. If no one is seleted everyone can see it.
  • Widget is the preconfigured widget to be shown in section.

Web Permissions

Here you can view/configure new roles for your organization’s web based on OpenGate’s original profiles.

How it Works

Web Permissions

The list of roles shows the name of the role and the OpenGate profile on which it is based. This means that a user will have the OpenGate profile as a base, but some functionalities will be limited on the web.

Actions on Roles

Web Permissions Actions

For each item on the list, the following actions can be performed:

  • Clone allows creating a new role based on the current one
  • Edit opens the role’s configuration for modification
  • Delete removes the selected role

In the navigation bar, the following actions can be performed:

  • Search allows applying a filter to the list
  • Refresh refreshes the content of the list
  • New opens the form for creating a new role

New Role Form

Web Permissions New Role

The form for the creation/modification of roles contains the following information:

  • Name unique identifying value of the role
  • Original Profile indicates which OpenGate profile is taken as a base for this role

Lastly, there are various layers of role customization. There are 4 groups:

  • Visibility allows hiding/showing common elements of the menu, widgets, workspaces, and dashboards
  • Management groups everything related to wizards and action forms for elements on the platform
  • Sections from here you can manage which web sections you want to enable for the role
  • Views allows selecting which provisioning/collection wizards should be displayed/hidden for the role. This option will only be visible if any of these elements are configured
Web Permissions Visibility

IMPORTANT NOTE: To make use of this new role, it will be necessary to log out and log back into the platform.

Common Elements

At the top of the form, we can find the following elements:

  • Search With this, you can filter the permissions to be selected, facilitating their identification
  • Import/Export Configuration Allows importing and exporting the wizard configuration via JSON.

Import/Export Configuration

Web Permissions Import Export JSON

When accessing the import and export functionality, it displays a window with various actions. Additionally, it presents the configuration of the wizard in JSON format.

The available actions are as follows:

  • Upload Json: Uploads a JSON file and replaces the previous JSON configuration.
  • Paste from clipboard: Pastes JSON data from the clipboard and replaces the previous JSON configuration.
  • Download Json: Downloads the JSON configuration as a file with the wizard’s name.
  • Copy to clipboard: Copies the JSON configuration to the clipboard.

Web Preferences

Here you can configure everything related to the web for your organization.

How it Works

Web Preferences

Within the configuration, we can distinguish three parts:

  • Organization Logo where an identifying image can be uploaded that will always be displayed on the navigation bar of the website.

  • Themes allows the selection of the color and overall appearance of the website.

  • Other Configs here, specific parameters can be configured that will affect the content displayed across the website. Their use is detailed below:

    • Google Key enables the use of Google’s localization tools. For example, in the tracking widget, it enables route calculations for device location points.
    • Weather Key allows activation of weather layers in the map widget. A free key can be created at OpenWeatherMaps.
    • Date Formatting this allows setting the desired format for the dates displayed across the website (to the extent possible). This relies on Moment.js.
    • Storage Limit indicates the maximum storage available for uploading files to the organization. With sufficient permissions, this can be modified.

In the navigation bar, the following actions can be performed:

  • Refresh refreshes the content of the listing.
  • Cancel cancel changes.
  • Save saves the current changes so they are not lost.

Devices Emulator

The Devices Emulator website emulates data on devices that can be used with platform elements. It is necessary to create a device from the Devices Wizard beforehand. Once created, we will select the device in the Entity Key combo.

Entity key

In the actions menu, the following actions can be performed:

  • Exact search
  • Case sensitive
  • New: Opens the device wizard
  • Execute operation: Opens the new operation wizard. To make this available, it is necessary to have previously selected an Entity key.
Select actions Menu actions

Finally, you can view the logs of the different actions performed from the icon.

Clean log

Subsections of Devices Emulator

Map

In the Map tab, a location will be selected.

Tab Map

Once you know the location, you click on the map.

Tab Map Pin

Operation

The Operation tab allows you to simulate the response that the device would send to the OpenGate platform when receiving an operation, by selecting a previously created operation.

Tab Sensors

The help opens a modal window that provides information on the data structure for input and output operation variables

Tab Sensors Help

If you click on the copy template button, it will copy the response template.

Tab Sensors

Inside the function, you can create an input and output operation. Using the delete or save buttons, you can delete or save the emulation of that operation.

Tab Sensors Delete Tab Sensors Save

Sensors

In the Sensors tab, you can choose the device datastreams that you want to send to the OpenGate Platform, simulating the transmission that the device would perform. This message will go through the entire workflow in OpenGate.

Tab Sensors

You can delete the previously data.

Tab Sensors clear

System

The System tab allows you to send values from the product datastreams of the selected device to the OpenGate Platform, simulating the transmission that the device would perform. This message will go through the entire workflow in OpenGate.

You can fill in the various fields to emulate device data. If you have filled in data, you can send it using the SEND DATA button.

Tab System

Analytics

On the analytics web page, you have access to the Artificial Intelligence settings of the platform along with complementary tools.

Analytics Section Home

The home screen will display panels that are most commonly used, facilitating access to various settings.

The menu can be collapsed to save screen space by clicking on the bottom part of the navigation menu.

Analytics Section Collapsed menu

Panels

Each panel contains an embedded widget similar to those used in Workspaces & Dashboards, making the configuration and usage unified.

From each of them, you will have access to the corresponding widget’s documentation.

Sections

Within the settings, three major sections can be distinguished:


Subsections of Analytics

Subsections of Analytics related

Data models Administration

From here you can view and/or manage the data models of our organization.

How it Works

Datamodels Administration

This panel is composed of the following widget:

In the navigation bar, the following actions can be performed:

  • Filter allows you to apply a filter to the list
  • Refresh refreshes the content of the list
  • Actions Menu displays all available actions (the same as those of the widget)
Data models Administration Actions

Section Configuration

From the Action Menu, you can access the configuration of the widget corresponding to the section.

  • Configuration opens the widget’s configuration.
  • Default allows resetting the configuration to its initial state.

Rules Administration

From here, you can view and/or manage the rules of our organization.

How it Works

Rules Administration

This panel is composed of the following widget:

In the navigation bar, the following actions can be performed:

  • Refresh refreshes the content of the list
  • Actions Menu displays all available actions (the same as those of the widget)
Rules Administration Actions

Section Configuration

From the Action Menu, you can access the configuration of the widget corresponding to the section.

  • Configuration opens the widget’s configuration.
  • Default allows resetting the configuration to its initial state.

Operation System Support

The OSS (Operation System Support) website contains pre-configured panels that can be used for operational tasks on the platform’s entities, as well as for identifying issues within them.

OSS Section Home

On the home screen, commonly used panels will be displayed, facilitating access to various configurations. Additionally, there will be two charts summarizing alarms and operations in the last 24 hours.

The menu can be collapsed to maximize screen space by clicking on the bottom part of the navigation menu.

OSS Section Collapsed menu

Panels

Each panel embeds one or more widgets that are also used in Workspaces & Dashboards, thus ensuring a unified configuration and user experience.

Each page provides access to corresponding documentation, which will direct the user to the relevant widgets.

Sections

Within the configurations, three major sections can be distinguished:

  • Operations: This section contains information related to operations executed and planned on the platform.
  • Alerts and Incidents: This section holds information about platform alarms and tickets.
  • Entities: In this section, one can navigate through various types of entities.

Configurations


Subsections of Operation System Support

Subsections of Entities

Assets Administration

From here, you can view and/or manage the assets of our organization.

How it works

Assets Administration

This panel is composed of the following widget:

The navigation bar contains the actions that can be performed:

  • Filter allows applying a filter on the list.
  • Refresh refreshes the content of the list.
  • Create asset provides quick access to the asset creation wizard.
  • Action menu displays all available actions (the same as those on the widget).
Assets Administration Actions

Section Configuration

From the Action Menu, you can access the configuration of the widget corresponding to the section.

  • Configuration opens the widget’s configuration.
  • Default allows resetting the configuration to its initial state.

Devices Administration

From here, you can view and/or manage the devices of our organization.

How it works

Devices Administration

This panel is composed of the following widget:

In the navigation bar are the actions that can be performed:

  • Filter allows you to apply a filter on the list.
  • Refresh refreshes the content of the list.
  • Create device provides quick access to the device creation wizard.
  • Action menu displays all the available actions (the same as those on the widget).
Devices Administration Actions

Section Configuration

From the Action Menu, you can access the configuration of the widget corresponding to the section.

  • Configuration opens the widget’s configuration.
  • Default allows resetting the configuration to its initial state.

Maps

From here, you can view the devices of our organization on the map.

How it works

Maps Administration

This panel is composed of the following widget:

In the navigation bar are the actions that can be performed:

  • Filter allows you to apply a filter to the list.
  • Refresh refreshes the content of the list.
  • Action menu displays all the available actions (the same as those on the widget).
Maps Administration Actions

Section Configuration

From the Action Menu, you can access the configuration of the widget corresponding to the section.

  • Configuration opens the widget’s configuration.
  • Default allows resetting the configuration to its initial state.

Subscribers Administration

From here, you can view and/or manage the subscribers of our organization.

How it works

Subscribers Administration

This panel is composed of the following widget:

In the navigation bar are the actions that can be performed:

  • Filter allows you to apply a filter to the list.
  • Refresh refreshes the content of the list.
  • Create Subscriber provides quick access to the subscriber creation wizard.
  • Action Menu displays all the available actions (the same as those on the widget).
Subscribers Administration Actions

Section Configuration

From the Action Menu, you can access the configuration of the widget corresponding to the section.

  • Configuration opens the widget’s configuration.
  • Default allows resetting the configuration to its initial state.

Subscriptions Administration

From this interface, you can view and/or manage the subscriptions of our organization.

How it works

Subscriptions Administration

This panel consists of the following widget:

In the navigation bar, you will find the actions that can be executed:

  • Filter allows you to apply a filter to the list.
  • Refresh refreshes the content of the list.
  • Create Subscription provides quick access to the subscription creation wizard.
  • Action Menu displays all available actions (the same as those in the widget).
Subscriptions Administration Actions

Section Configuration

From the Action Menu, you can access the configuration of the widget corresponding to the section.

  • Configuration opens the widget’s configuration.
  • Default allows resetting the configuration to its initial state.

Subsections of Notices and incidents

Alarms

Here you can consult the alarms of the platform.

How it works

Alarms Administration

This panel is composed of the following widget:

In the navigation bar, the following actions can be performed:

  • Filter allows you to apply a filter to the list
  • Refresh updates the content of the list
  • Action Menu displays all available actions (the same as those of the widget)
Alarms Administration Actions

Section Configuration

From the Action Menu, you can access the configuration of the widget corresponding to the section.

  • Configuration opens the widget’s configuration.
  • Default allows resetting the configuration to its initial state.

Alarms Summary

Here you can consult the alarms of the platform in graphical form.

How it works

Alarms Summary Administration

This panel is composed of the following widget:

In the navigation bar, the following actions can be performed:

  • Filter allows you to apply a filter to the graphs
  • Refresh updates the content of the graphs
  • Action Menu displays all available actions (the same as those of the widget)
Alarms Summary Administration Actions

Section Configuration

From the Action Menu, you can access the configuration of the widget corresponding to the section.

  • Configuration opens the widget’s configuration.
  • Default allows resetting the configuration to its initial state.

Tickets

Here you can consult the tickets of the platform.

How it works

Tickets Administration

This panel is composed of the following widget:

In the navigation bar, the following actions can be performed:

  • Filter allows you to apply a filter to the list
  • Refresh updates the content of the list
  • Create Ticket quick access to the new ticket creation form
  • Action Menu displays all available actions (the same as those of the widget)
Tickets Administration Actions

Section Configuration

From the Action Menu, you can access the configuration of the widget corresponding to the section.

  • Configuration opens the widget’s configuration.
  • Default allows resetting the configuration to its initial state.

Tickets Summary

Here you can graphically consult the tickets of the platform.

How it works

Tickets Summary Administration

This panel is composed of the following widget:

In the navigation bar, the following actions are available:

  • Filter allows you to apply a filter to the charts
  • Refresh updates the content of the charts
  • Action Menu displays all available actions (the same as those of the widget)
Tickets Summary Administration Actions

Section Configuration

From the Action Menu, you can access the configuration of the widget corresponding to the section.

  • Configuration opens the widget’s configuration.
  • Default allows resetting the configuration to its initial state.

Subsections of Operations

Operations List

From this interface, you can view and execute operations on devices.

How it works

Operations Administration

This panel is composed of the following widgets:

Both panels are linked, so if we select an operation in the upper list, the results in the executions list will be filtered for the selected operations.

Operations Navigation Bar

In the navigation bar are the actions that can be performed:

  • Filter allows you to apply a filter to the list.
  • Refresh refreshes the content of the list.
  • Action Menu displays all available actions (the same as those in the widget).
Operations List Actions

Executions Navigation Bar

In the navigation bar are the actions that can be performed:

  • In Progress/History indicates whether to list ongoing operations or those that have been completed.
  • Resource Type in the case of displaying ongoing executions, you must specify whether you want them for devices, subscribers, or subscriptions.
  • Filter allows you to apply a filter to the list.
  • Refresh refreshes the content of the list.
  • Action Menu displays all available actions (the same as those in the widget).
Executions List Actions

Section Configuration

From the Action Menu, you can access the configuration of the widget corresponding to the section.

  • Configuration opens the widget’s configuration.
  • Default allows resetting the configuration to its initial state.

Operations Summary

From this interface, you can view a summary of the operations on devices.

How it works

Operations Summary Administration

This panel is composed of the following widgets:

Both panels are linked, so if we select an operation in the upper list, the results in the summary will be filtered for the selected operations.

Operations Navigation Bar

In the navigation bar, you can find the actions that can be performed:

  • Filter allows you to apply a filter to the list.
  • Refresh updates the content of the list.
  • Action Menu displays all available actions (the same as those in the widget).
Operations Summary List Actions

Summary Navigation Bar

In the navigation bar, you can find the actions that can be performed:

  • In Progress/History indicates whether to display ongoing operations or those that have been completed.
  • Resource Type in the case of displaying ongoing executions, you must specify whether you want them for devices, subscribers, or subscriptions.
  • Filter allows you to apply a filter.
  • Refresh updates the content.
  • Execute Operation opens the operation launcher.
  • Action Menu displays all available actions (the same as those in the widget).
Operations Summary Actions

Section Configuration

From the Action Menu, you can access the configuration of the widget corresponding to the section.

  • Configuration opens the widget’s configuration.
  • Default allows resetting the configuration to its initial state.

Periodic Operations

From this interface, you can view a summary of the configured periodic operations as well as the scheduling of the next executions.

How it Works

Tasks Administration

This panel is composed of the following widgets:

IMPORTANT NOTE: To view the calendar data, at least one periodic operation must be selected from the list.

Periodic Operations Navigation Bar

In the navigation bar, you can find the actions that can be performed:

  • Filter allows you to apply a filter to the list.
  • Refresh updates the content of the list.
  • Action Menu displays all available actions (the same as those in the widget).
Tasks List Actions

Summary Navigation Bar

In the navigation bar, you can find the actions that can be performed:

  • Refresh updates the content.
  • Action Menu displays all available actions (the same as those in the widget).
Tasks Actions

Section Configuration

From the Action Menu, you can access the configuration of the widget corresponding to the section.

  • Configuration opens the widget’s configuration.
  • Default allows resetting the configuration to its initial state.

Legal

Contact

  • AMPLIA SOLUCIONES
  • Av. Europa, 4
  • 28108, Alcobendas, Madrid
  • Info@amplia.es
  • +34 91 112 67 47

Conditions and disclaimers

The information contained in this document is copyrighted, and Amplia Soluciones SL reserves all rights. Amplia Soluciones SL reserves the right to make periodic modifications to the document without the obligation to notify any person or entity of such revision. Copying, duplicating, selling, or otherwise distributing any part of the software or documentation without the prior written consent of an authorized representative of Amplia Soluciones SL is prohibited.

Documentation is provided as a reference sample on an “as is” basis, without warranty of any kind, either expressed or implied, including, without limitation, guarantees that the documentation is free of defects, merchantable, fit for a particular purpose, or non-infringing. The entire risk as to the documentation’s quality, accuracy, and performance is with you. Should any documentation prove defective in any respect, you (not the initial writer or any other contributor) assume the cost of any necessary servicing, repair, or correction. This disclaimer of warranty constitutes an essential part of this license. No use of any documentation is authorized hereunder except under this disclaimer.

Under no circumstances and no legal theory, whether in tort (including negligence), contract, or otherwise, shall the initial writer, any other contributor, or any distributor of documentation, or any supplier of any of such parties, be liable to any person for any direct, indirect, special, incidental, or consequential damages of any character including, without limitation, damages for loss of goodwill, work stoppage, computer failure or malfunction, or any other damages or losses arising out of or relating to the use of the documentation, even if such party shall have been informed of the possibility of such damages.

OpenGate and amplía))) are trademarks or registered trademarks of Amplia Soluciones SL. All other company and product names may be trademarks of the respective companies they are associated with. Specifications are subject to change without notice. Amplia Soluciones SL. is not responsible for errors or omissions.

Amplia Soluciones SL makes no warranties or commitments concerning the availability of future products or versions that may be planned or under development, whether they were notified or not in any format.