AVAILABLE WITH BUSINESS SUBSCRIPTION
Request: POST /department/{departmentId}
Permissions to Run the Request
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.
Header | Description |
---|
X-Auth-Account-Url (required) | The base URL of the account, e.g. https://myaccount.ispringlearn.com |
X-Auth-Email (required) | The login of Account Owner, Account Administrator, Department Administrator, or a user with a custom role. |
X-Auth-Password (required) | The password of Account Owner, Account Administrator, Department Administrator, or a user with a custom role. |
Parameter | Description |
---|
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. |
Response Codes
Code | Text | Description |
---|
204 | No Content | 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. |
Sample Request
POST /department/d48bd4fa-5b70-11e9-b12b-22e9fbac4a59 https/1.1
Host: api-learn.ispringlearn.com
X-Auth-Account-Url: https://myaccount.ispringlearn.com
X-Auth-Email: email@email.com
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>
XML
Sample Response
https/1.1 204 No Content
XML