Hello,
I am trying to create groups on Mobicontrol through API and I did create a json file for multiple groups.
It is working when I post to MobiControl/api/devicegroups/ and body contains
{
"Name": "group A",
"Path": "\\\\Root\\Groups\\Group A",
"Icon": "Green",
"Kind": "Regular"
}
but it is not working when I post to MobiControl/api/devicegroups/ and body contains
[{
"Name": "group A",
"Path": "\\\\Root\\Groups\\Group A",
"Icon": "Green",
"Kind": "Regular"
},
{
"Name": "group B",
"Path": "\\\\Root\\Groups\\Group B",
"Icon": "Green",
"Kind": "Regular"
}]
I am getting back the following error message.
{
"$type": "ErrorDetails",
"ErrorCode": 0,
"Message": "Contract validation failed",
"Data": [
"deviceGroup: Error parsing value"
],
"HelpLink": null
}
Is there any way to create multiple groups at once through the API? I am just wonder if the body has to be different when trying to create more than 1 group at once.
Thank you.