Difference between revisions of "SwivelHelpdeskRequest Documentation"

From Swivel Knowledgebase
Jump to: navigation, search
 
m (1 revision imported)
 
(No difference)

Latest revision as of 12:52, 11 May 2017

Overview

Class name: SwivelHelpdeskRequest

Namespace: swivelsecure.client

This class is a wrapper round the XML-based Helpdesk API. It allows a limited number of commands to be executed compared to the SwivelAdminRequest, but has the additional ability to specify that the request applies to users from any specified repository.

A typical example of usage for this class is as follows:

  • Create an instance of the class:
SwivelHelpdeskRequest req = new SwivelHelpdeskRequest();
  • Create one or more users linked to the request class:
SwivelUser user = new SwivelUser(req, txtUsername.Text);
  • Call one of the operational methods on the user or users:
req.ResetUser(user);
  • Call the Send method to execute the command:
req.Send();

Constructors

SwivelHelpdeskRequest()

Constructor using settings from web.config.

SwivelHelpdeskRequest(SwivelSettings settings)

Constructor using specified settings.
settings: The settings to use

Methods

void UpdateUser(SwivelUser user)

Add a user update command to the request.
user: The user to update

Note: Users are not notified of updates to PIN etc, unless specifically requested.

void UpdateUser(SwivelUser user, string repository)

Add a user update command to the request.
user: The user to update
repository: The repository the user belongs to

void UpdateUsers(List<SwivelUser> users)

Add an update command for multiple users to the request.
users: The list of users to update

void UpdateUsers(List<SwivelUser> users, string repository)

Add an update command for multiple users to the request.
users: The list of users to update
repository: The repository the users belong to

void ResetUser(SwivelUser user)

Add a PIN reset request for the specified user.
user: The user to reset

void ResetUser(SwivelUser user, string repository)

Add a PIN reset request for the specified user.
user: The user to reset
repository: The repository the user belongs to

void ResetUsers(List<SwivelUser> users)

Add a PIN reset request for the specified list of users.
users: The list of users to reset

void ResetUsers(List<SwivelUser> users, string repository)

Add a PIN reset request for the specified list of users.
users: The list of users to reset
repository: The repository the users belong to

void SendStrings(SwivelUser user)

Add a request to send security strings for a user in the Agent repository.
user: The user to send strings to

void SendStrings(SwivelUser user, string repository)

Add a request to send security strings for a user in the Agent repository.
user: The user to send strings to
repository: The repository the user belongs to

void SendStrings(List<SwivelUser> users)

Add a request to send security strings for a list of users in the Agent repository.
users: The users to send strings to

void SendStrings(List<SwivelUser> users, string repository)

Add a request to send security strings for a user in the Agent repository.
users: The users to send strings to
repository: The repository the users belong to

void Report(SwivelReport report)

Add a report element to the request.
report: The report to add. Note that the report cannot specify a repository name in this case.

bool Send()

Send the completed request to the Swivel server.
This method must be called after all changes are made to the request in order to execute the request.
Returns True if a valid response was received from PINsafe. Does not necessarily mean that the request succeeded.

XmlElement RequestElement()

Get the top-level XmlElement from the request

XmlElement CreateElement(string name)

Create a new XmlElement with the required name.
Provided for future enhancement. You should not need to call this method directly.

string ToString()

Override of the base ToString() method.
Returns The XML representation of the request

Properties

SwivelAdminAPIResponse Response

The encapsulated response returned by PINsafe.

TimeSpan ResponseTime

The time it took to execute the last request.