Table of Contents
Member List Representation
This article describes the JSON format that represents a list of members of a group in the Users and Groups API.
Table of Contents
Methods
GET
Members of a group can be either users or groups (also called sub groups or children). It is not possible to list all user and group members in one representation. The list of users and the list of sub groups can be requested separately as follows:
GET href Accept: application/vnd.fotoware.user-list+json
Read all users which are members of the group. Returns a User List Representation.
GET href Accept: application/vnd.fotoware.group-list+json
Read all sub groups of the group. Returns a Group List Representation.
POST
POST href Content-Type: application/vnd.fotoware.user-link-list+json {...}
Adds existing users to the member list of a group.
The request body MUST be a UserLinkList representation containing the URLs of the users to add to the group.
It is allowed to specify users which are already members of the group. These users will be ignored.
If successful, the server sends the following response:
204 No Content
PATCH (remove some users from a group)
PATCH href Content-Type: application/vnd.fotoware.user-list-update+json { delete: [ {href: "user1_url"}, {href: "user2_url"}, ... ] }
Removes some users from a group.
The request body contains the URLs of the users to be removed (here user1_url
, user2_url
, ...).
It is allowed to specify users which are not members of the group. These users will be ignored.
If successful, the server sends the following response:
204 No Content
PATCH (remove all users from a group)
PATCH href Content-Type: application/vnd.fotoware.user-list-update+json { data: [] }
Removes all users from a group.
The request body is a constant structure as shown above, which symbolizes an empty user link list.
If successful, the server sends the following response:
204 No Content