The following command will update a group (group ID = 1) with the users listed in newgroup.xml
curl -u admin:password -H "Content-Type: application/xml" -T newgroup.xml -i http://192.168.168.110/@api/deki/groups/1/users
We want to modify the group (group ID = 2) created here. Two users will be added, IDs 2 and 6, and user, ID 1, will be removed.
Content-Type: application/xml
<users> <user id="5"/> <user id="2"/> <user id="4"/> <user id="3"/> <user id="6"/> </users>
curl -u admin:password -H "Content-Type: application/xml" -T fabfour.xml -i http://192.168.168.110/@api/deki/groups/2/users
HTTP/1.1 200 OK Date: Thu, 14 Jan 2010 19:03:47 GMT Server: Dream-HTTPAPI/1.7.2.17433 X-Deki-Site: id="default" Content-Type: application/xml; charset=utf-8 Content-Length: 495 Via: 1.1 dekiwiki
Content-Type: application/xml
<?xml version="1.0"?>
<group id="2" href="http://192.168.168.110/@api/deki/groups/2">
<groupname>the fab four</groupname>
<service.authentication id="1" href="http://192.168.168.110/@api/deki/site/services/1"/>
<users count="5" href="http://192.168.168.110/@api/deki/groups/2/users"/>
<permissions.group>
<operations mask="1343">LOGIN,BROWSE,READ,SUBSCRIBE,UPDATE,CREATE,DELETE,CHANGEPERMISSIONS</operations>
<role id="4" href="http://192.168.168.110/@api/deki/site/roles/4">Contributor</role>
</permissions.group>
</group>
| Images 0 | ||
|---|---|---|
| No images to display in the gallery. |
Copyright © 2011 MindTouch, Inc. Powered by