Community data

Retrieve information for your community.

To get your community information, send a request using the access token as below:

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

If the authentication is successful the response will 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 information about all community members, send a request using access token as below:

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

If the authentication is successful the response will return with a 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 information about all community programmes, send a request using the access token as below:

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

If the authentication is successful the response will return with a 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 information about all community roles, send a request using access token as below:

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

If the authentication is successful the response will return with a 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]
  },
  ...
}