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 Jose,
On this documentation page you can find an example of how DataMiner encodes the data from the "Parameter" tags when sending a POST (the example right above the "Response" section).
As you have noticed yourself, this is not in the format that you need.
Alternatively you can use the "data" tag, as shown here (the first example).
When using a POST the contents of the data tag is sent as the body, so in your case the contents of that data tag (set with pid='<parameterid>') will need to be the JSON data that you want to send.
The easiest way to put the data in that parameter in the right format will be with a QAction.
Hope this helps.
Kind regards,