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

You can make a user active or inactive with a POST request to the following URL: /user/{user_id}/status.

Permissions to run the request: Account Owner, Administrators, Department Administrators

Department Administrators may activate or deactivate only users belonging to the departments they manage or their daughter departments. 


Request Headers

Header
Description
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.
user_id (required)ID of a user you want to activate or deactivate.

Request Parameters

Parameter

Description

statusTo block a user, add 3 (<status>3</status>) in the status row. To active a user, type 1 (<status>1</status>).


 Possible Response Codes


Code
Text
Description
200Successful operationA user's status is changed.
400Bad RequestA request error.
401UnauthorizedAn authorization error.
403Permission DeniedThe user doesn't have enough permissions to activate or deactivate users. For example, Department Administrators can't activate or deactivate users who don't belong to the departments they manage.

 

Sample Request

POST /user/43f4a84c-6280-11e9-8686-a6210366ac32/status 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
Content-Type:application/xml

<?xml version="1.0" encoding="UTF-8"?>
<request>
    <status>1</status>
</request>

Sample Response

HTTP/1.1 200 Successful operation
Connection: close


  • No labels