---
title: Getting Views Information
description: To retrieve views information, access any server node in a cluster
  on port 8092.
pubDate: 2026-08-17T09:53:44.266Z
antora:
  editUrl: https://github.com/couchbase/docs-server/edit/release/7.2/modules/rest-api/pages/rest-views-get.adoc
  xref: xref:7.2@server:rest-api:rest-views-get.adoc[]
---

[Consult the llms.txt file for a full list of contents](/llms.txt)
[View original HTML](/server/7.2/rest-api/rest-views-get.html)

# Getting Views Information

> To retrieve views information, access any server node in a cluster on port 8092\. 

## [](#http-method-and-uri)HTTP method and URI

GET /[bucket-name]/_design/[ddoc-name]/_view/[view-name]

Where:

* bucket-name is the name of the bucket.
* ddoc-name is the name of the design document that contains the view.
* view-name is the name of the corresponding view within the design document.

Development view, the `ddoc-name` is prefixed with `dev_`. For example, the design document `beer` is accessible as a development view using `dev_beer`.

Production views are accessible using their name only.

| **Request data**            | None                                  |
| --------------------------- | ------------------------------------- |
| **Response data**           | JSON of the rows returned by the view |
| **Authentication required** | No                                    |

Parameters (optional):

__Table 1\. Views parameters__
| Parameters      | Type    | Description                                                                                                                                                                                                                                                                                            |
| --------------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| descending      | boolean | Return the documents in descending by key order.                                                                                                                                                                                                                                                       |
| endkey          | string  | Stop returning records when the specified key is reached. Key must be specified as a JSON value.                                                                                                                                                                                                       |
| endkey\_docid   | string  | Stop returning records when the specified document ID is reached.                                                                                                                                                                                                                                      |
| full\_set       | boolean | Use the full cluster data set (development views only).                                                                                                                                                                                                                                                |
| group           | boolean | Group the results using the reduce function to a group or single row. Note: Do not use group with group\_level because they are not compatible.                                                                                                                                                        |
| group\_level    | numeric | Specify the group level to be used. Note: Do not use group\_level with group because they are not compatible.                                                                                                                                                                                          |
| inclusive\_end  | boolean | Specifies whether the specified end key is included in the result. Note: Do not use inclusive\_end with key or keys.                                                                                                                                                                                   |
| key             | string  | Return only documents that match the specified key. Key must be specified as a JSON value.                                                                                                                                                                                                             |
| keys            | array   | Return only documents that match each of keys specified within the given array. Key must be specified as a JSON value. Sorting is not applied when using this option.                                                                                                                                  |
| limit           | numeric | Limit the number of the returned documents to the specified number.                                                                                                                                                                                                                                    |
| on\_error       | string  | Sets the response in the event of an error. Supported values: continue : Continue to generate view information in the event of an error, including the error information in the view response stream. stop : Stop immediately when an error condition occurs. No further view information is returned. |
| reduce          | boolean | Use the reduction function.                                                                                                                                                                                                                                                                            |
| skip            | numeric | Skip this number of records before starting to return the results.                                                                                                                                                                                                                                     |
| stale           | string  | Allow the results from a stale view to be used. Supported values: false : Force a view update before returning data. ok : Allow stale views. update\_after : Allow stale view, update view after it has been accessed.                                                                                 |
| startkey        | string  | Return records with a value equal to or greater than the specified key. Key must be specified as a JSON value.                                                                                                                                                                                         |
| startkey\_docid | string  | Return records starting with the specified document ID.                                                                                                                                                                                                                                                |

## [](#syntax)Syntax

Curl request syntax:

GET http://[localhost]:8092/[bucket-name]/_design/[ddoc-name]/_view/[view-name]

To access a view stored within an SASL password-protected bucket, include the bucket name and bucket password within the URL of the request:

GET http://[bucket-name]:[password]@[localhost]: \
8092/[bucket-name]/_design/[ddoc-name]/_view/[view-name]

> [!NOTE]
> Additional arguments to the URL request can be used to select information from the view, and provide limit, sorting and other options.

To output only ten items:

GET http://[localhost]:8092/[bucket-name]/_design/[ddoc-name]/_view/[view-name]?limit=10

> [!IMPORTANT]
> The formatting of the URL follows the HTTP specification. The first argument is separated from the base URL using a question mark ( `?` ). Additional arguments are separated using an ampersand ( `&` ). Special characters are quoted or escaped according to the HTTP standard rules.

## [](#example)Example

Curl request example:

In the following example, an empty development view is created with a view name, johnView, and a design document name, \_design/dev\_john in the bucket, test2.

curl -u Administrator:password -X GET \
  http://10.5.2.117:8092/test2/_design/dev_john/_view/johnView

## [](#response)Response

View responses are JSON structures containing information about the number of rows in the view and the individual view information.

The following shows an empty View result from the previous example.

{
    "rows": [],
    "total_rows": 0
}

The following shows a populated View result:

{
  "total_rows": 576,
  "rows" : [
      {"value" : 13000, "id" : "James", "key" : ["James", "Paris"] },
      {"value" : 20000, "id" : "James", "key" : ["James", "Tokyo"] },
      {"value" : 5000,  "id" : "James", "key" : ["James", "Paris"] },
…
    ]
}

The JSON response returns the following fields:

* total\_rows  
A count of the number of rows of information within the stored View. This shows the number of rows in the full View index, not the number of rows in the returned data set.
* rows  
An array, with each element of the array containing the returned view data, consisting of the value, document ID that generated the row, and the key.

In the event of an error or incorrect parameters, the HTTP response is a JSON structure with a basic `error` field and a more detailed `reason` field. For example:

{
  "error":"bad_request",
  "reason":"invalid UTF-8 JSON: {{error,{1,\"lexical error: \
  invalid char in json text.\\n\"}},\n\"Paris\"}"
}

> [!NOTE]
> With client libraries, error response behavior might differ between client SDKs, but in all cases, an invalid query triggers an error or exception.