• Workspace

workspace
  1. Help Center
  2. Workspace
  3. API Reference
  4. Policies
  5. Querying Policies

Querying Policies

Function

This interface is used to query the policies supported by Workspace.

URI

  • URI format

    GET /v1.0/{project_id}/policies

  • URI parameter description

    Parameter

    Mandatory

    Type

    Description

    project_id

    Yes

    string

    Specifies the user ID.

Request

  • Request example
    GET /v1.0/29dfe82ada564ac2b927e1ff036d9a9b/policies

Response

  • Elements

    Name

    Type

    Description

    policies

    Dictionary data structure [1]

    Specifies the policy information.

[1] policies field data structure description

Name

Type

Description

usb_port_redirection

Dictionary data structure [2]

Specifies USB port redirection.

printer_redirection

Dictionary data structure [4]

Specifies printer redirection.

file_redirection

Dictionary data structure [6]

Specifies file redirection.

clipboard_redirection

string

Specifies clipboard redirection. Possible values are:

  • DISABLED: indicates that clipboard redirection is disabled.
  • SERVER_TO_CLIENT_ENABLED: indicates that clipboard redirection from the server to the client is enabled.
  • CLIENT_TO_SERVER_ENABLED: indicates that clipboard redirection from the client to the server is enabled.
  • TWO_WAY_ENABLED: indicates that two-way clipboard redirection is enabled.

hdp_plus

Dictionary data structure [8]

Specifies the desktop protocol display level.

[2] usb_port_redirection field data structure description

Name

Type

Description

enable

boolean

Specifies whether to enable USB port redirection. Possible values are:

  • false: indicates that USB port redirection is disabled.
  • true: indicates that USB port redirection is enabled.

options

Dictionary data structure [3]

Controls USB port redirection.

[3] options  field data structure description

Name

Type

Description

usb_image_enable

boolean

Specifies whether to enable image devices (such as scanners). Possible values are:

  • false: indicates that image devices are disabled.
  • true: indicates that image devices are enabled.

usb_video_enable

boolean

Specifies whether to enable video devices (such as cameras). Possible values are:

  • false: indicates that video devices are disabled.
  • true: indicates that video devices are enabled.

usb_printer_enable

boolean

Specifies whether to enable print devices (such as printers). Possible values are:

  • false: indicates that print devices are disabled.
  • true: indicates that print devices are enabled.

usb_storage_enable

boolean

Specifies whether to enable storage devices (such as USB flash drives). Possible values are:

  • false: indicates that storage devices are disabled.
  • true: indicates that storage devices are enabled.

usb_smart_card_enable

boolean

Specifies whether to enable smartcard devices (such as USB keys). Possible values are:

  • false: indicates that smartcard devices are disabled.
  • true: indicates that smartcard devices are enabled.
[4] printer_redirection field data structure description

Name

Type

Description

enable

boolean

Specifies whether to enable printer redirection. Possible values are:

  • false: indicates that printer redirection is disabled.
  • true: indicates that printer redirection is enabled.

options

Dictionary data structure [5]

Controls printer redirection.

[5] options field data structure description

Name

Type

Description

sync_client_default_printer_enable

boolean

Specifies whether to enable the synchronization of the default client printer. Possible values are:

  • false: indicates that the synchronization of the default client printer is disabled.
  • true: indicates that the synchronization of the default client printer is enabled.

universal_printer_driver

string

Specifies the universal printer driver. Possible values are:

  • Default
  • HDP XPSDrv Driver
  • Universal Printing PCL 5
  • Universal Printing PCL 6
  • Universal Printing PS
[6] file_redirection field data structure description

Name

Type

Description

redirection_mode

string

Specifies file redirection. The values are as follows:

  • DISABLED: indicates that file redirection is disabled.
  • READ_ONLY: indicates that files are read-only.
  • READ_AND_WRITE: indicates that files are readable and writable.

options

Dictionary data structure [7]

Controls file redirection.

[7] options field data structure description

Name

Type

Description

fixed_drive_enable

boolean

Specifies whether to enable fixed drives (such as local disks). Possible values are:

  • false: indicates that fixed drives are disabled.
  • true: indicates that fixed drives are enabled.

removable_drive_enable

boolean

Specifies whether to enable removable drives (such as USB flash drives). Possible values are:

  • false: indicates that removable drives are disabled.
  • true: indicates that removable drives are enabled.

cd_rom_drive_enable

boolean

Specifies whether to enable the CD/DVD-ROM drive. Possible values are:

  • false: indicates that the CD/DVD-ROM drive is disabled.
  • true: indicates that the CD/DVD-ROM drive is enabled.

network_drive_enable

boolean

Specifies whether to enable the network drive. Possible values are:

  • false: indicates that the network drive is disabled.
  • true: indicates that the network drive is enabled.
[8] hdp_plus field data structure description

Name

Type

Description

hdp_plus_enable

boolean

Specifies whether to enable HDP Plus. Possible values are:

  • false: indicates that HDP Plus is disabled.
  • true: indicates that HDP Plus is enabled.

display_level

string

Specifies the display level. Possible values are:

  • SMOOTHNESS_FIRST: indicates smoothness first.
  • QUALITY_FIRST: indicates quality first.

options

Dictionary data structure [9]

Controls the HDP Plus and display level.

[9] options field data structure description

Name

Type

Description

bandwidth

integer

Specifies the bandwidth (Kbit/s). The value ranges from 1000 to 25,000.

frame_rate

integer

Specifies the frame rate (fps). The value ranges from 15 to 30.

video_frame_rate

integer

Specifies the video frame rate (fps). The value ranges from 15 to 50.

smoothing_factor

integer

Specifies the smoothing factor. The value ranges from 0 to 60.

lossy_compression_quality

integer

Specifies the lossy compression quality. The value ranges from 70 to 90.

  • Response example
    {
      "policies": {
        "usb_port_redirection": {
          "enable": true,
          "options": {
            "usb_image_enable": false,
            "usb_video_enable": true,
            "usb_printer_enable": false,
            "usb_storage_enable": true,
            "usb_smart_card_enable": false
          }
        },
        "printer_redirection": {
          "enable": true,
          "options": {
            "sync_client_default_printer_enable": false,
            "universal_printer_driver": "Universal Printing PCL 6"
          }
        },
        "file_redirection": {
          "redirection_mode": "READ_AND_WRITE",
          "options": {
            "fixed_drive_enable": true,
            "removable_drive_enable": false,
            "cd_rom_drive_enable": true,
            "network_drive_enable": true
          }
        },
        "clipboard_redirection": "TWO_WAY_ENABLED",
        "hdp_plus": {
          "hdp_plus_enable": false,
          "display_level": "QUALITY_FIRST",
          "options": {
            "bandwidth": 24315,
            "frame_rate": 18,
            "video_frame_rate": 20,
            "smoothing_factor": 58,
            "lossy_compression_quality": 88
          }
        }
      }
    } 

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.