Skip to main content

themes

Creates, updates, deletes, gets or lists a themes resource.

Overview

Namethemes
TypeResource
Idokta.brands.themes

Fields

The following fields are returned by SELECT queries:

Successfully returned the list of themes

NameDatatypeDescription
idstring
_linksobjectSpecifies link relations (see Web Linking) available using the JSON Hypertext Application Language specification. This object is used for dynamic discovery of related resources and lifecycle operations.
backgroundImagestring
emailTemplateTouchPointVariantstringVariant for email templates. You can publish a theme for email templates with different combinations of assets. Variants are preset combinations of those assets. (default: OKTA_DEFAULT)
endUserDashboardTouchPointVariantstringVariant for the Okta End-User Dashboard. You can publish a theme for end-user dashboard with different combinations of assets. Variants are preset combinations of those assets. (default: OKTA_DEFAULT)
errorPageTouchPointVariantstringVariant for the error page. You can publish a theme for error page with different combinations of assets. Variants are preset combinations of those assets. (default: OKTA_DEFAULT)
faviconstring
loadingPageTouchPointVariantstringVariant for the Okta loading page. You can publish a theme for Okta loading page with different combinations of assets. Variants are preset combinations of those assets. (default: OKTA_DEFAULT)
logostring
primaryColorContrastHexstringPrimary color contrast hex code
primaryColorHexstringPrimary color hex code
secondaryColorContrastHexstringSecondary color contrast hex code
secondaryColorHexstringSecondary color hex code
signInPageTouchPointVariantstringVariant for the Okta sign-in page. You can publish a theme for sign-in page with different combinations of assets. Variants are preset combinations of those assets. > Note: For a non-OKTA_DEFAULT variant, primaryColorHex is used for button background color and primaryColorContrastHex is used to optimize the opacity for button text.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
list_brand_themesselectsubdomainLists all the themes in your brand.

> Important: Currently each org supports only one theme, therefore this contains a single object only.
get_brand_themeselectsubdomainRetrieves a theme for a brand
replace_brand_themereplacesubdomain, data__primaryColorHex, data__secondaryColorHex, data__signInPageTouchPointVariant, data__endUserDashboardTouchPointVariant, data__errorPageTouchPointVariant, data__emailTemplateTouchPointVariantReplaces a theme for a brand
upload_brand_theme_background_imageexecsubdomain, fileUploads and replaces the background image for the theme. The file must be in PNG, JPG, or GIF format and less than 2 MB in size.
delete_brand_theme_background_imageexecsubdomainDeletes a theme background image
upload_brand_theme_faviconexecsubdomain, fileUploads and replaces the favicon for the theme
delete_brand_theme_faviconexecsubdomainDeletes a theme favicon. The theme will use the default Okta favicon.
upload_brand_theme_logoexecsubdomain, fileUploads and replaces the logo for the theme. The file must be in PNG, JPG, or GIF format and less than 100kB in size. For best results use landscape orientation, a transparent background, and a minimum size of 300px by 50px to prevent upscaling.
delete_brand_theme_logoexecsubdomainDeletes a Theme logo. The theme will use the default Okta logo.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
subdomainstringThe domain of your organization. This can be a provided subdomain of an official okta domain (okta.com, oktapreview.com, etc) or one of your configured custom domains. (default: my-org)

SELECT examples

Lists all the themes in your brand.

> Important: Currently each org supports only one theme, therefore this contains a single object only.

SELECT
id,
_links,
backgroundImage,
emailTemplateTouchPointVariant,
endUserDashboardTouchPointVariant,
errorPageTouchPointVariant,
favicon,
loadingPageTouchPointVariant,
logo,
primaryColorContrastHex,
primaryColorHex,
secondaryColorContrastHex,
secondaryColorHex,
signInPageTouchPointVariant
FROM okta.brands.themes
WHERE subdomain = '{{ subdomain }}' -- required
;

REPLACE examples

Replaces a theme for a brand

REPLACE okta.brands.themes
SET
data__emailTemplateTouchPointVariant = '{{ emailTemplateTouchPointVariant }}',
data__endUserDashboardTouchPointVariant = '{{ endUserDashboardTouchPointVariant }}',
data__errorPageTouchPointVariant = '{{ errorPageTouchPointVariant }}',
data__loadingPageTouchPointVariant = '{{ loadingPageTouchPointVariant }}',
data__primaryColorContrastHex = '{{ primaryColorContrastHex }}',
data__primaryColorHex = '{{ primaryColorHex }}',
data__secondaryColorContrastHex = '{{ secondaryColorContrastHex }}',
data__secondaryColorHex = '{{ secondaryColorHex }}',
data__signInPageTouchPointVariant = '{{ signInPageTouchPointVariant }}'
WHERE
subdomain = '{{ subdomain }}' --required
AND data__primaryColorHex = '{{ primaryColorHex }}' --required
AND data__secondaryColorHex = '{{ secondaryColorHex }}' --required
AND data__signInPageTouchPointVariant = '{{ signInPageTouchPointVariant }}' --required
AND data__endUserDashboardTouchPointVariant = '{{ endUserDashboardTouchPointVariant }}' --required
AND data__errorPageTouchPointVariant = '{{ errorPageTouchPointVariant }}' --required
AND data__emailTemplateTouchPointVariant = '{{ emailTemplateTouchPointVariant }}' --required
RETURNING
id,
_links,
backgroundImage,
emailTemplateTouchPointVariant,
endUserDashboardTouchPointVariant,
errorPageTouchPointVariant,
favicon,
loadingPageTouchPointVariant,
logo,
primaryColorContrastHex,
primaryColorHex,
secondaryColorContrastHex,
secondaryColorHex,
signInPageTouchPointVariant
;

Lifecycle Methods

Uploads and replaces the background image for the theme. The file must be in PNG, JPG, or GIF format and less than 2 MB in size.

EXEC okta.brands.themes.upload_brand_theme_background_image 
@subdomain='{{ subdomain }}' --required
@@json=
'{
"file": "{{ file }}"
}'
;