Update view
This method updates existing view definition.
It takes the same arguments as PUT. Only specified parameters will be overwritten.
This operation requires space_manage_views privilege.
Example cURL requests
Update space view
curl -H "X-Auth-Token: $TOKEN" -X PATCH \
-H "Content-type: application/javascript" \
https://$HOST/api/v3/oneprovider/spaces/$SPACE_ID/views/$VIEW_NAME?update_min_changes=10
Path parameters
| Parameter | Type & Description |
|---|---|
| sid required | string Space Id in which view exist. |
| view_name required | string Name of the view. |
Query parameters
| Parameter | Type & Description |
|---|---|
| spatial | boolean Specifies whether view is spatial or not. |
| update_min_changes | integer Minimum number of document changes to trigger re-viewing. |
| replica_update_min_changes | integer Minimum number of document changes to trigger re-viewing of a replica view. |
| providers[] | array Providers which will create view. |
Request body
The view map function.
No schema provided.
Request Examples
cat view.js | oneprovider-rest-cli updateSpaceView sid=$SPACE_ID view_name=$VIEW_NAME 'providers[]=$PROVIDER_ID' -Responses
View updated successfully.
Invalid request.
| Property | Type & Description |
|---|---|
error string Identifier representing internal error code. | |
error_description string Detailed error message. | |
Example
{
"error": "invalid_token",
"error_description": "Provided token could not be validated."
}Forbidden request.
| Property | Type & Description |
|---|---|
error string Identifier representing internal error code. | |
error_description string Detailed error message. | |
Example
{
"error": "invalid_token",
"error_description": "Provided token could not be validated."
}File not found.
| Property | Type & Description |
|---|---|
error string Identifier representing internal error code. | |
error_description string Detailed error message. | |
Example
{
"error": "invalid_token",
"error_description": "Provided token could not be validated."
}Internal server error.
| Property | Type & Description |
|---|---|
error string Identifier representing internal error code. | |
error_description string Detailed error message. | |
Example
{
"error": "invalid_token",
"error_description": "Provided token could not be validated."
}