Skip to main content
Skip table of contents

App Customization profiles (API)

App Customization parameters

When you apply the App Customization policy to an app, you choose a profile that specifies colors, fonts, and so on. You can create as many App Customization profiles as you want. 

Use these parameters in the JSON structure when you apply the App Customization policy (POLICY_CODE_APP_CUSTOMIZATION) to the app with app-market/policy.

ParameterDescription
backgroundColor

Optional. For configuring the background color of the Blue Cedar screen. Specified as an unsigned long data type in ARGB format, with the alpha sample in the highest 8 bits, followed by the red sample, green sample, and blue sample in the lowest 8 bit. ARGB values are typically expressed using hexadecimal digits so you must convert this value into an unsigned long data type. For example, the hexadecimal value EF2B2D converts to 15674157 in the unsigned long data type. While the REST API supports such a color specification with the alpha component, it is currently not supported on the Android device and thus, the alpha component is ignored. 

Valid values: Unsigned long data type (converted from a hexadecimal value).

backgroundImage

Optional. The background image that appears on the Blue Cedar screen.

If the image you choose has a transparent background, the background uses the color specified in Background Color. (If the image is not transparent, the image appears on top of the background color.)

The background image must be at least 1024 px in one dimension. It will be scaled to fit the device screen

displaySecuredByBarOptional. If set to 1, the app displays a "Secured by Blue Cedar" banner during enrollment and authentication.
fontColor

Optional. Specify the font color.

Valid values:  Unsigned long data type (converted from a hexadecimal value).

logoImage

Optional. The logo that appears on the Blue Cedar screen.

The logo image must have either a horizontal or vertical dimension of 512 px. The logo never has its aspect ratio changed.

primaryBtnColor

Optional. Specify the color of the primary button (for example, OK).

Valid values:  Unsigned long data type (converted from a hexadecimal value).

reset_bg_image

1: Set default background image to the Blue Cedar background.

0: Clear default logo image.

reset_logo_image

1: Set default logo image to the Blue Cedar logo.

0: Clear default logo image.

secondaryBtnColor

Optional. Specify the color of the secondary button (for example, Reset).

Valid values:  Unsigned long data type (converted from a hexadecimal value).

userStringsJsonOptional. Specify the custom translation strings JSON file. See Custom translation strings for information about the JSON contents.

App Customization API resources

To manage App Customization profiles, use these resources:

  • profile: Use type="app_customization" to create an App Customization profile. See example below.
  • profile/catalog/{policytype}: Use "app_customization" for "{policytype}". GET returns an array of details for all policy profiles of the specified type.
  • profile/{GUID}: Use the profile ID to specify a policy profile. GET returns details for the specified profile, PUT updates the details in the specified profile, and DELETE archives the profile.
  • profile/{GUID}/zip: Use the profile ID to specify a policy profile. GET returns a zip file including the profile details and any assets such as images.
  • settings/app-customization-default-profile (settings/{policytype}-default-profile): POST sets one of the DAR profiles as the default. GET returns the GUID of the current default profile. DELETE archives the current default.

To retrieve details for the policy:

  • app-policy/{GUID}: Use the policy ID to specify a policy. GET returns details for the specified policy.
  • app-policy/code/{code}: Use POLICY_CODE_APP_CUSTOMIZATION to specify the policy. GET returns details for the specified policy.

To secure apps with the App Customization policy, use these resources:

Creating an App Customization profile

This example creates an App Customization profile with the profile API, specifying all options.

Request

BASH
curl -k -v -L -b c.txt -c c.txt -X POST http://bc.qwe.com/mocana-app-control/rest/profile \
  -F name="TestProfile" \
  -F type="app_customization" \
  -F desc="Default Profile" \
  -F data="{\"backgroundColor\":\"00FFFF\",\"fontColor\":\"FF8DBF\",
     \"primaryBtnColor\":\"95C0CC\",\"secondaryBtnColor\":\"C46931\",
     \"displaySecuredByBar\":\"1\",\"reset_bg_image\":\"0\",\"reset_logo_image\":\"0\"}" \
  -F backgroundImage=@/Users/jlennon/Downloads/lock-icon-48.png \
  -F logoImage=@@/Users/jlennon/Downloads/lock-icon-48.png
  -F userStringsJson=@@/Users/jlennon/Downloads/custom_strings.json 

Response

JS
{
  "message": "",
  "profiles": {
    "data": {
      "profile_data": "{backgroundImageBlobId:ffab75fd-cb98-4aa1-8779-5f0b53b52f50,
        logoImageBlobId:4f843690-2493-4a7b-bf27-d4fd5bd0440c,
        backgroundColor:00FFFF,fontColor:FF8DBF,primaryBtnColor:95C0CC,
        secondaryBtnColor:C46931,displaySecuredByBar:1,
        userStringsJsonBlobId:1c4e07a8-b77a-4a16-b8c3-ff130e3b7daf,
        reset_bg_image:0,reset_logo_image:0}",
      "profile_data_id": "0b545708-cfb4-49d8-9e0c-b72438a20a7f",
      "profile_data_stamp": "2016-08-19 14:48:14.0"
      },
    "profile_desc": "Default Profile",
    "profile_id": "0732e1e9-5fe8-4a62-aa9f-2828d3001548",
    "profile_name": "TestProfile",
    "profile_type": "app_customization",
    "profile_url": "http://bc.qwe.com/mocana-app-control/rest/profile/0732e1e9-5fe8-4a62-aa9f-2828d3001548"
   },
  "status": "OK"
}
JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.