Modifying a View
Rename view
renames a view
PUT /_api/view/{view-name}/rename
Path Parameters
- view-name (required): The name of the view to rename.
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. Valid types are:
- arangosearch: ArangoSearch view
- properties : The view properties.
Note: this method is not available in a cluster. - ???
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 PUT --data-binary @- --dump - http://localhost:8529/_api/view/products1/rename <<EOF
{
"name" : "viewNewName"
}
EOF
HTTP/1.1 200 OK
content-type: application/json; charset=utf-8
x-content-type-options: nosniff
{
"id" : "15137",
"name" : "viewNewName",
"type" : "arangosearch",
"properties" : {
"commit" : {
"cleanupIntervalStep" : 10,
"commitIntervalMsec" : 60000,
"commitTimeoutMsec" : 5000,
"consolidate" : {
"bytes" : {
"segmentThreshold" : 300,
"threshold" : 0.8500000238418579
},
"bytes_accum" : {
"segmentThreshold" : 300,
"threshold" : 0.8500000238418579
},
"count" : {
"segmentThreshold" : 300,
"threshold" : 0.8500000238418579
},
"fill" : {
"segmentThreshold" : 300,
"threshold" : 0.8500000238418579
}
}
},
"locale" : "C",
"collections" : [ ],
"links" : {
}
}
}
hide response body
shell> curl -X PUT --data-binary @- --dump - http://localhost:8529/_api/view/products1/rename <<EOF
{
"name" : "viewNewName"
}
EOF
HTTP/1.1 200 OK
content-type: application/json; charset=utf-8
x-content-type-options: nosniff