<a id=“SuperOffice_WebApi_Agents_SaintAgent”></a> Class SaintAgent
Namespace: SuperOffice.WebApi.AgentsAssembly: SuperOffice.WebApi.dll Administration and maintenance of SAINT counters and statuses
Inheritance
object ← AgentBase ← SaintAgentImplements
ISaintAgent, IAgentBase, IDisposableInherited Members
AgentBase._json, AgentBase._binary, AgentBase._config, AgentBase._client, AgentBase._disposeClient, AgentBase.Merge(RequestOptions), AgentBase.BuildRequestFromObject(HttpMethod, string, object, WebApiOptions, string), AgentBase.BuildRequestFromStream(HttpMethod, string, Stream, WebApiOptions, string), AgentBase.BuildRequestFromObjectWithStream(HttpMethod, string, object, Stream, WebApiOptions, string), AgentBase.ParseAuthorization(IAuthorization), AgentBase.CancelRequest(), AgentBase.SendRequestObject(HttpMethod, string, object, WebApiOptions, string), AgentBase.SendRequestObjectWithStream(HttpMethod, string, object, Stream, WebApiOptions, string), AgentBase.SendRequest(HttpRequestMessage, RequestOptions), AgentBase.ThrowOnResponseErrorAsync(HttpRequestMessage, HttpResponseMessage), AgentBase.ParseResponse<T>(HttpResponseMessage), AgentBase.Finally(RequestOptions), AgentBase.Dispose(), AgentBase.Configuration, AgentBase.Client, AgentBase.HasRunningRequest, AgentBase.ClientCancellationTokenSource, AgentBase.ProgressListener, AgentBase.UploadProgressListener, object.ToString(), object.Equals(object), object.Equals(object, object), object.ReferenceEquals(object, object), object.GetHashCode(), object.GetType(), object.MemberwiseClone()Examples
<pre><code class=“lang-csharp”>using SuperOffice.WebApi; using SuperOffice.WebApi.Agents; var mySession = new WebApiOptions(“http://example.com/super/api”); mySession.Authorization = new AuthorizationUsernamePassword(“user”, “pass”); using (SaintAgent agent = new SaintAgent(mySession)) { // call methods on agent here… }</code></pre>Constructors
<a id=“SuperOffice_WebApi_Agents_SaintAgent__ctor_System_Net_Http_HttpClient_”></a> SaintAgent(HttpClient)
Constructor: Administration and maintenance of SAINT counters and statusesParameters
httpClient HttpClient
Use this HTTP client instead of making own HttpClient instance.
<a id=“SuperOffice_WebApi_Agents_SaintAgent__ctor_SuperOffice_WebApi_WebApiOptions_System_Net_Http_HttpClient_”></a> SaintAgent(WebApiOptions, HttpClient)
Constructor: Administration and maintenance of SAINT counters and statusesParameters
options WebApiOptions
Base URL and authentication values.
httpClient HttpClient
Optional: Use this HTTP client instead of making a new one.
Methods
<a id=“SuperOffice_WebApi_Agents_SaintAgent_CreateDefaultSaintConfigurationAsync_SuperOffice_WebApi_RequestOptions_”></a> CreateDefaultSaintConfigurationAsync(RequestOptions)
Set default values into a new SaintConfiguration. NetServer calculates default values on the entity, which is required when creating/storing a new instanceParameters
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<SaintConfiguration> A blank SaintConfiguration<a id=“SuperOffice_WebApi_Agents_SaintAgent_CreateDefaultStatusMonitorAsync_SuperOffice_WebApi_RequestOptions_”></a> CreateDefaultStatusMonitorAsync(RequestOptions)
Set default values into a new StatusMonitor. NetServer calculates default values on the entity, which is required when creating/storing a new instanceParameters
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<StatusMonitor> A blank StatusMonitor<a id=“SuperOffice_WebApi_Agents_SaintAgent_CreateDefaultStatusMonitorPeriodsAsync_SuperOffice_WebApi_RequestOptions_”></a> CreateDefaultStatusMonitorPeriodsAsync(RequestOptions)
Set default values into a new StatusMonitorPeriods. NetServer calculates default values on the entity, which is required when creating/storing a new instanceParameters
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<StatusMonitorPeriods> A blank StatusMonitorPeriods<a id=“SuperOffice_WebApi_Agents_SaintAgent_GetSaintConfigurationsAsync_SuperOffice_WebApi_RequestOptions_”></a> GetSaintConfigurationsAsync(RequestOptions)
Returns the StatusMonitorPeriods entity.Parameters
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<SaintConfiguration[]> The SaintConfiguration for all entities<a id=“SuperOffice_WebApi_Agents_SaintAgent_GetStatusMonitorAsync_System_Int32_SuperOffice_WebApi_RequestOptions_”></a> GetStatusMonitorAsync(int, RequestOptions)
Get a single status monitor based on its identityParameters
id int
Identity of status monitor
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<StatusMonitor> The requested status monitor<a id=“SuperOffice_WebApi_Agents_SaintAgent_GetStatusMonitorPeriodsAsync_SuperOffice_WebApi_RequestOptions_”></a> GetStatusMonitorPeriodsAsync(RequestOptions)
Returns the StatusMonitorPeriods entity.Parameters
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<StatusMonitorPeriods> The StatusMonitorEntity<a id=“SuperOffice_WebApi_Agents_SaintAgent_GetStatusMonitorsAsync_System_Int32_System_String_SuperOffice_WebApi_RequestOptions_”></a> GetStatusMonitorsAsync(int, string, RequestOptions)
Get all active status monitors for a specified targetParameters
id int
Identity of target type(contact identity, project identity etc.)
type string
Type to get status monitors for(“contact”, “project”, etc.)
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<StatusMonitor[]> Active status monitors<a id=“SuperOffice_WebApi_Agents_SaintAgent_RegenerateCountersAsync_System_Boolean_SuperOffice_WebApi_RequestOptions_”></a> RegenerateCountersAsync(bool, RequestOptions)
Regenerate the Saint counters - this can take several minutesParameters
runAsBatch bool
If true, then execute the regeneration as a Batch Task; the service call will return immediately. Otherwise wait until the task completes, may cause a timeout if called as a Web Service
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<BatchTaskInfo> Information about the batch task, if batch execution was requested. Otherwise null<a id=“SuperOffice_WebApi_Agents_SaintAgent_RegenerateStatusMonitorAsync_System_Int32_SuperOffice_WebApi_RequestOptions_”></a> RegenerateStatusMonitorAsync(int, RequestOptions)
Regenerate the given status monitorParameters
statusMonitorId int
The id of the statusmonitor to regenerate
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task This method has no return value<a id=“SuperOffice_WebApi_Agents_SaintAgent_RegenerateStatusMonitorsAsync_System_Boolean_SuperOffice_WebApi_RequestOptions_”></a> RegenerateStatusMonitorsAsync(bool, RequestOptions)
Regenerate status monitorsParameters
runAsBatch bool
If true, then execute the regeneration as a Batch Task; the service call will return immediately. Otherwise wait until the task completes, may cause a timeout if called as a Web Service
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<BatchTaskInfo> Information about the batch task, if batch execution was requested. Otherwise null<a id=“SuperOffice_WebApi_Agents_SaintAgent_SaveSaintConfigurationAsync_SuperOffice_WebApi_Data_SaintConfiguration_SuperOffice_WebApi_RequestOptions_”></a> SaveSaintConfigurationAsync(SaintConfiguration, RequestOptions)
Updates the existing SaintConfiguration or creates a new SaintConfiguration if the id parameter is 0.Parameters
saintConfiguration SaintConfiguration
The SaintConfiguration that is saved.
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<SaintConfiguration> New or updated SaintConfiguration<a id=“SuperOffice_WebApi_Agents_SaintAgent_SaveStatusMonitorAsync_SuperOffice_WebApi_Data_StatusMonitor_SuperOffice_WebApi_RequestOptions_”></a> SaveStatusMonitorAsync(StatusMonitor, RequestOptions)
Updates the existing StatusMonitor or creates a new StatusMonitor if the id parameter is 0.Parameters
statusMonitor StatusMonitor
The StatusMonitor that is saved.
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<StatusMonitor> New or updated StatusMonitor<a id=“SuperOffice_WebApi_Agents_SaintAgent_SaveStatusMonitorPeriodsAsync_SuperOffice_WebApi_Data_StatusMonitorPeriods_SuperOffice_WebApi_RequestOptions_”></a> SaveStatusMonitorPeriodsAsync(StatusMonitorPeriods, RequestOptions)
Updates the existing StatusMonitorPeriods or creates a new StatusMonitorPeriods if the id parameter is 0.Parameters
statusMonitorPeriods StatusMonitorPeriods
The StatusMonitorPeriods that is saved.
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<StatusMonitorPeriods> New or updated StatusMonitorPeriods<a id=“SuperOffice_WebApi_Agents_SaintAgent_SetRankOnStatusMonitorsAsync_System_String_System_Int32___SuperOffice_WebApi_RequestOptions_”></a> SetRankOnStatusMonitorsAsync(string, int[], RequestOptions)
Set rank order on status monitorsParameters
type string
Type of status monitors to reorder (“contact”, “project”, etc.)
itemsIds int[]
The ids of the items in the order you want
requestOptions RequestOptions
Override language/culture codes on this request.