5. RESTful API Guide
Access Control Plus offers increased control and flexibility through the support of a RESTful (Representational State Transfer) API for accessing a set of resources through a fixed set of operations.
- All calls use the base URI:
http(s)://<server-host>:8082/api/<resource>
- The Internet media type of the data supported by the web service is application/xml.
- The API is hypertext driven, using the following HTTP methods:
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 |
Online documentation
You can review a copy of the bundled API documenation. This documentation is taken straight from a live installation. Given that the documentation is automatically generated, it frequently links to local files and resources that will not be available here.
API Documentation is still in development:
Please be aware that the API documentation remains incomplete and requires further refinement in terms of available endpoints. Currently the documenation includes automatically generated endpoints that are not valid for their corresponding classes.
GeneratorResource
GeneratorResources endpoints should only include:
GET /generator/serialnumber, PUT /generator/resetserialnumber, PUT /generator/generatenow
Notifications
Notification Auxiliary Resources endpoints should only include:
GET /notifications/aux PUT /notifications/aux GET /notification/channel/{channelName}/gateways
Myself
Myself calls to myself should not be used.
Examples
Get Repository Information:
http://10.0.100.125:8082/api/repository/search?filesystemPath=/Users/<username>/Repositories/<repo-name>
http://10.0.100.125:8082/api/repository/0a00409e-5d64-4e64-8eb8-d325d62a9beb/replicationGroup newReplicationGroupId = 1a015b69-8bee-11e2-a13e-087db5080829
POST command to add a repo to a replication group:
Add apache-svn password generator to repo template:
curl -u username:password -X POST -d http://10.0.100.125:8082/api/repositorytemplates/{repotemplateid}/generatorassignments
<generatorassignment> <generatorId>apache-passwd</generatorId> <name>Lise1</name> <description>Lise Description</description> <generatorParameters> <entry> <key>target_location</key> <value>/home/apache/svn.passwd</value> </entry> </generatorParameters> <id>8b80b2e7-69f9-40c0-ac4a-facda26fe579</id> </generatorassignment>
curl -u username:password -X POST -d "newReplicationGroupId=1a015b69-8bee-11e2-a13e-087db5080829" http://10.0.100.125:8082/api/repository/0a00409e-5d64-4e64-8eb8-d325d62a9beb/replicationGroup
Take repository "Repo16" out of the global Read-only state:
http://10.0.100.117:8082/api/repository/65753499-098c-45cc-a243-d2eca54a988c/globalReadOnly <RepositoryAPIDTO> <FSPath>/opt/SVN/Repo16</FSPath> <globalReadOnly>false</globalReadOnly> <isLocal>false</isLocal> <localReadOnly>false</localReadOnly> <name>Repo0</name> <repositoryIdentity>65753499-098c-45cc-a243-d2eca54a988c</repositoryIdentity> <revisionNumber>0</revisionNumber> </RepositoryAPIDTO>
Copyright © 2010-2014 WANdisco plc.
All Rights Reserved
This product is protected by copyright and distributed under
licenses restricting copying, distribution and decompilation.
Access Control Plus
Last doc build: 17:35 09 May 2014