You are here: Home > API Reference > AOSP > Policies > Create non-GMS Android policy

Create non-GMS Android policy

Required Permission: mdm.aosp.policy.create

Create a new non-GMS Android policy for the enterprise

POST
https://api.applivery.io/v1/organizations/{organizationId}/mdm/aosp/enterprise/policies

Request

Send your API key in the request header authorization
Example: Authorization: Bearer <token>

organizationId string
required
Match pattern: ^(([a-fA-F0-9]{24})|([a-zA-Z0-9\\-]{3,}))$

Body Params application/json
name string required
Display name of the AOSP policy.
≤ 256 characters
description any optional
Optional human-readable description of the policy.
config object optional
Raw AOSP policy configuration payload stored by the backend.
private boolean optional
Whether the policy is private to a segment or workflow and should not be broadly reused.
segmentId integer optional
Optional segment identifier used to scope the resource within the organization.
≥ 0 · ≤ 9007199254740991
exposeToChildren any optional
Whether this policy can be inherited by child segments when segment filtering is expanded.
agentConfiguration object optional
Optional policy-level AOSP agent configuration delivered to devices.
allowLocation boolean optional
allowPackageTime boolean optional
allowPackageTransfer boolean optional
allowNetworkStatus boolean optional
policyFeatures object optional
defaultViewFeature string optional
bookmarks applications files notifications status
toggledFeatures array [object] optional
enableDefaultView boolean optional
kioskLauncherConfiguration object optional
displayDeviceName any optional
settingAction any optional
whitelistedApps array [string] optional
escapeHatchPassword string optional
≤ 256 characters
backgroundUrl string optional
≤ 500 characters
iconSize string optional
small medium large
screenAlwaysOn any optional
unlockPassword string optional
≤ 256 characters
inactivityLockTime integer optional
≥ 0 · ≤ 9007199254740991
startingUpApps array [object] optional
packageName string required
≤ 256 characters
config object required
appsLayout array optional
type string required
folder
package string required
≤ 256 characters
action any required
name string optional
≤ 256 characters
children array required
header object optional
text string optional
≤ 1000 characters
fontSize string optional
small medium large
footer object optional
text string optional
≤ 1000 characters
fontSize string optional
small medium large
assets array [object] optional
Referenced MDM assets attached to the policy.
mdmAssetId string required
Match pattern: ^[a-fA-F0-9]{24}$
location string required
≤ 256 characters
assetName string optional
≤ 256 characters
scope string required
user system all-users
applications array [object] optional
AOSP application assignments attached to the policy. Config applications must be backed by matching assignments.
aosApplicationId string required
Match pattern: ^[a-fA-F0-9]{24}$
configuration string optional
action string optional
forceInstall available
updatePolicy object optional
quarantine integer optional
≥ 0 · ≤ 30
autoUpdate any optional
major object optional
minor object optional
patch object optional
customAppConfig object optional
certificateProviderIds array [string] optional
Identifiers of certificate providers referenced by the policy.
{
    "name": "string",
    "description": "string",
    "config": {},
    "private": true,
    "segmentId": 0,
    "exposeToChildren": true,
    "agentConfiguration": {
        "allowLocation": true,
        "allowPackageTime": true,
        "allowPackageTransfer": true,
        "allowNetworkStatus": true,
        "policyFeatures": {
            "defaultViewFeature": "bookmarks",
            "toggledFeatures": [
                {
                    "name": "bookmarks",
                    "active": true
                }
            ],
            "enableDefaultView": true
        }
    },
    "kioskLauncherConfiguration": {
        "displayDeviceName": true,
        "settingAction": "",
        "whitelistedApps": [
            "string"
        ],
        "escapeHatchPassword": "string",
        "backgroundUrl": "string",
        "iconSize": "small",
        "screenAlwaysOn": true,
        "unlockPassword": "string",
        "inactivityLockTime": 0,
        "startingUpApps": [
            {
                "packageName": "string",
                "config": {}
            }
        ],
        "appsLayout": [
            {
                "type": "app",
                "package": "string"
            }
        ],
        "header": {
            "text": "string",
            "fontSize": "small"
        },
        "footer": {
            "text": "string",
            "fontSize": "small"
        }
    },
    "assets": [
        {
            "mdmAssetId": "string",
            "location": "string",
            "assetName": "string",
            "scope": "user"
        }
    ],
    "applications": [
        {
            "aosApplicationId": "string",
            "configuration": "string",
            "action": "forceInstall",
            "updatePolicy": {
                "quarantine": 0,
                "autoUpdate": true,
                "major": {
                    "gracePeriod": 0
                },
                "minor": {
                    "gracePeriod": 0
                },
                "patch": {
                    "gracePeriod": 0
                }
            },
            "customAppConfig": {}
        }
    ],
    "certificateProviderIds": [
        "string"
    ]
}

Responses

200 Response application/json
status boolean required
data object required
id string required
Identifier of the AOSP policy.
Match pattern: ^[a-fA-F0-9]{24}$
organizationId string required
Identifier of the organization that owns the AOSP enterprise resource.
Match pattern: ^[a-fA-F0-9]{24}$
aosEnterpriseId string required
Identifier of the AOSP enterprise configuration associated with this resource.
Match pattern: ^[a-fA-F0-9]{24}$
name string required
Display name of the AOSP policy.
≤ 256 characters
description string optional
Optional human-readable description of the policy.
≤ 500 characters
config any optional
Raw AOSP policy configuration payload stored by the backend.
private boolean optional
Whether the policy is private to a segment or workflow and should not be broadly reused.
segmentId integer optional
Optional segment identifier used to scope the resource within the organization.
≥ 0 · ≤ 9007199254740991
exposeToChildren any optional
Whether this policy can be inherited by child segments when segment filtering is expanded.
agentConfiguration object optional
Optional policy-level AOSP agent configuration delivered to devices.
allowLocation boolean optional
allowPackageTime boolean optional
allowPackageTransfer boolean optional
allowNetworkStatus boolean optional
policyFeatures object optional
kioskLauncherConfiguration object optional
displayDeviceName any optional
settingAction any optional
whitelistedApps array [string] optional
escapeHatchPassword string optional
≤ 256 characters
backgroundUrl string optional
≤ 500 characters
iconSize string optional
small medium large
screenAlwaysOn any optional
unlockPassword string optional
≤ 256 characters
inactivityLockTime integer optional
≥ 0 · ≤ 9007199254740991
startingUpApps array [object] optional
appsLayout array optional
header object optional
footer object optional
assets array [object] optional
Referenced MDM assets attached to the policy.
mdmAssetId string required
Match pattern: ^[a-fA-F0-9]{24}$
location string required
≤ 256 characters
assetName string optional
≤ 256 characters
scope string required
user system all-users
assetsInfo array [object] optional
Expanded asset metadata returned for dashboard rendering.
applications array [object] required
AOSP application assignments attached to the policy. Config applications must be backed by matching assignments.
aosApplicationId string required
Identifier of the referenced AOSP application mapping.
Match pattern: ^[a-fA-F0-9]{24}$
configuration string optional
Optional serialized application assignment configuration.
action string optional
Requested install or management action for the application assignment.
forceInstall available
updatePolicy object optional
Quarantine and grace-period configuration for this app assignment. quarantine (0-30 days, a single value shared by all update types) holds a build back until it has been released for that many whole UTC days, but only when the agent config assets resolve which build to distribute (last build, last build on a git branch/tag, etc.): the previous build that already cleared the window is served instead. It never applies to an assignment pinned to a specific build, nor to the builds pushed over MDM. autoUpdate governs the grace periods: when it is true, each gracePeriod (0-90 days) becomes a graceExpirationDate — the start of the resolved build's release UTC day, plus quarantine, plus that gracePeriod — sent to the agent for that update type. When autoUpdate is false no grace dates are emitted, and when it has never been configured no update policy is sent at all, so the agent keeps its own default.
customAppConfig object optional
Optional custom app configuration stored for the assignment.
applicationsInfo array [object] required
Expanded AOSP application mapping records resolved for dashboard rendering.
id string required
Identifier of the AOSP application mapping resource.
Match pattern: ^[a-fA-F0-9]{24}$
organizationId string required
Identifier of the organization that owns the AOSP enterprise resource.
Match pattern: ^[a-fA-F0-9]{24}$
aosEnterpriseId string required
Identifier of the AOSP enterprise configuration associated with this resource.
Match pattern: ^[a-fA-F0-9]{24}$
type string required
Type of source used to resolve the application mapping for AOSP policy assignment.
build lastBuild lastGitBranchBuild lastGitTagBuild lastTagBuild
config object required
Configuration used to resolve the mapped build or application.
info object optional
Resolved application package metadata used by policies and device diagnostics.
version integer optional
Internal resource version used by the backend for tracking changes over time.
≥ 0 · ≤ 9007199254740991
updatedAt string required
Timestamp when the resource was last updated.
createdAt string required
Timestamp when the resource was created.
certificateProviderIds array [string] optional
Identifiers of certificate providers referenced by the policy.
version integer optional
Internal resource version used by the backend for tracking changes over time.
≥ 0 · ≤ 9007199254740991
updatedAt string required
Timestamp when the resource was last updated.
createdAt string required
Timestamp when the resource was created.
{
    "status": true,
    "data": {
        "id": "string",
        "organizationId": "string",
        "aosEnterpriseId": "string",
        "name": "string",
        "description": "string",
        "config": "string",
        "private": true,
        "segmentId": 0,
        "exposeToChildren": true,
        "agentConfiguration": {
            "allowLocation": true,
            "allowPackageTime": true,
            "allowPackageTransfer": true,
            "allowNetworkStatus": true,
            "policyFeatures": {
                "defaultViewFeature": "bookmarks",
                "toggledFeatures": [
                    {
                        "name": "bookmarks",
                        "active": true
                    }
                ],
                "enableDefaultView": true
            }
        },
        "kioskLauncherConfiguration": {
            "displayDeviceName": true,
            "settingAction": "",
            "whitelistedApps": [
                "string"
            ],
            "escapeHatchPassword": "string",
            "backgroundUrl": "string",
            "iconSize": "small",
            "screenAlwaysOn": true,
            "unlockPassword": "string",
            "inactivityLockTime": 0,
            "startingUpApps": [
                {
                    "packageName": "string",
                    "config": {}
                }
            ],
            "appsLayout": [
                {
                    "type": "app",
                    "package": "string"
                }
            ],
            "header": {
                "text": "string",
                "fontSize": "small"
            },
            "footer": {
                "text": "string",
                "fontSize": "small"
            }
        },
        "assets": [
            {
                "mdmAssetId": "string",
                "location": "string",
                "assetName": "string",
                "scope": "user"
            }
        ],
        "assetsInfo": [
            {}
        ],
        "applications": [
            {
                "aosApplicationId": "string",
                "configuration": "string",
                "action": "forceInstall",
                "updatePolicy": {
                    "quarantine": 0,
                    "autoUpdate": true,
                    "major": {
                        "gracePeriod": 0
                    },
                    "minor": {
                        "gracePeriod": 0
                    },
                    "patch": {
                        "gracePeriod": 0
                    }
                },
                "customAppConfig": {}
            }
        ],
        "applicationsInfo": [
            {
                "id": "string",
                "organizationId": "string",
                "aosEnterpriseId": "string",
                "type": "build",
                "config": {
                    "buildId": "string",
                    "applicationId": "string",
                    "filter": "string"
                },
                "info": {
                    "id": "string",
                    "bundleId": "string",
                    "name": "string",
                    "icon": "string",
                    "processedVersionName": "string",
                    "versionCode": "string",
                    "size": "string",
                    "originalExtension": "string",
                    "applicationInfo": {
                        "id": "string",
                        "slug": "string",
                        "name": "string",
                        "picture": "string"
                    },
                    "disabled": true,
                    "signatures": [
                        {
                            "sha1": "string",
                            "sha256": "string"
                        }
                    ]
                },
                "version": 0,
                "updatedAt": "string",
                "createdAt": "string"
            }
        ],
        "certificateProviderIds": [
            "string"
        ],
        "version": 0,
        "updatedAt": "string",
        "createdAt": "string"
    }
}
400 Response application/json
status boolean optional
false
error object optional
code number optional
5237
message string optional
AosPolicy name already used
{
    "status": false,
    "error": {
        "code": 5209,
        "message": "Invalid input"
    }
}
401 Response application/json
status boolean optional
false
error object optional
code number optional
4004
message string optional
Invalid Token
{
    "status": false,
    "error": {
        "code": 4002,
        "message": "No auth token"
    }
}
404 Response application/json
status boolean optional
false
error object optional
code number optional
3001
message string optional
Entity not found
{
    "status": false,
    "error": {
        "code": 3001,
        "message": "Entity not found"
    }
}
Was this page helpful?