1# Performing Asset Operations in Specified User Space (for System Applications Only)
2
3For 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:
4
51. The singleton application needs to store, access, and destroy assets for multiple active users.
62. The singleton application needs to store an asset that is accessible after the device is first unlocked or accessible when the device is unlocked.
7
8To 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.
9
10## Constraints
11
12The caller must have the ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS permission.
13
14For 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).
15
16## Available APIs
17
18The following table describes the APIs.
19
20| API| Description| API with User Space Not Specified<br> |
21| -------- | -------- | ----------|
22| [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)             |
23| [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)             |
24| [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)             |
25| [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)             |
26| [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.           |
27| [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