Couchbase Compaction API

Endpoints for managing auto-compaction settings and triggering compaction operations.

Documentation

Specifications

Other Resources

OpenAPI Specification

couchbase-compaction-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Couchbase Analytics Service REST Allowed CIDRs Compaction API
  description: The Couchbase Analytics Service REST API provides access to the Analytics service for running complex analytical queries on operational data without impacting performance of key-value operations. It supports SQL++ queries for analytics, management of links to external data sources, and configuration of user-defined libraries. The service enables real-time analytics on JSON data alongside transactional workloads.
  version: '7.6'
  contact:
    name: Couchbase Support
    url: https://support.couchbase.com
  termsOfService: https://www.couchbase.com/terms-of-use
servers:
- url: https://localhost:8095
  description: Analytics Service (default port)
- url: https://localhost:18095
  description: Analytics Service (SSL)
security:
- basicAuth: []
tags:
- name: Compaction
  description: Endpoints for managing auto-compaction settings and triggering compaction operations.
paths:
  /settings/autoCompaction:
    get:
      operationId: getAutoCompaction
      summary: Get auto-compaction settings
      description: Returns the current auto-compaction settings for the cluster.
      tags:
      - Compaction
      responses:
        '200':
          description: Successful retrieval of auto-compaction settings
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AutoCompactionSettings'
        '401':
          description: Unauthorized access
    post:
      operationId: updateAutoCompaction
      summary: Update auto-compaction settings
      description: Updates the auto-compaction settings for the cluster including database and view fragmentation thresholds and compaction intervals.
      tags:
      - Compaction
      requestBody:
        required: true
        content:
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/AutoCompactionSettings'
      responses:
        '200':
          description: Auto-compaction settings updated successfully
        '400':
          description: Invalid compaction settings
        '401':
          description: Unauthorized access
components:
  schemas:
    AutoCompactionSettings:
      type: object
      description: Auto-compaction configuration
      properties:
        databaseFragmentationThreshold:
          type: object
          properties:
            percentage:
              type: integer
              description: Database fragmentation percentage threshold
            size:
              type: integer
              description: Database fragmentation size threshold in bytes
        viewFragmentationThreshold:
          type: object
          properties:
            percentage:
              type: integer
              description: View fragmentation percentage threshold
            size:
              type: integer
              description: View fragmentation size threshold in bytes
        parallelDBAndViewCompaction:
          type: boolean
          description: Whether to run database and view compaction in parallel
  securitySchemes:
    basicAuth:
      type: http
      scheme: basic
      description: HTTP Basic Authentication using Couchbase Server credentials.
externalDocs:
  description: Couchbase Analytics Service REST API Documentation
  url: https://docs.couchbase.com/server/current/analytics/rest-analytics.html