Icon Web Server Administration API - Users


Add User Request
The add user request adds the user provided in the included JSON content. If there is no active session or the session is not authenticated, the request will result in a 403 Forbidden HTTP response.

HTTP Method: POST

HTTP Request Content Type: application/json; charset=utf-8

Example Request:

https://localhost/administration?method=adduser

Example Request Content:

{
   "Name": "JohnSmith",
   "FullName": "John Smith",
   "EmailAddress": "john.smith@company.com",
   "LoginStartTime": -2209161600000,
   "LoginEndTime": -2209075201000
}

HTTP Response: 200 on success, 403 if not authenticated, and 500 on error

Information New users are always created in an inactive state, and must be activated using the Activate User Request below in order to be available for use with the web server.


Update User Request
The update user request updates the user provided in the included JSON content. If there is no active session or the session is not authenticated, the request will result in a 403 Forbidden HTTP response.

HTTP Method: POST

HTTP Request Content Type: application/json; charset=utf-8

Example Request:

https://localhost/administration?method=updateuser

Example Request Content:

{
   "Name": "JohnSmith",
   "FullName": "John Smith",
   "EmailAddress": "john.smith@company.com",
   "LoginStartTime": -2209161600000,
   "LoginEndTime": -2209075201000
}

HTTP Response: 200 on success, 403 if not authenticated, and 500 on error


Remove User Request
The remove user request removes the user provided in the included JSON content. If there is no active session or the session is not authenticated, the request will result in a 403 Forbidden HTTP response.

HTTP Method: POST

HTTP Request Content Type: application/json; charset=utf-8

Example Request:

https://localhost/administration?method=removeuser

Example Request Content:

{
   "Name": "JohnSmith"
}

HTTP Response: 200 on success, 403 if not authenticated, and 500 on error


Activate User Request
The activate user request changes the status of the user provided in the included JSON content to active. If there is no active session or the session is not authenticated, the request will result in a 403 Forbidden HTTP response.

HTTP Method: POST

HTTP Request Content Type: application/json; charset=utf-8

Example Request:

https://localhost/administration?method=activateuser

Example Request Content:

{
   "Name": "JohnSmith"
}

HTTP Response: 200 on success, 403 if not authenticated, and 500 on error


Deactivate User Request
The deactivate user request changes the status of the user provided in the included JSON content to inactive. If there is no active session or the session is not authenticated, the request will result in a 403 Forbidden HTTP response.

HTTP Method: POST

HTTP Request Content Type: application/json; charset=utf-8

Example Request:

https://localhost/administration?method=deactivateuser

Example Request Content:

{
   "Name": "JohnSmith"
}

HTTP Response: 200 on success, 403 if not authenticated, and 500 on error


Lock User Request
The lock user request locks the user provided in the included JSON content so that the user cannot authenticate with the web server until the provided date/time. If there is no active session or the session is not authenticated, the request will result in a 403 Forbidden HTTP response.

HTTP Method: POST

HTTP Request Content Type: application/json; charset=utf-8

Example Request:

https://localhost/administration?method=lockuser

Example Request Content:

{
   "Name": "JohnSmith",
   "LockReleaseTime": 1607392690982
}

HTTP Response: 200 on success, 403 if not authenticated, and 500 on error


Unlock User Request
The unlock user request unlocks the user provided in the included JSON content so that the user can authenticate with the web server. If there is no active session or the session is not authenticated, the request will result in a 403 Forbidden HTTP response.

HTTP Method: POST

HTTP Request Content Type: application/json; charset=utf-8

Example Request:

https://localhost/administration?method=unlockuser

Example Request Content:

{
   "Name": "JohnSmith"
}

HTTP Response: 200 on success, 403 if not authenticated, and 500 on error

Set User Password Request
The set user password request changes the password for the user provided in the included JSON content. If there is no active session or the session is not authenticated, the request will result in a 403 Forbidden HTTP response.

HTTP Method: POST

HTTP Request Content Type: application/json; charset=utf-8

Example Request:

https://localhost/administration?method=setuserpassword

Example Request Content:

{
   "Name": "JohnSmith",
   "Password": "HelloWorld123456"
}

HTTP Response: 200 on success, 403 if not authenticated, and 500 on error


Grant User Roles Request
The grant user roles request grants a set of roles to the user provided in the included JSON content. If there is no active session or the session is not authenticated, the request will result in a 403 Forbidden HTTP response.

HTTP Method: POST

HTTP Request Content Type: application/json; charset=utf-8

Example Request:

https://localhost/administration?method=grantuserroles

Example Request Content:

{
   "Name": "JohnSmith",
   "Roles": ["CustomerService", "Public"]
}

HTTP Response: 200 on success, 403 if not authenticated, and 500 on error


Revoke User Roles Request
The revoke user roles request revokes a set of roles from the user provided in the included JSON content. If there is no active session or the session is not authenticated, the request will result in a 403 Forbidden HTTP response.

HTTP Method: POST

HTTP Request Content Type: application/json; charset=utf-8

Example Request:

https://localhost/administration?method=revokeuserroles

Example Request Content:

{
   "Name": "JohnSmith",
   "Roles": ["CustomerService", "Public"]
}

HTTP Response: 200 on success, 403 if not authenticated, and 500 on error


Get User Roles Request
The get user roles request enumerates all of the roles assigned to the user provided in the included JSON content. If there is no active session or the session is not authenticated, the request will result in a 403 Forbidden HTTP response.

HTTP Method: GET

HTTP Request Content Type: application/json; charset=utf-8
HTTP Response Content Type: application/json; charset=utf-8

Example Request:

https://localhost/administration?method=getuserroles

Example Request Content:

{
   "Name": "JohnSmith"
}

Example Response Content:

{
   "Roles": ["CustomerService", "Public"]
}

HTTP Response: 200 on success, 403 if not authenticated, and 500 on error


Get Users Request
The get users request enumerates all of the users defined on the web server. If there is no active session or the session is not authenticated, the request will result in a 403 Forbidden HTTP response.

HTTP Method: GET

HTTP Response Content Type: application/json; charset=utf-8

Example Request:

https://localhost/administration?method=getusers

Example Response Content:

{
   "Users": [
      { "Name": "Administrator",
        "Active": true,
        "FullName": "Administrator User",
        "EmailAddress": "",
        "LoginStartTime": -2209161600000,
        "LoginEndTime": -2209075201000,
        "Locked": false,
        "LockReleaseTime": 0,
        "Roles": [{ "Name": "Administrators" },
                  { "Name": "Public" }] },
      { "Name": "Anonymous",
        "Active": true,
        "FullName": "Anonymous User",
        "EmailAddress": "",
        "LoginStartTime": -2209161600000,
        "LoginEndTime": -2209075201000,
        "Locked": false,
        "LockReleaseTime": 0,
        "Roles": [{ "Name": "Public" }] },
      { "Name": "JohnSmith",
        "Active": true,
        "FullName": "John Smith",
        "EmailAddress": "john.smith@company.com",
        "LoginStartTime": -2209161600000,
        "LoginEndTime": -2209075201000,
        "Locked": false,
        "LockReleaseTime": 0,
        "Roles": [{ "Name": "CustomerService" },
                  { "Name": "Public" }] }] 
}

HTTP Response: 200 on success, 403 if not authenticated, and 500 on error
Image