Community data

Retrieve information of your community

Community general information To get the community general information, send a request using access token like below:

GET /community/[community_id] HTTP/1.1
Authorization: Bearer [access_token]
Accept: application/json

If the authentication success the response would be:

HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
{
  "id": [community_id],
  "name": [community_name],
  "ownerId": [owner_id]
}

Community member information To get the information of all community members, send a request using access token like below:

GET /community/[community_id]/member HTTP/1.1
Authorization: Bearer [access_token]
Accept: application/json

If the authentication success the response would return with the list of all community members

HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
{
  "0": {
    "id": [user_id],
    "firstname": [user_firstname],
    "lastname": [user_lastname],
    "email": [user_email],
    "roles": [...array of role_id...],
    "groups": [...array of group_id...],
    "isAdmin": true/false,
    "isDeleted": true/false,
    "isSuspend": true/false
  },
  ...
}

Community progamme information To get the information of all community groups, send a request using access token like below:

GET /community/[community_id]/group HTTP/1.1
Authorization: Bearer [access_token]
Accept: application/json

If the authentication success the response would return with the list of all community groups

HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
{
  "0": {
    "id": [group_id],
    "name": [group_name],
    "order": [group_order]
  },
  ...
}

Community role information To get the information of all community roles, send a request using access token like below:

GET /community/[community_id]/role HTTP/1.1
Authorization: Bearer [access_token]
Accept: application/json

If the authentication success the response would return with the list of all community roles

HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
{
  "0": {
    "id": [role_id],
    "name": [role_name],
    "order": [role_order],
    "description": [description],
    "groups": [...array of group_id...],
    "canHost": true/false,
    "canSwitch": true/false,
    "total": [number_of_users]
  },
  ...
}