Couchbase Search Node API
- reference
Overview
The Search Node Configuration REST API is provided by the Search service. This API enables you to manage and monitor your Search nodes.
Version information
Version : 7.6
Host information
{scheme}://{host}:{port}
The URL scheme, host, and port are as follows.
Component | Description |
---|---|
scheme |
The URL scheme. Use Values: |
host |
The host name or IP address of a node running the Search Service. Example: |
port |
The Search Service REST port. Use Values: |
Resources
This section describes the operations available with this REST API. The operations are grouped in the following categories.
Configuration
Operations for node configuration.
Get Cluster Configuration
Replan Resource Assignments
Get Node Capabilities
Refresh Node Configuration
Get Cluster Configuration
GET /api/cfg
Description
Returns the node's current view of the cluster's configuration as JSON.
-
application/json
Example HTTP Response
{
"indexDefs": {
"implVersion": "4.0.0",
"indexDefs": {
"myFirstIndex": {
"name": "myFirstIndex",
"params": "",
"planParams": {
"hierarchyRules": null,
"maxPartitionsPerPIndex": 0,
"nodePlanParams": null,
"numReplicas": 0,
"planFrozen": false
},
"sourceName": "",
"sourceParams": "",
"sourceType": "nil",
"sourceUUID": "",
"type": "blackhole",
"uuid": "6cc599ab7a85bf3b"
}
},
"uuid": "6cc599ab7a85bf3b"
},
"indexDefsCAS": 3,
"indexDefsErr": null,
"nodeDefsKnown": {
"implVersion": "4.0.0",
"nodeDefs": {
"78fc2ffac2fd9401": {
"container": "",
"extras": "",
"hostPort": "0.0.0.0:8094",
"implVersion": "4.0.0",
"tags": null,
"uuid": "78fc2ffac2fd9401",
"weight": 1
}
},
"uuid": "2f0d18fb750b2d4a"
},
"nodeDefsKnownCAS": 1,
"nodeDefsKnownErr": null,
"nodeDefsWanted": {
"implVersion": "4.0.0",
"nodeDefs": {
"78fc2ffac2fd9401": {
"container": "",
"extras": "",
"hostPort": "0.0.0.0:8094",
"implVersion": "4.0.0",
"tags": null,
"uuid": "78fc2ffac2fd9401",
"weight": 1
}
},
"uuid": "72d6750878551451"
},
"nodeDefsWantedCAS": 2,
"nodeDefsWantedErr": null,
"planPIndexes": {
"implVersion": "4.0.0",
"planPIndexes": {
"myFirstIndex_6cc599ab7a85bf3b_0": {
"indexName": "myFirstIndex",
"indexParams": "",
"indexType": "blackhole",
"indexUUID": "6cc599ab7a85bf3b",
"name": "myFirstIndex_6cc599ab7a85bf3b_0",
"nodes": {
"78fc2ffac2fd9401": {
"canRead": true,
"canWrite": true,
"priority": 0
}
},
"sourceName": "",
"sourceParams": "",
"sourcePartitions": "",
"sourceType": "nil",
"sourceUUID": "",
"uuid": "64bed6e2edf354c3"
}
},
"uuid": "6327debf817a5ec7",
"warnings": {
"myFirstIndex": []
}
},
"planPIndexesCAS": 5,
"planPIndexesErr": null,
"status": "ok"
}
Replan Resource Assignments
POST /api/managerKick
Description
Forces the node to replan resource assignments, (by running the planner, if enabled) and update its runtime state to reflect the latest plan (by running the janitor, if enabled).
Get Node Capabilities
GET /api/managerMeta
Description
Returns information on the node's capabilities, including available indexing and storage options as JSON. This operation is intended to help management tools and web UIs to be more dynamically metadata driven.
-
application/json
Diagnostics
Operations for node diagnostics.
Capture CPU Profiling Information
Capture Memory Profiling Information
Get Diagnostics
Get Node Logs
Get Node Runtime Arguments
Get Node Runtime Information
Capture Memory Profiling Information
POST /api/runtime/profile/memory
Get Diagnostics
GET /api/diag
Description
Returns the full set of diagnostic information from the node as JSON. The response is the union of the responses from the node's other REST API diagnostic and monitoring endpoints.
For example, for a 3 node cluster, you could capture diagnostics for each node with something like:
curl http://cbft-01:8094/api/diag > cbft-01.json
curl http://cbft-02:8094/api/diag > cbft-02.json
curl http://cbft-03:8094/api/diag > cbft-03.json
The response JSON object can be quite large, 100s of KB or much more.
The motivation for this operation is to simplify working with the Couchbase community, forums, technical support, and other engineers, by making data capture from each Search node a single step.
-
application/json
Get Node Logs
GET /api/log
Description
Returns recent log messages and key events for the node as JSON.
-
application/json
Get Node Runtime Arguments
GET /api/runtime/args
Description
Returns information on the node's command-line, parameters, environment variables, and OS process values as JSON.
-
application/json
Responses
HTTP Code | Description | Schema |
---|---|---|
200 |
A JSON object containing the node's runtime arguments. |
Object |
Get Node Runtime Information
GET /api/runtime
Description
Returns information on the node's software, such as version strings and slow-changing runtime settings, as JSON.
-
application/json
Management
Operations for node management.
Monitoring
Operations for node monitoring.
Get Memory Statistics
GET /api/runtime/statsMem
Description
Returns information on the node's low-level garbage collection and memory-related runtime stats as JSON.
-
application/json
Responses
HTTP Code | Description | Schema |
---|---|---|
200 |
A JSON object containing the node's memory statistics. |
Object |
Definitions
This section describes the properties consumed and returned by this REST API.
Cluster Configuration
Index Definitions
Known Nodes
Wanted Nodes
Node Definitions Wrapper
Node Definition
Plan Partitions
Plan Partitions Wrapper
Plan Partition
Partition Nodes Wrapper
Partition Node
Plan Warnings Wrapper
Plan Warnings
Index Definitions Wrapper
Index Definition
Plan Parameters
Log Messages
Runtime Information
Go Runtime Information
Cluster Configuration
Property | Schema | |
---|---|---|
indexDefs |
An object containing Search index definitions and related information. |
|
indexDefsCAS |
Search index definition concurrency (compare and swap) value. |
Integer |
indexDefsErr |
Search index definition error. |
String |
nodeDefsKnown |
An object containing known node definitions and related information. |
|
nodeDefsKnownCAS |
Known node definition concurrency (compare and swap) value. |
Integer |
nodeDefsKnownErr |
Known node definition error. |
String |
nodeDefsWanted |
An object containing wanted node definitions and related information. |
|
nodeDefsWantedCAS |
Wanted node definition concurrency (compare and swap) value. |
Integer |
nodeDefsWantedErr |
Wanted node definition error. |
String |
planPIndexes |
An object containing Search index partitions and related information. |
|
planPIndexesCAS |
Search index partition concurrency (compare and swap) value. |
Integer |
planPIndexesErr |
Search index partition error. |
String |
status |
The status of the operation. |
String |
Index Definitions
Property | Schema | |
---|---|---|
implVersion |
String |
|
indexDefs |
An object containing 1 or more Search index definitions. |
Known Nodes
Property | Schema | |
---|---|---|
implVersion |
String |
|
nodeDefs |
An object containing the definitions of 1 or more nodes. |
|
uuid |
String |
Wanted Nodes
Property | Schema | |
---|---|---|
implVersion |
String |
|
nodeDefs |
An object containing the definitions of 1 or more nodes. |
|
uuid |
String |
Node Definitions Wrapper
Property | Schema | |
---|---|---|
additional |
An object containing the definition of a single node. The name of the property is the UUID of the node. |
Node Definition
Property | Schema | |
---|---|---|
container |
String |
|
extras |
String |
|
hostPort |
String |
|
implVersion |
String |
|
tags |
String |
|
uuid |
String |
|
weight |
Integer |
Plan Partitions
Property | Schema | |
---|---|---|
implVersion |
String |
|
planPIndexes |
An object containing information about 1 or more Search index partitions. |
|
uuid |
String |
|
warnings |
An object containing 0, 1, or more nested objects, each containing warnings that apply to a Search index. |
Plan Partitions Wrapper
Property | Schema | |
---|---|---|
additional |
An object containing information about a single Search index partition. |
Plan Partition
Property | Schema | |
---|---|---|
indexName |
The name of the Search index. For more information, see Initial Settings. |
String |
indexParams |
The Search index's type identifier, type mappings, and analyzers. For more information, see Params Object. |
Object |
indexType |
The type of the Search index. For more information, see Initial Settings. |
String |
indexUUID |
The UUID of the Search index. For more information, see Initial Settings. |
String |
name |
The name of the Search index partition. |
String |
nodes |
An object containing information about 1 or more Search index partition nodes. |
|
sourceName |
The name of the bucket where the Search index is stored. For more information, see Initial Settings. |
String |
sourceParams |
Advanced settings for Search index behavior. For more information, see Initial Settings. |
Object |
sourcePartitions |
String |
|
sourceType |
The type of the bucket where the Search index is stored. For more information, see Initial Settings. |
String |
sourceUUID |
The UUID of the bucket where the Search index is stored. For more information, see Initial Settings. |
String |
uuid |
The UUID of the Search index partition. |
String |
Partition Nodes Wrapper
Property | Schema | |
---|---|---|
additional |
An object containing information about a single Search index partition node. The name of the property is the node UUID. |
Partition Node
Property | Schema | |
---|---|---|
canRead |
Boolean |
|
canWrite |
Boolean |
|
priority |
Integer |
Plan Warnings
An array of warnings. The name of the property is the name of the Search index.
String
array
Index Definitions Wrapper
Property | Schema | |
---|---|---|
additional |
The full Search index definition. For a detailed list of all parameters, see Search Index JSON Properties. |
Index Definition
Property | Schema | |
---|---|---|
name |
The name of the Search index. For more information, see Initial Settings. |
String |
type |
The type of the Search index. For more information, see Initial Settings. |
String |
sourceName |
The name of the bucket where the Search index is stored. For more information, see Initial Settings. |
String |
sourceUUID |
The UUID of the bucket where the Search index is stored. For more information, see Initial Settings. |
String |
sourceParams |
Advanced settings for Search index behavior. For more information, see Initial Settings. |
Object |
sourceType |
The type of the bucket where the Search index is stored. For more information, see Initial Settings. |
String |
params |
The Search index's type identifier, type mappings, and analyzers. For more information, see Params Object. |
Object |
planParams |
The Search index's partitioning and replication settings. For more information, see Plan Params Object. |
|
prevIndexUUID |
The UUID of the previous index. Intended for clients that want to check that they are not overwriting the Search index definition updates of concurrent clients. |
String |
uuid |
The UUID of the Search index. For more information, see Initial Settings. |
String |
Plan Parameters
Property | Schema | |
---|---|---|
hierarchyRules |
String |
|
maxPartitionsPerPIndex |
This setting is deprecated.
Use |
Integer |
indexPartitions |
The number of partitions to split the Search index into, across the nodes you have available in your database with the Search Service enabled. |
Integer |
nodePlanParams |
String |
|
numReplicas |
The number of replicas the Search Service creates for the Search index to ensure high availability. |
Integer |
planFrozen |
Boolean |
Security
The Search REST APIs support HTTP basic authentication. Pass your credentials through HTTP headers.
Manage Cluster
You must have the Full Admin or Cluster Admin role, with permissions to manage the cluster.
Type : http
Read Cluster Settings
You must have the Full Admin or Cluster Admin role, with permission to read cluster settings.
Type : http
Read Cluster Logs
You must have the Full Admin or Cluster Admin role, with permission to read cluster logs.
Type : http
Write Cluster Settings
You must have the Full Admin or Cluster Admin role, with permission to write cluster settings.
Type : http
For more information, see Roles.