# Groups
Manage groups in your account using these endpoints.
# List groups
Lists all groups registered on the logged user account.
GET /groups?version=lite&page={page}
Example Request
$ curl --request GET 'https://console.radiobridge.com/api/visualization/v1/groups?version=lite' \
--header 'organization: <organization id>' \
--header 'Authorization: Bearer <token>'
Example Response
{
"data": [
{
"id": 1,
"group_name": "SK Group",
"children": [],
"devices_counter": 0
},
{
"id": 3,
"group_name": "SK Group",
"children": [],
"devices_counter": 0
}
]
}
Parameter | Type | Description |
---|---|---|
id | integer | Numeric Id of group |
group_name | string | Name of group |
children | array | Array list of group children |
devices_counter | integer | Number of devices |
# Retrieve Single Group Detail
Retrieve single group details of logged-in user
GET /groups/<groupId>?version=lite
Example Request
$ curl --request GET 'https://console.radiobridge.com/api/visualization/v1/groups/<groupId>?version=lite' \
--header 'Organization: <organization id>' \
--header 'Authorization: Bearer <token>'
Example Response
{
"data": {
"id": 1,
"group_name": "SK Group",
"devices": [],
"selected_group": null
}
}
Parameter | Type | Description |
---|---|---|
id | integer | Numeric Id of group |
group_name | string | Name of group |
devices | array | Array of associated devices |
selected_group | array | Number of selected devices |
# Batch Group Request
Perform various create, update and delete group requests for multiple items in one request.
GET /batch-group-requests
Property | Required | Description |
---|---|---|
Create | ||
groupName | Yes | Name of your group |
selectedDevices | No | Device EUIs. Must be an array. |
selectedGroup | No | Group ids. Must be array. |
action | Yes | create - create the group |
Update | ||
groupId | Yes | Id of group that is to be updated |
groupName | Yes | Name of your group |
selectedDevices | No | Device EUIs. Must be an array. |
selectedGroup | No | Group ids. Must be an array. |
action | Yes | Update - update the group |
Delete | ||
groupId | Yes | Id of group that is to be updated |
action | Yes | Delete - delete the group |
Example request
curl --request POST 'https://console.radiobridge.com/api/visualization/v1/batch-group-requests' \
--header 'Accept: application/json' \
--header 'Organization: <organization id>' \
--header 'Authorization: Bearer <token>' \
--data-raw '{
"groups":[
{
"groupName": "SK Group",
"selectedDevices": [1, 4, 91],
"selectedGroup": null,
"action": "Create"
},
{
"groupId": 2,
"groupName": "test",
"selectedDevices": [1,4],
"selectedGroup": null,
"action": "Update"
},
{
"groupId": 2,
"action": "Delete"
}
]
}'
Example Response
{
"data": [
{
"status": true,
"message": "Group created successfully!",
"groupName": "SK Group",
"groupId": 3
},
{
"status": true,
"message": "Group updated successfully!",
"groupId": "2"
},
{
"status": true,
"message": "Group deleted successfully!",
"groupId": "2"
}
]
}
Example Error
{
"data": [
{
"status": false,
"message": [
"The group name field is required.",
"The selected devices must be an array."
],
"groupId": null
},
{
"status": false,
"message": "Group not found!",
"groupId": "4"
},
{
"status": false,
"message": "Group not found!",
"groupId": "5"
}
]
}