Page tree
Skip to end of metadata
Go to start of metadata

You can delete a department by sending the DELETE request to the following URL: /department/{departmentId}.

Permission to run the request: Account Owner, Administrators, Department Administrators.

Department Administrator can delete only the department they manage and its daughter departments.

You can't delete a department if:

  • it contains users,
  • it is managed by Department Administrator or Author,
  • it is the root one.


Request Headers

ParameterDescription
X-Auth-Account-Url (required)Base URL of the account, e.g. http://myaccount.ispringlearn.com
X-Auth-Email (required)Login of Account Owner,Administrator, or Department Administrator.
X-Auth-Password (required)

Password of Account Owner,Administrator, or Department Administrator.

department_idID of the department you want to delete.

After the request has been completed, the system returns the response with the 204 code.


Possible Response Codes

Code

Text

Description

204Successful operation

The requested department has been deleted.

400Bad RequestA request error.
401UnauthorizedAn authorization error.
403Permission Denied

The user doesn't have enough permissions to remove the department.


Sample Request

DELETE /department/be676588-5448-11e9-b7f7-62fb686e6fbe HTTP/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

Sample Response

HTTP/1.1 204 Successful operation
Connection: close
  • No labels