Interface IDiagnosticsAgent
Namespace: SuperOffice.WebApi.AgentsAssembly: SuperOffice.WebApi.dll Diagnostics, usage data collection, caches and flushing
Implements
IAgentBase, IDisposableMethods
AddWebAppUsageAsync(WebAppUsage[], RequestOptions)
Adds WebApp usage to existing logParameters
webAppUsages WebAppUsage[]
Web app usage.
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
TaskChangeLogSettingsAsync(bool, bool, bool, bool, bool, bool, bool, bool, RequestOptions)
Change NetServer log settings.Parameters
logWarning bool
Turn on warning log
logInformation bool
Turn on information log
logSuccessAudit bool
Turn on success audit log
logFailureAudit bool
Turn on failure audit log
logToEventLog bool
Log to event log
logToSuperOffice bool
Log to SuperOffice
logToFile bool
Log to file
logToTrace bool
Log to trace
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
TaskCollectDataAdditionsAsync(RequestOptions)
Collect and transmit usage statistics: Database Additions. If opted-out then this call does nothing. The call returns immediately (starting a background thread), and updates CS scheduler table to set the next run time.Parameters
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task This method has no return valueCollectTableSizesAsync(RequestOptions)
Collect and transmit usage statistics: Table Sizes. If opted-out then this call does nothing. The call returns immediately (starting a background thread), and updates CS scheduler table to set the next run time.Parameters
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task This method has no return valueCollectWebUsageAsync(RequestOptions)
Collect and transmit usage statistics: Web-based clients Usage. If opted-out then this call does nothing. The call returns immediately (starting a background thread), and updates CS scheduler table to set the next run time.Parameters
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task This method has no return valueCollectWinUsageAsync(RequestOptions)
Collect and transmit usage statistics: Windows CRM Client Usage. If opted-out then this call does nothing. The call returns immediately (starting a background thread), and updates CS scheduler table to set the next run time.Parameters
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task This method has no return valueFlushCachesAsync(RequestOptions)
Flushes all NetServer cachesParameters
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
TaskFlushCachesByNameAsync(string[], RequestOptions)
Flushes all NetServer caches namedParameters
cacheNames string[]
Name of the cachnes to flush
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task This method has no return valueGetAnalyticsDataAsync(RequestOptions)
Retrieve analytics properties to be included in usage tracking.Parameters
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<AnalyticsData> Description Analytics DataGetCacheInvalidationGenerationsAsync(string[], RequestOptions)
Get generation for provided namesParameters
names string[]
Name of caches
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<CacheInvalidation[]> Array of caches with generation numberGetCacheNamesAsync(RequestOptions)
Get the name of the caches that can be flushedParameters
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<string[]> Name of the caches that can be flusehdGetCacheStateAsync(string[], RequestOptions)
Get the current generation value of the named caches. State is opaque.Parameters
cacheNames string[]
Names of the caches to check
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<string> Current state of the caches named. If not the same as previous value, then it is time to flushGetEntityCountsForAllUsersAsync(RequestOptions)
Get an array of entities and number of entities created for all associates.Parameters
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<EntityCounts[]> Array of EntityCounts[] for all the usersGetEntityCountsForCurrentUserAsync(RequestOptions)
Get an array of entities and number of entities created for the current associateParameters
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<EntityCounts[]> Array of EntityCounts[] for the current associateGetNextTableNumberAsync(RequestOptions)
Increment save and return NextTableNumber, to be used when creating new extra tableParameters
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<int> NextTableNumber of DatabaseModelGetSystemInfoAsync(RequestOptions)
Get system informationParameters
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<SoSystemInfoCarrier> License and configuration information.GetSystemMessagesAsync(int, RequestOptions)
Retrieves a list of system messages for a specific associate.Parameters
associateId int
The associateId of the message target.
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<SystemMessage[]> List of SystemMessages for desired associateGetWebAppUsagesForPeriodAsync(DateTime, DateTime, string, RequestOptions)
Get all WebAppUsages for a given period, that match an optional search termParameters
fromDate DateTime
toDate DateTime
searchTerm string
ViewState search term. ’%’ is the wildcard character, for example ‘Pocket%’ will match all viewstates starting with ‘Pocket’. If empty, all viewstates will be matched
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<WebAppUsage[]>LogViewStateAsync(string, RequestOptions)
Log a change in view state. The granularity of the logging depends on the current configuration. This call returns asynchronously, leaving the server to finish processing later on.Parameters
viewState string
Current view state to be logged
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
TaskPerformTasksAfterCustomObjectTableCreatedAsync(string, RequestOptions)
A temporary method to be used from c++ until CustomObjectsAgent.CreateTable implemented in NetServerParameters
tableName string
Name of DB table of the custom object that was created. E.g., ‘y_car’
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task This method has no return valuePerformTasksAfterCustomObjectTableDeletedAsync(string, RequestOptions)
A temporary method to be used from c++ until CustomObjectsAgent.DeleteTable implemented in NetServerParameters
tableName string
Name of DB table of the custom object that was deleted. E.g., ‘y_car’
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task This method has no return valuePerformTasksAfterUpgradeAsync(RequestOptions)
After upgrading to a new fileset, there may be tasks that need to be done. Examples - import new TypicalSearches, if present. Tasks performed here need to be idempotent and independent of the actual upgrade jump (what was the previous version). They should complete in a reasonable time, not more than a few minutes maximum.Parameters
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<string> Message that can be shown to the user, summarizing what has been done, if anything.RegisterClosedTicketsUsageAsync(int[], RequestOptions)
Logs and registers resolved ticket count to the metering serviceParameters
ticketIds int[]
IDs of closed tickets
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task This method has no return valueRemoveExpiredSystemMessagesAsync(RequestOptions)
Deletes expired system messages.Parameters
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
TaskRemoveSystemMessageAsync(int, string, RequestOptions)
Removes a system message for current associateParameters
onlineappId int
Id of the online app that owns this message
systemMessageId string
Message identifier, used for message removal
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
TaskRemoveSystemMessageForAssociateAsync(int, string, int, RequestOptions)
Removes a system message for specific associate.Parameters
onlineappId int
Id of the online app that owns this message
systemMessageId string
Message identifier, used for message update or removal
associateId int
The associateId of the message target.
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
TaskResyncUsersAsync(RequestOptions)
Resynchronize user information with SuperOffice Community, if opted-out then this call does nothing. The call returns immediately (starting a background thread), and updates CS scheduler table to set the next run time.Parameters
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task This method has no return valueSendSystemMessageAsync(string, int, string, DateTime, SystemMessageType, RequestOptions)
Adds a system message for a specific associate.Parameters
systemMessageId string
The message string id
associateId int
The associateId of the message target.
markdownMessage string
Markdown message to be displayed to the user
expire DateTime
When the message will no longer be available
type SystemMessageType
Type of message, example: info, warning, error
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
TaskTrackEventAsync(string, StringDictionary, RequestOptions)
Sends events to Amplitude and Userflow.Parameters
trackEventName string
“Sale Completed” or “Sale Sold” etc. See the TrackEventNames class for suitable string constants.
eventProperties StringDictionary
key-value pairs of event properties. client is set from the application token. Special keys: app_version, platform, os_name, os_version, device_brand, device_manufacturer
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<long> Amplitude Session id used to track the event. May be the same as passed in SO-AMPLITUDE header or ampSess cookie, or a fresh one if none defined.TrackUserAsync(StringDictionary, RequestOptions)
Sends user identification to Amplitude and Userflow. Sets current rights, user licenses automatically. Additional properties can be specified in userProperties.Parameters
userProperties StringDictionary
Optional: Additional key-value pairs of user properties to set on the user. Special keys: app_version, platform, os_name, os_version, device_brand, device_manufacturer
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<long> Amplitude Session id used to track the user. May be the same as passed in SO-AMPLITUDE header or ampSess cookie, or a fresh one if none defined.WebAppUsageExistsInPeriodAsync(int, string, DateTime, RequestOptions)
Returns true if viewState has been clicked at least once since FromDate, if asscoiateId < 0 or FromDate is DateTime.MinValue no restriction given for those parametersParameters
associateId int
The asscoiate id to look for webapp usage
viewState string
The viewState to search for
fromDate DateTime
The datetime to restrict webapp usage on
requestOptions RequestOptions
Override language/culture codes on this request.