Onedata API Reference

REST API references for Onezone, Oneprovider, and Onepanel.

List user's effective admin privileges

GET /users/{id}/effective_privileges

Returns the list of user's ({id}) admin privileges in Onezone.

Effective privileges are a sum of user's privileges and privileges inherited from his group memberships.

This operation requires oz_view_privileges admin privilege.

Example cURL requests

List user's effective admin privileges in Onezone

curl -u username:password -X GET  \
https://$HOST/api/v3/onezone/users/$USER_ID/effective_privileges


{
  "privileges": [
    "oz_view_privileges",
    "oz_users_list",
    "oz_users_view",
    "oz_groups_list",
    "oz_groups_view",
    "oz_spaces_list",
    "oz_spaces_view",
    "oz_shares_list",
    "oz_shares_view",
    "oz_providers_list",
    "oz_providers_view",
    "oz_handle_services_list",
    "oz_handle_services_view",
    "oz_handles_list",
    "oz_handles_view"
  ]
}

Path parameters

Parameter Type & Description
id required
string

User Id.

Request Examples

Shell
onezone-rest-cli listUserEffectiveAdminPrivileges id=f1c8b1a37aa7447b22eb65a742d40524

Responses

application/json
200

The list of user's effective admin privileges in Onezone.

PropertyType & Description
privileges
array of strings

A list of admin privileges in Onezone.

Example

application/json
{
  "privileges": [
    "oz_view_privileges",
    "oz_users_list",
    "oz_users_view",
    "oz_groups_list",
    "oz_groups_view",
    "oz_spaces_list",
    "oz_spaces_view",
    "oz_shares_list",
    "oz_shares_view",
    "oz_providers_list",
    "oz_providers_view",
    "oz_handle_services_list",
    "oz_handle_services_view",
    "oz_handles_list",
    "oz_handles_view"
  ]
}
400

Invalid request.

PropertyType & Description
error
object

Object describing an error.

id required
string

String identifying the error type. Does not change between error instances.

description required
string

Human readable error description. May contain information specific to given error instance.

details
object

Details about the error instance. The object schema is specific to each error type.

Example

application/json
{
  "error": {
    "id": "badValueString",
    "details": {
      "key": "name"
    },
    "description": "Bad value: provided \"name\" must be a string."
  }
}
401

Authentication error.

PropertyType & Description
error
object

Object describing an error.

id required
string

String identifying the error type. Does not change between error instances.

description required
string

Human readable error description. May contain information specific to given error instance.

details
object

Details about the error instance. The object schema is specific to each error type.

Example

application/json
{
  "error": {
    "id": "badValueString",
    "details": {
      "key": "name"
    },
    "description": "Bad value: provided \"name\" must be a string."
  }
}
403

Authorization error.

PropertyType & Description
error
object

Object describing an error.

id required
string

String identifying the error type. Does not change between error instances.

description required
string

Human readable error description. May contain information specific to given error instance.

details
object

Details about the error instance. The object schema is specific to each error type.

Example

application/json
{
  "error": {
    "id": "badValueString",
    "details": {
      "key": "name"
    },
    "description": "Bad value: provided \"name\" must be a string."
  }
}
404

Resource not found.

PropertyType & Description
error
object

Object describing an error.

id required
string

String identifying the error type. Does not change between error instances.

description required
string

Human readable error description. May contain information specific to given error instance.

details
object

Details about the error instance. The object schema is specific to each error type.

Example

application/json
{
  "error": {
    "id": "badValueString",
    "details": {
      "key": "name"
    },
    "description": "Bad value: provided \"name\" must be a string."
  }
}
500

Internal server Error.

PropertyType & Description
error
object

Object describing an error.

id required
string

String identifying the error type. Does not change between error instances.

description required
string

Human readable error description. May contain information specific to given error instance.

details
object

Details about the error instance. The object schema is specific to each error type.

Example

application/json
{
  "error": {
    "id": "badValueString",
    "details": {
      "key": "name"
    },
    "description": "Bad value: provided \"name\" must be a string."
  }
}