Subversion Commits API

Commit lifecycle — create transaction, stage changes, finalize

OpenAPI Specification

svn-commits-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: SVN WebDAV HTTP Commits API
  description: Apache Subversion repository access via the WebDAV/DeltaV protocol served by mod_dav_svn. Clients perform version control operations — checkout, update, commit, log, diff, copy, delete — over standard HTTP/HTTPS using a combination of WebDAV methods (PROPFIND, REPORT, MKACTIVITY, CHECKOUT, MERGE) and standard HTTP methods (GET, PUT, DELETE, COPY, OPTIONS).
  version: 1.0.0
  contact:
    name: Apache Subversion
    url: https://subversion.apache.org/
    email: users@subversion.apache.org
  license:
    name: Apache 2.0
    url: https://www.apache.org/licenses/LICENSE-2.0
  x-logo:
    url: https://subversion.apache.org/images/svn-square.jpg
servers:
- url: https://svn.example.com/repos/{repository}
  description: Subversion repository served via mod_dav_svn
  variables:
    repository:
      default: myproject
      description: Repository name
security:
- basicAuth: []
tags:
- name: Commits
  description: Commit lifecycle — create transaction, stage changes, finalize
paths:
  /{path}:
    put:
      operationId: putFile
      summary: Upload File Content
      description: Upload file content as part of an active commit transaction. The working resource URL is obtained from a prior CHECKOUT response. Requires an active MKACTIVITY transaction.
      tags:
      - Commits
      parameters:
      - name: path
        in: path
        required: true
        schema:
          type: string
      - name: X-SVN-Base-Fulltext-MD5
        in: header
        schema:
          type: string
        description: MD5 checksum of the base file for delta validation
      - name: X-SVN-Result-Fulltext-MD5
        in: header
        schema:
          type: string
        description: Expected MD5 checksum of the resulting file
      requestBody:
        required: true
        content:
          application/octet-stream:
            schema:
              type: string
              format: binary
      responses:
        '204':
          description: File content updated successfully
        '403':
          description: Forbidden — not inside an active transaction
    delete:
      operationId: deleteFileOrDirectory
      summary: Delete File or Directory
      description: Delete a file or directory as part of an active commit transaction. The resource is scheduled for deletion and removed on MERGE.
      tags:
      - Commits
      parameters:
      - name: path
        in: path
        required: true
        schema:
          type: string
      responses:
        '204':
          description: Resource deleted from transaction
        '404':
          description: Path not found
  /$svn/act/:
    post:
      operationId: createCommitTransaction
      summary: Create Commit Transaction
      description: MKACTIVITY — creates a new commit transaction (activity) on the server. Returns a URL to the activity resource used in subsequent CHECKOUT and MERGE requests. This is the first step of every SVN commit.
      tags:
      - Commits
      parameters:
      - name: X-SVN-Options
        in: header
        schema:
          type: string
          default: lock-break
      responses:
        '201':
          description: Activity (transaction) created
          headers:
            Location:
              schema:
                type: string
              description: URL of the created activity resource
        '403':
          description: Repository is read-only or user lacks commit permission
  /$svn/act/{txn-id}:
    delete:
      operationId: abortCommitTransaction
      summary: Abort Commit Transaction
      description: Abort an in-progress commit transaction by deleting the activity resource. This rolls back all staged changes.
      tags:
      - Commits
      parameters:
      - name: txn-id
        in: path
        required: true
        schema:
          type: string
        description: Transaction ID from MKACTIVITY
      responses:
        '204':
          description: Transaction aborted
        '404':
          description: Transaction not found
components:
  securitySchemes:
    basicAuth:
      type: http
      scheme: basic
      description: HTTP Basic authentication for SVN repository access
    digestAuth:
      type: http
      scheme: digest
      description: HTTP Digest authentication for SVN repository access