1e41f4b71Sopenharmony_ci# Performing Asset Operations in Specified User Space (for System Applications Only) 2e41f4b71Sopenharmony_ci 3e41f4b71Sopenharmony_ciFor a singleton application that provides system-wide management functionalities, all users share an instance, which isolates data of different users. You need to specify the user space to which the operated asset belongs when: 4e41f4b71Sopenharmony_ci 5e41f4b71Sopenharmony_ci1. The singleton application needs to store, access, and destroy assets for multiple active users. 6e41f4b71Sopenharmony_ci2. The singleton application needs to store an asset that is accessible after the device is first unlocked or accessible when the device is unlocked. 7e41f4b71Sopenharmony_ci 8e41f4b71Sopenharmony_ciTo implement isolation and access control of the assets for singleton applications, ASSET provides a set of APIs for asset operations with the user space specified. These APIs are available only for system applications. 9e41f4b71Sopenharmony_ci 10e41f4b71Sopenharmony_ci## Constraints 11e41f4b71Sopenharmony_ci 12e41f4b71Sopenharmony_ciThe caller must have the ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS permission. 13e41f4b71Sopenharmony_ci 14e41f4b71Sopenharmony_ciFor details about how to request the permission, see [Requesting Permissions for system_basic Applications](../AccessToken/determine-application-mode.md#requesting-permissions-for-system_basic-applications). 15e41f4b71Sopenharmony_ci 16e41f4b71Sopenharmony_ci## Available APIs 17e41f4b71Sopenharmony_ci 18e41f4b71Sopenharmony_ciThe following table describes the APIs. 19e41f4b71Sopenharmony_ci 20e41f4b71Sopenharmony_ci| API| Description| API with User Space Not Specified<br> | 21e41f4b71Sopenharmony_ci| -------- | -------- | ----------| 22e41f4b71Sopenharmony_ci| [addAsUser](../../reference/apis-asset-store-kit/js-apis-asset-sys.md#assetaddasuser) | Adds an asset to the specified user space. This API uses a promise to return the result. | [add](asset-js-add.md) | 23e41f4b71Sopenharmony_ci| [removeAsUser](../../reference/apis-asset-store-kit/js-apis-asset-sys.md#assetremoveasuser) | Removes one or more assets from the specified user space. This API uses a promise to return the result. | [remove](asset-js-remove.md) | 24e41f4b71Sopenharmony_ci| [updateAsUser](../../reference/apis-asset-store-kit/js-apis-asset-sys.md#assetupdateasuser) | Updates an asset in the specified user space. This API uses a promise to return the result. | [update](asset-js-update.md) | 25e41f4b71Sopenharmony_ci| [preQueryAsUser](../../reference/apis-asset-store-kit/js-apis-asset-sys.md#assetprequeryasuser) | Performs preprocessing for the asset query in the specified user space. This API is used when user authentication is required for the access to the asset. This API must be used with [queryAsUser](../../reference/apis-asset-store-kit/js-apis-asset-sys.md#assetqueryasuser) and [postQueryAsUser](../../reference/apis-asset-store-kit/js-apis-asset-sys.md#assetpostqueryasuser) together. This API uses a promise to return the result. | [preQuery](asset-js-query-auth.md) | 26e41f4b71Sopenharmony_ci| [queryAsUser](../../reference/apis-asset-store-kit/js-apis-asset-sys.md#assetqueryasuser) | Queries one or more assets in the specified user space. If user authentication is required before accessing the asset, call [preQueryAsUser](../../reference/apis-asset-store-kit/js-apis-asset-sys.md#assetprequeryasuser) before this API and call [postQueryAsUser](../../reference/apis-asset-store-kit/js-apis-asset-sys.md#assetpostqueryasuser) after this API. This API uses a promise to return the result. | [query](asset-js-query-auth.md) if user authentication is required before the asset is accessed.<br>[query](asset-js-query.md) if the asset can be accessed without user authentication. | 27e41f4b71Sopenharmony_ci| [postQueryAsUser](../../reference/apis-asset-store-kit/js-apis-asset-sys.md#assetpostqueryasuser) | Performs postprocessing for the asset query in the specified user space. This API is used when user authentication is required for the access to the asset. This API must be used with [preQueryAsUser](../../reference/apis-asset-store-kit/js-apis-asset-sys.md#assetprequeryasuser) together. This API uses a promise to return the result. | [postQuery](asset-js-query-auth.md) | 28