1e41f4b71Sopenharmony_ci# BundleInfo 2e41f4b71Sopenharmony_ci 3e41f4b71Sopenharmony_ciThe **BundleInfo** module defines the bundle information. A third-party application can obtain its own bundle information through [bundleManager.getBundleInfoForSelf](js-apis-bundleManager.md#bundlemanagergetbundleinfoforself), with [bundleFlags](js-apis-bundleManager.md#bundleflag) set to the information to be contained in the returned [BundleInfo](js-apis-bundleManager-bundleInfo.md). 4e41f4b71Sopenharmony_ci 5e41f4b71Sopenharmony_ci> **NOTE** 6e41f4b71Sopenharmony_ci> 7e41f4b71Sopenharmony_ci> The initial APIs of this module are supported since API version 9. Newly added APIs will be marked with a superscript to indicate their earliest API version. 8e41f4b71Sopenharmony_ci 9e41f4b71Sopenharmony_ci## BundleInfo 10e41f4b71Sopenharmony_ci 11e41f4b71Sopenharmony_ci**System capability**: SystemCapability.BundleManager.BundleFramework.Core 12e41f4b71Sopenharmony_ci 13e41f4b71Sopenharmony_ci| Name | Type | Read-Only| Optional| Description | 14e41f4b71Sopenharmony_ci| --------------------------------- | ------------------------------------------------------------ | ---- | ---- | ------------------------------------------------------------ | 15e41f4b71Sopenharmony_ci| name | string | Yes | No | Bundle name.<br>**Atomic service API**: This API can be used in atomic services since API version 11.| 16e41f4b71Sopenharmony_ci| vendor | string | Yes | No | Vendor of the bundle.<br>**Atomic service API**: This API can be used in atomic services since API version 11.| 17e41f4b71Sopenharmony_ci| versionCode | number | Yes | No | Version number of the bundle.<br>**Atomic service API**: This API can be used in atomic services since API version 11.| 18e41f4b71Sopenharmony_ci| versionName | string | Yes | No | Version description of the bundle.<br>**Atomic service API**: This API can be used in atomic services since API version 11.| 19e41f4b71Sopenharmony_ci| minCompatibleVersionCode | number | Yes | No | Earliest version compatible with the bundle in the distributed scenario.<br>**Atomic service API**: This API can be used in atomic services since API version 11.| 20e41f4b71Sopenharmony_ci| targetVersion | number | Yes | No | Target API version required for running the bundle.<br>**Atomic service API**: This API can be used in atomic services since API version 11.| 21e41f4b71Sopenharmony_ci| appInfo | [ApplicationInfo](js-apis-bundleManager-applicationInfo.md) | Yes | No | Application information. The information can be obtained by passing in **GET_BUNDLE_INFO_WITH_APPLICATION** to the **bundleFlags** parameter of [getBundleInfoForSelf](js-apis-bundleManager.md#bundlemanagergetbundleinfoforself).<br>**Atomic service API**: This API can be used in atomic services since API version 11.| 22e41f4b71Sopenharmony_ci| hapModulesInfo | Array\<[HapModuleInfo](js-apis-bundleManager-hapModuleInfo.md)> | Yes | No | Module configuration information. The information can be obtained by passing in **GET_BUNDLE_INFO_WITH_HAP_MODULE** to the **bundleFlags** parameter of [getBundleInfoForSelf](js-apis-bundleManager.md#bundlemanagergetbundleinfoforself).<br>**Atomic service API**: This API can be used in atomic services since API version 11.| 23e41f4b71Sopenharmony_ci| reqPermissionDetails | Array\<[ReqPermissionDetail](#reqpermissiondetail)> | Yes | No | Detailed information of the permissions to request from the system. The information can be obtained by passing in **GET_BUNDLE_INFO_WITH_REQUESTED_PERMISSION** to the **bundleFlags** parameter of [getBundleInfoForSelf](js-apis-bundleManager.md#bundlemanagergetbundleinfoforself).<br>**Atomic service API**: This API can be used in atomic services since API version 11.| 24e41f4b71Sopenharmony_ci| permissionGrantStates | Array\<[bundleManager.PermissionGrantState](js-apis-bundleManager.md#permissiongrantstate)> | Yes | No | Permission grant state. The information can be obtained by passing in **GET_BUNDLE_INFO_WITH_REQUESTED_PERMISSION** to the **bundleFlags** parameter of [getBundleInfoForSelf](js-apis-bundleManager.md#bundlemanagergetbundleinfoforself).<br>**Atomic service API**: This API can be used in atomic services since API version 11.| 25e41f4b71Sopenharmony_ci| signatureInfo | [SignatureInfo](#signatureinfo) | Yes | No | Signature information of the bundle. The information can be obtained by passing in **GET_BUNDLE_INFO_WITH_SIGNATURE_INFO** to the **bundleFlags** parameter of [getBundleInfoForSelf](js-apis-bundleManager.md#bundlemanagergetbundleinfoforself).<br>**Atomic service API**: This API can be used in atomic services since API version 11.| 26e41f4b71Sopenharmony_ci| installTime | number | Yes | No | Time when the bundle was installed.<br>**Atomic service API**: This API can be used in atomic services since API version 11.| 27e41f4b71Sopenharmony_ci| updateTime | number | Yes | No | Time when the bundle was updated.<br>**Atomic service API**: This API can be used in atomic services since API version 11.| 28e41f4b71Sopenharmony_ci| routerMap<sup>12+</sup> | Array\<[RouterItem](js-apis-bundleManager-hapModuleInfo.md#routeritem12)> | Yes | No | Router table of the application. The table is obtained by deduplicating and combining the **routerMap** information under **hapModulesInfo** based on the **name** field in **RouterItem**. The information can be obtained by passing in **GET_BUNDLE_INFO_WITH_HAP_MODULE** and **GET_BUNDLE_INFO_WITH_ROUTER_MAP** to the **bundleFlags** parameter of [getBundleInfoForSelf](js-apis-bundleManager.md#bundlemanagergetbundleinfoforself).<br>**Atomic service API**: This API can be used in atomic services since API version 12.| 29e41f4b71Sopenharmony_ci| appIndex<sup>12+</sup> | number | Yes | No | Index of an application clone. It takes effect only for cloned applications.| 30e41f4b71Sopenharmony_ci 31e41f4b71Sopenharmony_ci 32e41f4b71Sopenharmony_ci## ReqPermissionDetail 33e41f4b71Sopenharmony_ci 34e41f4b71Sopenharmony_ciProvides the detailed information of the permissions to request from the system. 35e41f4b71Sopenharmony_ci> **NOTE** 36e41f4b71Sopenharmony_ci> 37e41f4b71Sopenharmony_ci> If multiple packages of an application have requested the same permission but with different reasons, the system returns only one reason based on a descending priority order: entry HAP > feature HAP > in-app HSP. 38e41f4b71Sopenharmony_ci 39e41f4b71Sopenharmony_ci**Atomic service API**: This API can be used in atomic services since API version 11. 40e41f4b71Sopenharmony_ci 41e41f4b71Sopenharmony_ci**System capability**: SystemCapability.BundleManager.BundleFramework.Core 42e41f4b71Sopenharmony_ci 43e41f4b71Sopenharmony_ci| Name | Type | Read-Only| Optional| Description | 44e41f4b71Sopenharmony_ci| --------------------- | ----------------------- | ---- | ---- | ---------------------| 45e41f4b71Sopenharmony_ci| name | string | No | No | Name of the permission to request. | 46e41f4b71Sopenharmony_ci| moduleName<sup>10+</sup> | string | No | No | Name of the module that requests the permission. | 47e41f4b71Sopenharmony_ci| reason | string | No | No | Reason for requesting the permission. | 48e41f4b71Sopenharmony_ci| reasonId | number | No | No | ID of the reason for requesting the permission.| 49e41f4b71Sopenharmony_ci| usedScene | [UsedScene](#usedscene) | No | No | Use scenario and timing for using the permission.| 50e41f4b71Sopenharmony_ci 51e41f4b71Sopenharmony_ci 52e41f4b71Sopenharmony_ci 53e41f4b71Sopenharmony_ci## UsedScene 54e41f4b71Sopenharmony_ci 55e41f4b71Sopenharmony_ciDescribes the use scenario and timing for using the permission. 56e41f4b71Sopenharmony_ci 57e41f4b71Sopenharmony_ci**Atomic service API**: This API can be used in atomic services since API version 11. 58e41f4b71Sopenharmony_ci 59e41f4b71Sopenharmony_ci**System capability**: SystemCapability.BundleManager.BundleFramework.Core 60e41f4b71Sopenharmony_ci 61e41f4b71Sopenharmony_ci| Name | Type | Read-Only| Optional| Description | 62e41f4b71Sopenharmony_ci| --------- | -------------- | ---- | ---- | --------------------------- | 63e41f4b71Sopenharmony_ci| abilities | Array\<string> | No | No | Abilities that use the permission. | 64e41f4b71Sopenharmony_ci| when | string | No | No | Time when the permission is used. | 65e41f4b71Sopenharmony_ci 66e41f4b71Sopenharmony_ci## SignatureInfo 67e41f4b71Sopenharmony_ci 68e41f4b71Sopenharmony_ciDescribes the signature information of the bundle. 69e41f4b71Sopenharmony_ci 70e41f4b71Sopenharmony_ci**Atomic service API**: This API can be used in atomic services since API version 11. 71e41f4b71Sopenharmony_ci 72e41f4b71Sopenharmony_ci**System capability**: SystemCapability.BundleManager.BundleFramework.Core 73e41f4b71Sopenharmony_ci 74e41f4b71Sopenharmony_ci| Name | Type | Read-Only| Optional| Description | 75e41f4b71Sopenharmony_ci| --------- | -------------- | ---- | ---- | --------------------------- | 76e41f4b71Sopenharmony_ci| appId | string | Yes | No | Application ID. | 77e41f4b71Sopenharmony_ci|fingerprint| string | Yes | No | Fingerprint information of the bundle. This field changes when the used signing certificate changes. | 78e41f4b71Sopenharmony_ci|appIdentifier<sup>11+</sup>| string | Yes | No | Unique ID of the application, which is allocated by the cloud. This ID does not change along the application lifecycle, including version updates, certificate changes, public and private key changes, and application transfers. | 79e41f4b71Sopenharmony_ci|certificate<sup>13+</sup>| string | Yes | Yes | Public key of the application certificate. | 80