Onedata API Reference

REST API references for Onezone, Oneprovider, and Onepanel.

Get all space views

GET /spaces/{sid}/views

Returns the list of all view names in a space. The list is broken down into pages, each with length less or equal to the limit parameter. If the nextPageToken is present in the response, there are more names to list - provide the token in the page_token parameter in the following request.

This operation requires space_view_views privilege.

Example cURL requests

List at most 3 view names starting from page id 757136151113c2f

curl -X GET -H "X-Auth-Token: $TOKEN" \
"https://$HOST/api/v3/oneprovider/spaces/$SPACE_ID/views?limit=3&page_token=757136151113c2f"

{
  "views": [
    "favourites",
    "images",
    "videos"
  ],
  "nextPageToken": "8471726779817b3a"
}

Path parameters

Parameter Type & Description
sid required
string

Space Id in which to list views.

Query parameters

Parameter Type & Description
limit
integer

Allows to limit the number of returned views.

page_token
string

Allows to start the listing from a certain point, identified by the page token.

Request Examples

Shell
oneprovider-rest-cli sid=$SPACE_ID getSpaceViews limit=20 page_token=757136151113c2f

Responses

application/json
200

The list of view names, nextPageToken is present when there is more to list.

PropertyType & Description
views
array of strings

List of space views

nextPageToken
string

Can be used to list views starting after the last on returned list (present only when there is more views to list)

Example

application/json
{
  "views": [
    "images",
    "videos"
  ],
  "nextPageToken": "8471726779817b3a"
}
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

Oneprovider REST API not available.

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."
}