# RD Sessions

## List

> Retrieve one or multiple RD Sessions, from different sources such as RDS, VDI, and AVD.

```json
{"openapi":"3.0.1","info":{"title":"Parallels RAS - REST API v1.0","version":"1.0"},"paths":{"/api/RDSession":{"get":{"tags":["5-Session//RD Sessions"],"summary":"List","description":"Retrieve one or multiple RD Sessions, from different sources such as RDS, VDI, and AVD.","operationId":"07bef62f-626d-4d25-aec2-3e8386dba898","parameters":[{"name":"SiteId","in":"query","description":"Site ID from which to retrieve the RD session information (optional).","schema":{"type":"integer","format":"int32"}},{"name":"Source","in":"query","description":"Source from which to retrieve the RD Session information.","schema":{"$ref":"#/components/schemas/RDSessionSource"}},{"name":"ServerId","in":"query","description":"The Host ID of the server for which to retrieve the information (optional).","schema":{"type":"integer","format":"int32"}},{"name":"Server","in":"query","description":"The name of the server to filter the RD Session information (optional).","schema":{"type":"string"}},{"name":"State","in":"query","description":"State to filter the RD Session information (optional).","schema":{"$ref":"#/components/schemas/SessionState"}},{"name":"User","in":"query","description":"User to filter the RD Session information (optional).","schema":{"type":"string"}},{"name":"IP","in":"query","description":"IP Address to filter the RD Session information (optional).","schema":{"type":"string"}},{"name":"ThemeId","in":"query","description":"The Theme ID for which to retrieve the information (optional).","schema":{"type":"integer","format":"int32"}},{"name":"GroupId","in":"query","description":"The RD Session Host Group ID for which to retrieve the RD session information (optional).","schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"Success","content":{"application/json; api-version=1.0":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/RDSession"}}}}},"401":{"description":"Unauthorized","content":{"application/json; api-version=1.0":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"Not Found","content":{"application/json; api-version=1.0":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}}}},"components":{"schemas":{"RDSessionSource":{"enum":[["1 = RDS","2 = VDI","63 = AVD","-1 = All"]],"type":"string","description":"<para type=\"synopsis\">RDP Session Type</para>\r\n<para type=\"description\"></para>","format":"int32"},"SessionState":{"enum":[["0 = Active","1 = Connected","2 = ConnectQuery","3 = Shadow","4 = Disconnected","5 = Idle","6 = Listen","7 = Reset","8 = Down","9 = Init","-1 = All"]],"type":"string","description":"<para type=\"synopsis\">Session State</para>\r\n<para type=\"description\"></para>","format":"int32"},"RDSession":{"type":"object","properties":{"sessionID":{"type":"integer","description":"<para type=\"description\">RAS session ID.</para>","format":"int32"},"ip":{"type":"string","description":"<para type=\"description\">Session server IP.</para>","nullable":true},"serverID":{"type":"integer","description":"<para type=\"description\">Session server ID.</para>","format":"int32"},"type":{"$ref":"#/components/schemas/SessionPublishingType"},"user":{"type":"string","description":"<para type=\"description\">User to which the session belongs to.</para>","nullable":true},"themeID":{"type":"integer","description":"<para type=\"description\">Theme ID.</para>","format":"int32"},"connectionMode":{"$ref":"#/components/schemas/ConnMode"},"authenticationType":{"$ref":"#/components/schemas/MainAuthenticationMode"},"idleStartTime":{"type":"string","description":"<para type=\"description\">Session Idle Time.</para>","format":"date-time","nullable":true},"mfaProvider":{"$ref":"#/components/schemas/ProviderType"},"rfiCount":{"type":"integer","description":"<para type=\"description\">Flow Information Count.</para>","format":"int32"},"rfiInfoList":{"type":"array","items":{"$ref":"#/components/schemas/RouteFlowInfoEntry"},"description":"<para type=\"description\">Flow Information.</para>","nullable":true},"logonDuration":{"type":"integer","description":"<para type=\"description\">Logon Duration.</para>","format":"int32"},"connectionDuration":{"type":"integer","description":"<para type=\"description\">Connection Duration (in seconds).</para>","format":"int32"},"authenticationDuration":{"type":"integer","description":"<para type=\"description\">Authentication Duration (in seconds).</para>","format":"int32"},"rasPolicyLookup":{"type":"integer","description":"<para type=\"description\">RAS Policy Lookup (in ms).</para>","format":"int32"},"hostPreparation":{"type":"integer","description":"<para type=\"description\">Host Preparation (in ms).</para>","format":"int32"},"groupPolicyLoadTime":{"type":"integer","description":"<para type=\"description\">Group Policy Load Time (in ms).</para>","format":"int32"},"userProfileLoadTime":{"type":"integer","description":"<para type=\"description\">User Profile Load Time (in ms).</para>","format":"int32"},"desktopLoadTime":{"type":"integer","description":"<para type=\"description\">Desktop Load Time (in ms).</para>","format":"int32"},"logonOthersDuration":{"type":"integer","description":"<para type=\"description\">Logon Others Duration (in seconds).</para>","format":"int32"},"userProfileType":{"$ref":"#/components/schemas/UserProfileType"},"uxEvaluator":{"type":"integer","description":"<para type=\"description\">Round Trip Time.</para>","format":"int32"},"connectionQuality":{"$ref":"#/components/schemas/QualityLevel"},"latency":{"type":"integer","description":"<para type=\"description\">Latency.</para>","format":"int32"},"protocol":{"$ref":"#/components/schemas/SessionProtocol"},"bandwidthAvailability":{"type":"integer","description":"<para type=\"description\">Bandwidth Availability (in Kbps).</para>","format":"int32"},"lastReconnects":{"type":"integer","description":"<para type=\"description\">Last Reconnects.</para>","format":"int32"},"reconnects":{"type":"integer","description":"<para type=\"description\">Total Reconnects.</para>","format":"int32"},"disconnectReason":{"type":"string","description":"<para type=\"description\">Disconnect Reason.</para>","nullable":true},"state":{"$ref":"#/components/schemas/SessionState"},"logonTime":{"type":"string","description":"<para type=\"description\">Session Logon Time.</para>","format":"date-time"},"sessionLength":{"type":"integer","description":"<para type=\"description\">Session Length (in seconds).</para>","format":"int32"},"idleTime":{"type":"integer","description":"<para type=\"description\">Idle Time (in seconds).</para>","format":"int32"},"incomingData":{"type":"integer","description":"<para type=\"description\">Incoming Data (in bytes).</para>","format":"int32"},"outgoingData":{"type":"integer","description":"<para type=\"description\">Outgoing Data (in bytes).</para>","format":"int32"},"verticalResolution":{"type":"integer","description":"<para type=\"description\">Session Vertical Resolution.</para>","format":"int32"},"horizontalResolution":{"type":"integer","description":"<para type=\"description\">Session Horizontal Resolution.</para>","format":"int32"},"colourDepth":{"$ref":"#/components/schemas/SessionColorDepth"},"bandwidthUsage":{"type":"integer","description":"<para type=\"description\">Bandwidth Usage.</para>","format":"int32"},"deviceName":{"type":"string","description":"<para type=\"description\">Client Device Name.</para>","nullable":true},"clientIPAddress":{"type":"string","description":"<para type=\"description\">Client IP Address.</para>","nullable":true},"clientOS":{"type":"string","description":"<para type=\"description\">Client OS.</para>","nullable":true},"clientOSVersion":{"type":"string","description":"<para type=\"description\">Client OS Version.</para>","nullable":true},"clientVersion":{"type":"string","description":"<para type=\"description\">Client Version.</para>","nullable":true},"clientPolicyId":{"type":"integer","description":"<para type=\"description\">Client Policy Id.</para>","format":"int32"},"clientPolicyVersion":{"type":"integer","description":"<para type=\"description\">Client Policy Version.</para>","format":"int32"},"source":{"$ref":"#/components/schemas/RDSessionSource"},"vmid":{"type":"string","description":"<para type=\"description\">VM ID to which a VDI Remote Desktop Session is connected to (deprecated).</para>","nullable":true,"deprecated":true},"vmName":{"type":"string","description":"<para type=\"description\">VM Name to which a VDI Remote Desktop Session is connected to (deprecated).</para>","nullable":true,"deprecated":true},"sessionHostId":{"type":"string","description":"<para type=\"description\">Session Host ID to which a Session is connected to.</para>","nullable":true},"sessionHostName":{"type":"string","description":"<para type=\"description\">Session Host Name to which a Session is connected to.</para>","nullable":true},"poolName":{"type":"string","description":"<para type=\"description\">Group/Pool Name.</para>","nullable":true},"templateName":{"type":"string","description":"<para type=\"description\">Template Name.</para>","nullable":true},"fsLogixReasonCode":{"$ref":"#/components/schemas/FSLogixReasonCode"},"fsLogixStatusCode":{"$ref":"#/components/schemas/FSLogixStatusCode"}},"additionalProperties":false,"description":"<para type=\"synopsis\">User session type</para>\r\n<para type=\"description\"></para>"},"SessionPublishingType":{"enum":[["0 = Desktop","1 = PublishedApps","2 = Application","7 = Admin","8 = Unknown","9 = RemoteApps","10 = DirectRDP"]],"type":"string","description":"<para type=\"synopsis\">Session Publishing Type</para>\r\n<para type=\"description\"></para>","format":"int32"},"ConnMode":{"enum":[["0 = GatewayMode","1 = DirectMode","2 = GatewaySSLMode","3 = DirectSSLMode","4 = DirectRDPMode","200 = Unknown"]],"type":"string","description":"<para type=\"synopsis\">Connection Mode.</para>\r\n<para type=\"description\"></para>\r\n<para type=\"description\"></para>","format":"int32"},"MainAuthenticationMode":{"enum":[["0 = None","1 = Credentials","2 = SCard","3 = SAML","4 = WebCredentials"]],"type":"string","description":"<para type=\"synopsis\">Main Authentication Mode.</para>\r\n<para type=\"description\"></para>\r\n<para type=\"description\"></para>","format":"int32"},"ProviderType":{"enum":[["0 = None","1 = Deepnet","2 = SafeNet","3 = Radius","4 = AzureRadius","5 = DuoRadius","6 = FortiRadius","7 = TekRadius","8 = GAuthTOTP","9 = TOTP","10 = MicrosoftTOTP","11 = EmailOTP"]],"type":"string","description":"<para type=\"synopsis\">Provider Type</para>\r\n<para type=\"description\"></para>","format":"int32"},"RouteFlowInfoEntry":{"type":"object","properties":{"type":{"$ref":"#/components/schemas/RouteFlowHopType"},"ip":{"type":"string","description":"<para type=\"description\">IP.</para>","nullable":true}},"additionalProperties":false,"description":"<para type=\"synopsis\">Route Flow Information</para>\r\n<para type=\"description\"></para>"},"RouteFlowHopType":{"enum":[["0 = Unknown","1 = HALBInst","2 = Gateway","3 = ForwardingGateway","4 = HALBDevice","5 = HTML5","6 = Other","7 = AVDGateway"]],"type":"string","description":"<para type=\"synopsis\">Route Flow Hop Type.</para>\r\n<para type=\"description\"></para>","format":"int32"},"UserProfileType":{"enum":[["0 = Unknown","1 = Others","2 = UPD","3 = FSLogix"]],"type":"string","description":"<para type=\"synopsis\">User Profile Type.</para>\r\n<para type=\"description\"></para>\r\n<para type=\"description\"></para>","format":"int32"},"QualityLevel":{"enum":[["0 = None","1 = Poor","2 = Fair","3 = Good","4 = Excellent"]],"type":"string","description":"<para type=\"synopsis\">Connection Quality Level.</para>\r\n<para type=\"description\"></para>\r\n<para type=\"description\"></para>","format":"int32"},"SessionProtocol":{"enum":[["0 = Console","2 = RDP","10 = RDP_UDP"]],"type":"string","description":"<para type=\"synopsis\">Session Protocol</para>\r\n<para type=\"description\"></para>","format":"int32"},"SessionColorDepth":{"enum":[["1 = COLOURDEPTH_4BIT","2 = COLOURDEPTH_8BIT","4 = COLOURDEPTH_16BIT","8 = COLOURDEPTH_3BYTE","16 = COLOURDEPTH_15BIT","24 = COLOURDEPTH_24BIT","32 = COLOURDEPTH_32BIT"]],"type":"string","description":"<para type=\"synopsis\">Session Color Depth</para>\r\n<para type=\"description\"></para>","format":"int32"},"FSLogixReasonCode":{"enum":[["0 = ProfileAttached","1 = NotInWhiteList","2 = InBlackList","3 = LocalProfileExists","4 = ProfileShortSid","5 = Unknown"]],"type":"string","description":"<para type=\"synopsis\">FSLogix Reason Code values.</para>\r\n<para type=\"description\"></para>","format":"int32"},"FSLogixStatusCode":{"enum":[["0 = Success","1 = Error","2 = VirtualDiskDLL","3 = GetUser","5 = Security","6 = VHDPath","7 = CreateDir","8 = Impersonation","9 = CreateVHD","10 = CloseHandle","11 = OpenVHD","12 = AttachVHD","13 = GetPhysicalPath","14 = OpenDevice","15 = InitializeDisk","16 = GetVolumeGUID","17 = FormatVolume","18 = GetProfileDirectory","19 = SetMountPoint","20 = RegistryImport","21 = CheckGroupMembership","22 = HandleProfile","23 = ProfileSubfolderRedirection","100 = WaitingCreationOfUserProfile","200 = InProgress","300 = AlreadyAttached"]],"type":"string","description":"<para type=\"synopsis\">FSLogix Status Code values.</para>\r\n<para type=\"description\"></para>","format":"int32"},"ProblemDetails":{"type":"object","properties":{"type":{"type":"string","nullable":true},"title":{"type":"string","nullable":true},"status":{"type":"integer","format":"int32","nullable":true},"detail":{"type":"string","nullable":true},"instance":{"type":"string","nullable":true}},"additionalProperties":{}}}}}
```
