Deleting a Device Directory
→ Send an HTTP DELETE request to /v3/directories/tcdirectories/[id]
to delete a device directory. The ID of the directory is passed as a path variable in the URL.
curl \
--request DELETE \
--header 'Cookie: JSESSIONID=3FB2F3F6A089FE9029DFD6DAFEF146DC' \
https://[server]:8443/umsapi/v3/directories/tcdirectories/77118
Response
→ IMI replies with a brief success message:
Code Example:
<code> 200 OK</code>
Code Example:
<code>---</code>
Code Example:
<code> {"message":"Deletion successful."} </code>
A device directory has to be empty to be removed. If you try to delete a non-empty directory, IMI will respond with an error message:
400 Bad Request
---
{
"message": "Directory with ID <77118> is not empty. Remove content first.",
"errorCode": "ITG-0A006",
"time": "2016-04-06T13:29:59.362",
"stackTrace": "[de.igel.rm.umsapi.server.services.thinclientdirectory.
[...]
}
Learn more about error codes and messages here IGEL Management Interface > IMI API V3 Reference