Groups

Overview

Groups are used to assign collections of user to specific channels, roles and other common settings.

Get All Groups

Get information about all of you team's groups.

GET /groups

Pagination

The maximum number of groups that will be returned in a single request is 100. If there are more than 100 groups you can specify a page parameter great than 1 to get more data. The response will contain information about how many pages of data are available.

Query Parameters

Parameter

Default

Description

page

1

Specifies which page of results to return

per_page

100

Specifies maximum number of groups to return in a given request. The maximum you can specify is 100.

Success Response

A successful response will have an HTTP status of 200

Response Properties

Property

Description

page

Current page number of data returned

per_page

Maximum number of groups returned per page

total_pages

Number of pages of data available

response_count

The number of team groups that were returned from the given request

total_count

Total number of team groups that are available

groups

Collection of groups

Example response

The sample response below indicates that you have received the second page of results. There are 2 pages available. The current page contains 21 of the total 121 groups.

{
    "page": 2,
    "per_page": 100,
    "total_pages": 2,
    "response_count": 21,
    "total_count": 121,
    "groups": [
      {...},
      {...}
    ]
}

Create Group

Create a new group.

POST /groups

Body Parameters

Parameter

Required

Default

Description

name

Yes

Name of the groupyou are creating. This name must be unique. If there is already a group with the name provided you will get a response with a 422 status.

role

No

Valid values: "admin", "supervisor", "member", "staff". If left blank then the group will not dictate users roles.

is_body_cam_enabled

No

false

Specifies whether or not Android users in the group operate in body camera mode

body_cam_side_button_function

No

PTT

Android devices with Top and Side buttons can have buttons assigned to either start video or PTT. Available options are "PTT" and "VIDEO"

body_cam_top_button_function

No

VIDEO

See above

enable_task_menu

No

true

Specifies if group users see the task menu.

enable_mobility_menu

No

true

Specifies if group users see the mobility menu.

enable_period_markers_menu

No

true

Specifies if group users see the period marker menu.

users

No

[]

Users in the group.

Array of user objects. Each user object must contain an id. Example: [{id:123456}, {id: 98765}]

channels

No

[]

Users in the group will have access to these channels.

Array of channel objects. Each channel object must contain an id. Example: [{id:123456}, {id: 98765}]

task_type_ids

No

[]

Array of task type ids representing which tasks types will appear on the Home tab for group users.

Example: [ 1234, 5478]

Example Request Body

{
    "name" : "Admins", 
    "role": "admin, 
    "users": [
        {"id": "d4fa7488-7a58-4bd0-956a-9f8c5b0a87f1"}, 
        {"id": "d13535e5-7ebf-4433-9fd1-90f3de9b6e2d"}, 
        {"id": "fdd21692-7d52-46b5-a01c-6d660a247a31"}
    ],
    "channels": [
        {"id": "9338bcb6-29b5-407a-b596-0805ab843070"}, 
        {"id": "1dda6e79-ee85-4f85-a5e5-5429a65307c3"}
    ],
    "task_type_ids": [
        123,
        456
    ],
    "is_body_cam_enabled": true,
    "body_cam_side_button_function": "PTT",
    "body_cam_top_button_function": "VIDEO",
    "enable_task_menu": true,
    "enable_mobility_menu": false,
    "enable_period_markers_menu": true
}

Success Response

A successful group creation response will have an HTTP status of 201 created. The payload of the response is the same as you will see when requesting information about a specific group.

Error Response

If there was a problem creating the group you will receive a response that contains status and message properties.

Example error response:

{
    "status": 422,
    "message": "Validation failed: Name has already been taken"
}

Get Specified Group

Get information about a specific group

GET /groups/{group_id}

Path Parameters

Parameter

Description

group_id

Id of the group you are requesting information about

Success Response

A successful get response will have an HTTP status of 200

Response Properties

Property

Description

id

Unique group identifier.

name

Name of the group.

role

Role of the users in the group

users

Array of user objects

channels

Array of channel objects

task_types

Array of task type objects

is_body_cam_enabled

If body camera mode is enabled for the group

body_cam_side_button_function

Function of the Android side button

body_cam_top_button_function

Function of the Android topbutton.

enable_task_menu

Is task menu enabled

enable_mobility_menu

Is mobility menu enabled

enable_period_markers_menu

Is period marker menu enabled

Example Response Body

{
    "group": {
        "id": 35,
        "name": "API Group XX",
        "role": "admin",
        "sequential_id": 20,
        "users": [
            {
                "id": "63fa983b-5e82-4969-b982-9900963aeb4a",
                "name": "Some User"
            }
        ],
        "task_types": [
            {
                "id": 1001833951,
                "name": "Type ABC"
            },
            {
                "id": 1001833952,
                "name": "Type XYZ"
            }            
        ],
        "channels": [
            {
                "id": "8e7c6c7a-8fc7-4428-a259-5bbd41ed24bf",
                "name": "Channel 01"
            },
            {
                "id": "db611a10-8f36-4673-a382-81f3e76ae033",
                "name": "Channel 02"
            }
        ],
        "is_body_cam_enabled": true,
        "body_cam_side_button_function": "PTT",
        "body_cam_top_button_function": "PTT",
        "enable_task_menu": true,
        "enable_mobility_menu": true,
        "enable_period_markers_menu": true
    }
}

Update Group

Update a specified group.

POST /groups/{group_id}

Path Parameters

Parameter

Description

group_id

Id of the group you are updating

Body Parameters

See Create Group Body Parameters.

Success Response

A successful group update response will have an HTTP status of 200. The payload of the response is the same as you will see when creating a group.

Delete Group

Delete a specified group.

DELETE /groups/{group_id}

Path Parameters

Parameter

Description

group_id

Id of the group you are deleting

Success Response

A successful group soft delete will have an HTTP status of 200. The body of the response will also contain information about the group that was deleted.

Last updated