Skip to content
DataMiner DoJo

More results...

Generic selectors
Exact matches only
Search in title
Search in content
Post Type Selectors
Search in posts
Search in pages
Search in posts
Search in pages
Log in
Menu
  • Blog
  • Questions
  • Learning
    • E-learning Courses
    • Open Classroom Training
    • Certification
      • DataMiner Fundamentals
      • DataMiner Configurator
      • DataMiner Automation
      • Scripts & Connectors Developer: HTTP Basics
      • Scripts & Connectors Developer: SNMP Basics
      • Visual Overview – Level 1
      • Verify a certificate
    • Tutorials
    • Video Library
    • Books We Like
    • >> Go to DataMiner Docs
  • Expert Center
    • Solutions & Use Cases
      • Solutions
      • Use Case Library
    • Markets & Industries
      • Media production
      • Government & defense
      • Content distribution
      • Service providers
      • Partners
      • OSS/BSS
    • DataMiner Insights
      • Security
      • Integration Studio
      • System Architecture
      • DataMiner Releases & Updates
      • DataMiner Apps
    • Agile
      • Agile Webspace
      • Everything Agile
        • The Agile Manifesto
        • Best Practices
        • Retro Recipes
      • Methodologies
        • The Scrum Framework
        • Kanban
        • Extreme Programming
      • Roles
        • The Product Owner
        • The Agile Coach
        • The Quality & UX Coach (QX)
    • DataMiner DevOps Professional Program
  • Downloads
  • More
    • Feature Suggestions
    • Climb the leaderboard!
    • Swag Shop
    • Contact
      • General Inquiries
      • DataMiner DevOps Support
      • Commercial Requests
    • Global Feedback Survey
  • PARTNERS
    • All Partners
    • Technology Partners
    • Strategic Partner Program
    • Deal Registration
  • >> Go to dataminer.services

Guidance Needed: Polling JSON Data into a Table with Groups, Triggers, and QActions

Solved208 views25th March 2025
2
Maya Williamz118 20th March 2025 0 Comments

Hello DataMiner Community,

I am developing a driver that polls JSON results from an API and updates a table using the QAction FillArray method, leveraging Newtonsoft.Json for deserialization. Although my code compiles successfully and the HTTP session returns a 200 status along with valid data, the table—and consequently the Stream Viewer—remains empty after publishing.

I suspect the issue may be related to the configuration and sequencing of my polling groups, triggers, and actions. Specifically, I am unsure if my groups are correctly set up to trigger the HTTP session and if my triggers and QActions are properly configured to process the JSON response and populate the table.

Could anyone provide guidance or share a working example that demonstrates best practices for polling JSON data into a table using these mechanisms? Any insights into the correct ordering and configuration of groups, triggers, and actions would be greatly appreciated.

Thank you in advance for your assistance!

Maya Williamz Selected answer as best 25th March 2025

1 Answer

  • Active
  • Voted
  • Newest
  • Oldest
1
Robin Meurisse [SLC] [DevOps Enabler]1.12K Posted 20th March 2025 6 Comments

Hi Maya,

The general guideline would be to define a timer within the protocol.xml. This timer will be responsible to trigger your HTTP Session to retrieve the data for the specified interval.

More information on how to setup the Timer → Group → Session for HTTP communication can be found on the following docs page.

The page also contains a link to a generic HTTP connector example available on GitHub.

Hope this helps 🙂

Kind regards,

Maya Williamz Selected answer as best 25th March 2025
Maya Williamz commented 20th March 2025

Hi Robin,

Thank you for your prompt reply. However, I set a timer for 10 seconds with the associated group, and I'm still not seeing any results. Additionally, the example you shared appears to be unreachable.

My main issue is understanding where things went wrong. When I manually request the API, I receive a JSON response body, but when I parse that JSON and attempt to populate my table using FillArray, the table (and consequently the stream viewer) remains empty. As a beginner in this area, I would greatly appreciate any guidance or a working example that could help me understand the proper configuration and sequencing of polling groups, triggers, and QActions from a JSON response to the table as polling.

Thank you again for your assistance!

Best Regards,

Robin Meurisse [SLC] [DevOps Enabler] commented 20th March 2025

Hi Maya,
Apologies for the broken link, I've updated the link in the above post (URL: https://github.com/SkylineCommunications/SLC-C-Example_HTTP).

The Timer will contain a group which is put on the execution queue at each passing timer interval and the group then gets executed.
The Group should contain the <Content>-tag which links to your defined HTTP Session.
The StreamViewer will then display your request and response every time the timer goes off.
In the example, QAction 1 is triggered by the response parameter (PID20) every time a response is received. QAction 1 will then fill the contents of the defined table.

If the linked example would be unclear, extra details on integrating an HTTP connector can be found on the docs: https://docs.dataminer.services/develop/devguide/Connector/ConnectionsHttpImplementing.html
https://docs.dataminer.services/develop/devguide/Connector/ConnectionsHttpUseCase.html
https://docs.dataminer.services/develop/devguide/Connector/ConnectionsHttpExamples.html

There are also fully detailed courses available on Dojo which take you through the development step-by-step: https://community.dataminer.services/courses/dataminer-connector-integration-http-basics/

Hope this helps 🙂

Maya Williamz commented 23rd March 2025

I appreciate your assistance in this. I will definitely look into all what you have shared. Thanks so much!

Maya Williamz commented 25th March 2025

Hi Robin,
My protocol uses HTTP, and I'm successfully receiving a response body in raw JSON format. The HTTP status code is 200, and my table column types are all set to retrieved. However, the table doesn’t get populated — it remains empty.

I’ve linked my QAction to the parameter holding the response body, and below is the code I’m currently using (I've replaced parameter and variable names for confidentiality). Could you kindly take a look and let me know what I might be missing or doing wrong?

using System;
using System.Collections.Generic;
using Newtonsoft.Json;
using Skyline.DataMiner.Scripting;

/// <summary>
/// DataMiner QAction Class: Process Table.
/// </summary>
public static class QAction
{
/// <summary>
/// The QAction entry point.
/// </summary>
/// <param name="protocol">Link with SLProtocol process.</param>
public static void Run(SLProtocolExt protocol)
{
try
{
ProcessResponse(protocol);
}
catch (Exception ex)
{
protocol.Log($"QA{protocol.QActionID}|{protocol.GetTriggerParameter()}|Run|Exception thrown:{Environment.NewLine}{ex}", LogType.Error, LogLevel.NoLogging);
}
}

public static void ProcessResponse(SLProtocolExt protocol)
{
try
{
// Retrieve the HTTP status code
string httpStatusCode = protocol.GetParameter(Parameter.status_code_param).ToString();
if (string.IsNullOrEmpty(httpStatusCode) || !httpStatusCode.Contains("200"))
{
return;
}

// Retrieve the HTTP response body
string httpResponse = protocol.GetParameter(Parameter.response_body_param).ToString();
List<TableRowData> rows = new List<TableRowData>();

// Deserialize the JSON response
List<ApiItem> items = JsonConvert.DeserializeObject<List<ApiItem>>(httpResponse);

// Process each item
foreach (var item in items)
{
TableRowData row = new TableRowData
{
Column1 = item.Field1,
Column2 = item.Field2,
Column3 = item.Field3,
Column4 = item.Field4,
Column5 = item.Field5,
};
rows.Add(row);
}

// Populate the table
protocol.table_reference.FillArray(rows.ToArray());
}
catch (Exception ex)
{
protocol.Log($"QA{protocol.QActionID}|{protocol.GetTriggerParameter()}|Run|Exception thrown:{Environment.NewLine}{ex}", LogType.Error, LogLevel.NoLogging);
}
}

public class ApiItem
{
public string Field1 { get; set; }
public string Field2 { get; set; }
public string Field3 { get; set; }
public string Field4 { get; set; }
public string Field5 { get; set; }
}

public class TableRowData
{
public string Column1 { get; set; }
public string Column2 { get; set; }
public string Column3 { get; set; }
public string Column4 { get; set; }
public string Column5 { get; set; }
}
}

Robin Meurisse [SLC] [DevOps Enabler] commented 25th March 2025

Hi Maya,
Could we try a couple of things to further pinpoint the issue? 🙂
– Are there any exceptions visible in the element logging?
– Would it be possible to add a 'protocol.Log("Response parsing executed", LogType.Debug, LogLevel.NoLogging)' line inside your Run()-method? After uploading this change onto your system, would it be possible to verify in the element logging that this QAction is indeed being executed and this log line appears?
– The method protocol.table_reference.FillArray() accepts multiple types, the FillArray()-method might accept this as columns (object[]) instead which would not result into anything.
If you wish to populate the table row-based, could you try adjusting the code to:
List<QActionTableRows> rows = new List<QActionTableRow>();
…
var row = new TableDataQactionRow // Note: update this instance name 'TableData' to the name of your table, there should be a type available automatically generated by DIS for which the name ends with QactionRow
{
Column1_1001 = item.Field1, // Note: update the Column1_1001 property by the actual existing property inside of your QactionRow class
Column2_1002 = item.Field2,
Column3_1003 = item.Field3,
Column4_1004 = item.Field4,
Column5_1005 = item.Field5,
};
rows.Add(row);
…
protocol.table_reference.FillArray(rows); // Note: without the .ToArray() which would be the end goal – we should try and pass a 'List<QActionTableRow>' so the table gets populated as rows.

Let me know if this helps you further.
Kind regards,

Show 1 more comments
Please login to be able to comment or post an answer.

My DevOps rank

DevOps Members get more insights on their profile page.

My user earnings

0 Dojo credits

Spend your credits in our swag shop.

0 Reputation points

Boost your reputation, climb the leaderboard.

Promo banner DataMiner DevOps Professiona Program
DataMiner Integration Studio (DIS)
Empower Katas

Recent questions

Alarm Dashboard PDF/CSV Export 1 Answer | 0 Votes
Is the Microsoft SharePoint Connector Still Usable 0 Answers | 0 Votes
Is the Microsoft SharePoint Connector Still Usable 0 Answers | 0 Votes

Question Tags

adl2099 (115) alarm (62) Alarm Console (82) alarms (100) alarm template (83) Automation (223) automation scipt (111) Automation script (167) backup (71) Cassandra (180) Connector (108) Correlation (68) Cube (150) Dashboard (194) Dashboards (188) database (83) DataMiner Cube (57) DIS (81) DMS (71) DOM (139) driver (65) DVE (55) Elastic (83) Elasticsearch (115) elements (80) Failover (104) GQI (159) HTTP (76) IDP (74) LCA (151) low code app (166) low code apps (93) lowcodeapps (75) MySQL (53) protocol (203) QAction (83) security (88) services (51) SNMP (86) SRM (337) table (54) trending (87) upgrade (62) Visio (539) Visual Overview (345)
Privacy Policy • Terms & Conditions • Contact

© 2025 Skyline Communications. All rights reserved.

DOJO Q&A widget

Can't find what you need?

? Explore the Q&A DataMiner Docs

[ Placeholder content for popup link ] WordPress Download Manager - Best Download Management Plugin