Hi folks,
As per the subject, I'm looking for some examples of curl script in order to access to the API of Dataminer. I didn't find them in the documentation.
Thanks in advance.
Jordane
Should be possible to call an API method of DataMiner with cURL like this:
curl --header "Content-Type: application/json" \
--request POST \
--data '{"host": "", "login": "Username", "password": "Password", "clientAppName": "myApp", "clientAppVersion": "1.0", "clientComputerName": "clientTestDevice"}' \
https://mydma.mycompany.local/API/v1/Json.asmx/ConnectApp
The result will be a JSON string.
On Windows you might have to escape quotes:
curl --header "Content-Type: application/json" \
--request POST \
--data "{\"host\": \"\", \"login\": \"Username\", \"password\": \"Password\", \"clientAppName\": \"myApp\", \"clientAppVersion\": \"1.0\", \"clientComputerName\": \"clientTestDevice\"}" \
https://mydma.mycompany.local/API/v1/Json.asmx/ConnectApp
Other web methods can be called in a similar way.