Create a Theme
This applies to: Visual Data Discovery
You can create your own themes to use in the Symphony UI.
Create a theme
-
Set up the JSON file that describes your theme. Download and use the JSON files provided with the supplied modern and dark themes to get started or create your own.
-
To use the JSON files for either the modern or dark theme as a template for your own, retrieve the theme JSON file using the
/api/customization/themes/name/<name>
API endpoint in a GET request. The following request obtains the JSON for the modern theme.curl -X GET "http://<ip-address>:<port>/composer/api/customization/themes/name/modern" -H "accept: application/vnd.composer.v3+json"where
<ip-address>
is the IP address or host name of your Symphony instance and <port> is its port.The JSON is provided in the response from the request. You can download the JSON and review and alter it as needed.
You can create a JSON file that describes your theme. A sample is provided in Sample Themes JSON File.
-
-
Use the
/api/customization/themes/
API endpoint in a POST request to create the theme. Use the text of your JSON file as the body ("content": "<string>"
) of the request. Be sure to remove the"system": true
and"id": "<string>"
properties from the JSON file before you use it to create a theme. Symphony automatically generates an ID for the theme and sets the value of the"system"
property when the API request to create the theme is processed.If you want to specify a master theme, provide the theme name in the
masterThemeID
property. Master themes are optional, but allow you to identify the Symphony-supplied theme from which properties should be inherited by a custom theme, if the properties are not specified in the custom theme JSON. Master themes can only be Symphony- supplied themes. See Supplied Themes.The following shows a sample request to create a theme based on the supplied modern theme, but using the supplied composer theme as its master theme.
Note: At this time, you can only tailor theme colors. Other tailoring properties (such as fonts or font sizes) should not be changed.curl -X POST "<ip-address>:<port>/composer/api/customization/themes" -H "accept: application/vnd.composer.v3+json" -H "Content-Type: application/json" -d "{ \"masterThemeId\": \"composer\", \"name\": \"<theme-name>\", \"content\": { <JSONcontent> } }where
<ip-address>
is the IP address or host name of your Symphony instance,<port>
is its port,<theme-name>
is the name of your new theme, and<JSONcontent>
is the JSON content for your theme.After the theme is successfully created, it shows up in the list of available themes when one is generated (see List Themes) and it can be updated and patched (see Update a Theme and Patch a Theme). It can also be deleted (see Delete a Theme). However, it will not be used by the Symphony UI until it has been activated (see Activate a Theme).
Comments
0 comments
Please sign in to leave a comment.