Post an event: Server.PostEvent

Post event to the list of cameras

Parameters

params: object


params{}: object

Camera event object

params{}...

params{}.type: string

Event type. Combination of dvr|publish|capture|live


params{}.source: Uid aka string

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

Unique identifier used throughout the system

Camera UID to post event for


params{}.payload: string

Custom event payload


params{}.hostname: string

Event destination



Result

result: object

Map of events to post with success status


result{}: boolean

No description


POST /api/

JSON
{
  "jsonrpc": "2.0",
  "method": "Server.PostEvent",
  "params": {
    "event_0": {
      "hostname": "domain_or_ip",
      "source": "camera_uuid",
      "type": "dvr|publish",
      "payload": "event_payload"
    }
  },
  "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": "Server.PostEvent",
  "params": {
    "event_0": {
      "hostname": "domain_or_ip",
      "source": "camera_uuid",
      "type": "dvr|publish",
      "payload": "event_payload"
    }
  },
  "id": 123
}'

200 OK

JSON
{
  "jsonrpc": "2.0",
  "result": {
    "event_0": true
  },
  "id": 123
}

400 Bad Request

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

500 Internal Server Error

Server error