Table of Contents
Group List Representation
This article describes the JSON format that represents a list of groups in the Users and Groups API.
Table of Contents
MIME Type
application/vnd.fotoware.group-list+json
Part of ...
Example
|
|
Attributes
Name | Type | Description |
---|---|---|
data | Array of Group representations | Contains all users which are in this part of the user list. The format of each item is the same as the group representation of a single user. |
paging | Paging information (object) |
Paging information. For more information, see Paging. If the list has only one page, then this field is null. |
paging.next |
URL (string), links to GroupList |
Link to the next page of the list. If the current page is the last page, then this link is null. |
paging.prev |
URL (string), links to GroupList |
Link to the previous page of the list. If the current page is the first page, then this link is null. |
paging.first |
URL (string), links to GroupList |
Link to the first page of the list. This is never null. |
paging.last |
URL (string), links to GroupList |
Link to the last page of the list. This is never null. |
Methods
The following HTTP verbs are allowed on user lists:
GET (list all groups)
GET href Accept: application/vnd.fotoware.group-list+json
Read group list. Returns the representation described above.
GET (search for groups)
GET href?q=query Accept: application/vnd.fotoware.group-list+json
Search for groups. Returns the representation described above.
The query parameter is a free-form string which is matched against the name and description of groups. The string must be percent-encoded so it contains only valid URL characters. For example, spaces must be escaped as "%20" as in the following example:
GET .../?q=photo%20editors Accept: application/vnd.fotoware.group-list+json
which searches for groups whose name or description contain the text "photo editors".
Search is case-insensitive, so a search query such as "editors" will match "editors as well as "Editors" and "EDITORS".
POST (create group)
POST href Content-Type: application/vnd.fotoware.group+json {...}
Creates a new group. This request is only allowed on the first page.
The request body MUST be a Group representation, but fields can be omitted. Fields that are not defined in the request body will be set to default values.
Some fields MUST NOT be defined. See the remarks section of the Group documentation for details.
The following fields MUST be defined:
name
If successful, the server sends the following response:
201 Created Location: new_group_url
Where new_group_url
is the URL of the new group, which has a Group representation.