Search:

Search all manuals
Search this manual
Manual
Couchbase Server Manual 2.0
Community Wiki and Resources
Download Couchbase Server 2.0
Couchbase Developer Guide 2.0
Client Libraries
Couchbase Server Forum
Additional Resources
Community Wiki
Community Forums
Couchbase SDKs
Parent Section
Couchbase Server Manual 2.0
Child Sections
Chapters

Chapter 8. Using the REST API

Table of Contents

8.1. Types of Resources
8.2. HTTP Request Headers
8.3. HTTP Status Codes
8.4. Using the Couchbase Administrative Console
8.5. Managing Couchbase Nodes
8.5.1. Retrieving Statistics from Nodes
8.5.2. Provisioning a Node
8.5.3. Configuring Index Path for a Node
8.5.4. Setting Username and Password for a Node
8.5.5. Configuring Node Memory Quota
8.5.6. Providing Hostnames for Nodes
8.5.7. Manually Failing Over a Node
8.6. Managing Buckets
8.6.1. Viewing Buckets and Bucket Operations
8.6.2. Getting Individual Bucket Information
8.6.3. Getting Bucket Statistics
8.6.4. Using the Bucket Streaming URI
8.6.5. Creating and Editing Data Buckets
8.6.6. Getting Bucket Configuration
8.6.7. Modifying Bucket Parameters
8.6.8. Increasing the Memory Quota for a Bucket
8.6.9. Changing Bucket Authentication
8.6.10. Compacting Bucket Data and Indexes
8.6.11. Deleting a Bucket
8.6.12. Flushing a Bucket
8.7. Managing Clusters
8.7.1. Viewing Cluster Details
8.7.2. Adding a Node to a Cluster
8.7.3. Joining a Node into a Cluster
8.7.4. Removing a Node from a Cluster
8.7.5. Initiating a Rebalance
8.7.6. Getting Rebalance Progress
8.7.7. Adjusting Rebalance during Compaction
8.7.8. Retrieving Auto-Failover Settings
8.7.9. Enabling and Disabling Auto-Failover
8.7.10. Resetting Auto-Failover
8.7.11. Setting Maximum Buckets for Clusters
8.7.12. Setting Maximum Parallel Indexers
8.7.13. View Settings for Email Notifications
8.7.14. Enabling and Disabling Email Notifications
8.7.15. Sending Test Emails
8.7.16. Managing Internal Cluster Settings
8.7.17. Disabling Consistent Query Results on Rebalance
8.8. Managing Views with REST
8.9. Managing Cross Data Center Replication (XDCR)
8.9.1. Getting a Destination Cluster Reference
8.9.2. Creating a Destination Cluster Reference
8.9.3. Deleting a Destination Cluster Reference
8.9.4. Creating XDCR Replications
8.9.5. Deleting XDCR Replications
8.9.6. Viewing Internal XDCR Settings
8.9.7. Changing Internal XDCR Settings
8.9.8. Getting XDCR Stats via REST
8.10. Using System Logs
8.11. Client Logging Interface

The Couchbase REST API enables you to manage a Couchbase Server deployment as well as perform operations such as storing design documents and querying for results. The REST API conforms to Representational State Transfer (REST) constraints, in other words, the REST API follows a RESTful architecture. You use the REST API to manage clusters, server nodes, and buckets, and to retrieve run-time statistics within your Couchbase Server deployment. If you want to develop your own Couchbase-compatible SDK, you will also use the REST-API within your library to handle views. Views enable you to index and query data based on functions you define. For more information about views, see Chapter 9, Views and Indexes.

Tip

The REST API should not be used to read or write data to the server. Data operations such asset and get for example, are handled by Couchbase SDKs. See Couchbase SDKs.

The REST API accesses several different systems within the Couchbase Server product.

Please provide RESTful requests; you will not receive any handling instructions, resource descriptions, nor should you presume any conventions for URI structure for resources represented. The URIs in the REST API may have a specific URI or may even appear as RPC or some other architectural style using HTTP operations and semantics.

In other words, you should build your request starting from Couchbase Cluster URIs, and be aware that URIs for resources may change from version to version. Also note that the hierarchies shown here enable your reuse of requests, since they follow a similar pattern for accessing different parts of the system.

The REST API is built on a number of basic principles:

In order to use the REST API you should be aware of the different terms and concepts discussed in the following sections.