• Workspace

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

Modifying Policies

Function

This interface is used to modify policy information.

URI

  • URI format

    PUT /v1.0/{project_id}/policies

  • URI parameter description

    Parameter

    Mandatory

    Type

    Description

    project_id

    Yes

    string

    Specifies the user ID.

Request

  • Request body parameter description

    Parameter

    Mandatory

    Type

    Description

    policies

    Yes

    Dictionary data structure [1]

    Specifies the policy information.

[1] policies field data structure

Parameter

Mandatory

Type

Description

usb_port_redirection

No

Dictionary data structure [2]

Specifies USB port redirection.

printer_redirection

No

Dictionary data structure [4]

Specifies printer redirection.

file_redirection

No

Dictionary data structure [6]

Specifies file redirection.

clipboard_redirection

No

string

Specifies the 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

No

Dictionary data structure [8]

Specifies the desktop protocol display level.

[2] usb_port_redirection field data structure

Parameter

Mandatory

Type

Description

enable

No

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

No

Dictionary data structure [3]

Controls USB port redirection. When this is enabled, the fields in options can be changed.

[3] options field data structure

Parameter

Mandatory

Type

Description

usb_image_enable

No

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

No

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

No

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

No

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

No

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

Parameter

Mandatory

Type

Description

enable

No

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

No

Dictionary data structure [5]

Controls printer redirection. When this is enabled, the values of all the fields in options can be changed.

[5] options field data structure

Parameter

Mandatory

Type

Description

sync_client_default_printer_enable

No

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

No

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

Parameter

Mandatory

Type

Description

redirection_mode

No

string

Specifies file redirection. Possible values are:

  • 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

No

Dictionary data structure [7]

Controls file redirection. When this is in read-only or read and write mode, the values of all the fields in options can be changed.

[7] options field data structure

Parameter

Mandatory

Type

Description

fixed_drive_enable

No

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

No

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

No

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

No

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

Parameter

Mandatory

Type

Description

hdp_plus_enable

No

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

No

string

Specifies the display level. Possible values are:

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

options

No

Dictionary data structure [9]

Controls the HDP Plus and display level. When hdp_plus_enable is enabled, the value of lossy_compression_quality can be changed. Alternatively, all of the field values in options can be changed.

[9] options field data structure

Parameter

Mandatory

Type

Description

bandwidth

No

integer

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

frame_rate

No

integer

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

video_frame_rate

No

integer

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

smoothing_factor

No

integer

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

lossy_compression_quality

No

integer

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

  • Request example
    PUT /v1.0/29dfe82ada564ac2b927e1ff036d9a9b/policies
    Request Body: 
    {
      "policies": {
        "usb_port_redirection": {
          "enable": false,
          "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
          }
        }
      }
    }

Response

No response body

Returned Values

  • Normal

    204

  • 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.