The **bundleManager** module provides APIs for bundle management, including adding, obtaining, and removing a list of bundles that are allowed to install. Only the enterprise device administrator applications can call the APIs provided by this module.
> **NOTE**
>
> The initial APIs of this module are supported since API version 10. Newly added APIs will be marked with a superscript to indicate their earliest API version.
Adds a list of bundles that are allowed to be installed by the administrator for an enterprise device administrator application. This API uses an asynchronous callback to return the result.
| appIds | Array<string> | Yes | Bundles to be added to the allowed bundle list. |
| callback | AsyncCallback<void> | Yes | Callback used to return the result. If the operation is successful, **err** is **null**. Otherwise, **err** is an error object.|
**Error codes**
For details about the error codes, see [Enterprise Device Management Error Codes](../errorcodes/errorcode-enterpriseDeviceManager.md).
Adds a list of bundles that are allowed to be installed by the specified user for an enterprise device administrator application. This API uses an asynchronous callback to return the result.
| appIds | Array<string> | Yes | Bundles to be added to the allowed bundle list. |
| userId | number | Yes | User ID. The default value is the user ID of the caller. The value must be greater than or equal to 0.|
| callback | AsyncCallback<void> | Yes | Callback used to return the result. If the operation is successful, **err** is **null**. Otherwise, **err** is an error object.|
**Error codes**
For details about the error codes, see [Enterprise Device Management Error Codes](../errorcodes/errorcode-enterpriseDeviceManager.md).
Adds a list of bundles that are allowed to be installed by the administrator (if **userId** is not passed in) or the specified user (if **userId** is passed in) for an enterprise device administrator application. This API uses a promise to return the result.
Removes a list of bundles that are allowed to be installed by the administrator for an enterprise device administrator application. The bundles removed from the list can no longer be installed. This API uses an asynchronous callback to return the result.
| appIds | Array<string> | Yes | Bundles to be removed from the allowed bundle list. |
| callback | AsyncCallback<void> | Yes | Callback used to return the result. If the operation is successful, **err** is **null**. Otherwise, **err** is an error object.|
**Error codes**
For details about the error codes, see [Enterprise Device Management Error Codes](../errorcodes/errorcode-enterpriseDeviceManager.md).
Removes a list of bundles that are allowed to be installed by the specified user for an enterprise device administrator application. The bundles removed from the list can no longer be installed. This API uses an asynchronous callback to return the result.
| appIds | Array<string> | Yes | Bundles to be removed from the allowed bundle list. |
| userId | number | Yes | User ID. The default value is the user ID of the caller. The value must be greater than or equal to 0.|
| callback | AsyncCallback<void> | Yes | Callback used to return the result. If the operation is successful, **err** is **null**. Otherwise, **err** is an error object.|
**Error codes**
For details about the error codes, see [Enterprise Device Management Error Codes](../errorcodes/errorcode-enterpriseDeviceManager.md).
Removes a list of bundles that are allowed to be installed by the administrator (if **userId** is not passed in) or the specified user (if **userId** is passed in) for an enterprise device administrator application. The bundles removed from the list can no longer be installed. This API uses a promise to return the result.
Obtains the list of bundles that are allowed to be installed by the administrator for an enterprise device administrator application. This API uses an asynchronous callback to return the result.
| callback | AsyncCallback<Array<string>> | Yes | Callback used to return the result. If the operation is successful, **err** is **null**. Otherwise, **err** is an error object. |
**Error codes**
For details about the error codes, see [Enterprise Device Management Error Codes](../errorcodes/errorcode-enterpriseDeviceManager.md).
Obtains the list of bundles that are allowed to be installed by the specified user for an enterprise device administrator application. This API uses an asynchronous callback to return the result.
| userId | number | Yes | User ID. The default value is the user ID of the caller. The value must be greater than or equal to 0.|
| callback | AsyncCallback<Array<string>> | Yes | Callback used to return the result. If the operation is successful, **err** is **null**. Otherwise, **err** is an error object. |
**Error codes**
For details about the error codes, see [Enterprise Device Management Error Codes](../errorcodes/errorcode-enterpriseDeviceManager.md).
Obtains the list of bundles that are allowed to be installed for an enterprise device administrator application. This API uses a promise to return the result.