Collections Permissions

Data Structures

CollectionPermissionModel

Attribute

Type

Required

Description

collection_id

string

Read-only. The collection ID. Uniqueness is required in the combination with user_id and group_id.

subject_type

string {user, group}

yes

Read-only. Type of permission subject.

subject_name

string

yes

Read-only. User or group name.

access_policy

string {view_on_request, view, edit_on_request, full_edit}

yes

Read-only. Access policy level.

user_id

string

If subject_type == user

Read-only. User ID when subject_type is ‘user’. Uniqueness is required in the combination with collection_id and group_id.

group_id

string

If subject_type == group

Read-only. Group ID when subject_type is ‘group’. Uniqueness is required in the combination with collection_id and user_id.

group_users_count

number

If subject_type == group

Read-only. Hidden. Number of users in the group.

group_users_names

string

If subject_type == group

Read-only. Hidden. Comma separated string of user names in the group (for filtering purposes).

Retrieve Available Attributes of the CollectionPermissionModel

Request

Method

GET

Path

/api/v2/objspec/collection_permission

To check allowed methods, available URL parameters and possible responses please refer to the API Overview section.


Get Collection Permissions

Request

Method

GET

Path

/api/v2/collection/<collection_id>/permission

GET /api/v2/collection/<collection_id>/permission

Example Request

curl -s -k -X GET \
  -H 'Authorization: <token>' \
  'https://10.31.135.179/api/v2/collection/8754997675608244225/permission'

Response

{
    "result": "success",
    "collection_permission": [
        {
            "collection_id": "8754997675608244225",
            "subject_type": "user",
            "subject_name": "admin",
            "access_policy": "view_on_request",
            "user_id": "8754997675608244225"
        },
        {
            "collection_id": "8754997675608244225",
            "subject_type": "user",
            "subject_name": "jdoe",
            "access_policy": "view",
            "user_id": "8754997675608244227"
        }
    ]
}