Onedata API Reference

REST API references for Onezone, Oneprovider, and Onepanel.

Update group's handle service privileges

PATCH /handle_services/{id}/groups/{gid}/privileges

Updates group's ({gid}) privileges in a handle service ({id}).

This operation requires handle_service_update privilege. For administrator who does not belong to this group oz_handle_services_set_privileges privilege is required.

The grant field specifies a list of privileges to be granted. The revoke field specifies a list of privileges to be revoked. At least one of those fields must be given.

Example cURL requests

Update group's privileges in a handle service

curl -u username:password -X PATCH -H "Content-type: application/json" \
-d '{"grant": ["handle_service_register_handle"], "revoke": ["handle_service_update"]}' \
https://$HOST/api/v3/handle_services/$HANDLE_SERVICE_ID/groups/$GROUP_ID/privileges

Path parameters

Parameter Type & Description
id required
string

Handle service Id.

gid required
string

Group Id.

Request body

application/json

Handle service privileges update request.

PropertyType & Description
grant
array of strings

A list of privileges in the handle service.

revoke
array of strings

A list of privileges in the handle service.

Request Examples

application/json
{
  "grant": [
    "handle_service_update",
    "handle_service_view"
  ],
  "revoke": [
    "handle_service_delete",
    "handle_service_list_handles",
    "handle_service_register_handle"
  ]
}

Responses

application/json
204

The privileges have been updated.

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