User right

Method: list

Authorization is required. Group administrator's privileges required.

Request

HTTP request

GET https://<YOUR_DOMAIN>/api/v1/en_US/user-right/list/{groupId}

Parameters

property value description
groupId guid The elements group's ID

Request body

Do not supply a request body with this method.

Response

If successful, this method returns a response JSON with the following structure:

{
    "success": true,
    "message": "Amet Lorem sit enim dolor labore enim.",
    "timestamp": "2014-03-03T23:20:23Z",
    "errors": [],
    "object": {
        "offset": 0,
        "userRights": [
            {
    			"id": 1,
				"type": "userRight",
				"group": {
					"id": "44496ef3-3d66-43b1-90e1-c93ed097241e",
					"name": "home",
					"slug": "Home",
					"thumbUrl": "http://demo.hivesocialnow.com/logo/72_635267855582630000.png",
					"url": "http://demo.hivesocialnow.com/Home/"
				},
				"key": "user_allow",
				"description": "View the Users' list of this group. Change the user type for the user members of this group. Ban users. Search in the users' list.",
				"rightAllowanceId": 4,
				"rightAllowanceName": "allow",
				"rightGroupId": 1,
				"rightGroupName": "users",
				"userRoleId": 2,
				"userRoleName": "regular",
				"defaultUserRoleId": 5,
				"rightCategoryId": 3,
				"rightCategoryName": "System"
            }
        ]
    }
}

The general response properties are described on the Response format page. Here are the list of the specific properties for this method.

property value description
id integer The right Id
group object The group that you have requested this right setting for
key string The right identification string
description string some words about the right
rightAllowanceId id A way to group rights, based on the right purpose. The alternatives are:
  • 1 - Read
  • 2 - Modify
  • 3 - Delete
  • 4 - Allow
rightAllowanceName string The allowance label
rightGroupId integer Categorization of rights based on the influenced target.
rightGroupName string The right group label
userRoleId integer The current setting of this right for the requested group as role Id. Alternatives are:
  • 2 - regular
  • 3 - member
  • 4 - moderator
  • 5 - administrator
userRoleName integer The current setting of this right for the requested group as role name
defaultUserRoleId integer The default role for this right
rightCategoryId integer Categorization of rights for easier maintenance in the administration interface.
rightCategoryName string The categorization label

Method: get

Authorization is required. Group administrator's privileges required.

Request

HTTP request

GET https://<YOUR_DOMAIN>/api/v1/en_US/user-right/{rightId}/group/{groupId}

Parameters

property value description
rightId integer The rights's ID
groupId guid For which group you need to get the right's object

Request body

Do not supply a request body with this method.

Response

If successful, this method returns a response JSON with the following structure:

{
  "success": true,
  "message": "Labore Lorem nostrud pariatur eiusmod sit.",
  "timestamp": "2014-03-03T23:20:23Z",
  "errors": [],
  "object": {
    "id": 5,
    "type": "userRight",
    "group": {
      "id": "44496ef3-3d66-43b1-90e1-c93ed097241e",
      "name": "home",
      "slug": "Home",
      "thumbUrl": "http://demo.hivesocialnow.com/logo/72_635267855582630000.png",
      "url": "http://demo.hivesocialnow.com/Home/"
    },
    "key": "personalization_allow",
    "description": "Change Order, manage Layout and Appearance of the modules in the current group. Only available and allowed modules can be managed.",
    "rightAllowanceId": 4,
    "rightAllowanceName": "allow",
    "rightGroupId": 2,
    "rightGroupName": "personalization",
    "userRoleId": 5,
    "userRoleName": "administrator",
    "defaultUserRoleId": 5,
    "rightCategoryId": 3,
    "rightCategoryName": "System"
  }
}

The general response properties are described on the Response format page. Here are the list of the specific properties for this method.

Method: update

Authorization is required. Group administrator's privileges required.

Request

HTTP request

PUT https://<YOUR_DOMAIN>/api/v1/en_US/user-right/{rightId}/group/{groupId}

Parameters

property value description
rightId integer The rights's ID
groupId guid For which group you need to update the right's object

Request body

property value description
userRoleId integer The id of the new role

Response

If successful, this method returns a response JSON with the following structure:

{
  "timestamp": "2014-03-03T23:20:23Z",
  "success": false,
  "message": "Aliqua anim consequat amet cupidatat proident amet amet.",
  "errors": [
    {
      "key": "userRoleId",
      "value": "",
      "message": "Invalid user role Id"
    }
  ],
  "object": {
    "id": 5,
    "type": "userRight",
    "group": {
      "id": "44496ef3-3d66-43b1-90e1-c93ed097241e",
      "name": "home",
      "slug": "Home",
      "thumbUrl": "http://demo.hivesocialnow.com/logo/72_635267855582630000.png",
      "url": "http://demo.hivesocialnow.com/Home/"
    },
    "key": "personalization_allow",
    "description": "Change Order, manage Layout and Appearance of the modules in the current group. Only available and allowed modules can be managed.",
    "rightAllowanceId": 4,
    "rightAllowanceName": "allow",
    "rightGroupId": 2,
    "rightGroupName": "personalization",
    "userRoleId": 5,
    "userRoleName": "administrator",
    "defaultUserRoleId": 5,
    "rightCategoryId": 3,
    "rightCategoryName": "System"
  }
}

The general response properties are described on the Response format page. Here are the list of the specific properties for this method.

property value description
success Boolean Whether the requested operation is successful or not
message String Human readable error information
errors List (object) List of validation errors, if any. The "key" property value is matched to one of the record's fields
object object The object that caused the validation errors or the updated object. Have in mind that, if the server requires string trimming or data manipulation after the user submission, it is applied in this object. In this way the returned object can differe from the posted one.

Method: reset to default

Authorization is required. Group administrator's privileges required. Resets all rights for this group, to their defauts

Request

HTTP request

POST https://<YOUR_DOMAIN>/api/v1/en_US/user-right/reset-all

Parameters

Do not supply a request parameters with this method.

Request body

property value description
groupId guid In which group you need to reset the rights

Response

If successful, this method returns a response JSON with the following structure:

{
  "timestamp": "2014-03-03T23:20:23Z",
  "success": true,
  "message": "Aliqua anim consequat amet cupidatat proident amet amet.",
  "errors": [],
  "object": {
    "offset": 0,
    "userRights": [
      {
        "id": 1,
        "type": "userRight",
        "group": {
          "id": "44496ef3-3d66-43b1-90e1-c93ed097241e",
          "name": "home",
          "slug": "Home",
          "thumbUrl": "http://demo.hivesocialnow.com/logo/72_635267855582630000.png",
          "url": "http://demo.hivesocialnow.com/Home/"
        },
        "key": "user_allow",
        "description": "View the Users' list of this group. Change the user type for the user members of this group. Ban users. Search in the users' list.",
        "rightAllowanceId": 4,
        "rightAllowanceName": "allow",
        "rightGroupId": 1,
        "rightGroupName": "users",
        "userRoleId": 2,
        "userRoleName": "regular",
        "defaultUserRoleId": 5,
        "rightCategoryId": 3,
        "rightCategoryName": "System"
      }
    ]
  }
}

The general response properties are described on the Response format page. Here are the list of the specific properties for this method.

property value description
success Boolean Whether the requested operation is successful or not
message String Human readable error information
errors List (object) List of validation errors, if any. The "key" property value is matched to one of the record's fields
object object The new state of the group's rights