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/json – GroupListDocument
- text/plain – CRLF-delimited list of group names
Role: _group_read
Get group/role¶
- GET /group/(group-name)¶
Returns information about the specified group.
Produces: - application/xml, application/json – GroupDocument
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/(groupname)¶
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 and setup a new group¶
- PUT /group/(groupname)¶
Creates a new group with the specified name. Also any specified parent and child associations, users, metadata and description will be added.
Status Codes: - 200 OK – Group created.
- 409 Conflict – A group with that name already exists.
Accepts: - application/xml, application/json – GroupDocument
Role: _group_write
Delete a group¶
- DELETE /group/(groupname)¶
Deletes the group with the specified name.
Role: _group_write
Search groups¶
- PUT /group¶
Simple search of fields groupname, description and metadata.
Accepts: - application/xml, application/json – GroupListDocument
Produces: - application/xml, application/json – GroupSearchDocument
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¶
Group-to-group relations¶
Get parent groups to a group¶
- GET /group/(group-name)/parents¶
Returns groups that the specified group belongs to.
Produces: - application/xml, application/json – GroupListDocument
- text/plain – CRLF-delimeted list of Tabbed tuples of group name, group description
Role: _group_read
Get child groups to a group¶
- GET /group/(group-name)/children¶
Returns groups that belongs to the specified group.
Produces: - application/xml, application/json – GroupListDocument
- text/plain – CRLF-delimeted list of Tabbed tuples of group name, group description
Role: _group_read
Group-to-user relations¶
Users belonging to group¶
- GET /group/(group-name)/users¶
Returns all users belonging to the group/role, directly or indirectly.
Produces: - application/xml, application/json – UserListDocument
- text/plain – CRLF-delimeted list of Tabbed tuples of user name, user real name
Role: _group_read