ArangoDB v3.10 reached End of Life (EOL) and is no longer supported.
This documentation is outdated. Please see the most recent stable version.
HTTP interface for search-alias Views
The HTTP API for Views lets you manage search-alias
Views, including adding and removing inverted indexes
Create a search-alias View
Examples
curl -X POST --header 'accept: application/json' --data-binary @- --dump - http://localhost:8529/_api/view
{
"name": "products",
"type": "search-alias",
"indexes": [
{
"collection": "books",
"index": "inv-idx"
}
]
}
Get information about a View
The result is an object briefly describing the View with the following attributes:
id
: The identifier of the Viewname
: The name of the Viewtype
: The type of the View as string
Examples
Using an identifier:
curl --header 'accept: application/json' --dump - http://localhost:8529/_api/view/71485
Using a name:
curl --header 'accept: application/json' --dump - http://localhost:8529/_api/view/productsView
Read properties of a View
Returns an object containing the definition of the View identified by view-name.
The result is an object with a full description of a specific View, including View type dependent properties.
Examples
Using an identifier:
curl --header 'accept: application/json' --dump - http://localhost:8529/_api/view/71501/properties
Using a name:
curl --header 'accept: application/json' --dump - http://localhost:8529/_api/view/productsView/properties
List all Views
Returns an object containing a listing of all Views in a database, regardless of their type. It is an array of objects with the following attributes:
id
name
type
Examples
Return information about all Views:
curl --header 'accept: application/json' --dump - http://localhost:8529/_api/view
Replace the properties of a search-alias View
search-alias
View.Examples
curl -X PUT --header 'accept: application/json' --data-binary @- --dump - http://localhost:8529/_api/view/productsView/properties
{
"indexes": [
{
"collection": "books",
"index": "inv_descr"
}
]
}
Update the properties of a search-alias View
search-alias
View.Examples
curl -X PATCH --header 'accept: application/json' --data-binary @- --dump - http://localhost:8529/_api/view/productsView/properties
{
"indexes": [
{
"collection": "books",
"index": "inv_descr"
}
]
}
Rename a View
Renames a View. Expects an object with the attribute(s)
name
: The new name
It returns an object with the attributes
id
: The identifier of the View.name
: The new name of the View.type
: The View type.
Examples
curl -X PUT --header 'accept: application/json' --data-binary @- --dump - http://localhost:8529/_api/view/productsView/rename
{
"name": "catalogView"
}
Drop a View
Drops the View identified by view-name
.
If the View was successfully dropped, an object is returned with the following attributes:
error
:false
id
: The identifier of the dropped View
Examples
Using an identifier:
curl -X DELETE --header 'accept: application/json' --dump - http://localhost:8529/_api/view/71551
Using a name:
curl -X DELETE --header 'accept: application/json' --dump - http://localhost:8529/_api/view/productsView