Access Control offers increased control and flexibility through the support of a RESTful API, delivered over HTTP(S) via the same port that is used for the admin console (6444 by default).
A RESTful API web service uses HTTP and the principles of REST to facilitate interaction between client and server, running with the following principles:
http(s)://<server-host>:<server-port>/rest/v1.0/<resource>
Type | Action |
POST | to create a resource on the server |
GET | to retrieve a resource from the server |
PUT | to modify the state of a resource |
DELETE | to remove a resource |
In general body requests are used for complex constructions and the inclusion of data (XML) whilst the query parameters that are applied directly to resources (in the URL) are for simple flags and IDs. Below are some examples of how you might structure various types of commands:
Change the password for user "bfoster" to "newpassword":
curl -X POST -d "password=newpassword&authusername=admin&authpassword =admin"http://10.2.5.73:6444/rest/v1.0/users/bfoster?action=passwordUpdate
Create user "aaxley" with password "changepassword", email "db@thefirm.com" and System Admin Status set to "false":
curl -X POST -d "fullname=Abi%20Axley&password=changepassword&email=db@thefirm.com&isSysAdmin=false&authusername=admin&authpassword=admin" http://10.2.5.73:6444/rest/v1.0/users/aaxley
Create a team called 'TEAM_NAME'
curl -X POST -d "authusername=admin&authpassword=r3pg3RW343&action=create" http://127.0.0.1:6444/rest/v1.0/teams/TEAM_NAMEIn order to set attributes ON the team you need to make a second call. It's not possible to set attributes during the team's creation. Here is how the call might be formed:
curl -X POST -d "authusername=admin&authpassword=r3pg3RW343&ldapAuthOrder=100&ldapFilter=memberOf=CN=Some_Team,OU=Groups, OU=Computer,DC=net,DC=domain,DC=com&managingNodeName=svn-lab,DC=com&managingNodeName=[nodename]" http://127.0.0.1:6444/rest/v1.0/teams/TEST_NAME?action=setLdapTeam
curl -X POST -d @/tmp/test23-rule.txt http://127.0.0.1:6444/rest/v1.0/teams/TEST23/teamrules/test23-RW?authusername=admin&authpassword=r3pg3RW343The file "@/tmp/test23-rule.txt" contains the rule expressed in xml. Notice how the username and password parameters now move to being a URL query.
curl -X POST -d "authusername=admin&authpassword=password&action=create&fullname=Test RestAPI1&password =letmeout&email=testrest1@wandisco.com&isSysAdmin=false&includePendingChanges=false"http://10.2.99.3:6544/rest/v1.0/users/TestRestUser1
curl -X POST -d "authusername=admin&authpassword=password&userToUpdate=TestRestUser1&includePendingChanges =false" http://10.2.99.3:6544/rest/v1.0/teams/Support?action=addUserToTeamYou'll notice that here the action parameter moves to the URL.
Delete user 'TestRestUser2' using the credentials username 'admin' and password 'password'
curl -X DELETE "http://10.2.99.3:6544/rest/v1.0/users/TestRestUser2?authusername=admin&authpassword=password"
If you enable the Batch Access Updates feature, then Access Control changes that would trigger the regeneration of either the SVN password file or the authz file are actioned in batches, once per hour (the frequency can ber changed via the admin console).
In this situation you may need to modify API GET queries so that they ignore Access Control objects (users,team,rules) that are not yet enforced (because they're waiting to run in the next batch...)
Use the parameter "includePendingChanges=true|false"
e.g.
/rest/v1.0/users/<username>?authusername=<adminuser>&authpassword=<adminpassword>&includePendingChanges=falseBy default the API will treat this setting as "true" and will include objects that are not currently enforced.
Description: Initiate a synchronized stop. This action applies only when Access Control is running as part of WANdisco's Subversion MultiSite. Read more about the Synchronized Stop.
parameters support multiple names
Lists of parameters can be specified in the request by using the parameter name multiple times e.g. members=node1&members=node2&members=node3.
curl -X POST -d "authusername=<username>&authpassword=<password>" http://<nodeIP>:6444/rest/v1.0/sync/stop
Description: Restart replication after the completion of a synchronized stop. This action applies when Access Control is running as part of WANdisco's Subversion MultiSite. Read more about the Resuming from a Synchronized Stop.
http(s)://<server-host>:<server-port>/rest/v1.0/sync/resume
curl -X POST -d "authusername=<username>&authpassword=<password>" http://<nodeIP>:6444/rest/v1.0/sync/resume
Description: Get the current status of the syncronization between MultiSite nodes. This command is applicable when Access Control is running with WANdisco's Subversion MultiSite.
http(s)://<server-host>:<server-port>/rest/v1.0/sync/status
curl http://[IP ADDRESS]:6444/rest/v1.0/sync/status?token=$1 -s)
Description: Switch the "Use LDAP for login authentication" setting to either on (true) or off (false).
http(s)://<server-host>:<server-port>/rest/v1.0/system/toggleprerepldap
curl -X POST -d "authusername=<username>&authpassword=<password>&value=<true|false>" http://<nodeIP>:6444/rest/v1.0/system/toggleprerepldap
Description: This command toggles the use of LDAP authorities to authenticate administrators Switch the LDAP admin authentication state - setting it either on (true) or off (false).
Prequisite Must have a LDAP authority specified and must have at least one LDAP user with admin privileges.
http(s)://<server-host>:<server-port>/rest/v1.0/system/toggleldapadmin
curl -X POST -d "authusername=<LDAP username>&authpassword=<password>&value=<true|false>" http://<nodeIP>:6444/rest/v1.0/system/toggleldapadmin
Description: Get a selected Subversion user.
http(s)://<server-host>:<server-port>/rest/v1.0/users/{username}
curl "http://<nodeIP>:6444/rest/v1.0/users/<user>?authusername=<username>&authpassword=<password>"
Description: Get all Subversion user, lists all known users on that node.
http(s)://<server-host>:<server-port>/rest/v1.0/users
curl http://<nodeIP>:6444/rest/v1.0/users?authusername=<username>&authpassword=<password>
Description: Update a selected Subversion user.
http(s)://<server-host>:<server-port>/rest/v1.0/users/{username}
curl -X PUT -d "authusername=<username>&authpassword=<password>&password=<passwordToUpdate>&fullname=<fullnameToUpdate>&email=<emailToUpdate>" http://<nodeIP>:6444/rest/v1.0/users/<user>
Description: Delete a specified Subversion user.
http(s)://<server-host>:<server-port>/rest/v1.0/users/{username}
curl -X DELETE "http://<nodeIP>:6444/rest/v1.0/users/<user>?authusername=<username>&authpassword=<password>"
Description: Create a new Subversion user.
http(s)://<server-host>:<server-port>/rest/v1.0/users/{username}
curl -X POST -d "authusername=<username>&authpassword=<password>&password=<password>&fullname=<fullname>&email=<email>" http://<nodeIP>:6444/rest/v1.0/users/<user>
Description: Update a Subversion user's current password.
http(s)://<server-host>:<server-port>/rest/v1.0/users/{username}?action=passwordUpdate
curl -X POST -d "token=$1&password=newPassword" http://[IP Address]:[Port]/rest/v1.0/users/$USER?action=passwordUpdate
curl -X POST -d "authusername=<username>&authpassword=<password>&password=<newPassword>" http://<nodeIP>:6444/rest/v1.0/users/<user>?action=passwordUpdate
Description: Update a user's password, in an unencrypted form.
http(s)://<server-host>:<server-port>/rest/v1.0/users/{username}?action=passwordUpdateUnencrypted
curl -X POST -d "authusername=<username>&authpassword=<password>&password=<newPassword>" http://<nodeIP>:6444/rest/v1.0/users/<user>?action=passwordUpdateUnencrypted
Description: Toggle administrator permission for the specified user.
http(s)://<server-host>:<server-port>/rest/v1.0/users/{username}?action=permissionUpdate"
curl -X POST -d "authusername=<username>&authpassword=<password>&isSysAdmin=<true|false>" http://<nodeIP>:6444/rest/v1.0/users/<user>?action=permissionUpdate
Description: Enable a Subversion user who is currently in a disabled state.
http(s)://<server-host>:<server-port>/rest/v1.0/users/{username}?action=enable
curl -X POST -d "token=$1" http://$IP:6444/rest/v1.0/users/$USER?action=enable
curl -X POST -d "authusername=<username>&authpassword=<password>" http://<nodeIP>:6444/rest/v1.0/users/<user>?action=enable
Description: Disable a Subversion user, stopping them from accessing repository data.
http(s)://<server-host>:<server-port>/rest/v1.0/users/{username}?action=disable
curl -X POST -d "token=$1" http://$IP:6444/rest/v1.0/users/$USER?action=disable
curl -X POST -d "authusername=<username>&authpassword=<password>" http://<nodeIP>:6444/rest/v1.0/users/<user>?action=disable
Description: Replicate generic files (Authz files etc, not repository changes) to all nodes.
Prerequisite: The setting "Use generic file replication" in the System Settings page must to be enabled.
http(s)://<server-host>:<server-port>/rest/v1.0/filenotifier
curl "http://<nodeIP>:6444/rest/v1.0/filenotifier?authusername=<username>&authpassword=<password>&fileLocation=%2Fopt%2Fsvnauthfiles%2Fauthz.authz&fileDestination=%2Fopt%2Fsvnauthfiles%2Fauthz.authz.bak"
Description: Toggle the "Auto skip bypassable transactions" setting in the System Settings page.
http(s)://<server-host>:<server-port>/rest/v1.0/system/toggleautobypass
curl -X POST -d "authusername=<username>&authpassword=<password>&value=<true|false>" http://<nodeIP>:6444/rest/v1.0/system/toggleautobypass
Description: A call that allows the distinguish node to be changed:
http(s)://<server-host>:<server-port>/rest/v1.0/replication/changeDistinguishedNode
curl -X POST -d "authusername=<username>&authpassword=<password>&newdnip=<newNodeIP>" http://<nodeIP>:6444/rest/v1.0/replication/?action=changeDistinguishedNode
Description: Get all LDAP Authorities.
http(s)://<server-host>:<server-port>/rest/v1.0/ldapauthorities
curl "http://<nodeIP>:6444/rest/v1.0/ldapauthorities?authusername=<username>&authpassword=<password>
Description: Get a an LDAP Authority.
http(s)://<server-host>:<server-port>/rest/v1.0/ldapauthorities/{order}
curl "http://<nodeIP>:6444/rest/v1.0/ldapauthorities/<LdapOrder>?authusername=<username>&authpassword=<password>"
Description: Update a selected LDAP authority.
http(s)://<server-host>:<server-port>/rest/v1.0/ldapauthorities/{order}
curl -X PUT -d "authusername=<username>&authpassword=<password>&order=<newLdapOrder>&url=<newUrl>&bindDn=<newBindDN>&bindPass=<newBindPassword>&firstNameAttr=<newFirstNameAttribute>&lastNameAttr=<newLastNameAttribute>&emailAttr=<newEmailAttribute>" http://<nodeIP>:6444/rest/v1.0/ldapauthorities/<LdapOrder>
Description: Delete an LDAP authority.
http(s)://<server-host>:<server-port>/rest/v1.0/ldapauthorities/{order}
curl -X DELETE "http://<nodeIP>:6444/rest/v1.0/ldapauthorities/<LdapOrder>?authusername=<username>&authpassword=<password>
Description: Add an LDAP authority.
http(s)://<server-host>:<server-port>/rest/v1.0/ldapauthorities/{order}
curl -X POST -d "authusername=<username>&authpassword=<password>&order=<LdapOrder>&url=<newUrl>&bindDn=<newBindDN>&bindPass=<newBindPassword>&firstNameAttr=<newFirstNameAttribute>&lastNameAttr=<newLastNameAttribute>&emailAttr=<newEmailAttribute>" http://<nodeIP>:6444/rest/v1.0/ldapauthorities/<LdapOrder>
Description: API call to trigger a poll for changes on the LDAP service.
http(s)://<server-host>:<server-port>/rest/v1.0/ldapauthorities/pollLDAPAuthorities
curl -X POST -d "authusername=<username>&authpassword=<password>" http://<nodeIP>:6444/rest/v1.0/ldapauthorities/pollLDAPAuthorities
Description: API call to trigger a poll for changes on the LDAP service for a given team.
http(s)://<server-host>:6444/rest/v1.0/teams/<root-team>/subteam/<sub-team>/subteam/<target-team>?action=pollLdapTeam
curl -X POST -d "authusername=<username>&authpassword=<password>" http://<nodeIP>:6444/rest/v1.0/teams/<root-team>/subteam/<sub-team>/subteam/<target-team>?action=pollLdapTeam
Description: Get a repository.
http(s)://<server-host>:<server-port>/rest/v1.0/repos/{repo}
curl "http://<nodeIP>:6444/rest/v1.0/repos/<DAVLocation>?authusername=<username>&authpassword=<password>"
Description: Add a repository.
http(s)://<server-host>:<server-port>/rest/v1.0/repos/{repo}
curl -X POST -d "authusername=<username>&authpassword=<password>&davLocation=<DAVLocation>&directory=<pathOnFileSystem>&managePasswordFile=<true|false>&passwordFilePath=<passwordFilePath>" http://<nodeIP>:6444/rest/v1.0/repos/<DAVLocation>
curl -X POST -d "authusername=<username>&authpassword=<password>&davLocation=<DAVLocation>&directory=<pathOnFileSystem>&managePasswordFile=<true|false>&passwordFilePath=<passwordFilePath>&parentPath=true" http://<nodeIP>:6444/rest/v1.0/repos/<DAVLocation>
curl -X POST -d "authusername=<username>&authpassword=<password>&parentPathChild=true" http://<nodeIP>:6444/rest/v1.0/repos/<ChildDAVLocation>
Description: Update an existing repository.
http(s)://<server-host>:<server-port>/rest/v1.0/repos/{repo}
curl -X PUT -d "authusername=<username>&authpassword=<password>&davLocation=<newDAVLocation>&directory=<newDirectory>&managePasswordFile=<true|false>&passwordFilePath=<newPasswordFilePath>&preCommitHook=<newPreCommitHookLocation>&preLockHook=<newPreLockHookLocation>&preUnlockHook=<newPreUnlockHookLocation>" http://<nodeIP>:6444/rest/v1.0/repos/<DAVLocation>
Description: Delete a repository.
http(s)://<server-host>:<server-port>/rest/v1.0/repos/{repo}
curl -X DELETE "http://<nodeIP>:6444/rest/v1.0/repos/<DAVLocation>?authusername=<username>&authpassword=<password>"
Description: Update a repository hook script.
http(s)://<server-host>:<server-port>/rest/v1.0/repos/{repo}/hook
curl -X POST -d "authusername=<username>&authpassword=<password>&hookname=<pre-commit|pre-lock|pre-unlock>&action=<enable|disable>" http://<nodeIP>:6444/rest/v1.0/repos/<DAVLocation>/hook
Description: Use to get a list of all repositories and their current status.
http(s)://<server-host>:<server-port>/rest/v1.0/repos/
curl "http://<nodeIP>:6444/rest/v1.0/repos?authusername=<username>&authpassword=<password>"
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <repositoryRSDTOes> <repository> <childRepositories>repo1_pp</childRepositories> <childRepositories>repo2_pp</childRepositories> <childRepositories>repo3_pp</childRepositories> <davLocation>/svn</davLocation> <fileSystemLocation>/repos_pp</fileSystemLocation> <parentPath>true</parentPath> <status>Active</status> </repository> <repository> <davLocation>/svn/repo1_pp</davLocation> <fileSystemLocation>/repos_pp/repo1_pp</fileSystemLocation> <parentPath>false</parentPath> <status>Active</status> </repository> <repository> <davLocation>.........
Description: Get all Access Control teams.
http(s)://<server-host>:<server-port>/rest/v1.0/teams
curl "http://<nodeIP>:6444/rest/v1.0/teams?authusername=<username>&authpassword=<password>"
Description: Update an Access Control team.
http(s)://<server-host>:<server-port>/rest/v1.0/teams/{root-team}/subteam/{subteam1}/subteam/{target-team}
curl -X PUT -d "authusername=<username>&authpassword=<password>&newTeamDescription=<newDescription>&newTeamName=<newTeamName>" http://<nodeIP>:6444/rest/v1.0/teams/<teamName>
Description: Delete an Access Control team.
http(s)://<server-host>:<server-port>/rest/v1.0/teams/{root-team}/subteam/{subteam1}/subteam/{target-team}
curl -X DELETE http://<nodeIP>:6444/rest/v1.0/teams/<teamName>?authusername=<username>&authpassword=<password>
Description: Get an Access Control team.
http(s)://<server-host>:<server-port>/rest/v1.0/teams/{root-team}/subteam/{subteam1}/subteam/{target-team}
curl "http://<nodeIP>:6444/rest/v1.0/teams/<teamName>?authusername=<username>&authpassword=<password>"
Description: Create an Access Control team.
http(s)://<server-host>:<server-port>/rest/v1.0/teams/{root-team}/subteam/{subteam1}/subteam/{target-team}
curl -X POST -d "authusername=<username>&authpassword=<password>" http://<nodeIP>:6444/rest/v1.0/teams/<teamName>
Description: Set a team through LDAP.
http(s)://<server-host>:<server-port>/rest/v1.0/teams/{root-team}/subteam/{subteam1}/subteam/{target-team}
curl -X POST -d "authusername=<username>&authpassword=<password>&ldapAuthOrder=<LdapOrder>&LdapFilter=<LdapFilter>" http://<nodeIP>:6444/rest/v1.0/teams/TeamLdapManaged?action=setLdapTeam
Description: Disable a team through LDAP.
http(s)://<server-host>:<server-port>/rest/v1.0/teams/{root-team}/subteam/{subteam1}/subteam/{target-team}
curl -X POST -d "authusername=<username>&authpassword=<password>" http://<nodeIP>:6444/rest/v1.0/teams/TeamLdapManaged?action=disableLdapTeam
Description: Add a repository resource to an Access Control team.
http(s)://<server-host>:<server-port>/rest/v1.0/teams/{root-team}/subteam/{subteam1}/subteam/{target-team}?action=addResourceToTeam
curl -X POST -d "authusername=<username>&authpassword=<password>&resourceToUpdate=<DAVLocation>" http://<nodeIP>:6444/rest/v1.0/teams/<teamName>?action=addResourceToTeam
Description: Remove a repository resource from an Access Control team.
http(s)://<server-host>:<server-port>/rest/v1.0/teams/{root-team}/subteam/{subteam1}/subteam/{target-team}?action=removeResourceToTeam
curl -X POST -d "authusername=<username>&authpassword=<password>&resourceToUpdate=<DAVLocation>" http://<nodeIP>:6444/rest/v1.0/teams/<teamName>?action=removeResourceFromTeam
Description: Add a user to an Access Control teams.
http(s)://<server-host>:<server-port>/rest/v1.0/teams/{root-team}/subteam/{subteam1}/subteam/{target-team}?action=addUserToTeam
curl -X POST -d "authusername=<username>&authpassword=<password>&userToUpdate=<user>" http://<nodeIP>:6444/rest/v1.0/teams/<teamName>?action=addUserToTeam
Description: Remove a user from an Access Control team.
http(s)://<server-host>:<server-port>/rest/v1.0/teams/{root-team}/subteam/{subteam1}/subteam/{target-team}?action=removeUserFromTeam
curl -X POST -d "authusername=<username>&authpassword=<password>&userToUpdate=<user>" http://<nodeIP>:6444/rest/v1.0/teams/<teamName>?action=removeUserFromTeam
Description: Make an existing user into a team leader.
http(s)://<server-host>:<server-port>/rest/v1.0/teams/{root-team}/subteam/{subteam1}/subteam/{target-team}?action=promoteUserToTeamLeader
curl -X POST -d "authusername=<username>&authpassword=<password>&userToUpdate=<user>" http://<nodeIP>:6444/rest/v1.0/teams/<teamName>?action=promoteUserToTeamLeader
Description: Remove team leader privileges from a user.
http(s)://<server-host>:<server-port>/rest/v1.0/teams/{root-team}/subteam/{subteam1}/subteam/{target-team}?action=demoteUserFromTeamLeader
curl -X POST -d "authusername=<username>&authpassword=<password>&userToUpdate=<user>" http://<nodeIP>:6444/rest/v1.0/teams/<teamName>?action=demoteUserFromTeamLeader
Description: Assign Access Control system administrator permission to a user.
http(s)://<server-host>:<server-port>/rest/v1.0/teams/{root-team}/subteam/{subteam1}/subteam/{target-team}? action=grantAdminPermission
curl -X POST -d "authusername=<username>&authpassword=<password>&userToUpdate=<user>&permission=<createSubteams|addResources|createUsers|disableUsers|modifyUsers|modifyRules>" http://<nodeIP>:6444/rest/v1.0/teams/<teamName>?action=grantAdminPermission
Description: Remove Access Control system administrator permission.
http(s)://<server-host>:<server-port>/rest/v1.0/teams/{root-team}/subteam/{subteam1}/subteam/{target-team}
curl -X POST -d "authusername=<username>&authpassword=<password>&userToUpdate=<user>&permission=< createSubteams|addResources|createUsers|disableUsers|modifyUsers|modifyRules>" http://<nodeIP>:6444/rest/v1.0/teams/<teamName>?action=removeAdminPermission
http(s)://<server-host>:<server-port>/rest/v1.0/teams/{root-team}/subteam/{subteam1}/subteam/{target-team}/teamrules
curl "http://<nodeIP>:6444/rest/v1.0/teams/<teamName>/teamrules?authusername=<username>&authpassword=<password>"
Description: Get an Access Control team rule.
http(s)://<server-host>:<server-port>/rest/v1.0/teams/{root-team}/subteam/{subteam1}/subteam/{target-team}/teamrules/{rule-name}
curl "http://<nodeIP>:6444/rest/v1.0/teams/<teamName>/teamrules/<ruleName>?authusername=<username>&authpassword=<password>"
Description: Delete an Access Control team rule.
http(s)://<server-host>:<server-port>/rest/v1.0/teams/{root-team}/subteam/{subteam1}/subteam/{target-team}/teamrules/{rule-name}
curl -X DELETE "http://<nodeIP>:6444/rest/v1.0/teams/<teamName>/teamrules/<ruleName>?authusername=<username>&authpassword=<password>"
Description: Update an Access Control team rule.
http(s)://<server-host>:<server-port>/rest/v1.0/teams/{root-team}/subteam/{subteam1}/subteam/{target-team}/teamrules/{rule-name}
<rule> <id>{ruleID}</id> <rule-name>{ruleName}</rule-name> <team-name>{slash-delimited-team-hierarchy}</team-name> <ip-pattern>{IPFiltering}</ip-pattern> <ip-pattern-option>NoRestrictions|IPList</ip-pattern-option> <disabled>true|false</disabled> <apply-to-all-users>true|false</apply-to-all-users> <users> <user>{username}</user> </users> <resource-permissions> <resourcePermissions> <pathName>{path}</pathName> <permission>D|RO|RW</permission> </resourcePermissions> </resource-permissions> </rule>
curl -H "Content-Type: application/xml" -X PUT -d "<rule><id> {RULEID}</id><rule-name>{RULENAME}</rule-name><team-name>{TEAMNAME}</team-name><ip-pattern></ip-pattern><ip-pattern-option>NoRestrictions</ip-pattern-option><disabled>false</disabled><apply-to-all-users>true</apply-to-all-users><resource-permissions><resourcePermissions><pathName>{DAVLOCATION}</pathName><permission>{RW|RO|D}</permission></resourcePermissions></resource-permissions></rule>" http://<nodeIP>:6444/rest/v1.0/teams/<teamName>/teamrules/<ruleName>?authusername=<username>&authpassword=<password>Example: update a rule for specific user(s)
curl -H "Content-Type: application/xml" -X PUT -d "<rule><id>{RULEID} </id><rule-name> {RULENAME}</rule-name><team-name>{TEAMNAME}</team-name><ip-pattern></ip-pattern><ip-pattern-option>NoRestrictions</ip-pattern-option><disabled>false</disabled><apply-to-all-users>false</apply-to-all-users><users><user>{USERNAME}</user></users><resource-permissions><resourcePermissions><pathName>{DAVLOCATION}</pathName><permission>{RW|RO|D}</permission></resourcePermissions></resource-permissions></rule>" http://<nodeIP>:6444/rest/v1.0/teams/<teamName>/teamrules/<ruleName>?authusername=<username>&authpassword=<password>
Description: Create an Access Control team rule.
http(s)://<server-host>:<server-port>/rest/v1.0/teams/{root-team}/subteam/{subteam1}/subteam/{target-team}/teamrules/{rule-name}
<rule> <rule-name>{ruleName}</rule-name> <team-name>{slash-delimited-team-hierarchy}</team-name> <ip-pattern>{IPFiltering}</ip-pattern> <ip-pattern-option>NoRestrictions|IPList</ip-pattern-option> <disabled>true|false</disabled> <apply-to-all-users>true|false</apply-to-all-users> <users> <user>{username}</user> </users> <resource-permissions> <resourcePermissions> <pathName>{path}</pathName> <permission>D|RO|RW</permission> </resourcePermissions> </resource-permissions> </rule>
curl -H "Content-Type: application/xml" -X POST -d "<rule><id>{RULEID}</id><rule-name>{RULENAME} </rule-name><team-name> {TEAMNAME}</team-name><ip-pattern></ip-pattern><ip-pattern-option>NoRestrictions</ip-pattern-option><disabled>false</disabled><apply-to-all-users>true</apply-to-all-users><resource-permissions><resourcePermissions><pathName>{DAVLOCATION}</pathName><permission>{RW|RO|D}</permission></resourcePermissions></resource-permissions></rule>" http://<nodeIP>:6444/rest/v1.0/teams/<teamName>/teamrules/<ruleName>?authusername=<username>&authpassword=<password>Example: create a team for specific user(s)
curl -H "Content-Type: application/xml" -X POST -d "<rule><id>{RULEID}</id><rule-name>{RULENAME}</rule-name><team-name>{TEAMNAME} </team-name><ip-pattern></ip-pattern><ip-pattern-option>NoRestrictions</ip-pattern-option><disabled>false</disabled><apply-to-all-users>false</apply-to-all-users><users><user> {USERNAME} </user></users><resource-permissions><resourcePermissions><pathName> {DAVLOCATION} </pathName><permission> {RW|RO|D} </permission></resourcePermissions></resource-permissions></rule>" http://<nodeIP>:6444/rest/v1.0/teams/<teamName>/teamrules/<ruleName>?authusername=<username>&authpassword=<password>
Description: Return the total number of pending transactions.
http(s)://<server-host>:<server-port>/rest/v1.0/replication/pendingtransactions
curl http://<nodeIP>:6444/rest/v1.0/replication/pendingtransactions?authusername=<username>&authpassword=<password>
Description: A call that allows the distinguish node to be changed:
http(s)://<server-host>:<server-port>/rest/v1.0/replication/changeDistinguishedNode
curl -X POST -d "authusername=<username>&authpassword=<password>&newdnip=<newNodeIP>" http://<nodeIP>:6444/rest/v1.0/replication/?action=changeDistinguishedNode
Copyright © 2010-2012 WANdisco
All Rights Reserved
This product is protected by copyright and distributed under
licenses restricting copying, distribution and decompilation.