gs.group.member.leave.json

Author:Michael JasonSmith
Contact:Michael JasonSmith <mpj17@onlinegroups.net>
Date:2015-06-15
Organization:GroupServer.org
Copyright:This document is licensed under a Creative Commons Attribution-Share Alike 4.0 International License by OnlineGroups.net.

This product provides a web hook that allows a person to be removed from a group by an external system.

Contents:

Web hook

Synopsis

/gs-group-member-leave.json? token =<t> & groupId = <g> & userId =<u> & leave

Description

The gs-group-member-leave.json page in the site context removes a person from the group.

Required arguments

token

The authentication token [1].

groupId=<groupId>

The identifier for the group.

userId=<userId>

The identifier for the user.

leave

The “form” action. (No value needs to be set, but the argument must be present)

Returns

In response a JSON object will be returned with the following values:

class LeaveResponse()
status

The exist status:

  • 0: Success, the person has been removed from the group.
  • 1: No such group.
  • 2: No such user.
  • 4: The user and group exist, but the user is not a member of the group.
message

The plain-text version of the status.

groupId

The identifier for the group that the person was removed from.

userId:

The identifier of user-profile of the person that was removed from the group.

Example

Using wget to remove the person with the user-identifier qK7SgjsTHcLNrJ2ClevcJ0 from the group test.

$ wget --post-data='token=Fake&groupId=test&userId=qK7SgjsTHcLNrJ2ClevcJ0&leave' \
  http://groups.example.com/gs-group-member-leave.json

The response will look similar to the following:

{
  "status": 0,
  "message": "A Person has left Test",
  "groupId": "test",
  "userId": "qK7SgjsTHcLNrJ2ClevcJ0"
}
[1]See gs.auth.token <https://github.com/groupserver/gs.auth.token/>

Changelog

1.0.0 (2015-06-19)

Initial version. Prior to the creation of this product there was no way to add a person to a group using JSON.

Indices and tables