Group /group/{group-id}

Represents an individual group.

Reading

GET /group/{group-id} HTTP/1.1
Host: localhost:3000

Permissions

  • An access token with workspace_groups permission is required.
  • If access token points to an user, at least one of the following criteria must be met :
    • The privacy field of the group is set to PUBLIC or PRIVATE and the current person is attached to the workspace at witch is attached the group.
    • The privacy field of the group is set to HIDDEN, at least one of the following criteria is met :
      • The group is owned by the current person.
      • The current person is a member of the group.
      • The current person is invited to the group.
      • The current person is an admin of the workspace at witch is attached the group.
  • If access token points to a workspace, at least one of the following criteria must be met :
    • The current workspace is the workspace at witch is attached the group.

Fields

Name Description Type

_id

The group ID.

string

name

The name of the group.

string

avatar

The ID of the Photo that represents the avatar of the group.

Photo

notes

Notes about the group.

string

custom_fields

Custom fields attached to the group.

object

tags

An array of Tag IDs at which is attached the group.

Tag[]

owner

The ID of the User who is the owner of the group.

User

workspace

The ID of the Workspace at which is attached the group.

Workspace

privacy

The privacy of the group.

string{PUBLIC, PRIVATE, HIDDEN}

members

The user members of the group.

object[]

user

The member User ID.

User

admin

Set to true if the user is an admin of the group.

boolean

requests

The user requests of the group.

object[]

user

The request User ID.

User

state

The state of the request.

string{invited, declined, applied, quited, refused}

created_time

The date that indicates when the group was created.

date

updated_time

The date that indicates when the group was updated for the last time.

date

Publishing

You can publish group by using the /user/groups or /environment/groups edges.

Updating

PUT /group/{group-id} HTTP/1.1
Host: localhost:3000

Permissions

  • An access token (pointing to an user) with manage_groups permission is required.
  • At least one of the following criteria must be met :
    • The group is owned by the current person.
    • The current person is an admin member of the group.
    • The current person is an admin (with MANAGE permission) of the workspace at witch is attached the group.

Fields

Name Description Type

name

The name of the group.

string

avatar

The ID of the Photo that represents the avatar of the group.
Must be a photo attached to the group or a photo owned by the current person whose its tmp field is set to true.

string

notes

Notes about the group.

string

custom_fields

Custom fields attached to the group.

object

tags

An array of Tag IDs at which is attached the group.

string[]

privacy

The privacy of the group.

string{PUBLIC, PRIVATE, HIDDEN}

Response

If successful :

{
    "success": true
}

Otherwise a relevant error message will be returned.

Deleting

DELETE /group/{post-id} HTTP/1.1
Host: localhost:3000

Permissions

  • The applied permissions to update groups are required.

Fields

No fields are required.

Response

If successful :

{
    "success": true
}

Otherwise a relevant error message will be returned.

Actions

Name Description

/accept

Accept the group invitation.

/apply

Apply to the group.

/decline

Decline the group invitation.

/quit

Quit the group.

Edges

Name Description

/admins

The users who are admin members of the group.

/feed

The feed of the group.

/members

The users who are members of the group.

/photos

The photos attached to the group.

/requests

The users who have been invited to the group or apply to it.

/subjects

The subjects of the group.