getCommunity
query.
As a response, it will return the Community
object:
Parameter | Type | Description |
---|---|---|
id | ID | Required. The community entity ID. |
ownerUserContext | UserContext | Contains the community owner user context data. |
title | String | Required. Represents the community title. |
description | String | Required. Represents the community description text. Can contain html tags. |
visibility | CommunityVisibility | Required. The community visibility. |
created | Int | Required. Timestamp when the community was created. |
membersNumber | Int | Required. The number of the community members. Only users with associated not blocked context will be counted. |
postNotificationEnabled | Boolean | A flag that indicates that email notification about a new post is enabled. Note that the notification itself should be implemented on the client side, because we don’t have an access to user emails in the API. |
image | MediaImage | The community image (if it is set). |
cta | [Cta] | Contains the list of Call To Action objects available for the given community. |
lastPostTime | Int | Represents a timestamp when the last community post was created. |
Community visibility
PRIVATE
- private communities will not be returned in the search query results; a user can only be invited to a private community.PUBLIC
- users can join public communities by themselves, without the approval by the admin. Public communities are available in the search query results.
Community CTA
Action ID | Description | Corresponding mutation/query |
---|---|---|
EDIT_COMMUNITY | Allows to edit the given community. The action is available only for the community owner or users associated with the ADMINISTRATOR scope. | editCommunity |
DELETE_COMMUNITY | Allows to delete the given community. The action is available only for the community owner or users associated with the ADMINISTRATOR scope. | deleteCommunity |
VIEW_MEMBERS | Allows to view the given community members. Available for the community owner, members or users associated with the ADMINISTRATOR scope. | getCommunityMembers |
VIEW_SENT_INVITATIONS | Allows to view the invitations sent from the community. Available only for the community owner or users associated with the ADMINISTRATOR scope. | getCommunitySentInvitations |
LEAVE_COMMUNITY | Makes it possible to leave the community. Available for community members. | leaveCommunity |
INVITE_TO_COMMUNITY | Allows to invite users from the network to join the community. Available for the community owner and members (only for the public communities). | createCommunityInvitation |
JOIN_COMMUNITY | Allows to join the community. Available for the users who are not associated with the community yet (not owner and not a member). | joinCommunity |
CREATE_POST | Allows to create a post or a comment in the given community. Available only for the users associated with the community (the owner or a member). | createPost |