Documentation | Single version   Service version

API documentation

Camlytics Single API docs (autogenerated)

Camlytics Single API
Swagger definition: swagger.yaml
More information: REST API Help
Contact Info: camlytics.com
Version: 1
BasePath:/v1/json
All rights reserved
http://apache.org/licenses/LICENSE-2.0.html

Access

Methods

[ Jump to Models ]

Table of Contents

Default

Default

Up
get /channels
(channelsGet)
Retrieve video channels

Return type

array[Channel]

Example data

Content-Type: application/json
[
 {
  "profile_name" : "profile_name",
  "password" : "password",
  "stream_uri" : "stream_uri",
  "profile_token" : "profile_token",
  "name" : "name",
  "type" : "Unknown",
  "login" : "login",
  "channel_id" : "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
  "uri" : "uri"
 }, {
  "profile_name" : "profile_name",
  "password" : "password",
  "stream_uri" : "stream_uri",
  "profile_token" : "profile_token",
  "name" : "name",
  "type" : "Unknown",
  "login" : "login",
  "channel_id" : "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
  "uri" : "uri"
 }
]

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.
  • application/json

Responses

200

Success

default

Unexpected error Error

Up
get /events
(eventsGet)
Retrieve video analytics events ordered by event id.

Query parameters

channelId (optional)
Query Parameter — Include events only from specified channel. format: uuid
sinceId (optional)
Query Parameter — Exclude events that has id less or equal to sinceId. format: int32
sinceTime (optional)
Query Parameter — Exclude events that occurred before sinceTime. Example: sinceTime=2018-05-20T10:30:00.5550000Z format: date-time
untilId (optional)
Query Parameter — Exclude events that has id greater or equal to untilId. format: int32
untilTime (optional)
Query Parameter — Exclude events that occurred after untilTime. Example: untilTime=2018-05-20T10:30:00.5550000Z format: date-time
limit (optional)
Query Parameter — Max number of events returned. Default value is 100 events. format: int32
order (optional)
Query Parameter — Events sorting order (ASC or DESC). Default is ASC.
timeout (optional)
Query Parameter — Max number of seconds to wait for new events. If no new events occured, then an empty array is returned. 5 seconds should be fine. format: int32

Return type

array[Event]

Example data

Content-Type: application/json
[
 {
  "channel_name" : "channel_name",
  "rule_name" : "rule_name",
  "origin" : "Unknown",
  "snapshot_path" : "snapshot_path",
  "type" : "MotionStarted",
  "object_id" : 1,
  "recording_path" : "recording_path",
  "rule_id" : "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
  "event_id" : 0,
  "video_file_name" : "video_file_name",
  "video_file_time" : "2000-01-23T04:56:07.000+00:00",
  "time" : "2000-01-23T04:56:07.000+00:00",
  "channel_id" : "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
  "timestamp" : 6.0274563
 }, {
  "channel_name" : "channel_name",
  "rule_name" : "rule_name",
  "origin" : "Unknown",
  "snapshot_path" : "snapshot_path",
  "type" : "MotionStarted",
  "object_id" : 1,
  "recording_path" : "recording_path",
  "rule_id" : "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
  "event_id" : 0,
  "video_file_name" : "video_file_name",
  "video_file_time" : "2000-01-23T04:56:07.000+00:00",
  "time" : "2000-01-23T04:56:07.000+00:00",
  "channel_id" : "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
  "timestamp" : 6.0274563
 }
]

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.
  • application/json

Responses

200

Success

default

Unexpected error Error

Up
get /events/totals/rule
(eventsTotalsRuleGet)
Retrieve video analytics events totals grouped by rules (zones, lines).

Query parameters

channelId (optional)
Query Parameter — Include events only from specified channel. format: uuid
sinceTime (optional)
Query Parameter — Exclude events that occurred before sinceTime. Example: sinceTime=2018-05-20T10:30:00.5550000Z format: date-time
untilTime (optional)
Query Parameter — Exclude events that occurred after untilTime. Example: untilTime=2018-05-20T10:30:00.5550000Z format: date-time
origin (optional)
Query Parameter — Include only specified event origin.

Return type

Example data

Content-Type: application/json
[
 {
  "rule_id" : "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
  "rule_name" : "rule_name",
  "channel_id" : "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
  "rule_count" : 0
 }, {
  "rule_id" : "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
  "rule_name" : "rule_name",
  "channel_id" : "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
  "rule_count" : 0
 }
]

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.
  • application/json

Responses

200

Success

default

Unexpected error Error

Up
get /events/totals/type
(eventsTotalsTypeGet)
Retrieve video analytics events totals grouped by type.

Query parameters

channelId (optional)
Query Parameter — Include events only from specified channel. format: uuid
sinceTime (optional)
Query Parameter — Exclude events that occurred before sinceTime. Example: sinceTime=2018-05-20T10:30:00.5550000Z format: date-time
untilTime (optional)
Query Parameter — Exclude events that occurred after untilTime. Example: untilTime=2018-05-20T10:30:00.5550000Z format: date-time
origin (optional)
Query Parameter — Include only specified event origin.

Return type

Example data

Content-Type: application/json
[
 {
  "type_count" : 0,
  "type" : "MotionStarted",
  "channel_id" : "046b6c7f-0b8a-43b9-b35d-6489e6daee91"
 }, {
  "type_count" : 0,
  "type" : "MotionStarted",
  "channel_id" : "046b6c7f-0b8a-43b9-b35d-6489e6daee91"
 }
]

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.
  • application/json

Responses

200

Success

default

Unexpected error Error

Models

[ Jump to Methods ]

Table of Contents

  1. Channel -
  2. Error -
  3. Event -
  4. EventTotalByRule -
  5. EventTotalByType -

Channel - Up

channel_id (optional)
UUID format: uuid
name (optional)
type (optional)
Enum:
Unknown
Webcam
Onvif
ManualOnvif
Manual
File
Folder
stream_uri (optional)
login (optional)
password (optional)
uri (optional)
profile_name (optional)
profile_token (optional)

Error - Up

code (optional)
Integer format: int32
message (optional)
detail (optional)

Event - Up

event_id (optional)
Integer format: int32
type (optional)
Enum:
Sabotage
RegionJoin
RegionLeave
MotionInRegionOn
MotionInRegionOff
CrowdOn
CrowdOff
Tailgating
ObjectAppear
ObjectDisappear
Loitering
AbandonedObject
TripwireCrossed
CameraDisconnected
time (optional)
Date format: date-time
timestamp (optional)
Float format: float
channel_id (optional)
UUID format: uuid
channel_name (optional)
object_id (optional)
origin (optional)
Enum:
Unknown
Pedestrian
Vehicle
rule_id (optional)
UUID format: uuid
rule_name (optional)
snapshot_path (optional)
recording_path (optional)
video_file_name (optional)
video_file_time (optional)
Date format: date-time

EventTotalByRule - Up

channel_id (optional)
UUID format: uuid
rule_count (optional)
rule_id (optional)
UUID format: uuid
rule_name (optional)

EventTotalByType - Up

channel_id (optional)
UUID format: uuid
type (optional)
Enum:
Sabotage
RegionJoin
RegionLeave
MotionInRegionOn
MotionInRegionOff
CrowdOn
CrowdOff
Tailgating
ObjectAppear
ObjectDisappear
Loitering
AbandonedObject
TripwireCrossed
CameraDisconnected
type_count (optional)