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

Creating Views

The JSON definition for creating of a view is implementation dependant and varies for each supported view type. Please refer to the proper section of the required view type for details.

However, in general the format is the following:

Create an ArangoDB view

creates an ArangoDB view

POST /_api/view#arangosearch

A JSON object with these properties is required:

  • name: The name of the view.

  • type: The type of the view. must be equal to one of the supported ArangoDB view types.

  • properties: The view properties. If specified, then properties should be a JSON object containing the attributes supported by the specific view type.

Creates a new view with a given name and properties if it does not already exist.

Note: view can’t be created with the links. Please use PUT/PATCH for links management.

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

shell> curl -X POST --header 'accept: application/json' --data-binary @- --dump - http://localhost:8529/_api/view <<EOF
{ 
  "name" : "testViewBasics", 
  "type" : "arangosearch" 
}
EOF

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

Show response body