Subversion Edge Repository Template API

Use this API to get a list of available repository templates, post a new template, or update an existing template.

This API is available with Subversion Edge 2.3.0 (and later).
Note: The following examples show request bodies and responses in JSON format, but XML is equally valid.

GET

GET fetches a list of templates. When creating a repository, you can apply a template by using a template ID from this list.
HTTP method and URL
GET /csvn/api/1/template?format=json&showInactive=true
Parameters
showInactive
Optional. Provide this parameter to request all templates, including inactive or hidden ones.
Authentication / Authorization Repository administrators (ROLE_ADMIN_REPO) and the super user (ROLE_ADMIN)
Response GET retrieves the list of repository templates in the Subversion Edge instance, providing the ID, name, and description for each. The list of active templates is returned; to have hidden templates returned as well, set the showInactive parameter in the query string to true. If the showInactive parameter is set to true, the results indicate whether each template is active or not.

Example:

PUT

HTTP method and URL
PUT /csvn/api/1/template/2?format=json
Authentication / Authorization Repository administrators (ROLE_ADMIN_REPO) and the super user (ROLE_ADMIN)
Response PUT returns the template ID and name.

Example:

POST

When posting a new template, or updating an existing template, the request body is presumed to consist of a dump file (application/octet-stream) or a repository archive (application/zip). You can provide name and active query parameters for POST operations.
HTTP method and URL
POST /csvn/api/1/template?format=json&name=My%20New%20Template&active=true
Authentication / Authorization Repository administrators (ROLE_ADMIN_REPO) and the super user (ROLE_ADMIN)
Response POST returns the template ID and name.

Example: