Hi Nickolay,
I gues this is what you where looking for:
mleske$ curl -i -u admin:admin -X POST -T device.xml http://127.0.0.1:8080/api/config/devices
HTTP/1.1 100 Continue
Server:
Allow: GET, POST, OPTIONS, HEAD
Content-Length: 0
HTTP/1.1 201 Created
Server:
Location: http://127.0.0.1:8080/api/config/devices/device/x2
Date: Thu, 25 Jun 2015 21:04:02 GMT
Allow: GET, POST, OPTIONS, HEAD
Last-Modified: Thu, 25 Jun 2015 21:04:02 GMT
Cache-Control: private, no-cache, must-revalidate, proxy-revalidate
Etag: 1435-266242-872900
Content-Length: 0
Content-Type: text/html
Pragma: no-cache
mleske$ cat device.xml
<device>
<name>x2</name>
<address>127.0.0.1</address>
<port>10030</port>
<ssh>
<host-key>
<algorithm>ssh-dss</algorithm>
<key-data>.......</key-data>
</host-key>
</ssh>
<state>
<admin-state>unlocked</admin-state>
</state>
<authgroup>default</authgroup>
<device-type>
<cli>
<ned-id xmlns:cisco-ios-xr-id="http://tail-f.com/ned/cisco-ios-xr-id">cisco-ios-xr-id:cisco-ios-xr</ned-id>
</cli>
</device-type>
</device>