Loading...
Loading...
Compare original and translation side by side
lvssearchalertscurl -sf --max-time 5 "http://${HOST_IP}:30888/vst/api/v1/sensor/list" >/dev/null"No VSS profile appears to be running on(VIOS unreachable). Shall I deploy$HOST_IPusing thebaseskill? If you'd like a different profile, say which."/deploy
/deploy -p base/deploy -p basebaselvssearchalertscurl -sf --max-time 5 "http://${HOST_IP}:30888/vst/api/v1/sensor/list" >/dev/null"上似乎未运行任何VSS配置文件(VIOS无法访问)。是否需要我使用$HOST_IP技能部署/deploy配置文件?如果您需要其他配置文件,请告知。"base
/deploy -p base/deploy -p basebaseGET /vst/api/v1/sensor/listGET /vst/api/v1/sensor/<sensorId>/streamsbp_developer_alerts_2d_cvbp_developer_alerts_2d_vlm*-smc*-devnetwork_mode: hostsensor-msvst-ingress*-smc/deployvst-ingress/deploysensor-ms-*vst-ingress-*centralizedb-*storage-ms-*sdr-*envoy-*rtspserver-ms-*/deploy/deploystorage/file/*replay/stream/*/picture/urlstorage/file/*/urlGET /vst/api/v1/sensor/listGET /vst/api/v1/sensor/<sensorId>/streamsbp_developer_alerts_2d_cvbp_developer_alerts_2d_vlm*-smc*-devnetwork_mode: hostsensor-msvst-ingress*-smc/deploysensor-msvst-ingress/deploysensor-ms-*vst-ingress-*centralizedb-*storage-ms-*sdr-*envoy-*rtspserver-ms-*/deploy/deploystorage/file/*replay/stream/*/picture/urlstorage/file/*/urlhttp://<VST_ENDPOINT>/vst/api/v1curl -sf --connect-timeout 5 http://<VST_ENDPOINT>/vst/api/v1/sensor/version401-H "Authorization: Bearer <token>"startTimeendTimeGET /sensor/listsensorIdGET /sensor/{sensorId}/streamsstreamIdGET /sensor/streamsGET /live/streamsGET /replay/streamssensorIdstreamIdhttp://<VST_ENDPOINT>/vst/api/v1curl -sf --connect-timeout 5 http://<VST_ENDPOINT>/vst/api/v1/sensor/version401-H "Authorization: Bearer <token>"startTimeendTimeGET /sensor/listsensorIdGET /sensor/{sensorId}/streamsstreamIdGET /sensor/streamsGET /live/streamsGET /replay/streamssensorIdstreamId| Capability | URL prefix |
|---|---|
| Version / health check | |
| Sensor list / info / status / add / delete | |
| Sensor streams | |
| Network scan | |
| Recording timelines | |
| Video clip download / URL | |
| File upload / delete | |
| Live streams / snapshot (picture) | |
| Replay streams / historical snapshot | |
| 功能 | URL前缀 |
|---|---|
| 版本/健康检查 | |
| 传感器列表/信息/状态/添加/删除 | |
| 传感器流 | |
| 网络扫描 | |
| 录制时间线 | |
| 视频片段下载/URL | |
| 文件上传/删除 | |
| 直播流/快照(图片) | |
| 回放流/历史快照 | |
references/api-reference.mdreferences/api-reference.mdResponse: `{absolutePath, videoUrl, startTime, startTimeEpochMs, expiryISO, expiryMinutes, streamId, type: "replay"}`.
Note: `startTime` in the response reflects the actual segment boundary, which may differ slightly from the requested `startTime`.
**Query parameters for clip download/URL:**
| Parameter | Required | Description |
|---|---|---|
| `startTime` | Yes | ISO 8601 UTC. Use user-provided value, or fetch timelines first to get a valid range. |
| `endTime` | Yes | ISO 8601 UTC. Must fall within the same recorded segment as `startTime`. |
| `container` | No | `mp4` (default: `mp2t`/TS) |
| `disableAudio` | No | Always pass `true` — VIOS does not support audio for files with B-frames; disabled by default to avoid failures |
| `transcode` | No | `none` (default, fastest) or `full` (re-encode) |
| `fullLength` | No | boolean; if true, snaps to full segment boundaries |
| `expiryMinutes` | No (URL only) | minutes until URL expires, default 10080 (7 days) |
---响应:`{absolutePath, videoUrl, startTime, startTimeEpochMs, expiryISO, expiryMinutes, streamId, type: "replay"}`。
注意:响应中的`startTime`反映实际的片段边界,可能与请求的`startTime`略有差异。
**片段下载/URL的查询参数:**
| 参数 | 是否必填 | 描述 |
|---|---|---|
| `startTime` | 是 | ISO 8601 UTC格式。使用用户提供的值,或先获取时间线以获取有效范围。 |
| `endTime` | 是 | ISO 8601 UTC格式。必须与`startTime`处于同一录制片段内。 |
| `container` | 否 | `mp4`(默认值:`mp2t`/TS) |
| `disableAudio` | 否 | 始终传入`true`——VIOS不支持带B帧的文件音频;默认禁用以避免失败 |
| `transcode` | 否 | `none`(默认值,最快)或`full`(重新编码) |
| `fullLength` | 否 | 布尔值;若为true,则对齐至完整片段边界 |
| `expiryMinutes` | 否(仅URL接口) | URL过期时间(分钟),默认10080(7天) |
---undefinedundefined
**Get temporary URL for live snapshot** (no download, returns URL):
```bash
curl -s "http://<VST_ENDPOINT>/vst/api/v1/live/stream/<streamId>/picture/url" \
-H "streamId: <streamId>" | jq .{absolutePath, imageUrl, expiryISO, expiryMinutes, streamId, type: "live"}
**获取直播快照的临时URL**(不下载,仅返回URL):
```bash
curl -s "http://<VST_ENDPOINT>/vst/api/v1/live/stream/<streamId>/picture/url" \
-H "streamId: <streamId>" | jq .{absolutePath, imageUrl, expiryISO, expiryMinutes, streamId, type: "live"}startTime: Use the value provided by the user. If not provided, first fetch timelines to find a valid range:bashcurl -s "http://<VST_ENDPOINT>/vst/api/v1/storage/<streamId>/timelines" | jq .Pick any timestamp within a returnedrange.{startTime, endTime}
undefinedstartTime: 使用用户提供的值。若未提供,先获取时间线以找到有效范围:bashcurl -s "http://<VST_ENDPOINT>/vst/api/v1/storage/<streamId>/timelines" | jq .从返回的范围内选择任意时间戳。{startTime, endTime}
undefined
Optional: `width`, `height` query parameters (string format, e.g. `width=<width>`).
**Get temporary URL for historical snapshot:**
```bash
curl -s "http://<VST_ENDPOINT>/vst/api/v1/replay/stream/<streamId>/picture/url?startTime=<startTime>" \
-H "streamId: <streamId>" | jq .Note:must be passed as both path parameter andstreamIdheader (pattern:streamId, max 100 chars).^[a-zA-Z0-9_-]+$
可选参数:`width`、`height`查询参数(字符串格式,例如`width=<width>`)。
**获取历史快照的临时URL:**
```bash
curl -s "http://<VST_ENDPOINT>/vst/api/v1/replay/stream/<streamId>/picture/url?startTime=<startTime>" \
-H "streamId: <streamId>" | jq .注意:必须同时作为路径参数和streamId请求头传入(格式:streamId,最长100字符)。^[a-zA-Z0-9_-]+$
undefinedundefinedResponse: `{"sensorId": "<uuid>"}`.
**Add sensor by RTSP URL:**
```bash响应:`{"sensorId": "<uuid>"}`。
**通过RTSP URL添加传感器:**
```bash
Optional fields for both: `hardware`, `manufacturer`, `serialNumber`, `firmwareVersion`, `hardwareId`, `tags`.
**Trigger network scan for sensors:**
```bash
curl -s -X POST "http://<VST_ENDPOINT>/vst/api/v1/sensor/scan" | jq .
两者的可选字段:`hardware`、`manufacturer`、`serialNumber`、`firmwareVersion`、`hardwareId`、`tags`。
**触发传感器网络扫描:**
```bash
curl -s -X POST "http://<VST_ENDPOINT>/vst/api/v1/sensor/scan" | jq .undefinedundefinedThis removes the sensor from all VIOS APIs but does **not** delete recordings from disk.
> **RTSP full cleanup:** Calling only `DELETE /sensor/<sensorId>` leaves orphaned recordings on disk. See the delete guidance in Section 8 for the complete two-step RTSP removal flow.
---此操作会从所有VIOS API中移除传感器,但**不会**删除磁盘上的录制内容。
> **RTSP完整清理:** 仅调用`DELETE /sensor/<sensorId>`会在磁盘上留下孤立的录制内容。请参阅第8节的删除指南,完成两步式RTSP移除流程。
---PUT /storage/file/{filename}PUT /storage/file/{filename}undefinedundefined
Key behavior:
- Returns **409 Conflict** if a file with the same name already exists — does NOT auto-rename
- `sensorId` query param: if provided, used as the sensorId (allows grouping under an existing sensor as a sub-stream); if omitted, a new random UUID is generated
- `Content-Length` header is required
---
核心行为:
- 若同名文件已存在,返回**409 Conflict**——不会自动重命名
- `sensorId`查询参数:若提供,用作sensorId(允许将文件归类至现有传感器作为子流);若省略,生成新的随机UUID
- 必须传入`Content-Length`请求头
---PUT /storage/file/{filename}/{timestamp}PUT /storage/file/{filename}/{timestamp}undefinedundefined
Key behavior:
- If a file with the same name already exists, **auto-generates a unique filename** (no 409)
- sensorId is **always a newly generated random UUID** — there is no way to specify or reuse an existing sensorId; the `sensorId` query param is ignored even if passed
---
**Response (both APIs):** `{id, filename, bytes, sensorId, streamId, filePath, timestamp, created_at}`.
- `id` — unique file identifier
- `sensorId` / `streamId` — assigned sensor and stream (auto-generated UUID if not provided)
- `filePath` — absolute path on disk where the file is stored
- `created_at` — epoch ms when file was uploaded
- 413 if payload too large; 422 if codec unsupported; 507 if disk full
**Delete an uploaded file** (removes physical file from disk AND removes sensor from all APIs):
```bash
核心行为:
- 若同名文件已存在,**自动生成唯一文件名**(不会返回409)
- sensorId**始终为新生成的随机UUID**——无法指定或复用现有sensorId;即使传入`sensorId`查询参数也会被忽略
---
**响应(两种API):** `{id, filename, bytes, sensorId, streamId, filePath, timestamp, created_at}`。
- `id` —— 唯一文件标识符
- `sensorId`/`streamId` —— 分配的传感器和流(未提供则为自动生成的UUID)
- `filePath` —— 文件在磁盘上的绝对路径
- `created_at` —— 文件上传时的时间戳(毫秒级)
- 若 payload过大返回413;若 codec不支持返回422;若磁盘已满返回507
**删除上传的文件**(从磁盘中删除物理文件并从所有API中移除传感器):
```bash
> **Identify sensor type before deleting:** call `GET /sensor/<sensorId>/streams` and check the `url` field.
> - If `url` starts with `rtsp://` → RTSP/IP sensor
> - If `url` is a file path (e.g. `/home/vst/.../video.mp4`) → uploaded file sensor
>
> **Which delete to use:**
> - **Uploaded file sensor** — use ONLY `DELETE /storage/file/<streamId>?startTime=...&endTime=...`. This deletes the physical file and removes the sensor from all APIs. Do NOT use `DELETE /sensor/<sensorId>` alone — it removes the sensor from APIs but leaves the physical file on disk.
> - **RTSP sensor** — use BOTH in order: first `DELETE /sensor/<sensorId>` (stops recording, removes from APIs), then `DELETE /storage/file/<streamId>?startTime=...&endTime=...` (deletes recordings from disk). Using only the storage delete on an RTSP sensor erases existing recordings but the sensor stays active and keeps recording.
> **File sensor timeline times:** Uploaded file sensors report timelines relative to the timestamp provided at upload time, not the upload wall-clock time. If the default was used, timelines start at `2025-01-01T00:00:00.000Z`. Always fetch the timeline first before building the delete command — never assume times based on upload time.
---
> **删除前识别传感器类型:** 调用`GET /sensor/<sensorId>/streams`并检查`url`字段。
> - 若`url`以`rtsp://`开头 → RTSP/IP传感器
> - 若`url`是文件路径(例如`/home/vst/.../video.mp4`) → 上传文件传感器
>
> **选择删除方式:**
> - **上传文件传感器** —— 仅使用`DELETE /storage/file/<streamId>?startTime=...&endTime=...`。此操作会删除物理文件并从所有API中移除传感器。请勿单独使用`DELETE /sensor/<sensorId>`——它会从API中移除传感器,但物理文件仍留在磁盘上。
> - **RTSP传感器** —— 按顺序使用两种方式:先调用`DELETE /sensor/<sensorId>`(停止录制,从API中移除),再调用`DELETE /storage/file/<streamId>?startTime=...&endTime=...`(从磁盘中删除录制内容)。仅对RTSP传感器使用存储删除操作会清除现有录制内容,但传感器仍处于活跃状态并会继续录制。
> **文件传感器时间线时间:** 上传文件传感器报告的时间线基于上传时提供的时间戳,而非上传的实际时间。若使用默认值,时间线从`2025-01-01T00:00:00.000Z`开始。构建删除命令前请始终先获取时间线——切勿基于上传时间假设时间范围。
---curl -sf --connect-timeout 5 "http://<VST_ENDPOINT>/vst/api/v1/sensor/version"sensorIdcurl -s "http://<VST_ENDPOINT>/vst/api/v1/sensor/list" | jq .streamIdisMain: truecurl -s "http://<VST_ENDPOINT>/vst/api/v1/sensor/<sensorId>/streams" | jq .curl -s "http://<VST_ENDPOINT>/vst/api/v1/storage/<streamId>/timelines" | jq .streamIdcurl -sf --connect-timeout 5 "http://<VST_ENDPOINT>/vst/api/v1/sensor/version"sensorIdcurl -s "http://<VST_ENDPOINT>/vst/api/v1/sensor/list" | jq .streamIdisMain: truecurl -s "http://<VST_ENDPOINT>/vst/api/v1/sensor/<sensorId>/streams" | jq .curl -s "http://<VST_ENDPOINT>/vst/api/v1/storage/<streamId>/timelines" | jq .streamIdnullnulltrueDELETE /sensor/{sensorId}error_codeerror_message{
"error_code": "VMSInternalError",
"error_message": "VMS internal processing error"
}VMSInternalErrorVMSNotFoundVMSInvalidParameternullnulltrueDELETE /sensor/{sensorId}error_codeerror_message{
"error_code": "VMSInternalError",
"error_message": "VMS内部处理错误"
}VMSInternalErrorVMSNotFoundVMSInvalidParameterjq .-o <file>2026-04-10T10:30:00Z2026-04-10T10:30:00.000ZstreamId/urlsensorIdstreamIdGET /sensor/<sensorId>/streamsurlurlrtsp://url"/home/vst/vst_release/streamer_videos/TruckAccident.mp4"<VST_ENDPOINT>jq .-o <file>2026-04-10T10:30:00Z2026-04-10T10:30:00.000ZstreamId/urlsensorIdstreamIdGET /sensor/<sensorId>/streamsurlurlrtsp://url"/home/vst/vst_release/streamer_videos/TruckAccident.mp4"<VST_ENDPOINT>