diff --git a/.redocly.yaml b/.redocly.yaml index c8e29f87e3..3680eaa563 100644 --- a/.redocly.yaml +++ b/.redocly.yaml @@ -55,12 +55,6 @@ apis: plugin/excise-rbac-capella: on plugin/replace-description-capella: on remove-x-internal: on - diagnostic: - root: "./docs/api/diagnostic.yaml" - decorators: - remove-x-internal: on - diagnostic-internal: - root: "./docs/api/diagnostic.yaml" plugins: - './docs/api/plugins/plugin.js' diff --git a/docs/api/admin-capella.yaml b/docs/api/admin-capella.yaml index 052616f8c3..743ef405b8 100644 --- a/docs/api/admin-capella.yaml +++ b/docs/api/admin-capella.yaml @@ -10,7 +10,7 @@ openapi: 3.0.3 info: title: App Services Admin API description: 'App Services manages access and synchronization between Couchbase Lite and Couchbase Capella' - version: '3.3' + version: '3.1' license: name: Business Source License 1.1 (BSL) url: 'https://github.com/couchbase/sync_gateway/blob/master/LICENSE' diff --git a/docs/api/admin.yaml b/docs/api/admin.yaml index 7136a22fdb..f7750624d6 100644 --- a/docs/api/admin.yaml +++ b/docs/api/admin.yaml @@ -10,7 +10,7 @@ openapi: 3.0.3 info: title: Sync Gateway description: Sync Gateway manages access and synchronization between Couchbase Lite and Couchbase Server - version: '3.3' + version: '3.1' license: name: Business Source License 1.1 (BSL) url: 'https://github.com/couchbase/sync_gateway/blob/master/LICENSE' @@ -96,8 +96,6 @@ paths: $ref: ./paths/admin/_post_upgrade.yaml '/{db}/_config': $ref: './paths/admin/db-_config.yaml' - '/{db}/_config/audit': - $ref: './paths/admin/db-_config-audit.yaml' '/{keyspace}/_config/sync': $ref: './paths/admin/keyspace-_config-sync.yaml' '/{keyspace}/_config/import_filter': diff --git a/docs/api/components/schemas.yaml b/docs/api/components/schemas.yaml index 437e9efd43..9091a3d012 100644 --- a/docs/api/components/schemas.yaml +++ b/docs/api/components/schemas.yaml @@ -1304,13 +1304,6 @@ Database: description: The maximum number of revisions that can be stored in the revision cache. type: string default: 5000 - max_memory_count_mb: - description: |- - The maximum amount of memory the revision cache should take up in MB, setting to 0 will disable any eviction based on memory at rev cache. - When set this memory limit will work in in hand with revision cache size parameter. So you will potentially get eviction at revision cache both based off memory footprint and number of items in the cache. - **This is an enterprise-edition feature only** - type: integer - default: 0 shard_count: description: The number of shards the revision cache should be split into. type: string @@ -1852,194 +1845,7 @@ Database: items: type: string example: ["CRUD", "HTTP", "Query"] - audit: - description: Audit logging configuration. - type: object - properties: - enabled: - description: Whether audit logging is enabled. - type: boolean - default: false - enabled_events: - description: List of enabled audit events for this database. - type: array - items: - type: number - example: [1234, 5678] - disabled_users: - description: List of users for which audit logging is disabled. - type: array - items: - type: object - properties: - domain: - description: > - The domain of the user for which audit logging is disabled. - - * `cbs` - Couchbase Server User - * `sgw` - Sync Gateway User - type: string - enum: [cbs, sgw] - name: - description: The name of the user for which audit logging is disabled. - type: string - disabled_roles: - description: List of roles for which audit logging is disabled. Either cbs or sgw. - type: array - items: - type: object - properties: - domain: - description: > - The domain of the role for which audit logging is disabled. - - * `cbs` - Couchbase Server RBAC - * `sgw` - Sync Gateway Role - enum: [cbs, sgw] - type: string - name: - description: The name of the role for which audit logging is disabled. - type: string title: Database-config -Disabled-users-and-roles: - type: object - properties: - disabled_users: - description: List of users for which audit logging is disabled. - type: array - items: - type: object - properties: - domain: - description: The domain of the user for which audit logging is disabled. Either cbs or sgw. - type: string - name: - description: The name of the user for which audit logging is disabled. - type: string - disabled_roles: - description: List of roles for which audit logging is disabled. Either cbs or sgw. - type: array - items: - type: object - properties: - domain: - description: The domain of the role for which audit logging is disabled. - type: string - name: - description: The name of the role for which audit logging is disabled. - type: string -Database-audit: - title: Simple - description: A map of audit events and whether they are enabled or not. - properties: - enabled: - type: boolean - events: - type: object - additionalProperties: - x-additionalPropertiesName: audit_id - description: The audit event ID and whether it is enabled or not. - type: boolean - disabled_users: - description: List of users for which audit logging is disabled. - type: array - items: - type: object - properties: - domain: - description: > - The domain of the role for which audit logging is disabled. - - * `cbs` - Couchbase Server User - * `sgw` - Sync Gateway User - enum: [cbs, sgw] - type: string - name: - description: The name of the user for which audit logging is disabled. - type: string - disabled_roles: - description: List of roles for which audit logging is disabled. Either cbs or sgw. - type: array - items: - type: object - properties: - domain: - description: > - The domain of the role for which audit logging is disabled. - - * `cbs` - Couchbase Server RBAC - * `sgw` - Sync Gateway Role - enum: [cbs, sgw] - type: string - name: - description: The name of the role for which audit logging is disabled. - type: string -Database-audit-verbose: - title: Verbose - description: A map of detailed audit events. - properties: - enabled: - type: boolean - events: - type: object - additionalProperties: - x-additionalPropertiesName: audit_id - description: The audit event ID and whether it is enabled or not. - $ref: '#/AuditEventVerbose' - disabled_users: - description: List of users for which audit logging is disabled. - type: array - items: - type: object - properties: - domain: - description: > - The domain of the role for which audit logging is disabled. - - * `cbs` - Couchbase Server User - * `sgw` - Sync Gateway User - enum: [cbs, sgw] - type: string - name: - description: The name of the user for which audit logging is disabled. - type: string - disabled_roles: - description: List of roles for which audit logging is disabled. Either cbs or sgw. - type: array - items: - type: object - properties: - domain: - description: > - The domain of the role for which audit logging is disabled. - - * `cbs` - Couchbase Server RBAC - * `sgw` - Sync Gateway Role - enum: [cbs, sgw] - type: string - name: - description: The name of the role for which audit logging is disabled. - type: string -AuditEventVerbose: - title: audit-event-verbose - description: Detailed information about an audit event. - type: object - properties: - name: - type: string - description: "The name of the audit event." - readOnly: true - description: - type: string - description: "The description of the audit event." - readOnly: true - enabled: - type: boolean - description: "Whether this audit event is currently enabled or not." - filterable: - type: boolean - description: "Whether this audit event can be disabled. Some audit events are always on." - readOnly: true Event-config: type: object properties: @@ -2411,13 +2217,6 @@ Startup-config: description: Can be set to false to skip environment variable expansion in database configs type: boolean default: true - diagnostic_interface: - description: |- - Network interface to bind diagnotic API to. - - By default, this API will not be run unless this string is specified. - type: string - default: "" readOnly: true database_credentials: description: 'A map of database name to credentials, that can be used instead of the bootstrap ones.' @@ -2724,8 +2523,6 @@ Logging-config: default: 0 type: integer readOnly: true - audit: - $ref: '#/Audit-logging-config' File-logging-config-base: type: object properties: @@ -2734,52 +2531,6 @@ File-logging-config-base: type: boolean default: false title: File-logging-config -Audit-logging-config: - type: object - title: "Audit logging config" - properties: - enabled: - description: Toggle for this log output - type: boolean - default: false - rotation: - type: object - readOnly: true - properties: - max_size: - description: The maximum size in MB of the log file before it gets rotated. - type: integer - default: 100 - localtime: - description: 'If true, it uses the computer''s local time to format the backup timestamp.' - type: boolean - default: false - rotated_logs_size_limit: - description: Max Size (in mb) of log files before deletion - type: integer - default: 1024 - rotation_interval: - description: |- - If set, the interval at which log files are rotated, even if max_size is not reached. - - This is a duration and therefore can be provided with units "h", "m", "s", "ms", "us", and "ns". For example, 5 hours, 20 minutes, and 30 seconds would be `5h20m30s`. - type: string - default: 0 - max_age: - description: The maximum number of days to retain old log files. - default: 6 - type: integer - audit_log_file_path: - description: The path to write audit log files to - type: string - readOnly: true - enabled_events: - description: List of enabled global audit events. - type: array - items: - type: number - example: [1234, 5678] - readOnly: true Console-logging-config: type: object properties: diff --git a/docs/api/diagnostic.yaml b/docs/api/diagnostic.yaml deleted file mode 100644 index 2756e058ac..0000000000 --- a/docs/api/diagnostic.yaml +++ /dev/null @@ -1,45 +0,0 @@ -# Copyright 2022-Present Couchbase, Inc. -# -# Use of this software is governed by the Business Source License included -# in the file licenses/BSL-Couchbase.txt. As of the Change Date specified -# in that file, in accordance with the Business Source License, use of this -# software will be governed by the Apache License, Version 2.0, included in -# the file licenses/APL2.txt. - -openapi: 3.0.3 -info: - title: Sync Gateway - description: Sync Gateway manages access and synchronization between Couchbase Lite and Couchbase Server - version: '3.3' - license: - name: Business Source License 1.1 (BSL) - url: 'https://github.com/couchbase/sync_gateway/blob/master/LICENSE' -servers: - - url: '{protocol}://{hostname}:4987' - description: Diagnostic API - variables: - protocol: - description: The protocol to use (HTTP or HTTPS) - default: http - enum: - - http - - https - hostname: - description: The hostname to use - default: localhost -paths: - /_ping: - $ref: ./paths/common/_ping.yaml - '/{keyspace}/{docid}/_all_channels': - $ref: './paths/diagnostic/keyspace-docid-_all_channels.yaml' - '/{keyspace}/sync': - $ref: './paths/diagnostic/keyspace-sync.yaml' - '/{keyspace}/import_filter': - $ref: './paths/diagnostic/keyspace-import_filter.yaml' - '/{db}/_user/{name}/all_channels': - $ref: './paths/diagnostic/db-_user-name-_all_channels.yaml' - '/{keyspace}/_user/{name}': - $ref: './paths/diagnostic/keyspace-_user-name.yaml' -externalDocs: - description: Sync Gateway Quickstart | Couchbase Docs - url: 'https://docs.couchbase.com/sync-gateway/current/index.html' diff --git a/docs/api/metric-capella.yaml b/docs/api/metric-capella.yaml index 6f155c34ad..486b8eabcc 100644 --- a/docs/api/metric-capella.yaml +++ b/docs/api/metric-capella.yaml @@ -10,7 +10,7 @@ openapi: 3.0.3 info: title: App Services Metrics API description: 'App Services manages access and synchronization between Couchbase Lite and Couchbase Capella' - version: '3.3' + version: '3.1' license: name: Business Source License 1.1 (BSL) url: 'https://github.com/couchbase/sync_gateway/blob/master/LICENSE' diff --git a/docs/api/metric.yaml b/docs/api/metric.yaml index 990922052f..d49ae47866 100644 --- a/docs/api/metric.yaml +++ b/docs/api/metric.yaml @@ -10,7 +10,7 @@ openapi: 3.0.3 info: title: Sync Gateway description: Sync Gateway manages access and synchronization between Couchbase Lite and Couchbase Server - version: '3.3' + version: '3.1' license: name: Business Source License 1.1 (BSL) url: 'https://github.com/couchbase/sync_gateway/blob/master/LICENSE' diff --git a/docs/api/paths/admin/db-_config-audit.yaml b/docs/api/paths/admin/db-_config-audit.yaml deleted file mode 100644 index 986fa216e9..0000000000 --- a/docs/api/paths/admin/db-_config-audit.yaml +++ /dev/null @@ -1,107 +0,0 @@ -# Copyright 2022-Present Couchbase, Inc. -# -# Use of this software is governed by the Business Source License included -# in the file licenses/BSL-Couchbase.txt. As of the Change Date specified -# in that file, in accordance with the Business Source License, use of this -# software will be governed by the Apache License, Version 2.0, included in -# the file licenses/APL2.txt. -get: - summary: Get database audit configuration - description: |- - Retrieve the audit configuration for the database specified. - - Required Sync Gateway RBAC roles: - - * Sync Gateway Architect - parameters: - - name: verbose - in: query - description: Whether to show name and description with each audit event. - schema: - type: boolean - default: false - - name: filterable - in: query - description: Whether to show only filterable audit events. - schema: - type: boolean - default: false - responses: - '200': - description: Successfully retrieved database configuration - content: - application/json: - schema: - oneOf: - - $ref: ../../components/schemas.yaml#/Database-audit - - $ref: ../../components/schemas.yaml#/Database-audit-verbose - '404': - $ref: ../../components/responses.yaml#/Not-found - tags: - - Database Configuration - operationId: get_db-_config-audit -put: - summary: Replace database audit configuration - description: |- - Replaces the database audit configuration with the one sent in the request. - - Unspecified audit events will be reset to their default enabled value. Use POST if you want upsert-style semantics. - - Required Sync Gateway RBAC roles: - - * Sync Gateway Architect - requestBody: - description: The new database audit configuration to use - content: - application/json: - schema: - oneOf: - - $ref: ../../components/schemas.yaml#/Database-audit - - $ref: ../../components/schemas.yaml#/Database-audit-verbose - responses: - '200': - description: Database audit configuration successfully updated - '400': - $ref: ../../components/responses.yaml#/request-problem - '404': - $ref: ../../components/responses.yaml#/Not-found - tags: - - Database Configuration - operationId: put_db-_config-audit -post: - summary: Update database audit configuration - description: |- - This is used to update the database configuration fields specified. Only the fields specified in the request will have their values replaced. - - Unspecified audit events will be unaffected. Use PUT if you want to reset events to their default state. - - Required Sync Gateway RBAC roles: - - * Sync Gateway Architect - parameters: - - name: verbose - in: query - description: Whether to show name and description with each audit event. - schema: - type: boolean - default: false - requestBody: - description: The database configuration fields to update - content: - application/json: - schema: - oneOf: - - $ref: ../../components/schemas.yaml#/Database-audit - - $ref: ../../components/schemas.yaml#/Database-audit-verbose - responses: - '200': - description: Database audit configuration successfully updated - '400': - $ref: ../../components/responses.yaml#/request-problem - '404': - description: Not Found - tags: - - Database Configuration - operationId: post_db-_config-audit -parameters: - - $ref: ../../components/parameters.yaml#/db diff --git a/docs/api/paths/diagnostic/db-_user-name-_all_channels.yaml b/docs/api/paths/diagnostic/db-_user-name-_all_channels.yaml deleted file mode 100644 index c130a869e6..0000000000 --- a/docs/api/paths/diagnostic/db-_user-name-_all_channels.yaml +++ /dev/null @@ -1,28 +0,0 @@ -# Copyright 2022-Present Couchbase, Inc. -# -# Use of this software is governed by the Business Source License included -# in the file licenses/BSL-Couchbase.txt. As of the Change Date specified -# in that file, in accordance with the Business Source License, use of this -# software will be governed by the Apache License, Version 2.0, included in -# the file licenses/APL2.txt. -parameters: - - $ref: ../../components/parameters.yaml#/db - - $ref: ../../components/parameters.yaml#/user-name -get: - summary: Get all channels for a user - description: |- - Retrieve all channels that a user has access to. - - Required Sync Gateway RBAC roles: - - * Sync Gateway Architect - * Sync Gateway Application - * Sync Gateway Application Read Only - responses: - '200': - $ref: ../../components/responses.yaml#/All_user_channels_response - '404': - $ref: ../../components/responses.yaml#/Not-found - tags: - - Database Security - operationId: get_db-_user-name_-all_channels diff --git a/docs/api/paths/diagnostic/keyspace-_user-name.yaml b/docs/api/paths/diagnostic/keyspace-_user-name.yaml deleted file mode 100644 index 5feb6751dc..0000000000 --- a/docs/api/paths/diagnostic/keyspace-_user-name.yaml +++ /dev/null @@ -1,33 +0,0 @@ -# Copyright 2022-Present Couchbase, Inc. -# -# Use of this software is governed by the Business Source License included -# in the file licenses/BSL-Couchbase.txt. As of the Change Date specified -# in that file, in accordance with the Business Source License, use of this -# software will be governed by the Apache License, Version 2.0, included in -# the file licenses/APL2.txt. -parameters: - - $ref: ../../components/parameters.yaml#/keyspace - - $ref: ../../components/parameters.yaml#/user-name -get: - summary: Get all document access spans. - description: |- - Retrieve all sequence spans where a user had access to a list of documents. - The spans are in the form of start sequence - end sequence. - - Required Sync Gateway RBAC roles: - - * Sync Gateway Architect - * Sync Gateway Application - * Sync Gateway Application Read Only - parameters: - - $ref: ../../components/parameters.yaml#/doc_id - responses: - '200': - $ref: ../../components/responses.yaml#/user_access_span_response - '400': - description: Bad Request - '404': - $ref: ../../components/responses.yaml#/Not-found - tags: - - Database Security - operationId: get_keyspace-_user-name diff --git a/docs/api/paths/diagnostic/keyspace-docid-_all_channels.yaml b/docs/api/paths/diagnostic/keyspace-docid-_all_channels.yaml deleted file mode 100644 index b1d65abbb6..0000000000 --- a/docs/api/paths/diagnostic/keyspace-docid-_all_channels.yaml +++ /dev/null @@ -1,36 +0,0 @@ -# Copyright 2022-Present Couchbase, Inc. -# -# Use of this software is governed by the Business Source License included -# in the file licenses/BSL-Couchbase.txt. As of the Change Date specified -# in that file, in accordance with the Business Source License, use of this -# software will be governed by the Apache License, Version 2.0, included in -# the file licenses/APL2.txt. -parameters: - - $ref: ../../components/parameters.yaml#/keyspace - - $ref: ../../components/parameters.yaml#/docid -get: - summary: Get channel history for a document - description: |- - Retrieve all doc channels and the sequence spans showing when the doc was added to a channel and when it was removed. - Required Sync Gateway RBAC roles: - * Sync Gateway Application Read Only - responses: - '200': - description: Document found successfully - content: - application/json: - schema: - additionalProperties: - x-additionalPropertiesName: channel - description: The channels the document has been in. - type: array - items: - description: The sequence number that document was added to the channel. - type: string - example: "28-48" - - '404': - $ref: ../../components/responses.yaml#/Not-found - tags: - - Document - operationId: get_keyspace-docid-_all_channels diff --git a/docs/api/paths/diagnostic/keyspace-import_filter.yaml b/docs/api/paths/diagnostic/keyspace-import_filter.yaml deleted file mode 100644 index 54f8a4a570..0000000000 --- a/docs/api/paths/diagnostic/keyspace-import_filter.yaml +++ /dev/null @@ -1,42 +0,0 @@ -# Copyright 2024-Present Couchbase, Inc. -# -# Use of this software is governed by the Business Source License included -# in the file licenses/BSL-Couchbase.txt. As of the Change Date specified -# in that file, in accordance with the Business Source License, use of this -# software will be governed by the Apache License, Version 2.0, included in -# the file licenses/APL2.txt. -parameters: - - $ref: ../../components/parameters.yaml#/keyspace -get: - summary: Run a doc body through the Import filter and return results. - description: |- - Run a document body through the import filter and return whether its imported or not, and any error messages. - * Sync Gateway Application Read Only - requestBody: - content: - application/json: - schema: - $ref: ../../components/schemas.yaml#/Document - responses: - '200': - description: Document Processed by import filter successfully - content: - application/json: - schema: - type: object - properties: - shouldImport: - description: Whether this document would be imported after being processed by the import filter. - type: boolean - error: - description: Errors thrown by the Import filter. - type: string - - - '404': - $ref: ../../components/responses.yaml#/Not-found - parameters: - - $ref: ../../components/parameters.yaml#/doc_id - tags: - - Document - operationId: get_keyspace-import_filter-docid diff --git a/docs/api/paths/diagnostic/keyspace-sync.yaml b/docs/api/paths/diagnostic/keyspace-sync.yaml deleted file mode 100644 index d50981ecba..0000000000 --- a/docs/api/paths/diagnostic/keyspace-sync.yaml +++ /dev/null @@ -1,60 +0,0 @@ -# Copyright 2024-Present Couchbase, Inc. -# -# Use of this software is governed by the Business Source License included -# in the file licenses/BSL-Couchbase.txt. As of the Change Date specified -# in that file, in accordance with the Business Source License, use of this -# software will be governed by the Apache License, Version 2.0, included in -# the file licenses/APL2.txt. -parameters: - - $ref: ../../components/parameters.yaml#/keyspace -get: - summary: Run a doc body through the sync function and return sync data. - description: |- - Run a document body through the sync function and return document sync data. - * Sync Gateway Application Read Only - requestBody: - content: - application/json: - schema: - $ref: ../../components/schemas.yaml#/Document - responses: - '200': - description: Document Processed by sync function successfully - content: - application/json: - schema: - type: object - properties: - channels: - description: The channels the document was placed in by the sync function. - type: array - roles: - description: An access map of roles granted by the sync function. - type: object - properties: - username: - type: object - additionalProperties: - x-additionalPropertiesName: role - type: string - access: - description: An access map of dynamic channels granted by the sync function. - type: object - properties: - username: - type: object - additionalProperties: - x-additionalPropertiesName: channel - type: string - - exception: - description: Errors thrown by the sync function. - type: string - - '404': - $ref: ../../components/responses.yaml#/Not-found - parameters: - - $ref: ../../components/parameters.yaml#/doc_id - tags: - - Document - operationId: get_keyspace-sync diff --git a/docs/api/public.yaml b/docs/api/public.yaml index 213a10e90e..08ac5afea1 100644 --- a/docs/api/public.yaml +++ b/docs/api/public.yaml @@ -10,7 +10,7 @@ openapi: 3.0.3 info: title: Sync Gateway description: Sync Gateway manages access and synchronization between Couchbase Lite and Couchbase Server - version: '3.3' + version: '3.1' license: name: Business Source License 1.1 (BSL) url: 'https://github.com/couchbase/sync_gateway/blob/master/LICENSE'