Creating themes

A user with admin role can create a new theme for a particular tenant.

Procedure

  1. In a REST client platform, add the authentication details of the tenant where you want to create a new theme.
    
    //In case of Instance API key 
    Headers:
    {
    "x-instance-api-key": "instance_api_key"
    }
     
    // In case of MCSP or ISV token
    Headers:
    {
    "Authorization": "mcsp_or_isv_token"
    }
    
    Body:
    	{
    	"name": "<theme_name>*^",
    	"description": "<theme_description>",
    	"theme":<theme_values_obj>#,
    	"footerContent":"<theme_footerContent>",
    	"aboutPageContent":"<theme_aboutPageContent>" 
    	}
    	
    // A field with the asterisk (*) character in the body of the request is a required field. 
    // A field with the caret (^) character in the body of the request indicates that the field can only have unique values. 
    // The hash (#) character in the body of the request indicates that the field contains the object of the applied theme in the specified tenant.
    // You could get the theme object by performing a GET method request at the URL "<domain>/apis/v1/rest/themes/defaultvalues".
  2. Make a POST request at the URL of the project.

    URL syntax: <domain>/apis/v1/rest/themes

    Method: POST

    If the request is successful, you receive the response code for success.

    {
    output: 
    	{
    	"name": "<theme_name>",
    	"uid": "<theme_uid>",
    	"settings": 
    		{
    		"description": "<theme_name>",
    		"theme":<theme_values_obj>,
    		"footerContent": "<theme_footerContent>",
    		"aboutPageContent": "<theme_aboutPageContent>"
    		},
    	"active": <true || false>,
    }
    }