RemoteUserAdminService Class |
All methods need an UserAdminDTO as input.
All methods need username and password for company as input - authorization is done at all calls.
All methods need a format as input (json/xml) - result of request is delivered on format selected.
Namespace: OfvVehicleData.Service
public class RemoteUserAdminService
The RemoteUserAdminService type exposes the following members.
| Name | Description | |
|---|---|---|
| RemoteUserAdminService | Initializes a new instance of the RemoteUserAdminService class |
| Name | Description | |
|---|---|---|
| ChangePasswordForUser |
Change password for an existing user
- its only possible to update users that belongs to company logged in!
| |
| DeactivateUser |
De-Activate existing user
- its only possible to deactivate users that belongs to company logged in!
| |
| DeleteUser |
Delete an existing user
- its only possible to delete users that belongs to company logged in!
| |
| GetUser |
Get existing user from system
- its only possible to retreive users that belongs to company logged in!
| |
| ListUsers |
Get list of existing users from system
- its only possible to retreive users that belongs to company logged in!
| |
| NewUser |
Create new user
- its only possible to create users on company logged in!
| |
| ReactivateUser |
Re-Activate existing user
- its only possible to reactivate users that belongs to company logged in!
| |
| UpdateUser |
Update existing user
- its only possible to update users that belongs to company logged in!
|
Below is a simple example, that shows how to call the service [!:RemoteUserAdmin.GetUser].
function GetUser() { user = "companyUserName"; password = $.md5("companyUserNamePassword"); var userObject = { "userId": "userId to get", "userName": "userName to get" }; var url = host + "http://www.kjoretoydata.no/RemoteUserAdmin/GetUser?format=json"; var input = { "userToAdmin": userObject, "companyUserName": user, "password": password, "ipAddress": ip }; $.ajax({ type: "POST", url: url, data: JSON.stringify(input), processData: true, contentType: "application/json; charset=utf-8", dataType: "json", success: function (response) { if (response.success == true) { // Do something with resulting data } else { // Show error } } , error: function (request, status, error) { // Something went very wrong! alert('Error:' + request.status + ',' + request.statusText + ',' + request.responseText); } }); }