1e41f4b71Sopenharmony_ci# DataAbility Configuration
2e41f4b71Sopenharmony_ci
3e41f4b71Sopenharmony_ci
4e41f4b71Sopenharmony_ci## URI Introduction
5e41f4b71Sopenharmony_ci
6e41f4b71Sopenharmony_ciA Uniform Resource Identifier (URI) is used to identify a specific data item, such as a table in the database or a file on the disk. URIs used comply with the commonly used URI standard. A URI consists of the components:
7e41f4b71Sopenharmony_ci
8e41f4b71Sopenharmony_ci![fa-dataability-uri](figures/fa-dataability-uri.png)
9e41f4b71Sopenharmony_ci
10e41f4b71Sopenharmony_ci- **scheme**: name of the scheme used by the DataAbility. The value is fixed at **dataability**.
11e41f4b71Sopenharmony_ci
12e41f4b71Sopenharmony_ci- **authority**: device ID. To access data on a remote device, set this component to the ID of the remote device. To access data on the local device, leave this component empty.
13e41f4b71Sopenharmony_ci
14e41f4b71Sopenharmony_ci- **path**: location of the specific resource to access.
15e41f4b71Sopenharmony_ci
16e41f4b71Sopenharmony_ci- **query**: query parameters.
17e41f4b71Sopenharmony_ci
18e41f4b71Sopenharmony_ci- **fragment**: subordinate resources to access.
19e41f4b71Sopenharmony_ci
20e41f4b71Sopenharmony_ciExample URIs:
21e41f4b71Sopenharmony_ci
22e41f4b71Sopenharmony_ci- Cross-device scenario: dataability://_device_id_/_com.domainname.dataability.persondata_/_person_/_10_
23e41f4b71Sopenharmony_ci
24e41f4b71Sopenharmony_ci- Local device scenario: dataability:///_com.domainname.dataability.persondata_/_person_/_1_
25e41f4b71Sopenharmony_ci
26e41f4b71Sopenharmony_ci> **NOTE**
27e41f4b71Sopenharmony_ci>
28e41f4b71Sopenharmony_ci> In the case of local-device communication, **device_id** is empty, and therefore, there are three slashes (/) after **dataability:**.
29e41f4b71Sopenharmony_ci
30e41f4b71Sopenharmony_ci
31e41f4b71Sopenharmony_ci## Introduction to Certain Configuration Items
32e41f4b71Sopenharmony_ci
33e41f4b71Sopenharmony_ciSimilar to a PageAbility, a DataAbility is configured in **abilities** under **module** of the **config.json** file. The difference between a DataAbility and PageAbility lies in the **type** and **uri** fields.
34e41f4b71Sopenharmony_ci
35e41f4b71Sopenharmony_ci**Table 1** DataAbility configuration items
36e41f4b71Sopenharmony_ci
37e41f4b71Sopenharmony_ci| Name| Description|
38e41f4b71Sopenharmony_ci| -------- | -------- |
39e41f4b71Sopenharmony_ci| "name" | Ability name.|
40e41f4b71Sopenharmony_ci| "type" | Type of the ability. The value **data** indicates a DataAbility.|
41e41f4b71Sopenharmony_ci| "uri" | URI used for communication.|
42e41f4b71Sopenharmony_ci| "visible" | Whether the ability is visible to other applications. Data sharing is allowed only when the value is **true**.|
43e41f4b71Sopenharmony_ci
44e41f4b71Sopenharmony_ciThe following is an example **config.json** file:
45e41f4b71Sopenharmony_ci
46e41f4b71Sopenharmony_ci
47e41f4b71Sopenharmony_ci```json
48e41f4b71Sopenharmony_ci"abilities": [
49e41f4b71Sopenharmony_ci  ...
50e41f4b71Sopenharmony_ci  {
51e41f4b71Sopenharmony_ci    "name": ".DataAbility",
52e41f4b71Sopenharmony_ci    "srcLanguage": "ets",
53e41f4b71Sopenharmony_ci    "srcPath": "DataAbility",
54e41f4b71Sopenharmony_ci    "icon": "$media:icon",
55e41f4b71Sopenharmony_ci    "description": "$string:DataAbility_desc",
56e41f4b71Sopenharmony_ci    "type": "data",
57e41f4b71Sopenharmony_ci    "visible": true,
58e41f4b71Sopenharmony_ci    "uri": "dataability://com.samples.famodelabilitydevelop.DataAbility",
59e41f4b71Sopenharmony_ci    "readPermission": "ohos.permission.READ_CONTACTS",
60e41f4b71Sopenharmony_ci    "writePermission": "ohos.permission.WRITE_CONTACTS"
61e41f4b71Sopenharmony_ci  },
62e41f4b71Sopenharmony_ci  ...
63e41f4b71Sopenharmony_ci]
64e41f4b71Sopenharmony_ci```
65e41f4b71Sopenharmony_ci
66e41f4b71Sopenharmony_ciFor details about the configuration items, see [Internal Structure of module](../quick-start/module-structure.md).
67