ArangoDB v3.4 reached End of Life (EOL) and is no longer supported.
This documentation is outdated. Please see the most recent version here: Latest Docs
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.
Responses
HTTP 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
{
"error" : false,
"code" : 200,
"result" : [
{
"globallyUniqueId" : "h1118A17A2812/107",
"id" : "107",
"name" : "demoView",
"type" : "arangosearch"
}
]
}
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
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 (string, 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
Responses
HTTP 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/71350
HTTP/1.1 OK
content-type: application/json; charset=utf-8
x-content-type-options: nosniff
{
"error" : false,
"code" : 200,
"name" : "testView",
"type" : "arangosearch",
"id" : "71350",
"globallyUniqueId" : "h1118A17A2812/71350"
}
shell> curl --header 'accept: application/json' --dump - http://localhost:8529/_api/view/71350
HTTP/1.1 OK
content-type: application/json; charset=utf-8
x-content-type-options: nosniff
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
{
"error" : false,
"code" : 200,
"name" : "testView",
"type" : "arangosearch",
"id" : "71355",
"globallyUniqueId" : "h1118A17A2812/71355"
}
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
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
- view-name (string, required): The name of the view.
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
Responses
HTTP 400: If the view-name is missing, then a HTTP 400 is returned.
HTTP 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/71360/properties
HTTP/1.1 OK
content-type: application/json; charset=utf-8
x-content-type-options: nosniff
{
"error" : false,
"code" : 200,
"writebufferSizeMax" : 33554432,
"consolidationPolicy" : {
"type" : "bytes_accum",
"threshold" : 0.10000000149011612
},
"name" : "products",
"globallyUniqueId" : "h1118A17A2812/71360",
"id" : "71360",
"writebufferActive" : 0,
"consolidationIntervalMsec" : 60000,
"cleanupIntervalStep" : 10,
"links" : {
},
"type" : "arangosearch",
"writebufferIdle" : 64
}
shell> curl --header 'accept: application/json' --dump - http://localhost:8529/_api/view/71360/properties
HTTP/1.1 OK
content-type: application/json; charset=utf-8
x-content-type-options: nosniff
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
{
"error" : false,
"code" : 200,
"writebufferSizeMax" : 33554432,
"consolidationPolicy" : {
"type" : "bytes_accum",
"threshold" : 0.10000000149011612
},
"name" : "products",
"globallyUniqueId" : "h1118A17A2812/71366",
"id" : "71366",
"writebufferActive" : 0,
"consolidationIntervalMsec" : 60000,
"cleanupIntervalStep" : 10,
"links" : {
},
"type" : "arangosearch",
"writebufferIdle" : 64
}
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