• Workspace

workspace
  1. Help Center
  2. Workspace
  3. API Reference
  4. Desktop Users
  5. Querying Desktop User Login Records

Querying Desktop User Login Records

Function

This interface is used to query desktop user login records.

URI

  • URI format

    GET /v1.0/{project_id}/desktop-users/login-records

  • URI parameter description

    Name

    Mandatory

    Type

    Description

    project_id

    Yes

    string

    Specifies the user ID.

The following table lists the optional parameters for querying desktop user login records.

Name

Mandatory

Type

Description

start_time

No

string

Specifies the start time of the login record query. If this parameter is specified, the returned result set contains login records generated after the start time. The format is 2016-08-20T21:11Z.

NOTE:

The time is in the UTC format.

end_time

No

string

Specifies the end time of the login record query. If this parameter is specified, the returned result set contains login records generated before the end time. The format is 2016-08-20T21:11Z.

NOTE:

The time is in the UTC format.

user_name

No

string

Specifies the username for logging in to the desktop.

computer_name

No

string

Specifies the computer name, which can be viewed on the OS information page.

terminal_type

No

string

Specifies the terminal system type for logging in to the desktop, for example, Windows 7 and Windows 10.

offset

No

integer

Specifies the offset of the specified information list query and the default value is 0.

limit

No

integer

Specifies the limits on the number of users who will be returned during query by page. The default value is 20.

  • Request example
GET /v1.0/92c84e5bce3d48d7ab5714a44901eb08/desktop-users/login-records?start_time=2016-12-09T08:06Z&end_time=2016-12-09T08:33Z&user_name=wjj&computer_name=wjj&terminal_type=Windows 7&offset=1&limit=3

Response

  • Description

    Name

    Type

    Description

    records

    List data structure [1]

    Specifies the user login records.

[1] records field data structure description

Name

Type

Description

computer_name

string

Specifies the computer name, which can be viewed on the OS information page.

user_name

string

Specifies the login username.

terminal_mac

string

Specifies the terminal MAC address.

terminal_name

string

Specifies the terminal name.

terminal_ip

string

Specifies the terminal IP address.

client_version

string

Specifies the client software version used when you log in to the desktop.

terminal_type

string

Specifies the terminal system type for logging in to the desktop, for example, Windows 7 and Windows 10.

agent_version

string

Specifies the AccessAgent version.

desktop_ip

string

Specifies the IP address of the desktop.

connection_start_time

string

Specifies the start time of the connection. The connection is established between the server and the client software when the client software obtains the desktop IP address using Ticket. The format is 2016-08-20T21:11:09.000Z.

NOTE:

The time is in the UTC format.

connection_setup_time

string

Specifies the time when the connection between the client software and the desktop is formally established. The format is 2016-08-20T21:11:09.000Z.

NOTE:

The time is in the UTC format.

connection_end_time

string

Specifies the time when the connection between the client software and the desktop is disconnected. The format is 2016-08-20T21:11:09.000Z.

NOTE:

The time is in the UTC format.

is_reconnect

boolean

Specifies whether the reconnection occurs during the login process. Possible values are:

  • true: indicates that a reconnection occurs.
  • false: indicates that the reconnection does not occur.

connection_failure_reason

string

Specifies the cause for a connection failure. This parameter has a value when the connection fails. The format is 400200:The desktop is being prepared.

  • Response example
    {
      "records": [
        {
          "computer_name": "a0504@abc.com",
          "user_name": "a05@abc.com",
          "terminal_mac": "28-6e-d4-f8-cb-1b",
          "terminal_name": "TEST01D02",
          "terminal_ip": "10.75.229.214",
          "client_version": "1.6.00004",
          "terminal_type": "Windows 10 ",
          "agent_version": "1.6.00005.0",
          "desktop_ip": "172.16.0.20",
          "connection_start_time": "2016-12-09T07:28:07.000Z",
          "connection_setup_time": "2016-12-09T07:28:17.000Z",
          "connection_end_time": "2016-12-09T08:29:37.000Z",
          "is_reconnect": false,
          "connection_failure_reason": null
        },
        {
          "computer_name": "a0505@abc.com",
          "user_name": "a05@abc.com",
          "terminal_mac": "28-6e-d4-f8-cb-1b",
          "terminal_name": "TEST01D02",
          "terminal_ip": "10.75.229.214",
          "client_version": "1.6.00004",
          "terminal_type": "Windows 10 ",
          "agent_version": "1.6.00005.0",
          "desktop_ip": null,
          "connection_start_time": "2016-12-09T06:56:21.000Z",
          "connection_setup_time": null,
          "connection_end_time": null,
          "is_reconnect": false,
          "connection_failure_reason": "400200:The desktop is being prepared."
        }
      ]
    }

Returned Values

  • Normal

    200

  • Abnormal

    Returned Value

    Description

    400 Bad Request

    The request syntax is incorrect and cannot be understood by the server.

    401 Unauthorized

    Authentication fails.

    403 Forbidden

    You are not authorized to perform the operation.

    404 Not Found

    The requested resource is not found.

    405 Method Not Allowed

    The method specified in the request is not allowed.

    500 Internal Server Error

    Internal service error. For details about error codes, see Error Code Description.

    503 Service Unavailable

    The service is unavailable.