A newer version of this documentation is available.

View Latest

Search API

  • reference

Couchbase Server Enterprise Edition 7.6 reaches End of Life on March 31, 2027. Please upgrade to 8.0.x by following Upgrade, or contact Couchbase Support.

APIs in this Section

For Full Text Search, REST endpoints can be reached on Search-Service nodes on port 8094, or on 18094 when using SSL.

For information on required roles and permissions, see Roles.

For a list of the methods and URIs covered by these pages in this section, see the tables below.

Node Configuration

HTTP Method URI Documented at

GET

/api/cfg

Get Cluster Configuration

POST

/api/cfgRefresh

Refresh Node Configuration

POST

/api/managerKick

Replan Resource Assignments

GET

/api/managerMeta

Get Node Capabilities

Node Diagnostics

HTTP Method URI Documented at

GET

/api/diag

Get Diagnostics

GET

/api/log

Get Node Logs

GET

/api/runtime

Get Node Runtime Information

GET

/api/runtime/args

Get Node Runtime Arguments

POST

/api/runtime/profile/cpu

Capture CPU Profiling Information

POST

/api/runtime/profile/memory

Capture Memory Profiling Information

Node Management

HTTP Method URI Documented at

POST

/api/runtime/gc

Perform Garbage Collection

Node Monitoring

HTTP Method URI Documented at

GET

/api/runtime/stats

Get Runtime Statistics

GET

/api/runtime/stats/statsMem

Get Memory Statistics

Index Definition

HTTP Method URI Documented at

GET

/api/bucket/{BUCKET_NAME}/scope/{SCOPE_NAME}/index

Get All Search Index Definitions (Scoped)

GET

/api/bucket/{BUCKET_NAME}/scope/{SCOPE_NAME}/index/{INDEX_NAME}

Get Index Definition (Scoped)

PUT

/api/bucket/{BUCKET_NAME}/scope/{SCOPE_NAME}/index/{INDEX_NAME}

Create or Update an Index Definition (Scoped)

DELETE

/api/bucket/{BUCKET_NAME}/scope/{SCOPE_NAME}/index/{INDEX_NAME}

Delete Index Definition (Scoped)

Index Management

HTTP Method URI Documented at

POST

/api/bucket/{BUCKET_NAME}/scope/{SCOPE_NAME}/index/{INDEX_NAME}/ingestControl/{OP}

Set Index Ingestion Control (Scoped)

POST

/api/bucket/{BUCKET_NAME}/scope/{SCOPE_NAME}/index/{INDEX_NAME}/planFreezeControl/{OP}

Freeze Index Partition Assignment (Scoped)

POST

/api/bucket/{BUCKET_NAME}/scope/{SCOPE_NAME}/index/{INDEX_NAME}/queryControl/{OP}

Stop Queries on an Index (Scoped)

Index Monitoring and Debugging

HTTP Method URI Documented at

GET

/api/stats

Get Indexing and Data Metrics for All Indexes

GET

/api/stats/{INDEX_NAME}

Get Indexing and Data Metrics for an Index

POST

/api/stats/{INDEX_NAME}/analyzeDoc

Analyze Document

GET

/api/bucket/{BUCKET_NAME}/scope/{SCOPE_NAME}/index/{INDEX_NAME}/status

Get Index Status (Scoped)

Index Querying

HTTP Method URI Documented at

GET

/api/index/{INDEX_NAME}/count

Get Document Count for an Index

POST

/api/bucket/{BUCKET_NAME}/scope/{SCOPE_NAME}/index/{INDEX_NAME}/pindexLookup

Look up the Index Partition for a Document (Scoped)

POST

/api/bucket/{BUCKET_NAME}/scope/{SCOPE_NAME}/index/{INDEX_NAME}/query

Query a Search Index (Scoped)

Index Partition Definition

HTTP Method URI Documented at

GET

/api/pindex

Get Index Partition Information

GET

/api/pindex/{pindexName}

Get Index Partition by Name

Index Partition Querying

HTTP Method URI Documented at

GET

/api/pindex/{pindexName}/count

Get Index Partition Document Count

POST

/api/pindex/{pindexName}/query

Query Index Partition

FTS Memory Quota

HTTP Method URI Documented at

POST

/pools/default

Set FTS Memory Quota

Search Statistics

HTTP Method URI Documented at

GET

/api/nsstats

Get Query, Mutation, and Partition Statistics for the Search Service

GET

/api/nsstats/index/{INDEX_NAME}

Get Query, Mutation, and Partition Statistics for an Index

Active Queries

HTTP Method URI Documented at

GET

/api/query

View Active Node Queries

GET

/api/query/index/{indexName}

View Active Index Queries

POST

/api/query/{queryID}/cancel

Cancel Active Queries

Search Manager Options

HTTP Method URI Documented at

GET

/api/managerOptions

Rebalance Based on File Transfer

Legacy APIs

These endpoints are for legacy Search indexes and may be deprecated in a future release.

Index Definition

HTTP Method URI Documented at

GET

/api/index

Get All Search Index Definitions

GET

/api/index/{INDEX_NAME}

Get Index Definition

PUT

/api/index/{INDEX_NAME}

Create or Update an Index Definition

DELETE

/api/index/{INDEX_NAME}

Delete Index Definition

Index Management

HTTP Method URI Documented at

POST

/api/index/{INDEX_NAME}/ingestControl/{OP}

Set Index Ingestion Control

POST

/api/index/{INDEX_NAME}/planFreezeControl/{OP}

Freeze Index Partition Assignment

POST

/api/index/{INDEX_NAME}/queryControl/{OP}

Stop Queries on an Index

Index Querying

HTTP Method URI Documented at

POST

/api/index/{INDEX_NAME}/query

Query a Search Index