1# DataAbility Configuration 2 3 4## URI Introduction 5 6A 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: 7 8 9 10- **scheme**: name of the scheme used by the DataAbility. The value is fixed at **dataability**. 11 12- **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. 13 14- **path**: location of the specific resource to access. 15 16- **query**: query parameters. 17 18- **fragment**: subordinate resources to access. 19 20Example URIs: 21 22- Cross-device scenario: dataability://_device_id_/_com.domainname.dataability.persondata_/_person_/_10_ 23 24- Local device scenario: dataability:///_com.domainname.dataability.persondata_/_person_/_1_ 25 26> **NOTE** 27> 28> In the case of local-device communication, **device_id** is empty, and therefore, there are three slashes (/) after **dataability:**. 29 30 31## Introduction to Certain Configuration Items 32 33Similar 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. 34 35**Table 1** DataAbility configuration items 36 37| Name| Description| 38| -------- | -------- | 39| "name" | Ability name.| 40| "type" | Type of the ability. The value **data** indicates a DataAbility.| 41| "uri" | URI used for communication.| 42| "visible" | Whether the ability is visible to other applications. Data sharing is allowed only when the value is **true**.| 43 44The following is an example **config.json** file: 45 46 47```json 48"abilities": [ 49 ... 50 { 51 "name": ".DataAbility", 52 "srcLanguage": "ets", 53 "srcPath": "DataAbility", 54 "icon": "$media:icon", 55 "description": "$string:DataAbility_desc", 56 "type": "data", 57 "visible": true, 58 "uri": "dataability://com.samples.famodelabilitydevelop.DataAbility", 59 "readPermission": "ohos.permission.READ_CONTACTS", 60 "writePermission": "ohos.permission.WRITE_CONTACTS" 61 }, 62 ... 63] 64``` 65 66For details about the configuration items, see [Internal Structure of module](../quick-start/module-structure.md). 67