Loading...
Loading...
Query VIOS REST APIs: sensor list, recording timelines, video clip extraction, snapshot capture, add/delete sensors and streams
npx skill4agent add nvidia/skills vioslvssearchalertscurl -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 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/*/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/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 | |
references/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) |
---
### 5. Snapshot / Picture
#### Live snapshot (most recent frame from sensor)
```bash
# width and height are optional; omit to use native sensor resolution (max 8000x4000)
curl -s "http://<VST_ENDPOINT>/vst/api/v1/live/stream/<streamId>/picture?width=<width>&height=<height>" \
-H "streamId: <streamId>" \
-o snapshot.jpgcurl -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}
# startTime is ISO 8601 UTC — the frame closest to this timestamp is returned
curl -s "http://<VST_ENDPOINT>/vst/api/v1/replay/stream/<streamId>/picture?startTime=<startTime>" \
-H "streamId: <streamId>" \
-o snapshot_recorded.jpgwidthheightwidth=<width>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_-]+$
# sensorIp: camera IP address; name/location are optional labels
curl -s -X POST "http://<VST_ENDPOINT>/vst/api/v1/sensor/add" \
-H "Content-Type: application/json" \
-d '{
"sensorIp": "<sensorIp>",
"username": "<username>",
"password": "<password>",
"name": "<name>",
"location": "<location>"
}' | jq .{"sensorId": "<uuid>"}# sensorUrl: full RTSP URL with credentials embedded, e.g. rtsp://<username>:<password>@<ip>:<port>/<path>
# username/password are part of the URL — do not include them separately in the body
# name: use the last segment of the RTSP URL path as the default (e.g. for rtsp://.../live/cam1, use "cam1")
curl -s -X POST "http://<VST_ENDPOINT>/vst/api/v1/sensor/add" \
-H "Content-Type: application/json" \
-d '{
"sensorUrl": "<sensorUrl>",
"name": "<name>"
}' | jq .hardwaremanufacturerserialNumberfirmwareVersionhardwareIdtagscurl -s -X POST "http://<VST_ENDPOINT>/vst/api/v1/sensor/scan" | jq .# Returns true on success
curl -s -X DELETE "http://<VST_ENDPOINT>/vst/api/v1/sensor/<sensorId>" | jq .RTSP full cleanup: Calling onlyleaves orphaned recordings on disk. See the delete guidance in Section 8 for the complete two-step RTSP removal flow.DELETE /sensor/<sensorId>
PUT /storage/file/{filename}# filename: must not contain whitespace
# timestamp: ISO 8601 UTC, e.g. 2025-01-01T00:00:00.000Z — default when user has not specified: 2025-01-01T00:00:00.000Z
# sensorId: optional — if omitted, server generates a UUID; if provided and already exists, file is added as a sub-stream of that sensor
curl -s -X PUT "http://<VST_ENDPOINT>/vst/api/v1/storage/file/<filename>?timestamp=<timestamp>&sensorId=<sensorId>" \
-H "Content-Type: application/octet-stream" \
-H "Content-Length: <file_size_in_bytes>" \
--upload-file /path/to/video.mp4 | jq .sensorIdContent-LengthPUT /storage/file/{filename}/{timestamp}# filename: must not contain whitespace
# timestamp: ISO 8601 UTC, e.g. 2025-01-01T00:00:00.000Z — default when user has not specified: 2025-01-01T00:00:00.000Z
curl -s -X PUT "http://<VST_ENDPOINT>/vst/api/v1/storage/file/<filename>/<timestamp>" \
-H "Content-Type: application/octet-stream" \
-H "Content-Length: <file_size_in_bytes>" \
--upload-file /path/to/video.mp4 | jq .sensorId{id, filename, bytes, sensorId, streamId, filePath, timestamp, created_at}idsensorIdstreamIdfilePathcreated_at# streamId: use the streamId returned in the upload response (or from sensor/{sensorId}/streams)
# startTime / endTime: use the timeline range for this streamId (fetch from /storage/<streamId>/timelines)
# Returns {spaceSaved: <MB>}
curl -s -X DELETE "http://<VST_ENDPOINT>/vst/api/v1/storage/file/<streamId>?startTime=<startTime>&endTime=<endTime>" | jq .Identify sensor type before deleting: calland check theGET /sensor/<sensorId>/streamsfield.url
- If
starts withurl→ RTSP/IP sensorrtsp://- If
is a file path (e.g.url) → uploaded file sensor/home/vst/.../video.mp4Which delete to use:
- Uploaded file sensor — use ONLY
. This deletes the physical file and removes the sensor from all APIs. Do NOT useDELETE /storage/file/<streamId>?startTime=...&endTime=...alone — it removes the sensor from APIs but leaves the physical file on disk.DELETE /sensor/<sensorId>- RTSP sensor — use BOTH in order: first
(stops recording, removes from APIs), thenDELETE /sensor/<sensorId>(deletes recordings from disk). Using only the storage delete on an RTSP sensor erases existing recordings but the sensor stays active and keeps recording.DELETE /storage/file/<streamId>?startTime=...&endTime=...
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. Always fetch the timeline first before building the delete command — never assume times based on upload time.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 .streamIdnullnulltrueDELETE /sensor/{sensorId}error_codeerror_message{
"error_code": "VMSInternalError",
"error_message": "VMS internal processing error"
}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>