Onedata API Reference

REST API references for Onezone, Oneprovider, and Onepanel.

Get effective user's harvester membership intermediaries

GET /harvesters/{id}/effective_users/{uid}/membership

Returns the effective user's ({uid}) harvester membership intermediaries - entities from which the user inherits access to the harvester ({id}). Special keyword "self" in entity id indicates that the user ({uid}) has a direct access to the harvester ({id}).

This operation requires any of the following authorization:

  • as user ({uid}) who is an effective member of the harvester ({id})
  • as user who has harvester_view privilege in the harvester ({id})
  • as user who has oz_harvesters_view admin privilege.

Example cURL requests

Get effective user's harvester membership intermediaries

curl -u admin:password -X GET \
https://$HOST/api/v3/onezone/harvesters/$HARVESTER_ID/effective_users/$USER_ID/membership

{
  "intermediaries": [
    {"type": "group", "id": "95527367966a95639e93a88718450b36"},
    {"type": "group", "id": "2ef3de15fd49b3d6420f58428a6ad219"},
    {"type": "harvester", "id": "self"}
  ]
}

Path parameters

Parameter Type & Description
id required
string

Harvester Id.

uid required
string

User Id.

Request Examples

Shell
onezone-rest-cli getEffectiveUserHarvesterMembershipIntermediaries id=b752ceafabb662b4e5728b2ded25cdd1 uid=a5b469a2b0516b662a49da74d6d7d7bc

Responses

application/json
200

The list of membership intermediaries.

PropertyType & Description
intermediaries
array of objects
type
string

The type of the intermediary.

Enum:
groupspaceproviderhandle_servicehandlecluster
id
string

The id of the intermediary.

Example

application/json
{
  "intermediaries": [
    {
      "type": "group",
      "id": "ef228f31345699bbfa74b030517965a2"
    },
    {
      "type": "group",
      "id": "b55b907444dd00aab8cbe8dcb82681fd"
    },
    {
      "type": "space",
      "id": "self"
    }
  ]
}
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."
  }
}