Getting full information from a certain Desktop Policy

Getting full information from a certain Desktop Policy

Format

Method

GET

URL

/vdi/desktoppolicies/$DESKTOP_POLICY_ID

Request contents

Empty

Successful answer

DesktopPolicyInfo Object

Non-successful answer

ErrorMessage Object

Unexpected error

HTTP 500

DesktopPolicyInfo Object

Schema

desktop_policy_id

String

Desktop Policy's unique identifier

pool_id

String

Unique identifier of the Pool where Guests for this Desktop Policy are going to be created

template_id

String

Unique identifier of the Guest being used as Template

desktop_protocol

String

Currently only "vdi" is reported

sysprep_name

String

Name of sysprep response file. Optional, can be empty

windows_domain

String

Windows Domain to be injected in sysprep response file and Single-Sign On credentials

image_storage_id

String

Unique identifier of the Image Storage which contains volume_id Volume

volume_id

String

Unique identifier of the Volume to be used as storage for differential images

precreation_guest_number

Integer

Number of precreated Guests

precreation_disable_at

Integer

Number of Guests that, when reached, disables Guest precreation

enable_usb_redir

String

Flag which indicates if desktops will be created with USB redirection. Either "true" or "false"

enable_copy_paste_h2g

String

Flag which indicates if desktops will be created with Copy&Paste from Host to Guest permission. Either "true" or "false"

enable_copy_paste_g2h

String

Flag which indicates if desktops will be created with Copy&Paste from Guest to Host permission. Either "true" or "false"

enable_power_actions

String

Flag which indicates if desktops will be created with permission to be rebooted, shutdown or reset by the user. Either "true" or "false"

enable_printing

String

Flag which indicates if desktops will be created with permission to use FollowMe printing. Either "true" or "false"

enable_audio_playback

String

Flag which indicates if desktops will be created with permission to play audio. Either "true" or "false"

enable_audio_record

String

Flag which indicates if desktops will be created with permission to record audio. Either "true" or "false"

enable_video_streaming

String

Flag which indicates if desktops will be created with permission to stream video. Either "true" or "false"

enable_multiple_clients

String

Flag which indicates if desktops will be created with permission to be simultaneously accessed from multiple clients. Either "true" or "false"

inactivity_timeout

Integer

Time in seconds, for automatic user disconnection

first_operation_what

String

Operation to be executed after first_operation_when minutes from last user disconnection. Either "none", "stop", "shutdown", "pause", "suspend" or "destroy"

first_operation_when

Integer

Time (minutes) from last user disconnection, when operation first_operation_what will be executed

second_operation_what

String

Operation to be executed after second_operation_when minutes from last user disconnection. Either "none", "stop", "shutdown", "pause", "suspend" or "destroy"

second_operation_when

Integer

Time (minutes) from last user disconnection, when operation second_operation_what will be executed

third_operation_what

String

Operation to be executed after third_operation_when minutes from last user disconnection. Either "none", "stop", "shutdown", "pause", "suspend" or "destroy"

third_operation_when

Integer

Time (minutes) from last user disconnection, when operation third_operation_what will be executed

copy_uuid

String

Legacy. Leave as "false"

sessions

SessionInfo Array

List of Sessions registered on this Desktop Policy

parameters

DesktopParameter Array

Since 3.0.3: List of parameter definition that are applied to the Guests of this Desktop Policy

JSON example

{ "desktop_protocol": "vdi", "precreation_disable_at": 6, "first_operation_when": 10, "volume_id": "samsung_ssd", "third_operation_what": "none", "sessions": [{ "username": "precreated-47bdcb09", "guest_id": "windows7_020216-volatile-47bdcb09", "last_exit": "2016-02-05 06:13:39", "guest_state": "running", "last_access": "2016-02-05 06:13:39" }, { "username": "precreated-d8416432", "guest_id": "windows7_020216-volatile-d8416432", "last_exit": "2016-02-03 22:06:37", "guest_state": "running", "last_access": "2016-02-03 22:06:37" }, { "username": "precreated-687d354a", "guest_id": "windows7_020216-volatile-687d354a", "last_exit": "2016-02-03 14:23:37", "guest_state": "running", "last_access": "2016-02-03 14:23:37" }], "second_operation_what": "destroy", "image_storage_id": "internal", "sysprep_name": "legacy", "desktop_policy_id": "windows7_public", "copy_uuid": "false", "second_operation_when": 11, "windows_domain": "", "precreation_guest_number": 3, "third_operation_when": 0, "first_operation_what": "stop", "pool_id": "demo_public", "template_id": "windows7_020216", "enable_usb_redir":"false", "enable_copy_paste_h2g":"false", "enable_copy_paste_g2h":"false", "enable_power_actions":"false", "enable_printing":"false", "enable_audio_playback":"false", "enable_audio_record":"false", "enable_video_streaming":"false", "enable_multiple_clients":"false", "inactivity_timeout": 0, "parameters": [{ "name": "ip_address", "pattern": "192.168.0.\\n{50,100}", "value": "192.168.0.56" }] }

SessionInfo Object

Schema

username

String

Identifier of user connected to this Session. Can be an special construction, like precreated-$RANDID for precreated desktops, or guest-$TERMINAL_ID for Kiosk sessions

guest_id

String

Unique identifier of Guest assigned to this Session

guest_state

String

Current status for Guest indicated in guest_id. Either "unknown", "running", "stopped", "paused" or "suspended"

last_access

String

Date of last connection to this Session

last_exit

String

Date of last disconnection from this Session. Can be "connected", if user is still connected to the Session

JSON example

{ "username": "precreated-687d354a", "guest_id": "windows7_020216-volatile-687d354a", "last_exit": "2016-02-03 14:23:37", "guest_state": "running", "last_access": "2016-02-03 14:23:37" }

DesktopParameter Object

Schema

name

String

Name of the parameter

pattern

String

Pattern used to generate the set of values for this parameter.

value

String

Next available value that can be assigned to a Guest.

globally_unique

Boolean

State if values of this parameter should be unique across all desktop policies that have a parameter with the same name.

A DesktopParameter pattern determine the set of valid values of a parameter. The syntax is similar to regular expressions. It consists of a succession of one or more of the following elements:

  • a - Represents character 'a'.

  • \b - Represents character 'b'. Useful to escape some special characters, like '\' or '{'.

  • [a-f] - Represents a class of characters from 'a' to 'f'. You can use '\' to escape characters like '-' or '[' inside a class.

  • [a-fjs-v] - Class of characters 'a' to 'f', 'j' and 's' to 'v'.

Any of these elements can be repeated:

  • e{n} - Represents element e (single char or class) n times.

  • e{n, m} - Represents element e a minimum of n times and a maximum of m.

Besides, there are also numbers in decimal format: \n{first,last} (here, 'n' is the literal character n). It represents a number between first and last, both inclusive.

Some examples of patterns and their set of valid values:

  • [ab]{3} - aaa, aab, aba, abb, baa, bab, bba, bbb

  • a{1,2}\n{9,11} - a9, a10, a11, aa9, aa10, aa11

  • 192.168.0.\n{50,100} - all IP addresses between 192.168.0.50 and 192.168.0.100

JSON example

{ "name": "ip_address", "pattern": "192.168.0.\\n{50,100}", "value": "192.168.0.56", "globally_unique": false }