Onedata API Reference

REST API references for Onezone, Oneprovider, and Onepanel.

Update view

PATCH /spaces/{sid}/views/{view_name}

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

application/javascript

The view map function.

No schema provided.

Request Examples

Shell
cat view.js | oneprovider-rest-cli updateSpaceView sid=$SPACE_ID view_name=$VIEW_NAME 'providers[]=$PROVIDER_ID' -

Responses

application/json
204

View updated successfully.

400

Invalid request.

PropertyType & Description
error
string

Identifier representing internal error code.

error_description
string

Detailed error message.

Example

application/json
{
  "error": "invalid_token",
  "error_description": "Provided token could not be validated."
}
403

Forbidden request.

PropertyType & Description
error
string

Identifier representing internal error code.

error_description
string

Detailed error message.

Example

application/json
{
  "error": "invalid_token",
  "error_description": "Provided token could not be validated."
}
404

File not found.

PropertyType & Description
error
string

Identifier representing internal error code.

error_description
string

Detailed error message.

Example

application/json
{
  "error": "invalid_token",
  "error_description": "Provided token could not be validated."
}
500

Internal server error.

PropertyType & Description
error
string

Identifier representing internal error code.

error_description
string

Detailed error message.

Example

application/json
{
  "error": "invalid_token",
  "error_description": "Provided token could not be validated."
}