GetDashboardEmbedUrl -

GetDashboardEmbedUrl

Generates a session URL and authorization code that you can use to embed an Amazon QuickSight read-only dashboard in your web server code. Before you use this command, make sure that you have configured the dashboards and permissions.

Currently, you can use GetDashboardEmbedURL only from the server, not from the user's browser. The following rules apply to the combination of URL and authorization code:

  • They must be used together.

  • They can be used one time only.

  • They are valid for 5 minutes after you run this command.

  • The resulting user session is valid for 10 hours.

For more information, see Embedding Amazon QuickSight in the Amazon QuickSight User Guide .

Request Syntax

GET /accounts/AwsAccountId/dashboards/DashboardId/embed-url?creds-type=IdentityType&reset-disabled=ResetDisabled&session-lifetime=SessionLifetimeInMinutes&undo-redo-disabled=UndoRedoDisabled&user-arn=UserArn HTTP/1.1

URI Request Parameters

The request uses the following URI parameters.

AwsAccountId

The ID for the AWS account that contains the dashboard that you're embedding.

Length Constraints: Fixed length of 12.

Pattern: ^[0-9]{12}$

Required: Yes

DashboardId

The ID for the dashboard, also added to the IAM policy.

Length Constraints: Minimum length of 1. Maximum length of 2048.

Pattern: [\w\-]+

Required: Yes

IdentityType

The authentication method that the user uses to sign in.

Valid Values: IAM | QUICKSIGHT

Required: Yes

ResetDisabled

Remove the reset button on the embedded dashboard. The default is FALSE, which enables the reset button.

SessionLifetimeInMinutes

How many minutes the session is valid. The session lifetime must be 15-600 minutes.

Valid Range: Minimum value of 15. Maximum value of 600.

UndoRedoDisabled

Remove the undo/redo button on the embedded dashboard. The default is FALSE, which enables the undo/redo button.

UserArn

The Amazon QuickSight user's Amazon Resource Name (ARN), for use with QUICKSIGHT identity type. You can use this for any Amazon QuickSight users in your account (readers, authors, or admins) authenticated as one of the following:

  • Active Directory (AD) users or group members

  • Invited nonfederated users

  • IAM users and IAM role-based sessions authenticated through Federated Single Sign-On using SAML, OpenID Connect, or IAM federation.

Omit this parameter for users in the third group – IAM users and IAM role-based sessions.

Request Body

The request does not have a request body.

Response Syntax

HTTP/1.1 Status Content-type: application/json { "EmbedUrl": "string", "RequestId": "string" }

Response Elements

If the action is successful, the service sends back the following HTTP response.

Status

The HTTP status of the request.

The following data is returned in JSON format by the service.

EmbedUrl

A single-use URL that you can put into your server-side webpage to embed your dashboard. This URL is valid for 5 minutes. The API provides the URL with an auth_code value that enables one (and only one) sign-on to a user session that is valid for 10 hours.

Type: String

RequestId

The AWS request ID for this operation.

Type: String

Errors

For information about the errors that are common to all actions, see Common Errors.

AccessDeniedException

You don't have access to this item. The provided credentials couldn't be validated. You might not be authorized to carry out the request. Make sure that your account is authorized to use the Amazon QuickSight service, that your policies have the correct permissions, and that you are using the correct access keys.

HTTP Status Code: 401

DomainNotWhitelistedException

The domain specified isn't on the allow list. All domains for embedded dashboards must be added to the approved list by an Amazon QuickSight admin.

HTTP Status Code: 403

IdentityTypeNotSupportedException

The identity type specified isn't supported. Supported identity types include IAM and QUICKSIGHT.

HTTP Status Code: 403

InternalFailureException

An internal failure occurred.

HTTP Status Code: 500

InvalidParameterValueException

One or more parameters has a value that isn't valid.

HTTP Status Code: 400

QuickSightUserNotFoundException

The user with the provided name isn't found. This error can happen in any operation that requires finding a user based on a provided user name, such as DeleteUser, DescribeUser, and so on.

HTTP Status Code: 404

ResourceExistsException

The resource specified already exists.

HTTP Status Code: 409

ResourceNotFoundException

One or more resources can't be found.

HTTP Status Code: 404

SessionLifetimeInMinutesInvalidException

The number of minutes specified for the lifetime of a session isn't valid. The session lifetime must be 15-600 minutes.

HTTP Status Code: 400

ThrottlingException

Access is throttled.

HTTP Status Code: 429

UnsupportedUserEditionException

This error indicates that you are calling an operation on an Amazon QuickSight subscription where the edition doesn't include support for that operation. Amazon QuickSight currently has Standard Edition and Enterprise Edition. Not every operation and capability is available in every edition.

HTTP Status Code: 403

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following: