There's a new home for Articles. Find Articles on Our Product Support Page.
Hi all, I’m having some issues with the SOTI API that I’m hoping the community can help out with because the documentation is not being very helpful. The goal we’re trying to accomplish is using the API to move a set of 6 devices from each of our facility locations to a different folder. Per the documentation the API method we should be using is POST /devicegroups/{path}/members. I've tried a few different ways but it almost always returns 403 Forbidden error with "Message": "Unauthorized access or invalid reference to specified object" or a 404 Not Found. I am able to run some basic commands like getting folder details or device details: GET <instanceID>.mobicontrolcloud.com/MobiControl/api/devicegroups/referenceIds:reference_id GET <instanceID>.mobicontrolcloud.com/MobiControl/api/devices/device_id From that, I assume I should be doing the following to move the device to the reference_id below but it's not working for me. POST <instanceID>.mobicontrolcloud.com/MobiControl/api/devicegroups/referenceIds:reference_id/<device_id(s)> I’ve also tried it with and without the /members/ in between the new path and device IDs as well as the following in the body as JSON: POST <instanceID>.mobicontrolcloud.com/MobiControl/api/devicegroups/referenceIds:reference_id/<device_id(s)> { "path": "referenceIds:reference_id", "deviceIds": ["device_id"] } I get the following error when using the body method: { "$type": "ErrorDetails", "ErrorCode": 0, "Message": "Contract validation failed", "Data": [ "deviceGroup.Name: Name is a required field." ], "HelpLink": null } Can anyone tell me what I’m doing wrong? Am I misunderstanding the documentation?
Top-tier experts who are delivering outstanding content. Should have more than 7000 points.
Experts who are consistent with great content. Should have more than 1000 points
Highly experienced members with valuable inputs. Should have more than 700 points
Beginners taking the initiative. Should have more than 500 points