I am trying to handle paginated HTTP end point and not getting complete data. So planning to handle the logic in QAction and trying to call API inside QAction. Please let me know is it possible to handle in protocol.
Hello,
To implement HTTP paging in a DataMiner Protocol using QActions, it's best to do the following:
QAction that initiates the HTTP session, sets the correct URL parameters (like limit
or offset
), and stores the response and processor class that encapsulates the logic for parsing each page, detecting the existence of a next page, and storing all the desired data into the protocol's tables.
General workflow is this:
Initial Setup - The QAction sets the initial URL with query parameters, including the desired limit
for pagination. Then it triggers an HTTP session that will use that URL.
Handling the Response - When the API response is received, the QAction is triggered again. The response content is deserialized and processed, received data is stored in processor class. If a next page exists (e.g., via a next URL field), a new HTTP session is triggered with the updated URL. If there are no more pages, all collected data is written to the tables.
Hope this helps!
i tried this way to call HTTP end point inside QAction its not working
public static class QAction
{
public static void Run(SLProtocolExt protocol)
{
try
{
int sessionId = 0;
string url = "<url>";
string method = "GET";
string headers = "<Authorization: token>";
protocol.Log("Entered 1");
var request = new Hashtable
{
{"Url", url },
{"Method", method },
{"Headers", headers},
};
protocol.Log("Enetered 2");
object response = protocol.NotifyClient(300, sessionId, request);
protocol.Log("Enetered 3");
protocol.Log($"QA{response}");
}
catch (Exception ex)
{
protocol.Log($"QA{protocol.QActionID}|Run|Exception thrown:{Environment.NewLine}{ex}", LogType.Error, LogLevel.NoLogging);
}
}
}
I am not sure which method i need to use for handling http call from this list
https://docs.dataminer.services/develop/api/types/Skyline.DataMiner.Scripting.SLProtocolExt.html
Can you please check this also.

Hi,
First you need Group that will trigger that HTTP Session. Here you can find one example how you can trigger HTTP session from timer:
https://docs.dataminer.services/develop/devguide/Connector/ConnectionsHttpImplementing.html?q=httpsession
If you want to trigger HTTP session from QAction, you need to create Trigger first.
Example:
<Trigger id="100">
<Name>OnTriggerFromQAction</Name>
<Type>action</Type>
<Content>
<Id>100</Id>
</Content>
</Trigger>
this trigger will go to Action with ID 100:
<Action id="100">
<Name>Trigger HTTP Session</Name>
<On id="100">group</On>
<Type>execute</Type>
</Action>
This action will execute Group with ID 100
<Group id="100">
<Name>Trigger HTTP Session</Name>
<Type>poll</Type>
<Content>
<Session>1</Session>
</Content>
</Group>
this group will execute HTTP Session with ID 1.
If you want to trigger HTTP session from QAction, you need to trigger that Trigger with ID 100. You can do that simply by calling protocol.CheckTrigger(100);
Thanks for the reply, I have created Group, Trigger also Session and triggering session from QAction also working.
But i need to call HTTP API end point inside the QAction, I need to handle paginated http end point to get complete data. So i am planning to call API end point inside QAction not from Http Session outside of QAction.
how to trigger a http session from a QAction. please let me know sample