You can make a user active or inactive with a POST request to the following URL: /user/<user_id>/status.
Permission to run the request: Account Owner, Administrator, Organization Administrator.
| |
---|
X-Auth-Account-Url (required) | Base URL of the account, e.g. http://myaccount.ispringlearn.com |
X-Auth-Email (required) | Administrator/Organization admin e-mail address. |
X-Auth-Password (required) | Administrator/Organization admin password. |
X-Status (required) | Specify user status: 1 - active 3 - inactive |
X-Deactivation-Date (optional) | Date formatted according to ISO8601 (YYYY-MM-DD). Example: 2017-11-27 |
To set the deactivation date, send '1' for the X-Status parameter.
If you send the request without a deactivation date, any previously entered date will be disregarded.
Possible Response Codes
| | |
---|
404 | Unknown user | User with the specified ID was not found. |
403 | Permission denied | User does not have enough permissions to handle the operation. Example: Organization admin can't add users to another organization. |
400 | Empty parameter user status | User status was not specified. |
400 | User status must be 1 or 3, <status> given | Unacceptable status. |
400 | Deactivation date must be in a format YYYY-MM-DD | Deactivation date must be in the format YYYY-MM-DD. |
200 | Ok | The request has been processed successfully. |
Sample Request
POST /user/3/status HTTP/1.1
Host: api.ispringonline.com
X-Auth-Account-Url: http://myaccount.ispringlearn.com
X-Auth-Email: email@email.com
X-Auth-Password: password
X-Status: 1
X-Deactivation-Date: 2017-11-29
XML
Sample Response
HTTP/1.1 200 OK
Connection: close
XML