---
title: "Create a DBaaS OpenSearch service"
method: POST
path: "/dbaas-opensearch/{name}"
tags: ["dbaas"]
---

# Create a DBaaS OpenSearch service

`POST /dbaas-opensearch/{name}`

## Request

- Base URL: `https://api-ch-gva-2.exoscale.com/v2`
- URL: `https://api-ch-gva-2.exoscale.com/v2/dbaas-opensearch/{name}`
- Auth: none declared
- TypeScript: <https://skmtc.dev/exoscale/apis/exoscale-api/docs/dbaas-opensearch/:name/post.ts> (a function with typed inputs; its response is checked against the schema)

Create a DBaaS OpenSearch service

## Path parameters

- `name` string, required

## Request body

- object
  - `max-index-count` integer, nullable: Maximum number of indexes to keep before deleting the oldest one
  - `keep-index-refresh-interval` boolean: Aiven automation resets index.refresh_interval to default value for every index to be sure that indices are always visible to search. If it doesn't fit your case, you can disable this by setting up this flag to true.
  - `ip-filter` string[]: Allow incoming connections from CIDR address block, e.g. '10.20.0.0/16'
  - `termination-protection` boolean: Service is protected against termination and powering off
  - `fork-from-service` string
  - `index-patterns` object[]: Allows you to create glob style patterns and set a max number of indexes matching this pattern you want to keep. Creating indexes exceeding this value will cause the oldest one to get deleted. You could for example create a pattern looking like 'logs.?' and then create index logs.1, logs.2 etc, it will delete logs.1 once you create logs.6. Do note 'logs.?' does not apply to logs.10. Note: Setting max_index_count to 0 will do nothing and the pattern gets ignored.
    - `max-index-count` integer, nullable: Maximum number of indexes to keep
    - `sorting-algorithm` 'alphabetical' | 'creation_date': Deletion sorting algorithm
    - `pattern` string: fnmatch pattern
  - `maintenance` object: Automatic maintenance settings
    - `dow` 'saturday' | 'tuesday' | 'never' | 'wednesday' | 'sunday' | 'friday' | 'monday' | 'thursday', required: Day of week for installing updates
    - `time` string, required: Time for installing updates, UTC
  - `index-template` object: Template settings for all new indexes
    - `mapping-nested-objects-limit` integer, nullable: The maximum number of nested JSON objects that a single document can contain across all nested types. This limit helps to prevent out of memory errors when a document contains too many nested objects. Default is 10000.
    - `number-of-replicas` integer, nullable: The number of replicas each primary shard has.
    - `number-of-shards` integer: The number of primary shards that an index should have.
  - `opensearch-settings` JsonSchemaOpensearch
    - `thread_pool_search_throttled_size` integer: Size for the thread pool. See documentation for exact details. Do note this may have maximum value depending on CPU count - value is automatically lowered if set to higher than maximum value.
    - `thread_pool_analyze_size` integer: Size for the thread pool. See documentation for exact details. Do note this may have maximum value depending on CPU count - value is automatically lowered if set to higher than maximum value.
    - `thread_pool_get_size` integer: Size for the thread pool. See documentation for exact details. Do note this may have maximum value depending on CPU count - value is automatically lowered if set to higher than maximum value.
    - `thread_pool_get_queue_size` integer: Size for the thread pool queue. See documentation for exact details.
    - `indices_memory_max_index_buffer_size` integer: Absolute value. Default is unbound. Doesn't work without indices.memory.index_buffer_size. Maximum amount of heap used for query cache, an absolute indices.memory.index_buffer_size maximum hard limit.
    - `indices_recovery_max_concurrent_file_chunks` integer: Number of file chunks sent in parallel for each recovery. Defaults to 2.
    - `indices_queries_cache_size` integer: Percentage value. Default is 10%. Maximum amount of heap used for query cache. This is an expert setting. Too low value will decrease query performance and increase performance for other operations; too high value will cause issues with other OpenSearch functionality.
    - `search_backpressure` object
      - `mode` 'monitor_only' | 'enforced' | 'disabled': The search backpressure mode. Valid values are monitor_only, enforced, or disabled. Default is monitor_only
      - `node_duress` object
        - `cpu_threshold` number: The CPU usage threshold (as a percentage) required for a node to be considered to be under duress. Default is 0.9
        - `heap_threshold` number: The heap usage threshold (as a percentage) required for a node to be considered to be under duress. Default is 0.7
        - `num_successive_breaches` integer: The number of successive limit breaches after which the node is considered to be under duress. Default is 3
      - `search_shard_task` object
        - `total_heap_percent_threshold` number: The heap usage threshold (as a percentage) required for the sum of heap usages of all search shard tasks before cancellation is applied. Default is 0.5
        - `elapsed_time_millis_threshold` integer: The elapsed time threshold (in milliseconds) required for a single search shard task before it is considered for cancellation. Default is 30000
        - `cancellation_rate` number: The maximum number of tasks to cancel per millisecond of elapsed time. Default is 0.003
        - `heap_variance` number: The minimum variance required for a single search shard task’s heap usage compared to the rolling average of previously completed tasks before it is considered for cancellation. Default is 2.0
        - `heap_moving_average_window_size` integer: The number of previously completed search shard tasks to consider when calculating the rolling average of heap usage. Default is 100
        - `cancellation_ratio` number: The maximum number of tasks to cancel, as a percentage of successful task completions. Default is 0.1
        - `heap_percent_threshold` number: The heap usage threshold (as a percentage) required for a single search shard task before it is considered for cancellation. Default is 0.5
        - `cpu_time_millis_threshold` integer: The CPU usage threshold (in milliseconds) required for a single search shard task before it is considered for cancellation. Default is 15000
        - `cancellation_burst` number: The maximum number of search tasks to cancel in a single iteration of the observer thread. Default is 10.0
      - `search_task` object
        - `total_heap_percent_threshold` number: The heap usage threshold (as a percentage) required for the sum of heap usages of all search tasks before cancellation is applied. Default is 0.5
        - `elapsed_time_millis_threshold` integer: The elapsed time threshold (in milliseconds) required for an individual parent task before it is considered for cancellation. Default is 45000
        - `cancellation_rate` number: The maximum number of search tasks to cancel per millisecond of elapsed time. Default is 0.003
        - `heap_variance` number: The heap usage variance required for an individual parent task before it is considered for cancellation. A task is considered for cancellation when taskHeapUsage is greater than or equal to heapUsageMovingAverage * variance. Default is 2.0
        - `heap_moving_average_window_size` integer: The window size used to calculate the rolling average of the heap usage for the completed parent tasks. Default is 10
        - `cancellation_ratio` number: The maximum number of search tasks to cancel, as a percentage of successful search task completions. Default is 0.1
        - `heap_percent_threshold` number: The heap usage threshold (as a percentage) required for an individual parent task before it is considered for cancellation. Default is 0.2
        - `cpu_time_millis_threshold` integer: The CPU usage threshold (in milliseconds) required for an individual parent task before it is considered for cancellation. Default is 30000
        - `cancellation_burst` number: The maximum number of search tasks to cancel in a single iteration of the observer thread. Default is 5.0
    - `shard_indexing_pressure` object
      - `primary_parameter` object
        - `shard` object
          - `min_limit` number: Specify the minimum assigned quota for a new shard in any role (coordinator, primary, or replica). Shard indexing backpressure increases or decreases this allocated quota based on the inflow of traffic for the shard. Default is 0.001
        - `node` object
          - `soft_limit` number: Define the percentage of the node-level memory threshold that acts as a soft indicator for strain on a node. Default is 0.7
      - `operating_factor` object
        - `upper` number: Specify the upper occupancy limit of the allocated quota of memory for the shard. If the total memory usage of a shard is above this limit, shard indexing backpressure increases the current allocated memory for that shard. Default is 0.95
        - `optimal` number: Specify the optimal occupancy of the allocated quota of memory for the shard. If the total memory usage of a shard is at this level, shard indexing backpressure doesn’t change the current allocated memory for that shard. Default is 0.85
        - `lower` number: Specify the lower occupancy limit of the allocated quota of memory for the shard. If the total memory usage of a shard is below this limit, shard indexing backpressure decreases the current allocated memory for that shard. Default is 0.75
      - `enforced` boolean: Run shard indexing backpressure in shadow mode or enforced mode. In shadow mode (value set as false), shard indexing backpressure tracks all granular-level metrics, but it doesn’t actually reject any indexing requests. In enforced mode (value set as true), shard indexing backpressure rejects any requests to the cluster that might cause a dip in its performance. Default is false
      - `enabled` boolean: Enable or disable shard indexing backpressure. Default is false
    - `knn_memory_circuit_breaker_enabled` boolean: Enable or disable KNN memory circuit breaker. Defaults to true.
    - `thread_pool_search_size` integer: Size for the thread pool. See documentation for exact details. Do note this may have maximum value depending on CPU count - value is automatically lowered if set to higher than maximum value.
    - `indices_memory_min_index_buffer_size` integer: Absolute value. Default is 48mb. Doesn't work without indices.memory.index_buffer_size. Minimum amount of heap used for query cache, an absolute indices.memory.index_buffer_size minimal hard limit.
    - `indices_recovery_max_bytes_per_sec` integer: Limits total inbound and outbound recovery traffic for each node. Applies to both peer recoveries as well as snapshot recoveries (i.e., restores from a snapshot). Defaults to 40mb
    - `http_max_initial_line_length` integer: The max length of an HTTP URL, in bytes
    - `enable_security_audit` boolean
    - `thread_pool_write_queue_size` integer: Size for the thread pool queue. See documentation for exact details.
    - `script_max_compilations_rate` string: Script compilation circuit breaker limits the number of inline script compilations within a period of time. Default is use-context
    - `search_max_buckets` integer, nullable: Maximum number of aggregation buckets allowed in a single response. OpenSearch default value is used when this is not defined.
    - `reindex_remote_whitelist` string[], nullable: Whitelisted addresses for reindexing. Changing this value will cause all OpenSearch instances to restart.
    - `override_main_response_version` boolean: Compatibility mode sets OpenSearch to report its version as 7.10 so clients continue to work. Default is false
    - `http_max_header_size` integer: The max size of allowed headers, in bytes
    - `email-sender` object
      - `email_sender_name` string, required: This should be identical to the Sender name defined in Opensearch dashboards
      - `email_sender_password` string, required: Sender password for Opensearch alerts to authenticate with SMTP server
      - `email_sender_username` string, required
    - `indices_fielddata_cache_size` integer, nullable: Relative amount. Maximum amount of heap memory used for field data cache. This is an expert setting; decreasing the value too much will increase overhead of loading field data; too much memory used for field data cache will decrease amount of heap available for other operations.
    - `action_destructive_requires_name` boolean, nullable
    - `plugins_alerting_filter_by_backend_roles` boolean: Enable or disable filtering of alerting by backend roles. Requires Security plugin. Defaults to false
    - `indices_memory_index_buffer_size` integer: Percentage value. Default is 10%. Total amount of heap used for indexing buffer, before writing segments to disk. This is an expert setting. Too low value will slow down indexing; too high value will increase indexing performance but causes performance issues for query performance.
    - `thread_pool_force_merge_size` integer: Size for the thread pool. See documentation for exact details. Do note this may have maximum value depending on CPU count - value is automatically lowered if set to higher than maximum value.
    - `auth_failure_listeners` object
      - `internal_authentication_backend_limiting` object
        - `allowed_tries` integer: The number of login attempts allowed before login is blocked
        - `authentication_backend` 'internal': The internal backend. Enter `internal`
        - `block_expiry_seconds` integer: The duration of time that login remains blocked after a failed login
        - `max_blocked_clients` integer: The maximum number of blocked IP addresses
        - `max_tracked_clients` integer: The maximum number of tracked IP addresses that have failed login
        - `time_window_seconds` integer: The window of time in which the value for `allowed_tries` is enforced
        - `type` 'username': The type of rate limiting
      - `ip_rate_limiting` object
        - `allowed_tries` integer: The number of login attempts allowed before login is blocked
        - `block_expiry_seconds` integer: The duration of time that login remains blocked after a failed login
        - `max_blocked_clients` integer: The maximum number of blocked IP addresses
        - `max_tracked_clients` integer: The maximum number of tracked IP addresses that have failed login
        - `time_window_seconds` integer: The window of time in which the value for `allowed_tries` is enforced
        - `type` 'ip': The type of rate limiting
    - `ism-history` object
      - `ism_enabled` boolean, required
      - `ism_history_enabled` boolean
      - `ism_history_max_age` integer
      - `ism_history_max_docs` integer
      - `ism_history_rollover_check_period` integer
      - `ism_history_rollover_retention_period` integer
    - `cluster_routing_allocation_node_concurrent_recoveries` integer: How many concurrent incoming/outgoing shard recoveries (normally replicas) are allowed to happen on a node. Defaults to 2.
    - `thread_pool_analyze_queue_size` integer: Size for the thread pool queue. See documentation for exact details.
    - `action_auto_create_index_enabled` boolean: Explicitly allow or block automatic creation of indices. Defaults to true
    - `http_max_content_length` integer: Maximum content length for HTTP requests to the OpenSearch HTTP API, in bytes.
    - `thread_pool_write_size` integer: Size for the thread pool. See documentation for exact details. Do note this may have maximum value depending on CPU count - value is automatically lowered if set to higher than maximum value.
    - `thread_pool_search_queue_size` integer: Size for the thread pool queue. See documentation for exact details.
    - `knn_memory_circuit_breaker_limit` integer: Maximum amount of memory that can be used for KNN index. Defaults to 50% of the JVM heap size.
    - `indices_query_bool_max_clause_count` integer: Maximum number of clauses Lucene BooleanQuery can have. The default value (1024) is relatively high, and increasing it may cause performance issues. Investigate other approaches first before increasing this value.
    - `thread_pool_search_throttled_queue_size` integer: Size for the thread pool queue. See documentation for exact details.
    - `cluster_max_shards_per_node` integer: Controls the number of shards allowed in the cluster per data node
  - `version` string: OpenSearch major version
  - `recovery-backup-name` string: Name of a backup to recover from for services that support backup names
  - `plan` string, required: Subscription plan
  - `opensearch-dashboards` object: OpenSearch Dashboards settings
    - `opensearch-request-timeout` integer: Timeout in milliseconds for requests made by OpenSearch Dashboards towards OpenSearch (default: 30000)
    - `enabled` boolean: Enable or disable OpenSearch Dashboards (default: true)
    - `max-old-space-size` integer: Limits the maximum amount of memory (in MiB) the OpenSearch Dashboards process can use. This sets the max_old_space_size option of the nodejs running the OpenSearch Dashboards. Note: the memory reserved by OpenSearch Dashboards is not available for OpenSearch. (default: 128)

## Response `200`

200

- Operation: Operation
  - `id` string, uuid: Operation ID
  - `reason` 'incorrect' | 'unknown' | 'unavailable' | 'forbidden' | 'busy' | 'fault' | 'partial' | 'not-found' | 'interrupted' | 'unsupported' | 'conflict': Operation failure reason
  - `reference` object: Related resource reference
    - `id` string, uuid: Reference ID
    - `link` string: Link to the referenced resource
    - `command` string: Command name
  - `message` string: Operation message
  - `state` 'failure' | 'pending' | 'success' | 'timeout': Operation status

## Changes

- **2025-08-10** `814bf1ccd925`: 4 info
  - the request property `index-patterns/items/max-index-count` became nullable
  - the request property `index-template/mapping-nested-objects-limit` became nullable
  - the request property `index-template/number-of-replicas` became nullable
  - the request property `max-index-count` became nullable
- **2024-09-18** `eae1143f1c63`: 6 info
  - added the new optional request property `opensearch-settings/indices_memory_max_index_buffer_size`
  - added the new optional request property `opensearch-settings/indices_memory_min_index_buffer_size`
  - added the new optional request property `opensearch-settings/knn_memory_circuit_breaker_enabled`
  - added the new optional request property `opensearch-settings/knn_memory_circuit_breaker_limit`
  - …2 more
- **2024-05-22** `d1903c399d90`: 6 breaking, 3 info
  - the request property `opensearch-settings/ism-history/ism_enabled` became not nullable
  - the request property `opensearch-settings/ism-history/ism_history_enabled` became not nullable
  - the request property `opensearch-settings/ism-history/ism_history_max_age` became not nullable
  - the request property `opensearch-settings/ism-history/ism_history_max_docs` became not nullable
  - …5 more
- …earlier changes not shown

[Operation history](https://skmtc.dev/exoscale/apis/exoscale-api/changes/dbaas-opensearch/:name/post.md)

---

[API](https://skmtc.dev/exoscale/apis/exoscale-api.md) - [All operations](https://skmtc.dev/exoscale/apis/exoscale-api/llms.txt) - [OpenAPI document](https://skmtc.dev/exoscale/apis/exoscale-api/revisions/63da6f74c845?raw)
