Getting Information about a View

View Listing

A listing of all views in a database, regardless of their type, may be obtained via:

List all views

returns all views

GET /_api/view

Returns an object containing an array of all view descriptions.

Return Codes

  • 200: The list of views

Examples

Return information about all views:

shell> curl --header 'accept: application/json' --dump - http://localhost:8529/_api/view

HTTP/1.1 OK
content-type: application/json; charset=utf-8
x-content-type-options: nosniff

Show response body

Basic View Information

Basic view information, common to all view types, for a specific view may be obtained via:

Return information about a view

returns a view

GET /_api/view/{view-name}

Path Parameters

  • view-name (required): The name of the view.

The result is an object describing the view with the following attributes:

  • id: The identifier of the view
  • name: The name of the view
  • type: The type of the view as string

Return Codes

  • 404: If the view-name is unknown, then a HTTP 404 is returned.

Examples

Using an identifier:

shell> curl --header 'accept: application/json' --dump - http://localhost:8529/_api/view/107920

HTTP/1.1 OK
content-type: application/json; charset=utf-8
x-content-type-options: nosniff

Show response body

Using a name:

shell> curl --header 'accept: application/json' --dump - http://localhost:8529/_api/view/testView

HTTP/1.1 OK
content-type: application/json; charset=utf-8
x-content-type-options: nosniff

Show response body

Full View Information

A full description, populated with additional properties depending on view type, for a specific view may be obtained via:

Read properties of a view

reads the properties of the specified view

GET /_api/view/{view-name}/properties

Path Parameters

Returns an object containing the definition of the view identified by view-name.

The result is an object describing the view with the following attributes:

  • id: The identifier of the view
  • name: The name of the view
  • type: The type of the view as string
  • any additional view implementation specific properties

  • view-name (required): The name of the view.

Return Codes

  • 400: If the view-name is missing, then a HTTP 400 is returned.

  • 404: If the view-name is unknown, then a HTTP 404 is returned.

Examples

Using an identifier:

shell> curl --header 'accept: application/json' --dump - http://localhost:8529/_api/view/107934/properties

HTTP/1.1 OK
content-type: application/json; charset=utf-8
x-content-type-options: nosniff

Show response body

Using a name:

shell> curl --header 'accept: application/json' --dump - http://localhost:8529/_api/view/products/properties

HTTP/1.1 OK
content-type: application/json; charset=utf-8
x-content-type-options: nosniff

Show response body