Видеонаблюдение

Основная платформа
cctv_cameras_readВидеонаблюдение

A facility's CCTV cameras and edge processors, and the camera catalogue. list shows AI edge processors with the network (RTSP/HTTP) cameras each one records, and cloud cameras; get shows one; status says which are online; snapshot returns a camera's latest still; capabilities shows a camera's image settings and motion mask. catalog_search and catalog_templates look up stream paths in the public camera database (the same data as "Find my camera" in Device Management). test_stream asks an edge processor to probe a stream before you add it. Stream credentials show as : unless includeCredentials is set; workflow steps and Agent devices never get stream addresses or IP addresses. Live video is never available here. To add, change, restart or remove cameras use cctv_cameras_write; for edge processors use cctv_edge_processors_write.

Actions:

  • list: List cameras and edge processors. Edge processors (online means a heartbeat in the last 5 minutes, provisioning, system updates) with their cameras nested (stream status, offlineReason, IP, codec, recording and AI settings), then cloud cameras. Use it to pick an online edge processor or find a camera deviceUuid.
  • get: Get a camera or edge processor. One camera or edge processor as list shows it, with its status (online, offline, pending or provisioning), why it's offline, when it was last seen, and a link to its recordings. Needs deviceUuid.
  • status: Check which cameras are online. Every camera and edge processor with its status: online, offline (reason edge_processor_offline, not_streaming or no_heartbeat), pending (just added) or provisioning, plus counts and a one-line summary for messages. Narrow it with cameraIds or location; offlineOnly lists only what is offline (counts still cover everything chosen). A network camera is offline while its edge processor is.
  • snapshot: Get a camera's latest still. The camera's latest still as an image, with capturedAt, a frameId and an imageUrl that shows its latest timelapse frame for 24 hours. Listed in Recent Access with who took it. Workflow steps and Agent devices need 'Workflows can share footage and identify people' turned on. Needs cameraId.
  • capabilities: A camera's image settings and motion mask. A cloud camera reports its image settings (brightness, contrast and the like) live, within about 10 seconds; network cameras take theirs from the camera itself, so imageSettings is null. motionMask lists the areas where motion is ignored, as polygons with x and y from 0 to 1. Change them with cctv_cameras_write save_capabilities and save_mask. Needs deviceUuid.
  • catalog_search: Search the camera catalogue. Find a manufacturer, series or model by the name or model number on the camera label, e.g. "CAM-0001". Each match has a manufacturer slug for catalog_templates and sometimes a templateId. Needs query.
  • catalog_templates: A manufacturer's stream templates. Default port and username, stream templates and models. Prefer the template matching the search hit templateId, else the isDefault one. Templates look like rtsp://{username}:{password}@{ip}:{port}/Streaming/Channels/{channel}01; pass them as stream parts (mainStreamProtocol, camera IP, port, mainStreamPath with {channel} filled in, usually 1) so credentials are encoded server-side. Needs manufacturer.
  • test_stream: Test a camera stream. The edge processor pings the camera, checks the port and probes the stream, then returns the outcome, codec, resolution, fps, logs and a snapshot image. Takes up to about 35 seconds. Run it for each camera before adding it; on failure the logs show the cause (wrong path or credentials, closed port, unreachable IP). Needs edgeProcessorUUID.

Параметры

ИмяТипОписание
action*"list" | "get" | "status" | "snapshot" | "capabilities" | "catalog_search" | "catalog_templates" | "test_stream"Что сделать; каждое действие описано в описании инструмента.
includeCredentialsbooleanReturn stream URLs with their username and password. Off by default (credentials show as ***:***). Only set this when the user explicitly needs the credentials; it needs CCTV access at the facility. (list, get)
facilityIdstringID объекта. Необязателен, если имеется в виду подключённый объект.
deviceUuidstringCamera or edge processor deviceUuid from list or status (get, capabilities)
cameraIdsarrayCamera ids (deviceUuid) from cctv_cameras_read list or status (status)
locationstringA camera location (the camera's group, for example Reception) (status)
offlineOnlybooleanList only cameras and edge processors that are offline (status)
cameraIdstringCamera id (deviceUuid) from cctv_cameras_read list or status (snapshot)
querystringПроизводитель, серия или модель для поиска (catalog_search)
limitintegerМаксимум результатов (по умолчанию 10) (catalog_search)
manufacturerstringSlug производителя из catalog_search (catalog_templates)
edgeProcessorUUIDstringdeviceUuid подключённого к сети Edge Processor на объекте, который будет получать поток (test_stream)
streamUrlstringПолный URL потока, например rtsp://user:pass@192.0.2.20:554/stream1 (rtsp, rtsps, http или https). Используйте этот параметр ИЛИ stream. (test_stream)
streamobjectURL потока по частям, собирается на сервере с URL-кодированием учётных данных. Используйте этот параметр ИЛИ streamUrl. Путь получите из cctv_cameras_read catalog_templates. (test_stream)
cctv_cameras_writeВидеонаблюдение

Changes the cameras at a facility. add puts network (RTSP/HTTP) IP cameras on an AI edge processor, which then pulls each stream for recording and AI (people tracking, motion). update changes a network or cloud camera. restart restarts a camera or edge processor that stopped responding. save_capabilities and save_mask change a camera's image settings and motion mask. remove takes a camera off the facility; its recordings stay until the retention period ends. Find cameras and edge processors with cctv_cameras_read list, and test each stream with cctv_cameras_read test_stream before adding it.

Actions:

  • add: Add network cameras. Up to 25 per call. Each camera needs deviceName, cameraGroup (its location) and streamUrl or stream parts. Defaults: motion recording, people tracking on, 6 fps AI. All of the edge processor's streams reload once. Needs edgeProcessorUUID, cameras. Asks for confirmation.
  • update: Change a camera. Only the settings you pass change. Network cameras also take peopleTracking, aiFramerate, transcription, a new stream (streamUrl or stream) and edgeProcessorUUID (move to another online edge processor); a new stream or edge processor asks for confirmation. Cloud cameras also take resolution. Needs deviceUuid. May ask for confirmation.
  • remove: Remove a camera. A network camera is taken off its edge processor, whose other streams reload once. A cloud camera is decommissioned: unpaired so the hardware can be paired elsewhere. To replace an edge processor and keep its cameras, use cctv_edge_processors_write transfer_cameras. Needs deviceUuid. Asks for confirmation.
  • restart: Restart a camera or edge processor. For a camera or edge processor that stopped responding. A cloud camera reboots. For a network camera, the edge processor that records it restarts, with all its cameras. An offline device may not get the restart (wasOnline); check cctv_cameras_read status a few minutes later. A workflow step restarts once per run. Needs deviceUuid. Asks for confirmation.
  • save_capabilities: Change a camera's image settings. Cloud cameras only: send the settings to change as { : }, using the ids and allowed values from cctv_cameras_read capabilities. The camera's recorder restarts to apply them, so a few seconds aren't recorded. Needs deviceUuid, settings. Asks for confirmation.
  • save_mask: Change a camera's motion mask. Replaces the areas where the camera ignores motion (an empty list clears them). Motion there no longer starts a recording or a 'Motion recorded' workflow. Read the current mask with cctv_cameras_read capabilities. Needs deviceUuid, polygons. Asks for confirmation.

Параметры

ИмяТипОписание
action*"add" | "update" | "remove" | "restart" | "save_capabilities" | "save_mask"Что сделать; каждое действие описано в описании инструмента.
edgeProcessorUUIDstringdeviceUuid подключённого к сети Edge Processor на объекте (add, update)
camerasarrayДобавляемые камеры (add)
facilityIdstringID объекта. Необязателен, если имеется в виду подключённый объект.
deviceUuidstringCamera deviceUuid from cctv_cameras_read list (network cameras start with ep_) (update, remove, restart, save_capabilities, save_mask)
deviceNamestringНазвание камеры (update)
cameraGroupstringРасположение, например "Reception" (update)
recordingEnabledbooleanЗаписывать эту камеру (update)
recordingMode"motion" | "continuous"Запись по движению или непрерывно (update)
motionThresholdintegerЧувствительность к движению; чем меньше значение, тем выше чувствительность (update)
resolution"1920x1080" | "1280x720" | "640x360"Разрешение записи (облачные камеры) (update)
peopleTrackingbooleanОтслеживать людей с помощью AI (сетевые камеры) (update)
aiFramerateintegerКоличество кадров в секунду, анализируемых AI (сетевые камеры) (update)
transcriptionEnabledbooleanТранскрибировать аудио (сетевые камеры) (update)
transcriptionPriority"0" | "3" | "5"Приоритет транскрипции: 0 — низкий, 3 — средний, 5 — высокий (update)
streamUrlstringПолный URL потока, например rtsp://user:pass@192.0.2.20:554/stream1 (rtsp, rtsps, http или https). Используйте этот параметр ИЛИ stream. (update)
streamobjectURL потока по частям, собирается на сервере с URL-кодированием учётных данных. Используйте этот параметр ИЛИ streamUrl. Путь получите из cctv_cameras_read catalog_templates. (update)
settingsobjectImage settings to change, for example { "brightness": 60 } (save_capabilities)
polygonsarrayAreas where motion is ignored, each a list of 3 to 50 corners { x, y } as fractions of the frame (0 is the left or top edge, 1 the right or bottom). An empty list clears the mask. (save_mask)
confirmbooleanЗадавайте только после того, как пользователь подтвердил предпросмотр, возвращённый первым вызовом
cctv_edge_processors_writeВидеонаблюдение

Manages AI edge processors, the on-site devices that record network cameras and run their AI. Find their deviceUuid with cctv_cameras_read list, and check whether they are online with cctv_cameras_read status. To restart one use cctv_cameras_write restart; to move one (with its cameras) to another facility use device_inventory_write move.

Actions:

  • pair: Pair a new edge processor. Adds an edge processor to the facility by the serial number on its label. It must be powered and online. Needs deviceSerialNumber.
  • update: Rename or relocate an edge processor. Needs deviceUuid.
  • transfer_cameras: Move all cameras to another edge processor. Moves every network camera from deviceUuid to another online edge processor at the facility (toUUID), e.g. when replacing failed hardware. Needs deviceUuid, toUUID. Asks for confirmation.
  • decommission: Decommission an edge processor. Unpairs it so the facility can be deleted or the hardware reused. Refused while it still has cameras unless removeCameras is true. Needs deviceUuid. Asks for confirmation.

Параметры

ИмяТипОписание
action*"pair" | "update" | "transfer_cameras" | "decommission"Что сделать; каждое действие описано в описании инструмента.
deviceSerialNumberstringСерийный номер для привязки (pair)
deviceNamestringНазвание Edge Processor (pair, update)
cameraGroupstringРасположение, например "Comms Room" (pair, update)
facilityIdstringID объекта. Необязателен, если имеется в виду подключённый объект.
deviceUuidstringdeviceUuid Edge Processor из cctv_cameras_read list (update, transfer_cameras, decommission)
toUUIDstringdeviceUuid Edge Processor, на который переносятся камеры (transfer_cameras)
removeCamerasbooleanТакже удалить его сетевые камеры (decommission)
confirmbooleanЗадавайте только после того, как пользователь подтвердил предпросмотр, возвращённый первым вызовом
cctv_recordings_readВидеонаблюдение

A facility's CCTV recordings: list and get them, see when each camera recorded (timeline), count them (summary), and look at a frame from one. Recordings are referred to by recordingId (from list, a CCTV trigger or cctv_search_anything); times are ISO 8601. Each recording has a link that opens it in the CCTV app. Videos themselves never leave the app; frame returns a still instead. To keep, release or label recordings use cctv_recordings_write.

Actions:

  • list: List recordings. Newest first, with camera, start and end, status (uploading, available, keeping, kept), who kept it and its note. Narrow by from and to, cameraIds, location or kept; page with cursor.
  • get: Get a recording. Needs recordingId.
  • timeline: When cameras recorded. Per camera between from and to (at most 7 days): the time ranges it recorded, how many recordings and how many are kept. Use it to find gaps or busy periods. Needs from.
  • summary: Count recordings. How many recordings the facility has (available, kept, uploading) and the oldest and newest, as the Recordings page counts them (updated hourly).
  • filters: What recordings can be filtered by. The cameras and locations that have recordings, and the statuses list takes.
  • frame: Look at a frame. A still from a recording nearest at (default its middle; within a minute, from the camera's timelapse), or a frame by frameId. Returns the image, its frameId and an imageUrl that shows it for 24 hours. Listed in Recent Access with who looked. Workflow steps and Agent devices need 'Workflows can share footage and identify people' turned on.

Параметры

ИмяТипОписание
action*"list" | "get" | "timeline" | "summary" | "filters" | "frame"Что сделать; каждое действие описано в описании инструмента.
fromstringRecordings that started at or after this time (list, timeline)
tostringand before this time (default now) (list, timeline)
cameraIdsarrayCamera ids (deviceUuid) from cctv_cameras_read list or status (list, timeline)
locationstringA camera location (the camera's group, for example Reception) (list)
keptbooleantrue lists only kept recordings, false only the others (list)
limitintegerЭлементов на странице (по умолчанию 25, не более 100) (list)
cursorstringnextCursor с предыдущей страницы (list)
facilityIdstringID объекта. Необязателен, если имеется в виду подключённый объект.
recordingIdstringrecordingId from cctv_recordings_read list, a CCTV trigger or cctv_search_anything (get, frame)
atstringA moment within the recording (frame)
frameIdstringA frameId instead of a recording (frame)
cctv_recordings_writeВидеонаблюдение

Keeps CCTV recordings so the facility's recording retention never deletes them, changes their note or name, and releases them again. Keeping records who kept it (a person, the AI Agent or the workflow by name) and is listed in Recent Access. Find recordings with cctv_recordings_read list, a CCTV trigger or cctv_search_anything. Workflow steps keep and label recordings once per run; only a person can release one.

Actions:

  • keep: Keep recordings. Up to 50 recordings by recordingId, with an optional note. Each one reports kept, already_kept, not_uploaded (still uploading; try again later) or failed. Needs recordingIds.
  • keep_range: Keep every recording in a time range. Keeps every recording that overlaps from to to (at most 24 hours) on cameraIds, or on every camera when none are given. Use it for an incident: a few minutes either side of when it happened. Needs from.
  • update: Change a recording's note or name. Pass note, name or both; null or an empty string clears one. Needs recordingId.
  • release: Release a kept recording. Undoes keep: the recording is deleted when the facility's recording retention ends, like any other. Only a person can release one, from AI chat or the CCTV app. Needs recordingId. May ask for confirmation.

Параметры

ИмяТипОписание
action*"keep" | "keep_range" | "update" | "release"Что сделать; каждое действие описано в описании инструмента.
recordingIdsarrayrecordingIds from cctv_recordings_read list, a CCTV trigger or cctv_search_anything (keep)
notestringnullA note shown with the recording, for example why it was kept; null or empty clears it (keep, keep_range, update)
facilityIdstringID объекта. Необязателен, если имеется в виду подключённый объект.
fromstringAn ISO date and time (keep_range)
tostringDefault now (keep_range)
cameraIdsarrayCamera ids (deviceUuid) from cctv_cameras_read list or status (keep_range)
recordingIdstringrecordingId from cctv_recordings_read list, a CCTV trigger or cctv_search_anything (update, release)
namestringnullA name for the recording (update)
confirmbooleanЗадавайте только после того, как пользователь подтвердил предпросмотр, возвращённый первым вызовом
cctv_search_anythingВидеонаблюдение

Searches a facility's indexed CCTV media (person crops, recording frames and timelapse frames) by meaning, as the CCTV page does. Returns one list of hits, newest first.

Ask in any of four ways; text with an image or seed narrows (the words filter, the picture ranks):

  • Text: query (e.g. "person in a red jacket near reception this morning") plus timezone. Time, zone and camera phrases become filters (smartQuery).
  • Image: imageBase64 and imageMimeType.
  • More like an earlier hit: copy its results[N].seed into seedIndex, seedRef and seedFrameId (or seedOffsetMs).
  • Filters: from and to (epoch ms), zoneIds, cameraNames or cameraIds.

Scores order hits. They aren't percentages, and text and image scores can't be compared. perIndex.*.textGated explains an empty list ("matched the picture, not the words"). With an image or a person seed, matching people come first, in faceMatches (insights_people_read get).

Each hit has a seed, a 1-based resultIndex and captureTimeMs. Recording hits carry a recordingId (cctv_recordings_read get), timelapse hits a frameId (cctv_recordings_read frame). Nothing is searchable until an edge processor has built the facility's indexes.

Параметры

ИмяТипОписание
facilityIdstringОбъект для поиска
timezonestringЧасовой пояс IANA для разбора времени в smart-query (например Pacific/Auckland). Обязателен, если query содержит фразы с датой или временем.
querystringОписание на естественном языке и/или фразы-фильтры. С изображением или seed слова отбирают кандидатов (текст отбирает, изображение ранжирует).
smartQuerybooleanПеред поиском преобразовывать фразы о дате, зоне и камере из query в фильтры (по умолчанию true).
imageBase64stringБайты вложенного изображения в base64 (без префикса data: URL). Отправляйте исходные байты файла; не изменяйте размер и не перекодируйте.
imageMimeTypestringMIME-тип для imageBase64, должен быть image/* (например image/jpeg, image/png).
seedIndex"person-crops" | "recording-frames" | "timelapse-frames"Search for more like an earlier hit: the index from its results[N].seed. Use with seedRef (and seedFrameId for recording frames). The tool keeps no state, so copy the seed back.
seedRefstringThe ref from results[N].seed of an earlier search at this facility.
seedFrameIdstringThe frameId from results[N].seed, for recording-frames seeds.
seedOffsetMsintegerThe offsetMs from results[N].seed, when it has no frameId.
fromintegerВремя съёмки включительно, epoch ms.
tointegerВремя съёмки, не включая, epoch ms.
zoneIdsarrayID зон доступа; родительская зона включает свои дочерние зоны.
cameraNamesarrayОтображаемые названия камер для сужения поиска.
cameraIdsarraydeviceUuid камер из cctv_cameras_read list; если указаны, сопоставление зон и названий пропускается.
limitnumberЛимит на индекс (по умолчанию 50, максимум 100).
sort"date" | "score"date (по умолчанию) = хронологический порядок All Results; score = по релевантности, без выделения Top Results.
includeFaceMatchesbooleanПри поиске по изображению или seed фрагмента с человеком или таймлапса также искать людей по лицу (по умолчанию true). Совпавшие люди выводятся первыми и перечисляются в faceMatches с id, name, status и similarity.
cctv_settings_readВидеонаблюдение

How long the facility keeps recordings, timelapse frames and analysis, whether enhanced analysis is on, recording counts, the Live Views everyone at the facility shares, and whether "Workflows can share footage and identify people" is on. To change them use cctv_settings_write.

Actions:

  • settings: Read the CCTV settings. recordingRetentionDays, timelapseRetentionMonths and analysisRetentionMonths ("all" means kept forever), enhancedAnalysis, and workflowControl.
  • storage: Recording counts and retention. How many recordings the facility has (available, kept, still uploading), the oldest and newest, and how long each kind of footage is kept.
  • live_views: List shared Live Views. The camera walls everyone at the facility shares, each with its cameras by id and name. A Live View can be shown on a display screen.
  • workflow_control: Can workflows share footage and identify people?. Whether "Workflows can share footage and identify people" is on, and what it allows workflow steps and Agent devices to do.

Параметры

ИмяТипОписание
action*"settings" | "storage" | "live_views" | "workflow_control"Что сделать; каждое действие описано в описании инструмента.
facilityIdstringID объекта. Необязателен, если имеется в виду подключённый объект.
cctv_settings_writeВидеонаблюдение

Changes how long the facility keeps recordings, timelapse frames and analysis, turns enhanced analysis on or off, makes, changes and deletes the Live Views everyone at the facility shares, and turns "Workflows can share footage and identify people" on or off. Every change asks for confirmation except saving a Live View. Read the current values with cctv_settings_read. Workflow steps and Agent devices can't change CCTV settings.

Actions:

  • save_settings: Change CCTV settings. Pass only the settings to change. Shortening a retention deletes older footage (kept recordings stay). May ask for confirmation.
  • save_live_view: Make or change a shared Live View. Without viewId, makes a Live View (name and cameraIds required). With viewId, renames it or replaces its cameras. At most 36 cameras.
  • delete_live_view: Delete a shared Live View. Needs viewId. Asks for confirmation.
  • update_workflow_control: Turn "Workflows can share footage and identify people" on or off. Only a person can change it, from AI chat or the CCTV app, and it always asks for confirmation. While off, workflow steps that get footage images, make share links or identify people are shown but can't be turned on. Needs enabled. Asks for confirmation.

Параметры

ИмяТипОписание
action*"save_settings" | "save_live_view" | "delete_live_view" | "update_workflow_control"Что сделать; каждое действие описано в описании инструмента.
recordingRetentionDaysinteger1 to 365 (save_settings)
timelapseRetentionMonthsinteger1 to 60 (save_settings)
analysisRetentionMonthsinteger1 to 60 (save_settings)
enhancedAnalysisbooleanAnalyse footage in more detail, for better search results (save_settings)
facilityIdstringID объекта. Необязателен, если имеется в виду подключённый объект.
viewIdstringviewId from cctv_settings_read live_views (save_live_view, delete_live_view)
namestring(save_live_view)
cameraIdsarrayCamera ids (deviceUuid) from cctv_cameras_read list or status (save_live_view)
enabledboolean(update_workflow_control)
confirmbooleanЗадавайте только после того, как пользователь подтвердил предпросмотр, возвращённый первым вызовом
cctv_sharing_readВидеонаблюдение

Share History and Recent Access for a facility's CCTV. links lists the share links that let someone outside the organisation watch the facility's recordings, with their status, expiry, views and who made them (never the link itself). access_log lists who viewed, downloaded, kept, released, edited or searched footage, newest first, including workflow steps and the AI Agent by name. People are named, never shown by email. To make or revoke a link use cctv_sharing_write.

Actions:

  • links: List share links. Newest first; status narrows to active, expired or revoked links. Page with cursor.
  • access_log: List Recent Access. Each entry has when, the action, who (a person's name, a workflow by name, or the AI Agent), the recordingId when it was about a recording, and what was accessed. Entries by organisation admins show only to callers with organisation-wide CCTV access, as in the app. Page with cursor.

Параметры

ИмяТипОписание
action*"links" | "access_log"Что сделать; каждое действие описано в описании инструмента.
status"active" | "expired" | "revoked"Only links with this status (links)
limitintegerЭлементов на странице (по умолчанию 25, не более 100)
cursorstringnextCursor с предыдущей страницы
facilityIdstringID объекта. Необязателен, если имеется в виду подключённый объект.
accessAction"viewed" | "downloaded" | "edited" | "kept" | "released" | "searched" | "door_unlocked"Only entries for this action (access_log)
cctv_sharing_writeВидеонаблюдение

Share links let someone outside the organisation (an insurer, the police, a contractor) watch a facility's CCTV recordings in the browser until the link expires. create_link makes one and returns its url, the only time a url is returned; people can make links for up to 7 days, workflow steps and Agent devices for up to 24 hours, and only while "Workflows can share footage and identify people" is on in CCTV settings. revoke_link stops a link working within a minute, and restore makes a revoked one work again. Every link and who made it shows in Share History (cctv_sharing_read links).

Actions:

  • create_link: Make a share link. Returns { link, url, expiresAt }. Send the url to whoever needs to watch the footage. expiresInHours defaults to 24. Asks for confirmation.
  • revoke_link: Revoke a share link. Anyone watching with the link is signed out within a minute. Revoking a revoked link changes nothing (revoked: false). Needs linkId.
  • restore: Restore a revoked share link. Makes a revoked link work again until it expires. An expired link can't be restored; make a new one instead. Needs linkId. May ask for confirmation.
  • update: Change a share link's description. Needs linkId, description.

Параметры

ИмяТипОписание
action*"create_link" | "revoke_link" | "restore" | "update"Что сделать; каждое действие описано в описании инструмента.
descriptionstringWhat the link is for, shown in Share History, for example "For the insurer" (create_link, update)
expiresInHoursnumberHow long the link works, in hours (default 24; at most 24 for workflow steps and Agent devices) (create_link)
facilityIdstringID объекта. Необязателен, если имеется в виду подключённый объект.
linkIdstringlinkId from cctv_sharing_read links, cctv_sharing_write create_link or a Footage accessed trigger (revoke_link, restore, update)
confirmbooleanЗадавайте только после того, как пользователь подтвердил предпросмотр, возвращённый первым вызовом