Skip to main content
Skip table of contents

Sub-user view

This query displays a user object with items that the user has given access to. You can give access to labels, groups and layouts.

GET/api/v1/users/subusers/{subuser}

Headers

Authorization

Bearer token

Accept

application/json

X-Client

ios-cctv|android-cctv|thick-legal|web

X-UUID

unique device id

Body

subuseroptional

int

Identifier of the sub-user to get

Response

200

Successful response

JSON
{
    "id": 44,
    "login": "user@mai.com",
    "name": "user@mai.com",
    "parent_id": 13,
    "permissions": [
        {
            "id": 22,
            "name": "camera-events-index",
            "display_name": "View camera events"
        },
        {
            "id": 240,
            "name": "analytic-cases-camera-obstacle",
            "display_name": "Business case - camera damage / overlap / vandalism detection"
        },
        {
            "id": 239,
            "name": "analytic-cases-line-intersection",
            "display_name": "Business case - line crossing detection"
        },
        {
            "id": 49,
            "name": "analytic-cases-index",
            "display_name": "List of business cases"
        }
    ],
    "cameras": [
        {
            "id": 765,
            "group_id": 100,
            "status": "active",
            "type": "media_server_v2",
            "start_at": "2022-04-06 12:13:58",
            "created_at": "2022-01-27 20:16:28",
            "billing_id": null,
            "pretty_name": "Camera 1",
            "lat": null,
            "lng": null,
            "azimuth": null,
            "is_archive_recording": true,
            "is_bridge": false,
            "is_favorite": false,
            "user_status": "active",
            "name": "Camera 1"
        },
        {
            "id": 761,
            "group_id": 100,
            "status": "active",
            "type": "media_server_v2",
            "start_at": "2022-04-06 12:13:58",
            "created_at": "2022-01-27 20:10:24",
            "billing_id": null,
            "pretty_name": "Camera 2",
            "lat": null,
            "lng": null,
            "azimuth": null,
            "is_archive_recording": true,
            "is_bridge": false,
            "is_favorite": false,
            "user_status": "active",
            "name": "Camera 2"
        }
    ],
    "groups": [
        {
            "id": 43,
            "name": "Group"
        }
    ],
    "layouts": [
        {
            "id": 209,
            "name": "01",
            "layout_template_id": 11,
            "layout_template": "Grid91",
            "user_id": 13,
            "grid": [
                null,
                {
                    "id": 753,
                    "group_id": 101,
                    "status": "active",
                    "type": "media_server_v2",
                    "start_at": "2022-04-06 12:13:58",
                    "created_at": "2022-01-27 19:48:31",
                    "billing_id": null,
                    "pretty_name": "Camera 3",
                    "pretty_text": "Cameras",
                    "short_address": "Cameras",
                    "full_address": "Cameras",
                    "lat": null,
                    "lng": null,
                    "azimuth": null,
                    "streams": [
                        {
                            "id": 748,
                            "type": "high",
                            "camera_id": 753,
                            "is_preview_from_server": true,
                            "is_archive_from_server": null,
                            "status": "active",
                            "has_sound": false,
                            "layout_priority": "reserve",
                            "width": 2048,
                            "height": 1536
                        },
                        {
                            "id": 749,
                            "type": "low",
                            "camera_id": 753,
                            "is_preview_from_server": true,
                            "is_archive_from_server": null,
                            "status": "active",
                            "has_sound": false,
                            "layout_priority": "main",
                            "width": 2048,
                            "height": 1536
                        }
                    ],
                    "services": {
                        "ptz": false,
                        "motion_detect": false
                    },
                    "has_sound": false,
                    "is_archive_recording": true,
                    "is_bridge": false,
                    "is_favorite": false,
                    "user_status": "active",
                    "name": "Camera 3"
                },
                null,
                {
                    "id": 765,
                    "group_id": 100,
                    "status": "active",
                    "type": "media_server_v2",
                    "start_at": "2022-04-06 12:13:58",
                    "created_at": "2022-01-27 20:16:28",
                    "billing_id": null,
                    "pretty_name": "Camera 4",
                    "pretty_text": "Cameras",
                    "short_address": "Cameras",
                    "full_address": "Cameras",
                    "lat": null,
                    "lng": null,
                    "azimuth": null,
                    "streams": [
                        {
                            "id": 772,
                            "type": "high",
                            "camera_id": 765,
                            "is_preview_from_server": true,
                            "is_archive_from_server": null,
                            "status": "active",
                            "has_sound": false,
                            "layout_priority": "reserve",
                            "width": 1920,
                            "height": 1080
                        },
                        {
                            "id": 773,
                            "type": "low",
                            "camera_id": 765,
                            "is_preview_from_server": true,
                            "is_archive_from_server": null,
                            "status": "active",
                            "has_sound": false,
                            "layout_priority": "main",
                            "width": 704,
                            "height": 576
                        }
                    ],
                    "services": {
                        "ptz": false,
                        "motion_detect": false
                    },
                    "has_sound": false,
                    "is_archive_recording": true,
                    "is_bridge": false,
                    "is_favorite": false,
                    "user_status": "active",
                    "name": "Camera 4"
                },
                null,
                null,
                null
            ],
            "created_at": "2021-09-15 18:50:19",
            "updated_at": "2022-02-08 09:41:30"
        }
    ],
    "marks": [
        {
            "id": 485887,
            "type": "mark",
            "type_pretty": "Mark",
            "title": "New mark",
            "can_delete": true,
            "from": "2022-02-18 07:43:40",
            "to": null,
            "camera_id": 752,
            "created_at": "2022-02-18 16:43:07",
            "updated_at": "2022-02-18 16:43:07"
        }
    ],
    "created_at": "2021-11-24 23:52:20",
    "updated_at": "2021-12-09 18:44:38",
    "access_token_id": null,
    "can_update_password": false,
    "analytic_license": [
        {
            "type": "analytic_l1",
            "type_pretty": "LIC-XXXX-YY-L1",
            "all": 1,
            "free": 1,
            "used": 0
        },
        {
            "type": "analytic_l2",
            "type_pretty": "LIC-XXXX-YY-L2",
            "all": 1,
            "free": 1,
            "used": 0
        },
        {
            "type": "analytic_l3",
            "type_pretty": "LIC-XXXX-YY-L3",
            "all": 1,
            "free": 1,
            "used": 0
        }
    ]
}
404

If the sub-user does not belong to the user or does not exist

401

Authorization token not provided or invalid, see Obtaining a token

Example

JSON
curl -k --location --request GET 'https://vms.local/api/v1/users/subusers/{subuser}' \
--header 'Authorization:Bearer token' \
--header 'Accept:application/json' \
--header 'X-Client:ios-cctv|android-cctv|thick-legal|web' \
--header 'X-UUID:unique device id'
JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.