Click or drag to resize

RemoteUserAdminService Class

OFV Kjøretøydata service

This service administrates users for remote customers.

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.

Inheritance Hierarchy
SystemObject
  OfvVehicleData.ServiceRemoteUserAdminService

Namespace:  OfvVehicleData.Service
Assembly:  OfvVehicleData.Service (in OfvVehicleData.Service.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
public class RemoteUserAdminService

The RemoteUserAdminService type exposes the following members.

Constructors
  NameDescription
Public methodRemoteUserAdminService
Initializes a new instance of the RemoteUserAdminService class
Top
Methods
  NameDescription
Public methodCode exampleChangePasswordForUser
Change password for an existing user - its only possible to update users that belongs to company logged in!
Public methodCode exampleDeactivateUser
De-Activate existing user - its only possible to deactivate users that belongs to company logged in!
Public methodCode exampleDeleteUser
Delete an existing user - its only possible to delete users that belongs to company logged in!
Public methodCode exampleGetUser
Get existing user from system - its only possible to retreive users that belongs to company logged in!
Public methodCode exampleListUsers
Get list of existing users from system - its only possible to retreive users that belongs to company logged in!
Public methodCode exampleNewUser
Create new user - its only possible to create users on company logged in!
Public methodCode exampleReactivateUser
Re-Activate existing user - its only possible to reactivate users that belongs to company logged in!
Public methodCode exampleUpdateUser
Update existing user - its only possible to update users that belongs to company logged in!
Top
Remarks
The purpose of this service is to expose methods that so that remote customers can manage their users. The service-methods consist of different calls, some can be used stand-alone and some requires input from another service-call.
Examples
Connect to webservice to get help information: https://www.kjoretoydata.no/RemoteUserAdmin/help

Below is a simple example, that shows how to call the service [!:RemoteUserAdmin.GetUser].

Call webservice from JavaScript using JQuery
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);
        }
    });
}
See Also