Skip to main content
Skip table of contents

List of analytics cases

List of analytics cases

List of analytics cases created on this camera

GET /api/admin/v1/cameras/{camera}/analytic-cases

Method parameters

int camera, unique camera identifier


int per_page, number of items per pagination page. Default is 25


int page, pagination page number


string search, search by analytics name, analytics type, or analytics case UID


string type, filter by analytics type


string sort, field by which the analytics cases should be sorted


string dir, sorting direction. desc - from largest to smallest, asc - from smallest to largest

200 OK

Returns a list of analytics cases on page i of pagination

JSON
{
    "data": [
        {
            "id": 39,
            "uuid": "6d435416-ac71-11ed-b8bb-5567f73a3ada",
            "status": "WORKING",
            "status_pretty": "Video stream active",
            "analytic_case": {
                "title": "Line crossing detection",
                "type": "line-intersection",
                "type_pretty": "Line crossing detection",
                "user": {
                    "id": 8,
                    "name": "user",
                    "parent": {
                        "id": 9,
                        "name": "parent_user",
                        "login": "parent_user",
                        "created_at": "2023-02-18T10:44:56.000000Z",
                        "updated_at": "2023-02-18T10:44:56.000000Z",
                        "expired_at": null,
                        "user_type": "user",
                        "is_licence_limit_reached": true,
                        "ptz_priority": 10,
                        "access_token_id": null
                    },
                    "login": "user@mail.com",
                    "user_type": "subuser",
                    "created_at": "2023-02-02T11:00:58.000000Z",
                    "updated_at": "2023-02-17T12:58:49.000000Z",
                    "expired_at": "2023-03-01T02:00:02.000000Z",
                    "is_licence_limit_reached": false,
                    "ptz_priority": 50,
                    "access_token_id": null
                }
            },
            "stream": {
                "id": 9,
                "type": "high",
                "camera_id": 5,
                "status": "active",
                "url": "rtsp://192.168.19.247/stream0?username=admin&password=9995465D8E49A8ECDEB4781ADE306421",
                "bitrate": 1029,
                "resolution": "1280x720",
                "output_rate": 1029,
                "ip": "192.168.19.247",
                "uuid": "bd83873e-95a9-499b-b565-54f97b925b51",
                "sound": "tracks-v1",
                "streams_count": 0,
                "created_at": "2023-02-01T10:13:20.000000Z",
                "updated_at": "2023-02-18T09:00:02.000000Z",
                "is_preview_from_server": true,
                "is_archive_from_server": null,
                "is_enabled": true,
                "is_can_transfer": true,
                "source": "manual",
                "is_sound_enabled": false,
                "reconnect_attempt": 0,
                "reconnect_total": 41,
                "reconnect_time": null,
                "disconnections_count": 0,
                "is_actual": true,
                "condition": "incorrect",
                "stopped_at": ""
            },
            "is_can_restart": false
        }
    ],
    "links": {
        "first": "https://host/api/admin/v1/cameras/5/analytic-cases?page=1",
        "last": "https://host/api/admin/v1/cameras/5/analytic-cases?page=1",
        "prev": null,
        "next": null
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 1,
        "links": [
            {
                "url": null,
                "label": "pagination.previous",
                "active": false
            },
            {
                "url": "https://host/api/admin/v1/cameras/5/analytic-cases?page=1",
                "label": "1",
                "active": true
            },
            {
                "url": null,
                "label": "pagination.next",
                "active": false
            }
        ],
        "path": "https://host/api/admin/v1/cameras/5/analytic-cases",
        "per_page": 15,
        "to": 2,
        "total": 2
    }
}

401 Unauthorized

Authorization token is not provided or is invalid. Obtaining a token

422 Unprocessable Entity

Returns a JSON object with an error. Validation

JSON
{
    "message": "There will be no informative message here",
    "errors": {
        "any_key": [
            "The reason for the error will be described here"
        ]
    }
}
cURL
BASH
curl -k --request POST \
	--url 'https://your-domain/api/admin/v1/cameras/{camera}/analytic-cases' \
	--header 'Content-Type: application/json' \
	--header 'Accept: application/json' \
	--data '{
    "camera": 0,
    "per_page": 0,
    "page": 0,
    "search": "string",
    "type": "string",
    "sort": "string",
    "dir": "string"
}'
PHP
PHP
$data = array (
  'camera' => 0,
  'per_page' => 0,
  'page' => 0,
  'search' => 'string',
  'type' => 'string',
  'sort' => 'string',
  'dir' => 'string',
);
$context = stream_context_create([
	'ssl'=>['verify_peer' => false],
	'http' => [
		'method' => 'GET',
		'header' => "Content-Type: application/json\r
Accept: application/json",
		'content'=>json_encode($data)
	]
]);
$result = file_get_contents('https://your-domain/api/admin/v1/cameras/{camera}/analytic-cases', false, $context);
JavaScript errors detected

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

If this problem persists, please contact our support.