Get information about the workgroup socialnetwork.api.workgroup.get
Scope:
socialnetworkWho can execute the method: any user
The method socialnetwork.api.workgroup.get returns information about a workgroup, project, scrum, or collaboration by its identifier. An administrator can retrieve information about any group on the account, even if it is secret and they are not a member.
Method parameters
Required parameters are marked with *
|
Name |
Description |
|
params* |
Request parameters to retrieve the group |
Parameter params
Required parameters are marked with *
|
Name |
Description |
|
groupId* |
Group identifier. The value for this field can be obtained using the method sonet_group.get |
|
select |
List of additional fields to extract, returned in |
|
mode |
Request mode. Can only take the value |
Parameter params[select]
|
ACTIONS |
Available operations for the current user on the group |
|
AVATAR |
URL of the group's compressed user avatar |
|
AVATAR_DATA |
Information about the group's avatar |
|
AVATAR_TYPES |
Types of avatars for groups |
|
COUNTERS |
Number of pending requests and invitations to join the group |
|
DATE_CREATE |
Date and time of group creation in a more readable format |
|
DEPARTMENTS |
Departments of employees added to the group |
|
EFFICIENCY |
Group efficiency |
|
FEATURES |
Available tools in the group specified in the advanced group settings |
|
GROUP_MEMBERS_LIST |
List of active group members, invited users, and users awaiting confirmation to join the group |
|
LIST_OF_MEMBERS |
List of group members with information about them |
|
LIST_OF_MEMBERS_AWAITING_INVITE |
Users awaiting confirmation to join the group |
|
OWNER_DATA |
Data about the group owner |
|
PIN |
Whether the group is pinned by the current user on the groups and projects page. Returned as |
|
PRIVACY_TYPE |
Privacy level of the group. Returned as |
|
SUBJECT_DATA |
Information about the group's subject specified in the advanced group settings |
|
TAGS |
Group tags specified in the advanced group settings |
|
USER_DATA |
Data about the current user's role in the group |
Example
curl -X POST \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"params":{"groupId":622,"select":["DEPARTMENTS","TAGS"]}}' \
https://**put_your_bitrix24_address**/rest/**put_your_user_id_here**/**put_your_webhook_here**/socialnetwork.api.workgroup.get
curl -X POST \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"params":{"groupId":622,"select":["DEPARTMENTS","TAGS"]},"auth":"**put_access_token_here**"}' \
https://**put_your_bitrix24_address**/rest/socialnetwork.api.workgroup.get
try
{
const response = await $b24.callMethod(
'socialnetwork.api.workgroup.get',
{
params: {
groupId: 622,
select: [ 'DEPARTMENTS', 'TAGS' ],
},
}
);
const result = response.getData().result;
console.log(result);
}
catch( error )
{
console.error('Error:', error);
}
try {
$response = $b24Service
->core
->call(
'socialnetwork.api.workgroup.get',
[
'params' => [
'groupId' => 622,
'select' => [ 'DEPARTMENTS', 'TAGS' ],
],
]
);
$result = $response
->getResponseData()
->getResult();
echo 'Success: ' . print_r($result, true);
} catch (Throwable $e) {
error_log($e->getMessage());
echo 'Error getting workgroup info: ' . $e->getMessage();
}
BX24.callMethod('socialnetwork.api.workgroup.get', {
params: {
groupId: 622,
select: [ 'DEPARTMENTS', 'TAGS' ],
},
}, result => {
console.log(result);
});
require_once('crest.php');
$result = CRest::call(
'socialnetwork.api.workgroup.get',
[
'params' => [
'groupId' => 622,
'select' => ['DEPARTMENTS', 'TAGS']
]
]
);
echo '<PRE>';
print_r($result);
echo '</PRE>';
How to Use Examples in Documentation
Response handling
HTTP status: 200
{
"result": {
"ID": 622,
"ACTIVE": "Y",
"SITE_ID": "s1",
"SUBJECT_ID": 1,
"NAME": "Group for demonstrating the method",
"DESCRIPTION": "First line of group description\r\nSecond line of group description",
"KEYWORDS": "group tag, another group tag",
"CLOSED": "N",
"VISIBLE": "Y",
"OPENED": "N",
"DATE_CREATE": "04/17/2025 19:37:55",
"DATE_UPDATE": "04/17/2025 19:40:48",
"DATE_ACTIVITY": "04/17/2025 19:40:48",
"IMAGE_ID": 0,
"AVATAR_TYPE": "folder",
"OWNER_ID": 1,
"INITIATE_PERMS": "K",
"NUMBER_OF_MEMBERS": 1,
"NUMBER_OF_MODERATORS": 1,
"PROJECT": "N",
"PROJECT_DATE_START": null,
"PROJECT_DATE_FINISH": null,
"SEARCH_INDEX": "Group for demonstrating the method First line of group description\r\nSecond line of group description group tag #group tag another group tag #another group tag group@example.com",
"LANDING": "N",
"SCRUM_OWNER_ID": 0,
"SCRUM_SPRINT_DURATION": 0,
"SCRUM_TASK_RESPONSIBLE": "",
"TYPE": "group",
"MEMBERS": [
1,
10,
20
],
"CHAT_ID": 1034,
"DIALOG_ID": "chat1034",
"ORDINARY_MEMBERS": [
10
],
"INVITED_MEMBERS": [
38
],
"MODERATOR_MEMBERS": [
20
],
"SITE_IDS": [
"s1"
],
"TAGS": [
"another group tag",
"group tag"
],
"DEPARTMENTS": [
8
],
"NUMBER_OF_MEMBERS_PLURAL": 0
},
"time": {
"start": 1744908074.244266,
"finish": 1744908074.279072,
"duration": 0.034806013107299805,
"processing": 0.010703086853027344,
"date_start": "2025-04-17T19:41:14+02:00",
"date_finish": "2025-04-17T19:41:14+02:00",
"operating_reset_at": 1744908674,
"operating": 0
}
}
Returned data
|
Name |
Description |
|
result |
Result of the request execution |
|
time |
Information about the request execution time |
Key result
|
Name |
Description |
|
ID |
Group identifier |
|
ACTIVE |
Flag |
|
SITE_ID |
Identifier of the site to which the group belongs |
|
SUBJECT_ID |
Identifier of the group's subject. The subject of the group is specified in the advanced group settings |
|
NAME |
Group name |
|
DESCRIPTION |
Group description |
|
KEYWORDS |
Group tags separated by commas: |
|
CLOSED |
Flag |
|
VISIBLE |
Flag |
|
OPENED |
Flag |
|
DATE_CREATE |
Date of group creation in the format
|
|
DATE_UPDATE |
Date of group update in the format |
|
DATE_ACTIVITY |
Date of last activity in the group in the format |
|
IMAGE_ID |
Identifier of the group's user avatar in the |
|
AVATAR_TYPE |
Type of the last set system avatar:
|
|
OWNER_ID |
Identifier of the group owner |
|
INITIATE_PERMS |
Who has the right to invite users to the group:
|
|
NUMBER_OF_MEMBERS |
Number of group members |
|
NUMBER_OF_MODERATORS |
Number of group moderators |
|
PROJECT |
Flag |
|
PROJECT_DATE_START |
Project start date in the format |
|
PROJECT_DATE_FINISH |
Project end date in the format |
|
SEARCH_INDEX |
Index, keywords for searching the group |
|
LANDING |
Flag |
|
SCRUM_MASTER_ID |
Identifier of the scrum master. |
|
SCRUM_SPRINT_DURATION |
Duration of the scrum sprint in seconds. |
|
SCRUM_TASK_RESPONSIBLE |
Default assignee when creating tasks:
|
|
TYPE |
Type of group:
|
|
MEMBERS |
Identifiers of group members |
|
CHAT_ID |
Identifier of the group chat |
|
DIALOG_ID |
Identifier of the group dialog |
|
ORDINARY_MEMBERS |
Array of identifiers of group users who are not owners or moderators |
|
INVITED_MEMBERS |
Array of identifiers of portal users who were invited to the group but have not yet accepted |
|
MODERATOR_MEMBERS |
Array of identifiers of group members with the role of moderator |
|
SITE_IDS |
List of identifiers of sites to which the group belongs |
|
AVATAR |
URL of the group's compressed user avatar. |
|
AVATAR_TYPES |
Object containing group avatars: |
|
AVATAR_DATA |
Information about the group's avatar:
|
|
OWNER_DATA |
Information about the group owner: |
|
SUBJECT_DATA |
Information about the group's subject specified in the advanced group settings: |
|
TAGS |
Group tags, similar to |
|
ACTIONS |
Data about available operations for the current user on the group:
|
|
USER_DATA |
Information about the current user regarding the group:
|
|
DEPARTMENTS |
Array of identifiers of departments added to the group |
|
IS_PIN |
Value |
|
PRIVACY_CODE |
Privacy level of the group:
|
|
LIST_OF_MEMBERS |
Array with information about group users:
|
|
FEATURES |
Array with information about the group's features:
|
|
LIST_OF_MEMBERS_AWAITING_INVITE |
Information about users awaiting confirmation to join the group: |
|
GROUP_MEMBERS_LIST |
Information about users associated with the group:
|
|
COUNTERS |
Counters: |
|
EFFICIENCY |
Group efficiency |
|
ADDITIONAL_DATA |
Additional data for the current user:
|
Error handling
HTTP status: 400
{
"error": "SONET_CONTROLLER_WORKGROUP_EMPTY",
"error_description": "No value for the workgroup ID was provided."
}
|
Name |
Description |
|
error |
String error code. It may consist of digits, Latin letters, and underscores |
|
error_description |
Textual description of the error. The description is not intended to be shown to the end user in its raw form |
Possible error codes
|
Code |
Description |
Status |
|
|
The parameter |
400 |
|
|
The group with identifier |
400 |
Statuses and System Error Codes
HTTP Status: 20x, 40x, 50x
The errors described below may occur when calling any method.
|
Status |
Code |
Description |
|
|
|
An internal server error has occurred, please contact the server administrator or Bitrix24 technical support |
|
|
|
An internal server error has occurred, please contact the server administrator or Bitrix24 technical support |
|
|
|
The request intensity limit has been exceeded |
|
|
|
The current method is not allowed to be called using batch |
|
|
|
The maximum length of parameters passed to the batch method has been exceeded |
|
|
|
Invalid access token or webhook code |
|
|
|
The methods must be called using the HTTPS protocol |
|
|
|
The REST API is blocked due to overload. This is a manual individual block, to remove it you need to contact Bitrix24 technical support |
|
|
|
The REST API is available only on commercial plans |
|
|
|
The user whose access token or webhook was used to call the method lacks permissions |
|
|
|
The manifest is not available |
|
|
|
The request requires higher privileges than those provided by the webhook token |
|
|
|
The provided access token has expired |
|
|
|
The user does not have access to the application. This means that the application is installed, but the account administrator has allowed access to this application only for specific users |
|
|
|
The public part of the site is closed. To open the public part of the site on an on-premise installation, disable the option "Temporary closure of the public part of the site". Path to the setting: Desktop > Settings > Product Settings > Module Settings > Main Module > Temporary closure of the public part of the site |