GetSessionScreenshots - NICE DCV Session Manager

GetSessionScreenshots

Gets screenshots of one or more NICE DCV sessions.

The image file type and resolution of the screenshot depends on the Session Manager Broker configuration. To modify the image file type, configure the session-screenshot-format parameter. To modify the resolution, configure the session-screenshot-max-width and session-screenshot-max-height parameters. For more information, see Broker configuration file in the NICE DCV Session Manager Administrator Guide.

Request parameters

SessionId

The ID of the NICE DCV session from which to get the screenshot.

Type: String

Required: Yes

Response parameters

RequestId

The unique ID of the request.

SuccessfulList

Information about the successful screenshots. This data structure includes the following nested response parameters:

SessionScreenshot

Information about the screenshots. This data structure includes the following nested response parameters:

SessionId

The ID of the NICE DCV session from which the screenshot was taken.

Images

Information about the images. This data structure includes the following nested response parameters:

Format

The format of the image. Possible values include: jpeg and png.

Data

The screenshot image base64 encoded format.

CreationTime

The date and time the screenshot was taken.

Primary

Indicates whether the screenshot is of the NICE DCV session's primary display.

UnsuccessfulList

Information about the unsuccessful screenshots. This data structure includes the following nested response parameters:

GetSesionScreenshotRequestData

The original request that failed.

SessionId

The ID of the NICE DCV session from which the screenshot was to be taken.

FailureReason

The reason for the failure.

Example

Python

Request

The following example gets screenshots from two sessions (sessionId1 and sessionId2). Session sessionId2 doesn't exist and results in a failure.

from swagger_client.models.describe_servers_request_data import DescribeServersRequestData def get_sessions_api(): api_instance = swagger_client.ServersApi(swagger_client.ApiClient(get_client_configuration())) set_request_headers(api_instance.api_client) return api_instance def get_session_screenshots(session_ids): request = [GetSessionScreenshotRequestData(session_id=session_id) for session_id in session_ids] print('Get Session Screenshots Request:', request) api_instance = get_sessions_api() api_response = api_instance.get_session_screenshots(body=request) print('Get Session Screenshots Response:', api_response) def main(): get_session_screenshots(["sessionId1", "sessionId2"])

Response

The following is the sample output.

{ "RequestId": "542735ef-f6ab-47d8-90e5-23df31d8d166", "SuccessfulList": [ { "SessionScreenshot": { "SessionId": "sessionId1", "Images": [ { "Format": "png", "Data": "iVBORw0KGgoAAAANSUhEUgAAAEXAMPLE", "CreationTime": "2021-03-30T15:47:06.822Z", "Primary": true } ] } } ], "UnsuccessfulList": [ { "GetSessionScreenshotRequestData": { "SessionId": "sessionId2" }, "FailureReason": "Dcv session not found." } ] }