Skip to content

Deploy Themes and Extensions with Platform Operations

Deploy themes and extensions

Themes and extensions provide powerful methods to easily customize the look and feel of analytics applications. In this example, you will:

  • Retrieve a list of extensions on a source tenant
  • Retrieve a list of themes on source tenant
  • Filter these assets by a tag
  • Deploy these assets to a target tenant

This model assumes you have your themes and extensions preloaded to a source tenant prior to deployment, however it’s possible to use other Automations connectors, such as the GitHub connector, to load these assets from a repository rather than a source tenant.

For more information on how to achieve this via Qlik APIs and toolkits, review the pro-code Add themes and extensions tutorial.

Requirements

  • A Qlik Cloud tenant with access to Qlik Application Automation.
  • Valid OAuth client with access to the tenants on which you wish to run the automation.
  • Access to a source tenant with existing extensions and themes, with at least one extension and theme tagged with deploy.
  • Access to a target tenant.

Variables you need to complete this tutorial

  • sourceTenant: The hostname for your source Qlik Cloud tenant (for example sourcetenant.eu.qlikcloud.com).
  • targetTenant: The hostname for your target Qlik Cloud tenant (for example targettenant.eu.qlikcloud.com).

Configuration

Prior to beginning, your sourceTenant should have one or more themes and extensions available and tagged with deploy. These will be exported and imported to the targetTenant by the automation.

Browser window showing source tenant extensions Browser window showing source tenant themes

Drag two Get Tenant Name And Region blocks onto your Start block. The first should be configured with the Hostname set to sourceTenant, and the second should be configured with the Hostname set to targetTenant.

Browser window showing the get tenant blocks

Add a List Extensions block, set the Tenant to the sourceTenant Get Tenant Name And Region block to return extensions in the sourceTenant.

Browser window showing the List Extensions block

Add a Filter List block, set the List to the List Extensions block, and the condition to when tags contains deploy. This will filter the extension list to only return extensions with that tag. This is desirable in deployment scenarios, as you may have extensions in varying stages of development, and you may wish to deploy only those that are production ready.

Browser window showing the Filter List block

Add an Get Extension Archive block, set the Tenant to the Get Tenant Name And Region block for the sourceTenant, and the ID to the extension ID from the Filter List. This exports the extension as a base64-encoded string.

Browser window showing the Get Extension Archive block

Add a Create Extension block, set the Tenant to the Get Tenant Name And Region block for the targetTenant, and the File to the output from the Get Extension Archive block. This will create the extension on the target tenant.

Browser window showing the Create Extension block

Add a Output block, set the Data to output to the Create Extension block to return information on the new extension once it is created.

Browser window showing the output block

Now repeat this for themes. The extension and theme blocks work the same way and return the same data structures, so copy the same attributes into each of these blocks.

Browser window showing the theme block section

Select Run to trigger the automation. The output will return the theme and extension metadata for the new assets created on the targetTenant.

Browser window showing the output of the automation on the run screen

The Platform Operations connector includes blocks for many other features and capabilities in Qlik Cloud allowing you to load/ store these assets outside of Qlik Cloud.

Full automation snippet

Full automation snippet

To import this snippet to your own automation, either:

  • Save as a JSON file, right click the canvas in an automation, and select Upload workspace.
  • Copy the snippet to the clipboard, right click the canvas in an automation, and select Paste blocks.

{"blocks":[{"id":"E7F8A9EF-FB4B-4A01-8AB6-85A54B639F18","type":"StartBlock","disabled":false,"name":"Start","displayName":"Start","comment":"","childId":"0F9C6CD8-0AF6-49CD-8EF7-AEA9AA459296","inputs":[{"id":"run_mode","value":"manual","type":"select","structure":{}}],"settings":[],"collapsed":[{"name":"loop","isCollapsed":false}],"x":0,"y":0},{"id":"0F9C6CD8-0AF6-49CD-8EF7-AEA9AA459296","type":"SnippetBlock","disabled":false,"name":"GetTenantNameAndRegion","displayName":"Qlik Platform Operations - Get Tenant Name And Region","comment":"","childId":"01A56278-A584-4A92-B82E-0D1E8D393AA5","inputs":[{"id":"575d1740-b1e2-11ed-958a-598edfec33b8","value":"orchestration.eu.qlikcloud.com","type":"string","structure":{}}],"settings":[{"id":"datasource","value":null,"type":"select","structure":{}},{"id":"blendr_on_error","value":"stop","type":"select","structure":{}},{"id":"automations_censor_data","value":false,"type":"checkbox","structure":{}}],"collapsed":[{"name":"loop","isCollapsed":false}],"x":233,"y":153,"datasourcetype_guid":"c7e48240-e0f2-11ec-ada1-d5ef75014b77","snippet_guid":"bd5c1ce0-ad14-11ed-83f6-1d42e53790dd"},{"id":"A54243CF-734A-48E7-B887-01456E8F6F45","type":"EndpointBlock","disabled":false,"name":"ListExtensions","displayName":"Qlik Platform Operations - List Extensions","comment":"","childId":"051EE323-4095-4CD6-BA96-A56DF1B8043C","inputs":[{"id":"b6f0df80-be83-11ed-ae20-a51aaeacbd5a","value":"{$.GetTenantNameAndRegion}","type":"string","structure":{}}],"settings":[{"id":"datasource","value":null,"type":"select","structure":{}},{"id":"maxitemcount","value":null,"type":"string","structure":{}},{"id":"blendr_on_error","value":"stop","type":"select","structure":{}},{"id":"cache","value":"0","type":"select","structure":{}},{"id":"automations_censor_data","value":false,"type":"checkbox","structure":{}}],"collapsed":[{"name":"loop","isCollapsed":false}],"x":2,"y":725,"datasourcetype_guid":"c7e48240-e0f2-11ec-ada1-d5ef75014b77","endpoint_guid":"b6bb3100-be83-11ed-a7f9-abba3ab71faa","endpoint_role":"list"},{"id":"051EE323-4095-4CD6-BA96-A56DF1B8043C","type":"FilterListBlock","disabled":false,"name":"filterList","displayName":"Filter over Qlik Platform Operations - List Extensions - Filter List","comment":"","childId":"26BAB158-9F7A-4BB9-9A0D-B8D05E5986D4","inputs":[{"id":"list","value":"{ $.ListExtensions }","type":"string","structure":{}},{"id":"conditions","value":{"mode":"all","conditions":[{"input1":"tags","operator":"contain","input2":"deploy"}]},"type":"custom","structure":{}}],"settings":[{"id":"automations_censor_data","value":false,"type":"checkbox","structure":{}}],"collapsed":[{"name":"loop","isCollapsed":false}],"x":0,"y":520,"loopBlockId":"60450964-3E2A-4D8E-BBAB-0BC2C8FF7451"},{"id":"60450964-3E2A-4D8E-BBAB-0BC2C8FF7451","type":"EndpointBlock","disabled":false,"name":"GetExtensionArchive","displayName":"Qlik Platform Operations - Get Extension Archive","comment":"","childId":"45B37C9E-8A89-4997-BAD0-595018FCB97E","inputs":[{"id":"483d38f0-be86-11ed-9882-4f6b9943312b","value":"{$.GetTenantNameAndRegion}","type":"string","structure":{}},{"id":"484ce070-be86-11ed-b69b-7f1361598aa8","value":"{$.filterList.item.id}","type":"string","structure":{}}],"settings":[{"id":"datasource","value":null,"type":"select","structure":{}},{"id":"blendr_on_error","value":"stop","type":"select","structure":{}},{"id":"cache","value":"0","type":"select","structure":{}},{"id":"automations_censor_data","value":false,"type":"checkbox","structure":{}}],"collapsed":[{"name":"loop","isCollapsed":false}],"x":190,"y":1022,"datasourcetype_guid":"c7e48240-e0f2-11ec-ada1-d5ef75014b77","endpoint_guid":"48251450-be86-11ed-807c-bf9ce237e4c2","endpoint_role":"get"},{"id":"01A56278-A584-4A92-B82E-0D1E8D393AA5","type":"SnippetBlock","disabled":false,"name":"GetTenantNameAndRegion2","displayName":"Qlik Platform Operations - Get Tenant Name And Region 2","comment":"","childId":"A54243CF-734A-48E7-B887-01456E8F6F45","inputs":[{"id":"575d1740-b1e2-11ed-958a-598edfec33b8","value":"platformoperations.eu.qlikcloud.com","type":"string","structure":{}}],"settings":[{"id":"datasource","value":null,"type":"select","structure":{}},{"id":"blendr_on_error","value":"stop","type":"select","structure":{}},{"id":"automations_censor_data","value":false,"type":"checkbox","structure":{}}],"collapsed":[{"name":"loop","isCollapsed":false}],"x":-244,"y":153.6190185546875,"datasourcetype_guid":"c7e48240-e0f2-11ec-ada1-d5ef75014b77","snippet_guid":"bd5c1ce0-ad14-11ed-83f6-1d42e53790dd"},{"id":"45B37C9E-8A89-4997-BAD0-595018FCB97E","type":"EndpointBlock","disabled":false,"name":"CreateExtension","displayName":"Qlik Platform Operations - Create Extension","comment":"","childId":"AC9604C6-7775-4B0C-93CE-BFEBE52ACFAB","inputs":[{"id":"f5514330-c8bb-11ed-865d-77ebe05bf6a6","value":"{$.GetTenantNameAndRegion2}","type":"string","structure":{}},{"id":"f55a1de0-c8bb-11ed-8abe-459b7e76332b","value":"{$.GetExtensionArchive}","type":"longtext","structure":{}}],"settings":[{"id":"datasource","value":null,"type":"select","structure":{}},{"id":"blendr_on_error","value":"stop","type":"select","structure":{}},{"id":"automations_censor_data","value":false,"type":"checkbox","structure":{}}],"collapsed":[{"name":"loop","isCollapsed":false}],"x":-306,"y":657.348876953125,"datasourcetype_guid":"c7e48240-e0f2-11ec-ada1-d5ef75014b77","endpoint_guid":"f534be80-c8bb-11ed-ab5a-ade5fa53dc81","endpoint_role":"create"},{"id":"26BAB158-9F7A-4BB9-9A0D-B8D05E5986D4","type":"EndpointBlock","disabled":false,"name":"ListThemes","displayName":"Qlik Platform Operations - List Themes","comment":"","childId":"B5E4549E-1B0E-42EB-A67A-AB7185E8C88E","inputs":[{"id":"436cf450-bce2-11ed-b7b7-15b386884cb1","value":"{$.GetTenantNameAndRegion}","type":"string","structure":{}}],"settings":[{"id":"datasource","value":null,"type":"select","structure":{}},{"id":"maxitemcount","value":null,"type":"string","structure":{}},{"id":"blendr_on_error","value":"stop","type":"select","structure":{}},{"id":"cache","value":"0","type":"select","structure":{}},{"id":"automations_censor_data","value":false,"type":"checkbox","structure":{}}],"collapsed":[{"name":"loop","isCollapsed":false}],"x":38,"y":1415,"datasourcetype_guid":"c7e48240-e0f2-11ec-ada1-d5ef75014b77","endpoint_guid":"435827c0-bce2-11ed-9289-8bed35156610","endpoint_role":"list"},{"id":"B5E4549E-1B0E-42EB-A67A-AB7185E8C88E","type":"FilterListBlock","disabled":false,"name":"filterList2","displayName":"Filter over Qlik Platform Operations - List Themes - Filter List 2","comment":"","childId":null,"inputs":[{"id":"list","value":"{$.ListThemes}","type":"string","structure":{}},{"id":"conditions","value":{"mode":"all","conditions":[{"input1":"tags","operator":"contain","input2":"deploy"}]},"type":"custom","structure":{}}],"settings":[{"id":"automations_censor_data","value":false,"type":"checkbox","structure":{}}],"collapsed":[{"name":"loop","isCollapsed":false}],"x":250,"y":520,"loopBlockId":"168725C0-86EB-4E57-BA0C-9FF4F2298AE1"},{"id":"168725C0-86EB-4E57-BA0C-9FF4F2298AE1","type":"EndpointBlock","disabled":false,"name":"GetThemeArchive","displayName":"Qlik Platform Operations - Get Theme Archive","comment":"","childId":"38388655-BAB5-42C8-9BF7-7F9DD30A8ADE","inputs":[{"id":"a6c448b0-be85-11ed-985f-05fe99fc9263","value":"{$.GetTenantNameAndRegion}","type":"string","structure":{}},{"id":"a6ca3f50-be85-11ed-bb12-9d9fa44ad7e3","value":"{$.filterList2.item.id}","type":"string","structure":{}}],"settings":[{"id":"datasource","value":null,"type":"select","structure":{}},{"id":"blendr_on_error","value":"stop","type":"select","structure":{}},{"id":"cache","value":"0","type":"select","structure":{}},{"id":"automations_censor_data","value":false,"type":"checkbox","structure":{}}],"collapsed":[{"name":"loop","isCollapsed":false}],"x":-284,"y":1344.6201171875,"datasourcetype_guid":"c7e48240-e0f2-11ec-ada1-d5ef75014b77","endpoint_guid":"a6b060b0-be85-11ed-8a29-d5bde56e4db5","endpoint_role":"get"},{"id":"38388655-BAB5-42C8-9BF7-7F9DD30A8ADE","type":"EndpointBlock","disabled":false,"name":"CreateTheme","displayName":"Qlik Platform Operations - Create Theme","comment":"","childId":"2BB05BFB-0E0E-4DAA-AAFE-2F018ECDFE23","inputs":[{"id":"35ed43e0-c703-11ed-a643-2317bde32b5d","value":"{$.GetTenantNameAndRegion2}","type":"string","structure":{}},{"id":"35f0e820-c703-11ed-b433-1f050f10ac4d","value":"{$.GetThemeArchive}","type":"longtext","structure":{}}],"settings":[{"id":"datasource","value":null,"type":"select","structure":{}},{"id":"blendr_on_error","value":"stop","type":"select","structure":{}},{"id":"automations_censor_data","value":false,"type":"checkbox","structure":{}}],"collapsed":[{"name":"loop","isCollapsed":false}],"x":-301,"y":1079.0599365234375,"datasourcetype_guid":"c7e48240-e0f2-11ec-ada1-d5ef75014b77","endpoint_guid":"35e616d0-c703-11ed-93d2-43b2f53ff52f","endpoint_role":"create"},{"id":"AC9604C6-7775-4B0C-93CE-BFEBE52ACFAB","type":"ShowBlock","disabled":false,"name":"output","displayName":"Output","comment":"","childId":null,"inputs":[{"id":"input","value":"{ $.CreateExtension }","type":"string","structure":{}}],"settings":[{"id":"display_mode","value":"add","type":"select","structure":{}}],"collapsed":[{"name":"loop","isCollapsed":false}],"x":-244,"y":775.0843505859375},{"id":"2BB05BFB-0E0E-4DAA-AAFE-2F018ECDFE23","type":"ShowBlock","disabled":false,"name":"output2","displayName":"Output 2","comment":"","childId":null,"inputs":[{"id":"input","value":"{ $.CreateTheme }","type":"string","structure":{}}],"settings":[{"id":"display_mode","value":"add","type":"select","structure":{}}],"collapsed":[{"name":"loop","isCollapsed":false}],"x":-287,"y":1278.7142333984375}],"variables":[]}

Next steps

Now that you are have successfully created a tenant, added a user, configured the tenant, deployed apps, and deployed themes and extensions, you are ready to create your own, more advanced workflows using the many blocks in the Platform Operations connector, and the many APIs on Qlik Cloud.

Was this page helpful?