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!
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,

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 π
I appreciate your assistance in this. I will definitely look into all what you have shared. Thanks so much!
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; }
}
}

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,
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,