openapi: 3.1.0 info: title: Couchbase Analytics Service REST Allowed CIDRs Import Export 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: Import Export description: Endpoints for importing and exporting Eventing Function definitions. paths: /api/v1/export: get: operationId: exportAllFunctions summary: Export all Eventing Functions description: Exports all Eventing Function definitions. Exported functions are always set to undeployed state at the time of export. tags: - Import Export responses: '200': description: Functions exported successfully content: application/json: schema: type: array items: $ref: '#/components/schemas/EventingFunction' '401': description: Unauthorized access /api/v1/export/{functionName}: get: operationId: exportEventingFunction summary: Export a specific Eventing Function description: Exports the definition of a specific Eventing Function in undeployed state. tags: - Import Export parameters: - $ref: '#/components/parameters/functionName' responses: '200': description: Function exported successfully content: application/json: schema: $ref: '#/components/schemas/EventingFunction' '401': description: Unauthorized access '404': description: Function not found /api/v1/import: post: operationId: importFunctions summary: Import Eventing Functions description: Imports Eventing Function definitions. Imported functions always start in undeployed state regardless of the setting values in the import data. tags: - Import Export requestBody: required: true content: application/json: schema: type: array items: $ref: '#/components/schemas/EventingFunction' responses: '200': description: Functions imported successfully '400': description: Invalid function definitions '401': description: Unauthorized access components: parameters: functionName: name: functionName in: path required: true description: The name of the Eventing Function schema: type: string schemas: EventingFunction: type: object description: Eventing Function definition required: - appname - appcode properties: appname: type: string description: Name of the Eventing Function appcode: type: string description: JavaScript handler code for the function depcfg: type: object description: Dependency configuration including bindings properties: buckets: type: array description: Bucket bindings for the function items: type: object properties: alias: type: string description: Alias name used in handler code bucket_name: type: string description: Name of the bound bucket scope_name: type: string description: Name of the scope collection_name: type: string description: Name of the collection access: type: string description: Access level for the bucket binding enum: - r - rw curl: type: array description: cURL bindings for external HTTP calls items: type: object properties: hostname: type: string description: URL of the external endpoint value: type: string description: Alias name used in handler code auth_type: type: string description: Authentication type enum: - no-auth - basic - bearer - digest allow_cookies: type: boolean description: Whether to allow cookies validate_ssl_certificate: type: boolean description: Whether to validate SSL certificates constants: type: array description: Constant bindings items: type: object properties: value: type: string description: Alias name literal: type: string description: Constant value source_bucket: type: string description: Source bucket for mutations source_scope: type: string description: Source scope for mutations source_collection: type: string description: Source collection for mutations metadata_bucket: type: string description: Metadata bucket for checkpoints metadata_scope: type: string description: Metadata scope for checkpoints metadata_collection: type: string description: Metadata collection for checkpoints settings: type: object description: Function deployment settings properties: dcp_stream_boundary: type: string description: Starting point for processing mutations enum: - everything - from_now deployment_status: type: boolean description: Whether the function is deployed processing_status: type: boolean description: Whether the function is processing mutations log_level: type: string description: Log level for the function enum: - INFO - ERROR - WARNING - DEBUG - TRACE language_compatibility: type: string description: Language compatibility version execution_timeout: type: integer description: Maximum execution time for a single handler invocation in seconds timer_context_size: type: integer description: Maximum size of timer context in bytes worker_count: type: integer description: Number of worker threads num_timer_partitions: type: integer description: Number of timer partitions function_scope: type: object description: Scope of the function definition properties: bucket: type: string description: Bucket for the function scope scope: type: string description: Scope name 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