Hi
I have issues when run this session:
<Sessionid="2"name="API Login">
<Connectionid="1"name="Credentials">
<Requestverb="POST"url="/api/v1/system/configuration/login">
<!--<Parameters>
<Parameter key="user" pid="135"></Parameter>
<Parameter key="password" pid="136"></Parameter>
</Parameters>-->
<Headers>
<Header key="Content-Type">application/json</Header>
</Headers>
</Request>
<ResponsestatusCode="4">
<Contentpid="5"></Content>
</Response>
</Connection>
</Session>
in wireshark appear this session send post with this body "{"
for login need send this format in POST to endpoint
{
"user":"xxxxxx",
"password":"xxxxxxx"
}
Hi Bram,
I use this QAction and work:
using System;
using System.Text;
using Skyline.DataMiner.Scripting;
public static class QAction
{
public static void Run(SLProtocol protocol)
{
try
{
string username = Convert.ToString(protocol.GetParameter(10));
string password = Convert.ToString(protocol.GetParameter(11));
string json = $"{{\"user\":\"{username}\",\"password\":\"{password}\"}}";protocol.SetParameter(12, json);
}
catch (Exception ex)
{
protocol.Log($"QAction Error: {ex.Message}");
}
}
}