Getting full information from a certain Desktop Policy

Format

MethodGET
URL

/vdi/desktoppolicies/$DESKTOP_POLICY_ID

Request contentsEmpty
Successful answerDesktopPolicyInfo Object
Non-successful answerErrorMessage Object
Unexpected errorHTTP 500

DesktopPolicyInfo Object

Schema

desktop_policy_idStringDesktop Policy's unique identifier
pool_idStringUnique identifier of the Pool where Guests for this Desktop Policy are going to be created
template_idStringUnique identifier of the Guest being used as Template
desktop_protocolStringCurrently only "vdi" is reported
sysprep_nameStringName of sysprep response file. Optional, can be empty
windows_domainStringWindows Domain to be injected in sysprep response file and Single-Sign On credentials
image_storage_idStringUnique identifier of the Image Storage which contains volume_id Volume
volume_idStringUnique identifier of the Volume to be used as storage for differential images
precreation_guest_numberIntegerNumber of precreated Guests
precreation_disable_atIntegerNumber of Guests that, when reached, disables Guest precreation
enable_usb_redirStringFlag which indicates if desktops will be created with USB redirection. Either "true" or "false"
enable_copy_paste_h2gStringFlag which indicates if desktops will be created with Copy&Paste from Host to Guest permission. Either "true" or "false"
enable_copy_paste_g2hStringFlag which indicates if desktops will be created with Copy&Paste from Guest to Host permission. Either "true" or "false"
enable_power_actionsStringFlag which indicates if desktops will be created with permission to be rebooted, shutdown or reset by the user. Either "true" or "false"
enable_printingStringFlag which indicates if desktops will be created with permission to use FollowMe printing. Either "true" or "false"
enable_audio_playbackStringFlag which indicates if desktops will be created with permission to play audio. Either "true" or "false"
enable_audio_recordStringFlag which indicates if desktops will be created with permission to record audio. Either "true" or "false"
enable_video_streamingStringFlag which indicates if desktops will be created with permission to stream video. Either "true" or "false"
enable_multiple_clientsStringFlag which indicates if desktops will be created with permission to be simultaneously accessed from multiple clients. Either "true" or "false"
inactivity_timeoutIntegerTime in seconds, for automatic user disconnection
first_operation_whatStringOperation to be executed after first_operation_when minutes from last user disconnection. Either "none", "stop", "shutdown", "pause", "suspend" or "destroy"
first_operation_whenIntegerTime (minutes) from last user disconnection, when operation first_operation_what will be executed
second_operation_whatStringOperation to be executed after second_operation_when minutes from last user disconnection. Either "none", "stop", "shutdown", "pause", "suspend" or "destroy"
second_operation_whenIntegerTime (minutes) from last user disconnection, when operation second_operation_what will be executed
third_operation_whatStringOperation to be executed after third_operation_when minutes from last user disconnection. Either "none", "stop", "shutdown", "pause", "suspend" or "destroy"
third_operation_whenIntegerTime (minutes) from last user disconnection, when operation third_operation_what will be executed
copy_uuidStringLegacy. Leave as "false"
sessionsSessionInfo ArrayList of Sessions registered on this Desktop Policy
parametersDesktopParameter ArraySince 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

usernameStringIdentifier 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_idStringUnique identifier of Guest assigned to this Session
guest_stateStringCurrent status for Guest indicated in guest_id. Either "unknown", "running", "stopped", "paused" or "suspended"
last_accessStringDate of last connection to this Session
last_exitStringDate 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

nameStringName of the parameter
patternStringPattern used to generate the set of values for this parameter.
valueStringNext available value that can be assigned to a Guest.
globally_uniqueBooleanState 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
}