Get URL for streams publishing: Stream.GetPublishUrls

Returns publish URLs for the specified streams

Parameters

params: object

params.cameras: StreamUids aka object

No description

params.cameras...

params.cameras{}: array

Min size: 1

List of stream UIDs to get information for


params.cameras{}[]: Uid aka string

Pattern: ^[a-zA-Z0-9_-]+$

Unique identifier used throughout the system



params.ssl: boolean

optional

Default:

JSON
false

Return publish URLs with RTSP over TLS when sink TLS is enabled


params.ttl: integer

optional

Default:

JSON
3600

URL validity time in seconds


params.live: integer

optional

Default:

JSON
1

Is live streaming enabled


params.view: integer

optional

Default:

JSON
1

Is DVR streaming enabled


params.copy: integer

optional

Default:

JSON
1

Is streaming download enabled


params.from: null|integer

optional nullable

Default:

JSON
0

From DVR stream


params.to: null|integer

optional nullable

Default:

JSON
0

To DVR stream


params.whitelist: array

optional

Default:

JSON
[]

List of IP addresses allowed access without authentication

IP whitelist for unauthorized access

params.whitelist...

params.whitelist[]: IpAddress aka string

Pattern: ^(?:[0-9]{1,3}\.){3}[0-9]{1,3}$|^(?:[0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}$

IPv4 or IPv6 address



Result

result: object


result{}: any

No description


POST /api/

JSON
{
  "jsonrpc": "2.0",
  "method": "Stream.GetPublishUrls",
  "params": {
    "cameras": {
      "camera_uuid": [
        "stream_uuid"
      ]
    },
    "ssl": false
  },
  "id": 123
}
cURL
Bash
curl -k --request POST \
    --url 'https://your-domain/api/' \
    --header 'Content-Type: application/json' \
    --header 'Authorization: Bearer <api-authorization-token>' \
    --data '{
  "jsonrpc": "2.0",
  "method": "Stream.GetPublishUrls",
  "params": {
    "cameras": {
      "camera_uuid": [
        "stream_uuid"
      ]
    },
    "ssl": false
  },
  "id": 123
}'

200 OK

JSON
{
  "jsonrpc": "2.0",
  "result": {
    "camera_uuid": {
      "stream_uuid": "rtsp://rAof9oiRaQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA9:JxMp7VgFKiKQL_NgEBwCyUYMFjgbRpo_gjUK6BJ3ugAAAAA~@labnsmse3.aivp.io:8998/sink/camera_uuid/stream_uuid/"
    }
  },
  "id": 123
}

400 Bad Request

JSON
{
  "jsonrpc": "2.0",
  "error": {
    "code": -32601,
    "message": "Method not found"
  },
  "id": 123
}

500 Internal Server Error

Server error