Product Documentation

Methods

Sep 04, 2015

The following topics describe the methods exposed by the API. Each method is described, together with the parameters provided, and what is returned by the API call. Example queries are also shown.

For more information about specifying time intervals, see About time and date ranges. For more information about the values returned by the Monitor Service OData API, see Determine enum values.

GetAverageLogOnBreakdown

Gets the average logon duration for the specified time period, user ID and desktopGroupUid.

Parameter Name Type Comments
startDate DateTime Start of the time window to get the average for. Must be UTC DateTime.
endDate DateTime End of the time window to get the average for. Must be UTC DateTime.
userSid String User Sid to limit the average to.
desktopGroupUid Guid DesktopGroup Uid to limit the average to.

Returns

An IQueryable of LogOnBreakdown objects that contain the following for each logon step:

Property Name Type Comments
LogonStepItems List<LogOnStepItem> List of LogOnStepItems. Each LogonStepItem has LogonStep (Values can be Brokering=1, VMStart=2, HDX=3, Authentication=4, Gpos=5, LogonScripts=6, ProfileLoad=7, Interactive=8, Total=0) and Duration (Nullable<double>) in milliseconds. If no data is available for the step, Duration is null.
BreakdownType int Type of breakdown. UsersLastSession=1, UsersSessionAverage=2, DesktopGroupAverage=3
Note: The HDX duration is a new metric that requires changes to the ICA protocol. This means that, if the new version of the client is not being used, the metrics returned are NULL.

Example

Gets the average logon duration for March 15th, for this user ID and desktopGroupUid.

 http://{dc-host}/Citrix/Monitor/OData/v1/Methods/GetAverageLogOnBreakdown?startDate=datetime'2012-03-15T00:00:00'&endDate=datetime'2012-03-30T00:00:00'&userSid='User%20Sid'&desktopGroupUid=guid'28D15C1F-7D4C-43BC-BAF2-5886D8514642'&$expand=LogOnStepItems

GetAverageLogOnDuration

Gets the average logon duration trend for the specified time period. Includes only logons that completed successfully (which have both a LogOnStartDate and a LogOnEndDate in the database).

Parameter Name Type Comments
start DateTime Start of the time window to be queried for the average logon duration trend. Must be UTC.
end DateTime End of the time window to be queried for the connection failure trend. Must be UTC.

Returns

Double representing the average logon duration for the specified time period.

Example

Gets the average logon duration over the hour specified for all Delivery Groups.

 
http://{dc-host}/Citrix/Monitor/OData/v1/Methods/GetAverageLogOnDuration?start=datetime'2012-06-05T12:24:00'&end=datetime'2012-06-05T13:24:00'

GetConcurrentSessionsTrend

Gets data points to represent a trend of concurrent sessions as a list of DateTime/value pairs for the specified time period. Each point represents the maximum number of concurrent sessions over the interval specified. The last point in the trend can represent the number of current users in the system.

Parameter Name Type Comments
startDate DateTime Start of the time window to be queried for concurrent sessions. Must be UTC. Inclusive.
endDate DateTime End of the time window to be queried for concurrent sessions. Must be UTC. Inclusive.
intervalLength int Interval between data points in minutes for the trend.

Returns

IQueryable list of TrendItem objects - IQueryable<TrendItem> ordered by Date ascending.

Each TrendItem contains a UTC Date (DateTime) property and a Value property (double) for plotting the trend.

Example

Gets a one hour trend (data point every minute) of the concurrent sessions:

http://{dc-host}/Citrix/Monitor/OData/v1/Methods/GetConcurrentSessionsTrend?startDate=datetime'2012-06-05T12:26:00'&endDate=datetime'2012-06-05T13:26:00'&intervalLength=1

GetConnectedUsersTrend

Gets the connected users trend for Server OS Machines for the specified time period. Each data point in the trend has the total number of users connected to Server OS Machines for the last interval (intervalLength).

Parameter Name Type Comments
startDate DateTime Start of the time window to be queried for the connected users trend. Must be UTC.
endDate DateTime End of the time window to be queried for the connected users trend. Must be UTC.
intervalLength int Interval between data points in minutes for the trend.
desktopGroupsFilter string Comma-separated list of Delivery Group Uids to limit the trend result to.
machineFilter string Comma-separated list of machine Sids to limit the trend result to.

Returns

An IQueryable of objects that contains the following:

Property Name Type Comments
ConnectedUsersTrend List<TrendItem> TrendItem contains a UTC Date (DateTime) and a Count (int) for the maximum number of connected users in the interval.

Examples

Gets a 24-hour trend (data point every 15 minutes) of the connected users trend for the two Delivery Groups specified.

 
http://{dc-host}/Citrix/Monitor/OData/v1/Methods/GetConnectedUsersTrend?startDate=datetime'2011-09-30T00:00:00'&endDate=datetime'2011-10-01T00:00:00'intervalLength=15&desktopGroupsFilter='04D53BBE-F5CC-11E0-B401-3F054824019B,0FBEFBBE-F5CC-11E0-9472-40054824019B'

Gets a week-long trend (data point every 4 hours) of the connected users trend.

 
http://{dc-host}/Citrix/Monitor/OData/v1/Methods/GetConnectedUsersTrend?startDate=datetime'2011-09-23T00:00:00'&endDate=datetime'2011-10-01T00:00:00'intervalLength=240

GetConnectionFailureTrend

Gets the connection failure trend for the specified time period. Each data point in the trend represents the total number of connection failures in the last interval (intervalLength parameter).

Parameter Name Type Comments
startDate DateTime Start of the time window to be queried for the connection failure trend. Must be UTC.
endDate DateTime End of the time window to be queried for the connection failure trend. Must be UTC.
intervalLength int Interval between data points in minutes for the trend.
desktopGroupsFilter string Comma-separated list of Delivery Group uids to limit the trend result to.
connectionFailureTypeFilter string Comma-separated list of connection failure type ints to limit the trend result to. This integer corresponds to ConnectionFailureType enum.
sessionSupportFilter string Comma- separated list of machine type ints (Single=1, Multiple=2, Unknown=0) to limit the trend result to. No value returns both types.

Returns

An IQueryable of TrendItem objects

Property Name Type Comments
FailureTrend List<TrendItem> TrendItem contains a UTC Date (DateTime) and a Count(int) of failures to indicate the trend of connection failures over the specified time period for the filters specified.

Examples

Gets a 24-hour trend (data point every 15 minutes) for all types of connection failures for the two Delivery Groups specified with Desktop OS Machine types.

 
http://{dc-host}/Citrix/Monitor/OData/v1/Methods/GetConnectionFailureTrend?startdate=datetime'2011-09-30T00:00:00'&enddate=datetime'2011-10-

Gets a week-long trend (data point every 4 hours) for 3 types of connection failures (aggregated) for all Delivery Groups the user has access to.

http://{dc-host}/Citrix/Monitor/OData/v1/Methods/GetConnectionFailureTrend?startdate=datetime'2011-09-23T00:00:00'&enddate=datetime'2011-10-01T00:00:00'intervalLength=240&connectionFailureTypeFilter='2,3,4'

GetConnectionFailureTrendsByType

Gets a list of connection failure counts by type, together with a trend for each type, for the specified time period. Each data point in the trend represents the total number of connection failures in the last interval (intervalLength parameter). Provides ability to specify a particular failure type to limit the query or get all failure types.

Parameter Name Type Comments
startDate DateTime Start of the time window to be queried for the connection failure trend. Must be UTC.
endDate DateTime End of the time window to be queried for the connection failure trend. Must be UTC.
intervalLength Int Interval between data points in minutes for the trend.
connectionFailureType Int [ConnectionFailureType] If provided (>0), returns only that connection failure type in the results. Otherwise (null or zero) returns a list of all failure types. This integer corresponds to ConnectionFailureType enum.

Returns

An IQueryable of ConnectionFailureTrend objects that contain the following for each ConnectionFailureType.

If all types are requested, then the sum is also returned with ConnectionFailureType = -1

If $expand=FailureTrend is included in the query, then the trend and TotalFailureCount properties are retrieved for each failure type.

If $expand=DesktopGroupBreakdown is included in the query, that property is also retrieved for each failure type.

Property Name Type Comments
ConnectionFailureType int [ConnectionFailureType] Type of connection failure (from enum ConnectionFailureType).
FailureTrend List<TrendItem> TrendItem contains a UTC Date (DateTime), and a Value (nullable double) to indicate the trend of connection failures over the time period specified for this type of failure.
TotalFailureCount int Total number of failures over the specified time period.
DesktopGroupBreakdown List<DesktopGroupBreakdown> DesktopGroupBreakdown contains a DesktopGroup object (must be included in the expand to be returned) and Count (int) to represent the total number of failures in the specified time window.

Examples

Retrieve both Delivery Group breakdown and the failure trend for all failure types for Nov-14 at 5am (UTC) to Nov 14 at 7am (UTC) with a data point every 30 minutes:

http://{dc-host}/Citrix/Monitor/OData/v1/Methods/GetConnectionFailureTrendsByType?startDate=datetime'2011-11-14T05:00:00'&endDate=datetime'2011-11-14T07:00:00'&intervalLength=30&connectionFailureType=0&$expand=FailureTrend,DesktopGroupBreakdown,DesktopGroupBreakdown\DesktopGroup

Retrieve Delivery Group breakdown only for the failure type 4 (No Capacity Available) for Nov-14 at 5am (UTC) to Nov 14 at 7am (UTC)

http://{dc-host}/Citrix/Monitor/OData/v1/Methods/GetConnectionFailureTrendsByType?startDate=datetime'2011-11-14T05:00:00'&endDate=datetime'2011-11-14T07:00:00'&connectionFailureType=4&$expand=DesktopGroupBreakdown,DesktopGroupBreakdown\DesktopGroup

Retrieve the failure trend for all failure types from Nov-14 at 12am (UTC) to Nov 14 at 11pm (UTC) with a data point every hour:

http://{dc-host}/Citrix/Monitor/OData/v1/Methods/GetConnectionFailureTrendsByType?startDate=datetime'2011-11-14T00:00:00'&endDate=datetime'2011-11-14T23:00:00'&intervalLength=60&connectionFailureType=0&$expand=FailureTrend

GetConnectionFailureTrendsByTypeLatest

Updated: 2013-11-11

Gets a list of connection failure counts by type, together with a trend for each type, for the specified number of intervals from now (UTC server time). Each data point in the trend represents the total number of connection failures in the last interval (intervalLength parameter). Provides ability to specify a particular failure type to limit the query or get all failure types.

Parameter Name Type Comments
intervalLength int Interval between data points in minutes for the trend.
numberOfIntervals int Number of requested data points. Used with intervalLength to calculate StartDate.
connectionFailureType int [ConnectionFailureType] If provided (>0), returns only that connection failure type in the results. Otherwise (null or zero) returns a list of all failure types. This integer corresponds to ConnectionFailureType enum.

Returns:

An IQueryable of ConnectionFailureTrend objects that contain the following for each ConnectionFailureType.

If all types are requested, then the sum is also returned with ConnectionFailureType = -1

If $expand=FailureTrend is included in the query, the trend and TotalFailureCount properties are retrieved for each failure type.

If $expand=DesktopGroupBreakdown is included in the query, that property is also retrieved for each failure type.

Property Name Type Comments
ConnectionFailureType int [ConnectionFailureType] Type of connection failure (from enum ConnectionFailureType).
FailureTrend List<TrendItem> TrendItem contains a UTC Date (DateTime), and a Value (nullable double) to indicate the trend of connection failures over the time period specified for this type of failure.
TotalFailureCount int Total number of failures over the specified time period.
DesktopGroupBreakdown List<DesktopGroupBreakdown> DesktopGroupBreakdown contains a DesktopGroup object (must be included in the expand to be returned) and Count (int) to represent the total number of failures in the specified time window.

Examples

Retrieve both Delivery Group breakdown and the failure trend for the last 60 minutes with a data point every 1 minute:

http://{dc-host}/Citrix/Monitor/OData/v1/Methods/GetConnectionFailureTrendsByTypeLatest?&intervalLength=1&numberOfIntervals=60&connectionFailureType=0&$expand=FailureTrend,DesktopGroupBreakdown,DesktopGroupBreakdown\DesktopGroup

Retrieve Delivery Group breakdown only for the failure type 4 (No Capacity Available) for the last 30 minutes

http://{dc-host}/Citrix/Monitor/OData/v1/Methods/GetConnectionFailureTrendsByTypeLatest?&intervalLength=1&numberOfIntervals=30&connectionFailureType=4&$expand=DesktopGroupBreakdown,DesktopGroupBreakdown\DesktopGroup

Retrieve the failure trend for all failure types for the last 24 hours with a data point every hour:

http://{dc-host}/Citrix/Monitor/OData/v1/Methods/GetConnectionFailureTrendsByTypeLatest?&intervalLength=60&numberOfIntervals=24&connectionFailureType=0&$expand=FailureTrend

GetLastSessionLogOnBreakdown

Gets the logon breakdown for User and Delivery Group. Returns the current User session, if one exists.

Parameter Name Type Required? Comments
userSid String Yes The ID of the user for whom information is being requested.
desktopGroupUid Guid Yes Delivery Group being queried.
machineUid String No The machine on which the last session was run. This may not be available.

Returns

An IQueryable of LogOnBreakdown objects that contain the following for each logon step:

Property Name Type Comments
LogonStepItems List<LogOnStepItem> List of LogOnStepItems. Each LogonStepItem has LogonStep (Values can be Brokering=1, VMStart=2, HDX=3, Authentication=4, Gpos=5, LogonScripts=6, ProfileLoad=7, Interactive=8, Total=0) and Duration (Nullable<double>) in milliseconds. If no data is available for the step, Duration is null.
BreakdownType int Type of breakdown - UsersLastSession=1, UsersSessionAverage=2, DesktopGroupAverage=3

Example

Get logon breakdown for User and Delivery Group. Returns the current User session if one exists.

http://{dc-host}/Citrix/Monitor/OData/v1/Methods/GetLastSessionLogOnBreakdown?userSid='User%20Sid'&desktopGroupUid=guid'28D15C1F-7D4C-43BC-BAF2-5886D8514642'&machineUid=guid'28D15C1F-7D4C-43BC-BAF2-5886D8514642'&$expand=LogOnStepItems

GetEffectiveLoadIndexTrend

Gets the Load Evaluation Index (LEI) trend for Server OS Machines for the specified time period (in minutes). Each data point represents the average load index over this interval. An IQueryable of LoadIndexTrendItems is returned, which represents the effective load index and the breakdown by individual types (CPU, Memory, Disk, Network, SessionCount).

Parameter Name Type Comments
startDate DateTime Start of the time window to be queried for the load index trend. Must be UTC.
endDate DateTime End of the time window to be queried for the load index trend. Must be UTC.
intervalLength int Interval between data points in minutes for the trend.
desktopGroupsFilter string Comma-separated list of Delivery Group Uids to limit the trend result to.
machineFilter string Comma-separated list of machine Sids to limit the trend result to. Expects MultiSession machines.

Returns

An IQueryable of objects that contains the following:

Property Name Type Comments
LoadIndexTrend List<LoadIndexTrendItem> LoadIndexTrendItem contains a UTC Date (DateTime) and an integer for total LEI, as well as integers for each of the LEI portions (CPU, Memory, Disk, Network, SessionCount) in a separate object (provided if $expand=Breakdown is included in the query).

Examples

Gets a 24-hour trend (data point every 15 minutes) of the load index trend and breakdown for the two Delivery Groups specified.

 
http://{dc-host}/Citrix/Monitor/OData/v1/Methods/GetEffectiveLoadIndexTrend?startDate=datetime'2011-09-30T00:00:00'&endDate=datetime'2011-10-01T00:00:00'intervalLength=15&desktopGroupsFilter='04D53BBE-F5CC-11E0-B401-3F054824019B,0FBEFBBE-F5CC-11E0-9472-40054824019B'&$expand=Breakdown

Gets a week-long trend (data point every 4 hours) of the load index trend.

 
http://{dc-host}/Citrix/Monitor/OData/v1/Methods/GetEffectiveLoadIndexTrend?startDate=datetime'2011-09-23T00:00:00'&endDate=datetime'2011-10-01T00:00:00'intervalLength=240&$expand=Breakdown

GetLoadIndexTrend

Updated: 2013-07-24

Gets the Load Evaluation Index (LEI) trend for Server OS Machines for the specified time period, limited by load index types. Each data point in the trend has the total LEI, as well as the breakdown for each load index type (CPU, Memory, Disk, Network, SessionCount).

Parameter Name Type Comments
startDate DateTime Start of the time window to be queried for the load index trend. Must be UTC.
endDate DateTime End of the time window to be queried for the load index trend. Must be UTC.
intervalLength int Interval between data points in minutes for the trend
desktopGroupsFilter string Comma-separated list of Delivery Group Uids to limit the trend result to.
machineFilter string Comma-separated list of machine Sids to limit the trend result to. Expects MultiSession machines.
indexTypeFilter string Comma-separated list of load index to include (effective, CPU, network, memory, disk, session count). Corresponds to the LoadIndexType enum. An empty or null string returns all.

Returns

An IQueryable of objects that contains the following for each index type specified:

Property Name Type Comments
LoadIndexType int [LoadIndexType] Corresponds to the LoadIndex type enum.
LoadIndexTrend List<TrendItem> TrendItem contains a UTC Date (DateTime) and an integer for the index.

Examples

Gets a 24-hour trend (data point every 15 minutes) of the load index trend and breakdown for the two Delivery Groups specified.

 
http://{dc-host}/Citrix/Monitor/OData/v1/Methods/GetLoadIndexTrend?startDate=datetime'2011-09-30T00:00:00'&endDate=datetime'2011-10-01T00:00:00'intervalLength=15&desktopGroupsFilter='04D53BBE-F5CC-11E0-B401-3F054824019B,0FBEFBBE-F5CC-11E0-9472-40054824019B'

Gets a week-long trend (data point every 4 hours) of the load index trend and breakdown.

 
http://{dc-host}/Citrix/Monitor/OData/v1/Methods/GetLoadIndexTrend?startDate=datetime'2011-09-23T00:00:00'&endDate=datetime'2011-10-01T00:00:00'intervalLength=240

GetLogOnCountTrend

Gets the logon duration trend (average) grouped by an interval (TimeOfDay, DayOfWeek, etc) over the specified time period. Includes only logons that completed successfully (which have both a LogOnStartDate and a LogOnEndDate in the database).

Parameter Name Type Comments
start DateTime Start of the time window to be queried for the average logon duration trend. Must be UTC.
end DateTime End of the time window to be queried for the logon duration trend. Must be UTC.
intervalLength int Interval between data points in minutes for the trend.

Returns

An IQueryable of TrendItem objects. TrendItem contains a UTC Date (DateTime) and a Value to indicate the trend of average logon counts over the start and end time period specified.

Example

Gets one hour of data, single data point per minute representing the total number of logons for that minute. If no logons occurred during that minute, the value in the TrendItem is zero.

http://{dc-host}/Citrix/Monitor/OData/v1/Methods/GetLogOnCountTrend?startDate=datetime'2012-06-05T12:24:00'&endDate=datetime'2012-06-05T13:24:00'&intervalLength=1

GetLogOnCountTrendFiltered

Gets the logon count trend for the specified time period. Each data point in the trend represents the total number of logons in the last interval (intervalLength). Includes only logons that completed successfully (which have both a LogOnStartDate and a LogOnEndDate in the database).

Parameter Name Type Comments
startDate DateTime Start of the time window to be queried for the logon count trend. Must be UTC.
endDate DateTime End of the time window to be queried for the logon count trend. Must be UTC.
intervalLength int Interval between data points in minutes for the trend.
desktopGroupsFilter string Comma-separated list of desktop group Uids to limit the trend result to.

Returns

A list of TrendItems:

Property Name Type Comments
LogonCountTrend List<TrendItem> LogonDurationTrendItem contains a UTC Date (DateTime) and a Count (int) to represent the number of logons for the date.

Example

Gets a 24-hour trend (data point every 15 minutes) of the logon count trend (in milliseconds) for the two Delivery Groups specified.

 
http://{dc-host}/Citrix/Monitor/OData/v1/Methods/GetLogOnCountTrendFiltered?start=datetime'2011-09-30T00:00:00'&end=datetime'2011-10-01T00:00:00'intervalLength=15&desktopGroupsFilter='04D53BBE-F5CC-11E0-B401-3F054824019B,0FBEFBBE-F5CC-11E0-9472-40054824019B'

Gets a week-long trend (data point every 4 hours) of the logon duration trend (in milliseconds).

 
http://{dc-host}/Citrix/Monitor/OData/v1/Methods/GetLogOnCountTrendFiltered?start=datetime'2011-09-23T00:00:00'&end=datetime'2011-10-01T00:00:00'intervalLength=240

GetLogOnDurationAverageTrend

Gets the logon duration average trend for the specified time window, with averages grouped by the specified interval. Each data point in the trend has average logon duration and breakdown for each interval in the groupByInterval.

Parameter Name Type Comments
start DateTime Start of the time window to be queried for the logon duration trend. Must be UTC.
end DateTime End of the time window to be queried for the logon duration trend. Must be UTC.
groupByInterval int How the averages are rolled up. Options: TimeOfDay=1, DayOfWeek=2, Month=3, Year=4. Required.
desktopGroupsFilter string Comma-separated list of Delivery Group Uids to limit the trend result to.

Returns

A list of GroupedLogOnDurationTrendItem

Property Name Type Comments
GroupByDate int Represents the group by date (4=4am, 2007=year 2007 depending on the groupByInterval that was input).

Number of points returned:

GroupByInterval=TimeOfDay (1): 24 points (0-23)

0=12AM, 1=AM, 2=2AM ... 23=11PM

GroupByInterval=DayOfWeek (2): 7 points (0-6)

0=Sunday, 1=Monday ... 6=Saturday

GroupByInterval=Month (3): 12 points (0-11)

0=January, 1=February ... 11=December

GroupByInterval=Year (4): However many years are included in the startDate/endDate range.

Order of Points: The data is always returned ordered by the GroupByDate, regardless of the start and end dates passed to the API.

Value Nullable<double>

Average total logon duration in milliseconds and the average duration of each step for this group.

Breakdown Collection<LogOnStepItem>

Collection of LogOnStepItem objects which each contain:

Duration (Nullable<double>) which has the average duration of this step in milliseconds and LogOnStep (int) which returns the integer enum value of the logon step (refers to the LogOnStep enum)

Example

Gets a 7-day average by time of day (hour) of the logon duration trend (in milliseconds) for the two Delivery Groups specified. This returns a trend item for each hour of the day that has the average logon duration for that time of day over the specified time frame (24 data points returned).

 
http://{dc-host}/Citrix/Monitor/OData/v1/Methods/GetDurationAverageTrend?start=datetime'2011-09-23T00:00:00'&end=datetime'2011-10-01T00:00:00'groupByInterval=1&desktopGroupsFilter='04D53BBE-F5CC-11E0-B401-3F054824019B,0FBEFBBE-F5CC-11E0-9472-40054824019B'

GetLogOnDurationDetailsTrend

Gets the logon duration trend for the specified time period. Each data point in the trend has the total logon duration, as well as the breakdown for each step.

Parameter Name Type Comments
startDate DateTime Start of the time window to be queried for the connection failure trend. Must be UTC.
endDate DateTime End of the time window to be queried for the connection failure trend. Must be UTC.
intervalLength int Interval between data points in minutes for the trend.
desktopGroupsFilter string Comma-separated list of Delivery Group Uids to limit the trend result to.

Returns

A list of LogonDurationTrendItems:

Property Name Type Comments
LogonDurationTrend List<LogonDurationTrendItem> LogOnDurationTrendItem contains a UTC Date (DateTime) and a double for average logon duration in milliseconds for that time. Also contains a breakdown for the average duration of each logon step for each data point.

Example

Gets a 24-hour trend (data point every 15 minutes) of the logon duration trend (in milliseconds) for the two Delivery Groups specified.

 
http://{dc-host}/Citrix/Monitor/OData/v1/Methods/GetLogOnDurationDetailsTrend?startDate=datetime'2011-09-30T00:00:00'&endDate=datetime'2011-10-01T00:00:00'intervalLength=15&desktopGroupsFilter='04D53BBE-F5CC-11E0-B401-3F054824019B,0FBEFBBE-F5CC-11E0-9472-40054824019B'

Gets a week-long trend (data point every 4 hours) of the logon duration trend (in milliseconds).

 http://{dc-host}/Citrix/Monitor/OData/v1/Methods/GetLogOnDurationDetailsTrend?startDate=datetime'2011-09-23T00:00:00'&endDate=datetime'2011-10-01T00:00:00'intervalLength=240

GetLogOnDurationTrend

Gets the logon duration trend (average) over the specified time period.

Parameter Name Type Comments
start DateTime Start of the time window to be queried for the average logon duration trend. Must be UTC.
end DateTime End of the time window to be queried for the average logon duration trend. Must be UTC.
intervalLength int Interval between data points in minutes for the trend.

Returns

An IQueryable of TrendItem objects. TrendItem contains a UTC Date (DateTime) and a Value (in milliseconds) to indicate average logon duration trend over the specified time period.

Examples

Gets one hour of data, single data point per minute representing the average logon duration for that minute. If no logons occurred during that minute, the value in the TrendItem is NaN (not a number).

http://{dc-host}/Citrix/Monitor/OData/v1/Methods/GetLogOnDurationTrend?start=datetime'2012-06-05T12:24:00'&end=datetime'2012-06-05T13:24:00'&intervalLength=1

Gets single data point representing the average logon duration for that hour.

http://{dc-host}/Citrix/Monitor/OData/v1/Methods/GetLogOnDurationTrend?start=datetime'2012-06-05T12:24:00'&end=datetime'2012-06-05T13:23:00'&intervalLength=60

GetMachineFailureTrend

Gets the concurrent machine failure trend for the specified time period. Each data point in the trend represents the maximum number of failed machines at any point in the last interval (intervalLength parameter). Provides ability to specify a particular machine failure type to limit the query or get all failure types.

Parameter Name Type Comments
startDate DateTime Start of the time window to be queried for the connection failure trend. Must be UTC.
endDate DateTime End of the time window to be queried for the connection failure trend. Must be UTC.
intervalLength int Interval between data points in minutes for the trend.
desktopGroupsFilter string Comma-separated list of Delivery Group Uids to limit the trend result to.
machineFailureTypeFilter string Comma-separated list of connection failure type integers to limit the trend result to. This integer corresponds to MachineFaultStateCode enum. If not provided, returns all types aggregated in the trend.
sessionSupportFilter int Comma-separated list of machine types integers (Single=1, Multiple=2, Unknown=0) to limit the trend result to. No value returns all types

Returns

A list of TrendItem objects (FailureTrend).

Property Name Type Comments
FailureTrend List<TrendItem> TrendItem contains a UTC Date (DateTime) and a Count (int) of failures to indicate the trend of machine failures over the specified time period for the filters specified.

Example

Gets a 24-hour trend (data point every 15 minutes) for all types of machine failures for the two Delivery Groups specified with Desktop OS Machine types.

 http://{dc-host}/Citrix/Monitor/OData/v1/Methods/GetMachineFailureTrend?startDate=datetime'2011-09-30T00:00:00'&endDate=datetime'2011-10-01T00:00:00'intervalLength=15&sessionSupportFilter='1'&desktopGroupsFilter='04D53BBE-F5CC-11E0-B401-3F054824019B,0FBEFBBE-F5CC-11E0-9472-40054824019B'

Gets a 24-hour trend (data point every 2 hours) for all Delivery Groups, all Session Types, and for machine failures of type "Failed to Start" and "Stuck on Boot".

 http://{dc-host}/Citrix/Monitor/OData/v1/Methods/GetMachineFailureTrend?startDate=datetime'2011-09-23T00:00:00'&endDate=datetime'2011-10-01T00:00:00'intervalLength=240&machineFailureTypeFilter='2,3'

GetMachineFailureTrendsByType

Gets a list of machine failure and success counts by type, together with a trend for each type, for the specified time period. Each data point in the trend represents the total number of machines in a failure state in the last interval (intervalLength parameter). You can specify a particular failure type to limit the query or get all failure types.

Parameter Name Type Comments
startDate DateTime Start of the time window to be queried for the machine failure trend. Must be UTC. Not required if not fetching trends.
endDate DateTime End of the time window to be queried for the machine failure trend. Must be UTC.
intervalLength int Interval between data points in minutes for the trend.
machineFailureType int (MachineFailureType) If provided (>0), returns only that machine failure type in the results. Otherwise (null or zero) returns a list of all failure types. This integer corresponds to MachineFailureType enum.
sessionSupport int (SessionSupport) Nullable int. If not provided, then returns all sessionSupport types. Single=1, Multiple=2, Unknown=0

Returns

An IQueryable of MachineFailureTrend objects that contain the following for each MachineFailureType.

If all types are requested, the sum is also returned with MachineFailureType = -1

If $expand=FailureTrend is included in the query, the trend and TotalFailureCount properties are retrieved for each failure type.

If $expand=DesktopGroupBreakdown is included in the query, that property is also retrieved for each failure type.

Property Name Type Comments
MachineFailureType int [MachineFailureType] Type of connection failure (see: Determine enum values).
TotalFailureCount int Total number of failures at the endDate specified.
FailureTrend List<TrendItem> TrendItem contains a UTC Date (DateTime), a Count (double) to indicate the trend of machine failures over the time period specified for this type of failure.
DesktopGroupBreakdown List<DesktopGroupBreakdown> DesktopGroupBreakdown contains a DesktopGroup object and Count (int) to represent the total number of machines in a failure state at the endDate specified.

Examples

Retrieve both Delivery Group breakdown and the failure trend for all machine failure types for Nov-14 at 5am (UTC) to Nov 14 at 7am (UTC), with a data point every 30 minutes for all Server OS Machines (i.e. sessionSupport =2):

http://{dc-host}/Citrix/Monitor/OData/v1/Methods/GetMachineFailureTrendsByType?startDate=datetime'2011-11-14T05:00:00'&endDate=datetime'2011-11-14T07:00:00'&intervalLength=30&machineFailureType=0&sessionSupport=2&$expand=FailureTrend,DesktopGroupBreakdown

Retrieve Delivery Group breakdown only for machine failure type 3 (Stuck on Boot) for Nov-14 at 5am (UTC) to Nov 14 at 7am (UTC) for Desktop OS Machines:

http://{dc-host}/Citrix/Monitor/OData/v1/Methods/GetMachineFailureTrendsByType?startDate=datetime'2011-11-14T05:00:00'&endDate=datetime'2011-11-14T07:00:00'&machineFailureType=3&sessionSupport=1&$expand=FailureTrend

Retrieve the failure trend for all failure types for all machine session types from Nov-14 at 12am (UTC) to Nov 14 at 11pm (UTC), with a data point every hour:

http://{dc-host}/Citrix/Monitor/OData/v1/Methods/GetMachineFailureTrendsByType?startDate=datetime'2011-11-14T00:00:00'&endDate=datetime'2011-11-14T23:00:00'&intervalLength=60&machineFailureType=0&$expand=FailureTrend

GetSessionCountTrend

Gets the data points to represent a trend of concurrent sessions (connected) as a list of DateTime/value pairs for the specified time window. Each point represents the maximum number of concurrent connected sessions over the interval specified. This value is calculated as the sum of the DesktopGroups and the MAX of the sum.

Parameter Name Type Comments
startDate DateTime Start of the time window to be queried for concurrent sessions. Must be UTC.
endDate DateTime End of the time window to be queried for concurrent sessions. Must be UTC.
intervalLength int Interval between data points in minutes for the trend.
sessionSupportFilter string List of comma-delimited machine type ints to limit the query to (Single=1, Multiple=2, Unknown=0). If not specified, default is all.
connectionStateFilter string List of comma-delimited connection state integers to limit the query to (1=Connected, 2=Disconnected). If not specified, both are returned.
desktopGroupFilter string List of comma-delimited Delivery Group Uids to limit the query to. If not specified, returns all Delivery Groups.

Returns

IQueryable list of TrendItem objects - IQueryable<TrendItem> - ordered by Date ascending.

Each TrendItem contains a UTC Date (DateTime) property and a Value property (int) for plotting the trend.

Example

Gets a 24-hour trend with data points every hour for concurrent connected sessions. Each data point represents the maximum number of concurrent sessions (connected only) in the last interval (60 minutes in this case).

 http://{dc-host}/Citrix/Monitor/OData/v1/Methods/GetSessionCountTrend?startDate=datetime'2011-09-30T00:00:00'&endDate=datetime'2011-10-01T00:00:00'&intervalLength=60&connectionStateFilter='1'

Gets a 24-hour trend with data points every hour for concurrent disconnected sessions. Each data point represents the maximum number of concurrent sessions (disconnected only) in the last interval (60 minutes in this case).

http://{dc-host}/Citrix/Monitor/OData/v1/Methods/GetSessionCountTrend?startDate=datetime'2011-09-30T00:00:00'&endDate=datetime'2011-10-01T00:00:00'&intervalLength=60&connectionStateFilter='2'

Gets past week's trend with data points every 6 hours for concurrent sessions (connected and disconnected) for both machine types (Desktop OS and Server OS Machines). Each data point represents the maximum number of concurrent sessions in the last interval (6 hours in this case).

http://{dc-host}/Citrix/Monitor/OData/v1/Methods/GetSessionCountTrend?startDate=datetime'2011-09-23T00:00:00'&endDate=datetime'2011-10-01T00:00:00'&intervalLength=360

GetSessionSummary

Gets the data points to represent a trend of concurrent sessions (connected) as a list of DateTime/value pairs for the specified time period. Each point represents the maximum number of concurrent connected sessions over the interval specified.

Parameter Name Type Comments
startDate DateTime Start of the time window to be queried for concurrent sessions. Must be UTC.
endDate DateTime End of the time window to be queried for concurrent sessions. Must be UTC.
sessionSupportFilter string List of comma-delimited machine type integers to limit the query to (Single=1, Multiple=2, Unknown=0). Default is all types, if no filter specified.
desktopGroupFilter string List of comma-delimited Delivery Group Uids to limit the query to. If no value is specified, all Delivery Groups are returned.
connectionStateFilter string List of comma-delimited connection state integers to limit the query to (1=Connected, 2=Disconnected). If not specified, default is both.

Returns

IQueryable list of SessionSummary objects - IQueryable<SessionSummary>.

Each SessionSummary contains the following:

  • DesktopGroup (name and Uid)
  • AverageSessionCount (double)
  • Average number of concurrent sessions for the specified time period. This is the average of the peak values for the time period using the granularity available for that time period
  • AverageUserCount (double)
  • Average number of users connected for the specified time period
  • PeakUserCount (int)
  • Peak number of users connected at any point in the specified time period
  • UniqueUserCount (int)
  • Total number of unique users over the specified time period
  • AverageHoursPerDay (double)
  • Average duration of a session (hours per user per day)
  • DesktopGroup (name and Uid)

Example

Gets a list of all Session summary objects over 24 hours for all sessions.

http://{dc-host}/Citrix/Monitor/OData/v1/Methods/GetSessionSummary?startDate=datetime'2011-09-30T00:00:00'&endDate=datetime'2011-10-01T00:00:00'

Gets a list of summary objects over 24 hours for Server OS Machine sessions

http://{dc-host}/Citrix/Monitor/OData/v1/Methods/GetSessionSummary?startDate=datetime'2011-09-30T00:00:00'&endDate=datetime'2011-10-01T00:00:00'&sessionSupportFilter='2'