Skip to main content
Skip table of contents

profile

A new policy profile or signing profile. See Configuring security policies for your apps for more information about profiles in general, as well as details about each policy type and its associated profile.

POST

Creates or updates a policy profile or signing profile.

Parameters

Parameter
Description
type

The type of profile to create. Valid values:

  • app_customization
  • client_certs
  • dar
  • data_sharing
  • device_posture
  • diagnostics
  • end_user_license_agreement
  • local_auth
  • master
  • secure_web_stack
  • signing
  • trusted_server_certs

To create a browser profile, use profile/mocana-browser/new.

To create a vpn profile, use app-policy/vpn-profile.

nameName of the profile.

desc

Profile description
dataJSON string or ZIP file with profile-specific data.
id

Use a profile ID to update an existing profile. To get the GUIDs for all profiles in the system, use GET profile/catalog; use the value of profile_id within the profile structure.

Required to update an existing profile; omit to create a new profile.

Example requests:

Create a new DAR profile:

Request

CODE
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="dar" \
  -F desc="Default Profile" \
  -F data="{\"null_cipher\":true,\"intercept_foundation\":true, \
    \"exceptions\":[{\"location\":\"sandbox\",\"pathMatch\":\"databases\", \
    \"platforms\":[\"android\",\"ios\"],\"appId\":\"*\"}, \
    {\"location\":\"sdcard\",\"pathMatch\":\"sdcardPath\",\"platforms\":[\"android\"],\"appId\":\"*\"}]}"


Update an existing Data Sharing profile to block Copy/Paste:

Request

CODE
curl -b c.txt -c c.txt -X POST https://bc.qwe.com/mocana-app-control/rest/profile \
 -F name="Block Copy Paste" \
 -F id="223302a1-add2-4bd9-8225-901ff424e697f" \
 -F desc="Default Profile" \
 -F data="{\"copyBlocked\":\"1\",\"pasteBlocked\":\"1\"}"


To create a new Master profile from an exported profile, use the profile.zip file:

Request

CODE
curl -b c.txt -c c.txt -X POST https://bc.qwe.com/mocana-app-control/rest/profile \
 -F type=master \
 -F name="Imported Master" \
 -F desc="Master profile 2" \
 -F data=@MyMasterProfile.zip

To create a new Signing profile, you need to supply the keystore file (Android) or provisioning profile (iOS) in addition to the JSON data. For iOS, use the provisioningProfile parameter:

Request

CODE
curl -k -v -L -b c.txt -c c.txt -X POST http://bc.qwe.com:8080/mocana-app-control/rest/profile \
  -F name="Signing Test Profile" \
  -F type="signing" \
  -F desc="some Profile" \
  -F data="{\"signing_cert_id\":\"iPhone Distribution : Blue Cedar\"}" \
  -F provisioningProfile=@acme.mobileprovision

For Android, use the keystore parameter:

Request

CODE
curl -k -v -L -b c.txt -c c.txt -X POST http://bc.qwe.com:8080/mocana-app-control/rest/profile \
  -F name="Signing Test Profile" \
  -F type="signing" \
  -F desc="some Profile" \
  -F data="{\"keystore_alias\":\"randomKey\",\"keystore_pass\":\"random\"}" \
  -F keystore=@myKeystore.keystore
JavaScript errors detected

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

If this problem persists, please contact our support.