REST APIs for managing embeds
- get_access_token - Get an embed access token for the current workspace.
- get_valid - Get all valid embed access tokens for the current workspace.
- delete - Revoke an embed access EmbedToken.
Returns an embed access token for the current workspace. This can be used to authenticate access to externally embedded content. Filters can be applied allowing views to be filtered to things like particular customerIds.
require 'speakeasy_client_sdk_ruby'
s = ::OpenApiSDK::SpeakeasyClientSDK.new
s.config_security(
::OpenApiSDK::Shared::Security.new(
api_key: "<YOUR_API_KEY_HERE>",
)
)
res = s.embeds.get_access_token(description="ew archaeology weekly lest lumpy", duration=330261, filters=::OpenApiSDK::Shared::Filters.new(
filters: [
::OpenApiSDK::Shared::Filter.new(
key: "<key>",
operator: "<value>",
value: "<value>",
),
],
limit: 347573,
offset: 52901,
operator: "<value>",
))
if ! res.embed_access_token_response.nil?
# handle response
end
Parameter | Type | Required | Description |
---|---|---|---|
description |
T.nilable(::String) | ➖ | The description of the embed access token. |
duration |
T.nilable(::Integer) | ➖ | The duration (in minutes) of the embed access token. |
filters |
T.nilable(::OpenApiSDK::Shared::Filters) | ➖ | The filter to apply to the query. |
T.nilable(::OpenApiSDK::Operations::GetEmbedAccessTokenResponse)
Get all valid embed access tokens for the current workspace.
require 'speakeasy_client_sdk_ruby'
s = ::OpenApiSDK::SpeakeasyClientSDK.new
s.config_security(
::OpenApiSDK::Shared::Security.new(
api_key: "<YOUR_API_KEY_HERE>",
)
)
res = s.embeds.get_valid()
if ! res.embed_tokens.nil?
# handle response
end
T.nilable(::OpenApiSDK::Operations::GetValidEmbedAccessTokensResponse)
Revoke an embed access EmbedToken.
require 'speakeasy_client_sdk_ruby'
s = ::OpenApiSDK::SpeakeasyClientSDK.new
s.config_security(
::OpenApiSDK::Shared::Security.new(
api_key: "<YOUR_API_KEY_HERE>",
)
)
res = s.embeds.delete(token_id="<id>")
if res.status_code == 200
# handle response
end
Parameter | Type | Required | Description |
---|---|---|---|
token_id |
::String | ✔️ | The ID of the EmbedToken to revoke. |
T.nilable(::OpenApiSDK::Operations::RevokeEmbedAccessTokenResponse)