Account Owner, Account Administrators, Department Administrators, or custom roles.
Department Administrators and users with a custom role can update only the department they manage and its sub-departments.
|X-Auth-Account-Url (required)||The base URL of the account, e.g. http://myaccount.ispringlearn.com|
|X-Auth-Email (required)||The login of Account Owner, Account Administrator, Department Administrator, or a user with a custom role.|
The password of Account Owner, Account Administrator, Department Administrator, or a user with a custom role.
|departmentId (required)||The ID of a department you want to edit.|
|name (optional)||The department name.|
|parentDepartmentId (optional)||The ID of the parent department.|
|code (optional)||The department code.|
|200||Successful operation||The parameter is successfully updated.|
|400||Bad Request||A request error.|
|401||Unauthorized||An authorization error.|
|403||Permission denied||The user doesn't have enough permissions to update a department. For instance, Department Administrators can't edit departments they don't manage.|
POST /department/d48bd4fa-5b70-11e9-b12b-22e9fbac4a59/ HTTP/1.1 Host: api-learn.ispringlearn.com X-Auth-Account-Url: https://myaccount.ispringlearn.com X-Auth-Email: firstname.lastname@example.org X-Auth-Password: password Content-Type:application/xml <?xml version="1.0" encoding="UTF-8"?> <request> <name>Quality Assurance</name> <parentDepartmentId>be676588-5448-11e9-b7f7-62fb686e6fbe</parentDepartmentId> <code>5</code> </request>
HTTP/1.1 200 Successful operation Connection: close