GET /portal/api/current_user/groups
List of groups that the current user belongs to

Supported Formats

json

Examples

app/views/portal/api/groups/index.json.rabl

Params

Param name Description
type
optional

Filter that will limit the returned groups.

Validations:

  • Must be one of: all, owned, joined.

scope
optional

Scope that will limit the returned groups.

Validations:

  • Must be one of: all.

sort_by
optional

Field that returned groups will be sorted by.

Validations:

  • Must be one of: date, name.

order_by
optional

Order that groups sets will be returned in.

Validations:

  • Must be one of: ASC, DSC.

book_category_id
optional

Unique identifier for the book category model that will limit the returned groups.

Validations:

  • Must be Integer


GET /portal/api/current_user/groups/:id
Show a group

Supported Formats

json

Examples

app/views/portal/api/groups/show.json.rabl

Params

Param name Description
id
required

Unique identifier for the group model that determines which group will be displayed.

Validations:

  • Must be Integer


POST /portal/api/current_user/groups
Create a group

Supported Formats

json

Examples

app/views/portal/api/groups/show.json.rabl

Params

Param name Description
name
required

Name of the group.

Validations:

  • Must be String

description
optional

Description of the group.

Validations:

  • Must be String

access_type
optional

Determines whether users can/cannot find or join the group

Validations:

  • Must be one of: public, restricted, private.

book_category_id
optional

Unique identifier for the book category model that determines which category will be added.

Validations:

  • Must be Integer


PATCH /portal/api/current_user/groups/:id
Update a group

PUT /portal/api/current_user/groups/:id
Update a group

Supported Formats

json

Examples

app/views/portal/api/groups/show.json.rabl

Params

Param name Description
id
required

Unique identifier for the group model that determines which group will be updated.

Validations:

  • Must be Integer

name
optional

Name of the group.

Validations:

  • Must be String

description
optional

Description of the group.

Validations:

  • Must be String

access_type
optional

Determines whether users can/cannot find or join the group. Defaults to private.

Validations:

  • Must be one of: public, restricted, private.

book_category_id
optional

Unique identifier for the book category model that determines which category will be added.

Validations:

  • Must be Integer


GET /portal/api/current_user/groups/:id/books
List of books that belong to a group

Supported Formats

json

Examples

app/views/portal/api/books/index.json.rabl

Params

Param name Description
id
required

Unique identifier for the group model that determines which books will be displayed.

Validations:

  • Must be Integer


GET /portal/api/current_user/groups/:id/contacts
List of contacts that belong to a group

Supported Formats

json

Examples

app/views/portal/api/contacts/index.json.rabl

Params

Param name Description
id
required

Unique identifier for the group model that determines which contacts will be displayed.

Validations:

  • Must be Integer


POST /portal/api/current_user/groups/:id/add_contact
Add a contact to a group

Supported Formats

json

Examples

app/views/portal/api/groups/show.json.rabl

Params

Param name Description
id
required

Unique identifier for the group model that determines which group the contact/user will be added to.

Validations:

  • Must be Integer

contact_id
optional

Unique identifier for the contact model that determines which contact will be added.

Validations:

  • Must be Integer

user_id
optional

Unique identifier for the user model that determines which user will be added. Will not be used if contact_id is specified.

Validations:

  • Must be Integer


DELETE /portal/api/current_user/groups/:id/remove_contact
Remove a contact from a group

Supported Formats

json

Examples

app/views/portal/api/groups/show.json.rabl

Params

Param name Description
id
required

Unique identifier for the group model that determines which group the contact/user will be removed from.

Validations:

  • Must be Integer

contact_id
optional

Unique identifier for the contact model that determines which contact will be removed.

Validations:

  • Must be Integer

user_id
optional

Unique identifier for the user model that determines which user will be removed. Will not be used if contact_id is specified.

Validations:

  • Must be Integer


POST /portal/api/current_user/groups/:id/join
Join a group

Supported Formats

json

Params

Param name Description
id
required

Unique identifier for the group model that determines which group the current user will be added to.

Validations:

  • Must be Integer


DELETE /portal/api/current_user/groups/:id
Destroy a group

Supported Formats

json

Examples

app/views/portal/api/groups/show.json.rabl

Params

Param name Description
id
required

Unique identifier for the group model that determines which group will be destroyed.

Validations:

  • Must be Integer


DELETE /portal/api/current_user/groups/:id/leave
Leave a group

Supported Formats

json

Examples

app/views/portal/api/books/index.json.rabl

Params

Param name Description
id
required

Unique identifier for the group model that determines which group to leave.

Validations:

  • Must be Integer


Supported Formats

json

Examples

app/views/portal/api/acl_entries/groups/show.json.rabl

Params

Param name Description
id
required

Unique identifier for the group model that determines which group's book list will be modified.

Validations:

  • Must be Integer

acl_id
required

Unique identifier for the book ACL group entry model that determines that determines which book will be moved.

Validations:

  • Must be Integer

position
required

The position the specified book will be moved to. If an Integer is provided, the book will be placed after the book with the matching book ACL group entry id.

Validations:

  • Must be one of: first, last, Integer.