camera

Connect new camera

post/cameras/

Request

  • Base URL
    https://api.angelcam.com/v1
  • Auth
    • OAuth 2
      Authorization codehttps://my.angelcam.com/oauth/authorize/, token URL https://my.angelcam.com/oauth/token/
      PasswordToken URL https://api.angelcam.com/oauth/token/
      Scopescamera_create
    • or API key in header Authorization
  • TypeScript
    A function with typed inputs. Its response is checked against the schema.

Request body

namestring required

Camera name

type'h264' | 'h265' | 'mjpeg' required

Camera type. We currently support H.264/H.265 over RTSP and MJPEG over HTTP cameras.

connection_type'direct' | 'arrow' required

How is the camera connected to Angelcam. The direct connection means that the camera stream is available on a public IP address. The arrow option can be used for connecting cameras that can be accessed via an Arrow client. Please note that cameras connected via an Arrow client use URL in a specific format. You will need to use the stream detection endpoints to obtain the URL first.

urlstring url required

Complete URL of a camera stream. H.264 and H.265 cameras must use "rtsp" scheme, for MJPEG cameras it's allowed to use "http" and "https" schemes. The "https" scheme is valid only for cameras using the direct connection type.

enable_status_checksboolean

Enable periodic online/offline checks for the camera.

enable_periodical_snapshotsboolean

Refresh camera snapshot automatically once every 24h.

tagsstring[]

List of tags assigned to the camera. Tags can be used for filtering.

Example request

{
  "name": "My brand new shiny camera",
  "type": "h264",
  "connection_type": "direct",
  "url": "rtsp://username:password@175.36.248.73:554/live.sdp"
}

Response

Newly created camera object

idinteger required

Camera ID

namestring required

Camera name

locationinteger nullable required

ID of the location the camera belongs to

siteinteger nullable required

ID of the location the camera belongs to. Deprecated: use location instead.

type'h264' | 'h265' | 'mjpeg' required

Camera type

status'offline' | 'online' | 'unknown' required
event_api_hashstring

Event API hash - unique token for posting events to camera timeline from embedded devices without authentication (do not disclose)

live_snapshotstring uri nullable required

Live snapshot URL

low_latency_enabledboolean required

Indicates if user enabled low latency streaming in camera settings.

audio_enabledboolean required

Indicates if audio is enabled for given camera.

enable_status_checksboolean required

Indicates if periodic online/offline checks for the camera are enabled.

enable_periodical_snapshotsboolean required

Indicates if camera snapshot is being refreshed automatically once every 24h.

tagsstring[] required

List of tags assigned to the camera. Tags can be used for filtering.

Example response

{
  "id": 157,
  "name": "Parkside Office",
  "location": 1,
  "site": 1,
  "type": "h264",
  "snapshot": {
    "url": "https://dsw4ncxjbie85.cloudfront.net/snapshot/81/y8jol6kbn0ol1gh2.jpg",
    "created_at": "2017-03-29T15:41:39.000Z"
  },
  "status": "online",
  "live_snapshot": "http://m1.angelcam.com/stream/81/snapshot.jpg?token=eyJ0aW1lIjogMTQ5NjkzNDYyODE5NjIxOCwgInRpbWVvdXQiOiAzNjAwLCAiYWxpYXMiOiAiODEifQ==.85b552be2b7f0abaa0a3b5b4f412877f8af92f691c7d0c6db6b8c517ea8f921c",
  "streams": [
    {
      "format": "mjpeg",
      "url": "http://m1.angelcam.com/stream/81/stream.mjpeg?token=eyJ0aW1lIjogMTQ5NjkzNDYyODE5NjIxOCwgInRpbWVvdXQiOiAzNjAwLCAiYWxpYXMiOiAiODEifQ==.85b552be2b7f0abaa0a3b5b4f412877f8af92f691c7d0c6db6b8c517ea8f921c",
      "refresh_rate": 0.1
    },
    {
      "format": "mp4",
      "url": "http://m1.angelcam.com/stream/81/stream.mp4?token=eyJ0aW1lIjogMTQ5NjkzNDYyODE5NjMxNiwgInRpbWVvdXQiOiAzNjAwLCAiYWxpYXMiOiAiODEifQ==.b5b4cf405cf054701a75b359f4069d2af8a102c5ffd8f33cbb560a4638c7cb71"
    },
    {
      "format": "mpegts",
      "url": "http://m1.angelcam.com/stream/81/stream.ts?token=eyJ0aW1lIjogMTQ5NjkzNDYyODE5NjMxNiwgInRpbWVvdXQiOiAzNjAwLCAiYWxpYXMiOiAiODEifQ==.b5b4cf405cf054701a75b359f4069d2af8a102c5ffd8f33cbb560a4638c7cb71"
    },
    {
      "format": "hls",
      "url": "http://m1.angelcam.com/stream/81/playlist.m3u8?token=eyJ0aW1lIjogMTQ5NjkzNDYyODE5NjQwMSwgInRpbWVvdXQiOiAzNjAwLCAiYWxpYXMiOiAiODEifQ==.8ac35b434e768e8f10161b2d74da492f5fd8a8c115c18cbb421017665acd908a"
    }
  ],
  "applications": [
    "LSA",
    "CRA"
  ],
  "low_latency_enabled": false,
  "audio_enabled": true,
  "enable_status_checks": true,
  "enable_periodical_snapshots": true,
  "tags": [
    "office",
    "entrance"
  ]
}

Changes

No recorded changes to this operation across all 1 revision of this API.