Group Member
Group member is the link object between Groups and Users.
Attributes
group
The id of the group the membership is for.
When requesting, can be expanded to the full group object by including the query parameter expand=group
.
- Type:
string
- Required:
true
user
The id of the user the membership is for.
When requesting, can be expanded to the full user object by including the query parameter expand=user
.
- Type:
string
- Required:
true
role
The role the user has in the group. Users with admin role can manage memberships for the group.
- Type:
string
- Required:
true
- Allowed values:
admin
,member
linked
Tells whether the user is a group member through an LDAP group.
- Type:
boolean
- Default: false
Operations
GET /groups/:group_id/members
List all the users for a group, with optional limit and offset parameters, as a metadata-results object.
GET /groups/:group_id/member/:user_id
Return a specific group user.
Example request
curl -X GET \
-H "Accept: application/vnd.hth.v1" \
-H "Authorization: hth.company_key='$COMPANY_KEY',account_key='$ACCOUNT_KEY'" \
https://helixteamhub.cloud/api/groups/devs/jlaiho
Example response
{
"api_status": 200,
"api_timestamp": "2013-11-28T08:36:55Z",
"group": {
"id": "devs"
},
"user": {
"id": "jlaiho"
},
"role": "admin",
"linked": false
}
POST /groups/:group_id/members
Add a user to a group. Returns the created group user.
Example request
curl -X POST \
-H "Accept: application/vnd.hth.v1" \
-H "Authorization: hth.company_key='$COMPANY_KEY',account_key='$ACCOUNT_KEY'" \
-H "Content-Type: application/json" \
-d '{ "id": "jlaiho", "role": "member" }' \
https://helixteamhub.cloud/api/groups/devs/members
Example response
{
"api_status": 201,
"api_timestamp": "2013-11-28T09:07:19Z",
"group": {
"id": "devs"
},
"user": {
"id": "jlaiho"
},
"role": "member",
"linked": false
}
PUT /groups/:group_id/members/:user_id
Update role for a group user. Returns the updated group user.
Example request
curl -X PUT \
-H "Accept: application/vnd.hth.v1" \
-H "Authorization: hth.company_key='$COMPANY_KEY',account_key='$ACCOUNT_KEY'" \
-H "Content-Type: application/json" \
-d '{ "role": "admin" }' \
https://helixteamhub.cloud/api/groups/devs/members/jlaiho
Example response
{
"api_status": 200,
"api_timestamp": "2013-11-28T09:10:16Z",
"group": {
"id": "devs"
},
"user": {
"id": "jlaiho"
},
"role": "admin",
"linked": false
}
DELETE /groups/:group_id/members/:user_id
Remove a user from a group. Returns the removed group user.
Example request
curl -X DELETE \
-H "Accept: application/vnd.hth.v1" \
-H "Authorization: hth.company_key='$COMPANY_KEY',account_key='$ACCOUNT_KEY'" \
https://helixteamhub.cloud/api/groups/devs/members/jlaiho
Example response
{
"api_status": 200,
"api_timestamp": "2013-11-28T09:11:50Z",
"group": {
"id": "devs"
},
"user": {
"id": "jlaiho"
},
"role": "admin",
"linked": false
}