Download a theme with API

Download a theme compressed file for your Verify tenant.

Before you begin

About this task

Download the theme files to customize the Verify pages on your tenant.

Procedure

  1. Download the files for a theme with the following command.
    curl -X GET -H "Authorization: Bearer <access_token>" -H "Accept: application/octet-stream" https://<tenant>/v1.0/branding/themes/<themeID> > themes.zip
    where:
    <access_token>
    The value of the access token you received in Managing themes.
    <tenant>
    The fully qualified domain name that is assigned to your Verify subscription.
    <themeID>
    The theme identification name. See List the themes.
    master
    The master theme is for reference. It cannot be modified. The master theme is used by Verify when no customizations are present.
    default
    The default theme is the theme for the overall Verify tenant. The default theme applies to all applications.
    <user created>
    A theme created by the user when following Register a new theme.
  2. Optional: Download only the customized files for a theme with the following command.
    curl -X GET -H "Authorization: Bearer <access_token>" -H "Accept: application/octet-stream" https://<tenant>/v1.0/branding/themes/<themeID>?customized_only=true > themes.zip
    where:
    customized_only
    Download only customized themes. The default value is false.
    true
    Only a customized theme for the current registered themeID is downloaded. If no theme has been customized, an empty file is downloaded.
    false
    The compressed file contains a combination of out-of-the-box templates and the customizations for the theme requested. The compressed file for the theme is downloaded in this order:
    1. Customized file for themeID.
    2. If that does not exist, the file for themeID=master is downloaded.

Results

A compressed theme file is returned to the current directory with the following format.

/templates/
           {templateDirectories}/
                  	{locales}/
                               {templateNames}

Examples

To download the most recent master theme files, issue the following command:

curl -X GET -H "Authorization: Bearer m1KhswVeQy84CF4sAki88phTkpmnYtaDzWi26ASX" -H "Accept: application/octet-stream" https://companyAppTest.verify.ibm.com/v1.0/branding/themes/master > master_theme.zip

To download the customizations that are currently applied globally for all applications on your tenant, issue the following command:

curl -X GET -H "Authorization: Bearer m1KhswVeQy84CF4sAki88phTkpmnYtaDzWi26ASX" -H "Accept: application/octet-stream" https://companyAppTest.verify.ibm.com/v1.0/branding/themes/default ?customized_only=true > my_default_theme.zip

To download the customizations for the theme ID of bb828385-e11c-4041-8474-eb95bdc2a35c, issue the following command:

curl -X GET -H "Authorization: Bearer m1KhswVeQy84CF4sAki88phTkpmnYtaDzWi26ASX" -H "Accept: application/octet-stream" https://companyAppTest.verify.ibm.com/v1.0/branding/themes/bb828385-e11c-4041-8474-eb95bdc2a35c ?customized_only=true > my customized_theme_files.zip

To download the theme ID of bb828385-e11c-4041-8474-eb95bdc2a35c, the global default customizations, and the master templates that are not currently customized, issue the following command:

curl -X GET -H "Authorization: Bearer m1KhswVeQy84CF4sAki88phTkpmnYtaDzWi26ASX" -H "Accept: application/octet-stream" https://companyAppTest.verify.ibm.com/v1.0/branding/themes/bb828385-e11c-4041-8474-eb95bdc2a35c > theme3.zip