Product Documentation

Determine enum values

Jun 13, 2013

This topic explains how to determine the enum types and values returned by the Monitor Service OData API.

Several of the Monitor Service OData methods return enums, such as GetSessionCountTrend and GetMachineFailureTrend. To determine the value of these enums, use the following "metadata" OData APIs:
  • GetAllMonitoringEnums returns an IQueryable<MonitoringEnumeration>, where MonitoringEnumeration is a class that encapsulates an enum type name and a set of values.
    public IQueryable<MonitoringEnumeration> GetAllMonitoringEnums()
  • GetMonitoringEnum returns the set of values for the specific type provided.
    public IQueryable<MonitoringEnumeration> GetMonitoringEnum(string typeName)

The following enums are used as parameters in the Monitor Service OData APIs:

sessionSupportFilter

  • maps to enum named SessionSupportCode
  • used in:
    • GetSessionCountTrend
    • GetSessionSummary
    • GetConnectedUsersTrend
    • GetConnectionFailureTrend
    • GetMachineFailureTrend
    • GetMachineFailureTrendsByType
  • Values:
    • 0 = Unknown (placeholder - do not use)
    • 1 = Single Session (Desktop OS Machines)
    • 2 = Multi Session (Server OS Machines)

connectionStateFilter

  • maps to enum named ConnectionState
  • used in:
    • GetSessionCountTrend
    • GetSessionSummary
  • Values:
    • 0 = Unknown (placeholder - do not use)
    • 1 = Connected
    • 2 = Disconnected
    • 3 = Terminated
    • 4 = Preparing
    • 5 = Active
    • 6 = Reconnecting
    • 7 = Non-brokered session
    • 8 = Other
    • 9 = Pending

connectionFailureFilter

  • maps to enum named ConnectionFailureType
  • used in:
    • GetConnectionFailureTrendsByType
    • GetConnectionFailureTrendsByTypeLatest
    • GetConnectionFailureTrend
  • Values:
    • 0 = None
    • 1 = Client Connection Failure
    • 2 = Machine Failure
    • 3 = No Capacity Available
    • 4 = No License Available
    • 5 = Configuration

machineFailureTypeFilter

  • maps to enum named MachineFaultStateCode
  • used in:
    • GetMachineFailureTrend
    • GetMachineFailureTrendsByType
    • GetMachineFailureTrendsByTypeLatest
  • Values:
    • 0 = Unknown (placeholder - do not use)
    • 1 = None
    • 2 = Failed To Start
    • 3 = Stuck On Boot
    • 4 = Unregistered
    • 5 = Maximum Capacity