# Regarding URL capability

**URL:** <https://dmap-community.ductus.global/t/regarding-url-capability/1633>\
**Category:** NETCONF\
**Created:** [November 7, 2017, 6:38am UTC](https://dmap-community.ductus.global/t/regarding-url-capability/1633 "2017-11-07T06:38:01Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Hatim5253](https://avatars.discourse-cdn.com/v4/letter/h/7993a0/32.png) [@Hatim5253](https://dmap-community.ductus.global/u/Hatim5253)\
**Post date:** [November 7, 2017, 6:38am UTC](https://dmap-community.ductus.global/t/regarding-url-capability/1633/1 "2017-11-07T06:38:01Z")

</div>

hi,

i want to delete my candidate datastore using delete-config by providing URL.

So what must be the content of the XML file that is placed in the remote location??

---

<div class="post-metadata">

**Author:** ![cohult](https://yyz2.discourse-cdn.com/flex010/user_avatar/dmap-community.ductus.global/cohult/32/221_2.png) [@cohult](https://dmap-community.ductus.global/u/cohult)\
**Post date:** [November 7, 2017, 11:12am UTC](https://dmap-community.ductus.global/t/regarding-url-capability/1633/2 "2017-11-07T11:12:58Z")

</div>

Hi,  
You mean like in this topic?

> [@URL Capability examples](http://discuss.tail-f.com/t/url-capability-examples/1533/2):
>
> Not sure how this relates to what is configured on your device, but you can try something like this: confd.conf example :url setting: ... \</capabilities\> ... \<url\> \<enabled\>true\</enabled\> \<file\> \<enabled\>true\</enabled\> \<rootDir\>/my/dir\</rootDir\> \</file\> \<ftp\> \<enabled\>true\</enabled\> \</ftp\> \<sftp\> \<enabled\>true\</enabled\> \</sftp\> \</url\> \</capabilities\> ... edit-config from file to running: \<edit-config\> \<target\> \<running/\> \</targ…

The XML file contain the config that you want to delete.

---

<div class="post-metadata">

**Author:** ![Hatim5253](https://avatars.discourse-cdn.com/v4/letter/h/7993a0/32.png) [@Hatim5253](https://dmap-community.ductus.global/u/Hatim5253)\
**Post date:** [November 7, 2017, 11:27am UTC](https://dmap-community.ductus.global/t/regarding-url-capability/1633/3 "2017-11-07T11:27:41Z")

</div>

hi cohult,

First of all, delete-config operation deletes the entire datastore or we can delete specific config as well???  
Because as per RFC, it mentions entire datastore:

RFC 6241  
7.4.

Description: Delete a configuration datastore. The   
configuration datastore cannot be deleted.

---

<div class="post-metadata">

**Author:** ![cohult](https://yyz2.discourse-cdn.com/flex010/user_avatar/dmap-community.ductus.global/cohult/32/221_2.png) [@cohult](https://dmap-community.ductus.global/u/cohult)\
**Post date:** [November 7, 2017, 1:50pm UTC](https://dmap-community.ductus.global/t/regarding-url-capability/1633/4 "2017-11-07T13:50:16Z")

</div>

You will with the below commands delete the config file itself , here the “my-config.xml” file, not the ConfD CDB datastore config:

delete-config file:

```xml
<delete-config>
  <target>
    <url>file:///my-config.xml</url>
  </target>
</delete-config>

```

delete-config ftp server file:

```xml
<delete-config>
  <target>
    <url>ftp://myusr:mypass@localhost/my-config.xml</url>
  </target>
</delete-config>

```

---

<div class="post-metadata">

**Author:** ![cohult](https://yyz2.discourse-cdn.com/flex010/user_avatar/dmap-community.ductus.global/cohult/32/221_2.png) [@cohult](https://dmap-community.ductus.global/u/cohult)\
**Post date:** [November 7, 2017, 2:10pm UTC](https://dmap-community.ductus.global/t/regarding-url-capability/1633/5 "2017-11-07T14:10:02Z")

</div>

> i want to delete my candidate datastore using delete-config by providing URL.

From the ConfD UG:

> For the `<delete-config>` operation specified in RFC 4741 / RFC 6241, only `<url>` with scheme “file” is supported for the `<target>` parameter - i.e. no data stores can be deleted. The concept of deleting a data store is not well defined, and at odds with the transaction-based configuration management of ConfD. To delete the entire contents of a data store, with full transactional support, a `<copy-config>` with an empty `<config/>` element for the `<source>` parameter can be used.

So you want to do something like this:

```xml
<copy-config>
  <target>
    <candidate/>
  </target>
  <source>
    <config/>  
  </source>
</copy-config>

```
