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.

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>