Groups and roles

Managing groups

List groups/roles

GET /group

Returns list of all groups.

Query Parameters:
 
  • first – Start returning groups from specified number. Default is 1, the beginning of the list.
  • number – Return at most specified number of groups. Default is no limit.
Produces:
  • application/xml, application/jsonGroupListDocument
  • text/plain – CRLF-delimited list of group URIs
Role:

_group_read

Get group/role

GET /group/(group-name)

Returns information about the specified group.

Produces:
  • application/xml, application/jsonGroupDocument
  • text/plain – The URI to the group.
Role:

_group_read

Get role status

GET /group/(group-name)/role

Returns the role status of the specified group.

Produces:
  • text/plain – 1 if group is a role, 0 if group is a regular group
Role:

_group_read

Create a new group

PUT /group/(group-name)

Creates a new group with the specified name.

Status Codes:
  • 200 OK – Group created.
  • 409 Conflict – A group with that name already exists.
Role:

_group_write

Create or update a group

PUT /group/(group-name)

Creates or updates the group with the specified name. Also any specified parent and child associations, users, metadata and description will be added.

Query Parameters:
 
  • clear
    • true - Remove any existing groups and users not in the given document.
    • false (default) - Existing groups and users not in the request document will be kept as is.
Status Codes:
  • 200 OK – Group created.
Accepts:
Role:

_group_write

Delete a group

DELETE /group/(group-name)

Deletes the group with the specified name.

Role:_group_write

Delete multiple groups

New in version 4.8.

DELETE /group

Deletes the groups with the specified names.

Query Parameters:
 
  • name – Comma-separated list of group names. Must not be empty.
Role:

_group_write

Example

DELETE /group?name=teachers,students,guests

Search groups

PUT /group

Simple search of fields groupname, description and metadata.

Query Parameters:
 
  • number – Return at most specified number of groups. Default is 10.
Accepts:
Produces:
  • application/xml, application/jsonGroupListDocument
  • text/plain – CRLF-delimited list of group names

Example

PUT /group
Content-Type: application/xml

<GroupSearchDocument xmlns="http://xml.vidispine.com/schema/vidispine">
    <field>
        <name>groupname</name>
        <value>vidi</value>
    </field>
    <field>
        <name>key</name>
        <value>value</value>
    </field>
</GroupSearchDocument>

Note that keywords groupname and description are reserved to do search on groupname and description fields

The boolean operators AND and OR are supported:

<GroupSearchDocument xmlns="http://xml.vidispine.com/schema/vidispine">
    <field>
        <name>groupname</name>
        <value>vidi</value>
    </field>
    <field>
        <name>description</name>
        <value>vidispine</value>
    </field>
    <operator operation="OR">
        <field>
          <name>key1</name>
          <value>value1</value>
        </field>
        <field>
          <name>key2</name>
          <value>value2</value>
        </field>
    </operator>
</GroupSearchDocument>

Group information

Get group description

GET /group/(group-name)/description

Returns the descriptive text about the specified group.

Produces:
  • text/plain – Group description
Role:

_group_read

Change the description of a group

PUT /group/(group-name)/description

Changes the description of a group.

Accepts:
  • text/plain – The new description.
Role:

_group_write

Group-to-group relations

Get parent groups to a group

GET /group/(group-name)/parents

Returns groups that the specified group belongs to.

Query Parameters:
 
  • traverse
    • true - Return all ancestors.
    • false (default) - Return only direct parents.
Produces:
  • application/xml, application/jsonGroupListDocument
  • text/plain – CRLF-delimeted list of URIs to the groups
Role:

_group_read

Get child groups to a group

GET /group/(group-name)/children

Returns groups that belongs to the specified group.

Query Parameters:
 
  • traverse
    • true - Return all descendants.
    • false (default) - Return only direct children.
Produces:
  • application/xml, application/jsonGroupListDocument
  • text/plain – CCRLF-delimeted list of URIs to the groups
Role:

_group_read

Add a group to another group

PUT /group/(group-name)/group/(child-groupname)

Creates parent-child relation between the two specified groups.

Role:_group_write

Remove a group from another group

DELETE /group/(group-name)/group/(child-groupname)

Removes the parent-child relation between the two specified groups.

Role:_group_write

Group-to-user relations

Users belonging to group

GET /group/(group-name)/users

Returns all users belonging to the group/role, directly or indirectly.

Query Parameters:
 
  • traverse
    • true - Return all users, including users in child groups.
    • false (default) - Return only direct users.
Produces:
Role:

_group_read

Add a user to a group

PUT /group/(group-name)/user/(username)

Adds the specified user to the specified group.

Role:_group_write

Remove a user from a group

DELETE /group/(group-name)/user/(username)

Removes the specified user from the specified group.

Role:_group_write