URI

<themes_uri>/{name}[.<format>]

Supported Methods

GET, PUT, HEAD

Parent Resource

themes

Introduction

The themeSetting resource represents the specific configuration for a particular theme style of iPortal. The iPortal theme style defines the foreground / background colors of site-wide UI components such as the navigation bar, sidebar, footer, and buttons.

Supported Methods:

  • GET: Retrieve the specified iPortal theme style configuration.
  • PUT: Modify the specified iPortal theme style.
  • HEAD: Check whether the themeSetting resource exists, or whether the permission can access the themeSetting resource.

Supported output formats: JSON.

Resource hierarchy

HTTP Request Method

Perform an HTTP request on the following URI. The json output format is used as an example, where supermapiportal is the server name.

http://supermapiportal:8190/iportal/web/uiconfig/themes/{name}.json

GET Request

Retrieve the specified iPortal theme style configuration.

Response Structure

The iPortal theme style configuration consists of the following fields:

Field Type Description
header String The theme style of the navigation bar.
resourceHeader String The theme style of the resource center secondary navigation bar.
resourceAside String The theme style of the resource center sidebar.
body String The theme style of the page body.
button String The theme style of buttons.
footer String The theme style of the footer.

Response Example

Perform a GET request on the themeSetting resource: http://localhost:8190/iportal/web/uiconfig/themes/ThemeSetting_blue.json. The returned json representation is as follows:

{

    "themeSetting":{

        "header":{

            "backgroundColor":"rgb(255, 255, 255)",

            "color":"rgb(51, 51, 51)",

            "hoverBackgroundColor":"#efefef",

            "hoverMenuFontColor":"#0161b7",

            "hoverLoginFontColor":"#0161b7"

        },

        "resourceHeader":{

            "backgroundImage": "{webUiRoot}reaource-center-img/banner-map.png",

            "backgroundColor": "#ffffff",

            "color":"#ffffff",

            "hoverBannerFontColor":"#ffffff"

        },

        "resourceAside":{

            "borderColor": "#E5E5E5",

            "activeBackgroundColor": "#f4f4f4"

        },

        "body":{

            "backgroundColor":"#f4f4f4"

        },

        "button":{

            "primaryColor":"#127fdc",

            "textColor":"rgba(0, 0, 0, .65)",

            "borderColorBase": "#d9d9d9"

        },

        "footer":{

            "backgroundColor": "rgb(255, 255, 255)",

            "color":"rgb(51, 51, 51)",

            "borderColor":"#f4f4f4"

        }

    }

}

PUT Request

Modify the specified iPortal theme style.

Request Parameters

When sending a request, you need to pass the following parameters in the request body:

Name Type Description
header String The theme style of the navigation bar.
resourceHeader String The theme style of the resource center secondary navigation bar.
resourceAside String The theme style of the resource center sidebar.
body String The theme style of the page body.
button String The theme style of buttons.
footer String The theme style of the footer.

Response Structure

The returned resource representation structure is as follows:

Field Type Description
succeed boolean Whether modifying the theme style is successful.
error HttpError Error information. If the modification is successful, this field is not returned.

Response Example

Modify the site-wide theme style of iPortal. Perform a PUT request on the themeSetting resource: http://localhost/iportal/web/uiconfig/themes/ThemeSetting_blue.json. The request body is as follows:

{

    "themeSetting": {

        "header": {

            "backgroundColor": "#181818",

            "color": "#ffffff",

            "hoverBackgroundColor": "#3E3D3D",

            "hoverMenuFontColor": "#ffffff",

            "hoverLoginFontColor": "#FB6800"

        },

        "resourceHeader": {

            "backgroundImage": "",

            "backgroundColor": "#ffffff",

            "color": "rgb(51, 51, 51)",

            "hoverBannerFontColor": "#FB6800"

        },

        "resourceAside": {

            "borderColor": "#E5E5E5",

            "activeBackgroundColor": "#FFF0E6"

        },

        "body": {

            "backgroundColor": "#f4f4f4"

        },

        "button": {

            "primaryColor": "#FB6800",

            "textColor": "rgba(0, 0, 0, .65)",

            "borderColorBase": "#d9d9d9"

        },

        "footer": {

            "backgroundColor": "#333333",

            "color": "#999999",

            "borderColor": "#FB6800"

        }

    }

}

 

The returned json representation is as follows:

{"succeed": true}

HEAD Request

Returns the same HTTP response headers as a GET request, but without a response entity. You can obtain the metadata information contained in the response message headers without transferring the entire response content. The metadata information includes media type, character encoding, compression encoding, entity content length, etc.

A HEAD request can be used to determine whether the themeSetting resource exists, or whether the client has permission to access the themeSetting resource. By performing a HEAD request on a URI with .<format> appended, you can also quickly determine whether the themeSetting resource supports the <format> representation.

See