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

Success Response

A successful response will have an HTTP status of 200

Response Properties

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

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

Success Response

A successful get response will have an HTTP status of 200

Response Properties

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

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

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