MENU
cURL

Introduction

Overview

The Eagle Eye Video API is a comprehensive RESTful API for recording, indexing and storing camera video. The Eagle Eye Video API handles all the heavy lifting of interfacing with the cameras, recording video, securely transmitting video to the cloud, storing video and making video available for use for your applications. All of the Eagle Eye Security Camera VMS user interfaces (web, iOS, Android) have been built using this API

We provide language bindings in cURL. You can view code examples on the right-hand side window and you can switch the programming language of the examples with the tabs in the top right (when available)

Getting Started

The Eagle Eye Video API allows you to securely record, manage and play video back from any camera, any place, any time. A robust annotation interface and smart bandwidth management allows you to turn terabytes of raw video into searchable, useful data

Since the API is based on REST principles, it’s very easy to write and test applications. You can use your browser to access URLs and you can use many different HTTP clients in nearly any programming language

Requirements

Get an API Key

Create a Developer Account

To get started with the Eagle Eye Video API you will need an API Key. This is used to identify you and your application. It also makes everything secure. To get an API Key you will need an account (so that you have some place to do some testing). You can either use your existing account or create a Developer Account. You can create an API Key in your existing account under the Account Settings

You will have to verify your email address to create your Developer Account. You will also get an email with a shortcut to create the API Key. Click on the shortcut link to create your API Key and get started writing some code

You may also want to purchase a development hardware kit from us (so you can connect some devices). These are available at a large discount for developers. You can get an Eagle Eye Bridge and even some Cameras from us for development and testing. Just email us for more information and pricing

The API Key should be located in the header under the 'Authorization' key with a colon appended to it

Please see the section on Single Sign On for alternatives to password authentication

Visual Steps

visual step 1 visual step 2 visual step 3 visual step 4 visual step 5

Content Features

Fully control the information flow:

Content

Press F8 to enable / disable Hover Modals
(onclick behavior will remain)

To close the Modal definition:

Appearance

Press Alt + C to change the Modal color
(the color will not be changed now)

Press F9 to enable / disable an additional feature

HTTP Response Codes

Overview

We use the established HTTP status codes. This is the general description for all the codes we return. Each API call defines any additional meaning intended with the return codes it uses.

HTTP Status Code Description
200 The request was fulfilled successfully
201 The request has been created and a webhook will be triggered upon completion or error
202 The request has been accepted for processing, but the processing has not been completed
204 User has been logged out
HTTP Status Code Description
301 Item has been moved, please follow redirect
HTTP Status Code Description
400 The request had bad syntax or was inherently impossible to be satisfied
401 Supplied credentials are not valid / invalid session cookie
402 Account is suspended
403 Forbidden due to the user missing the necessary privileges
404 Element not found (section specific)
405 Unexpected method used for the HTTP request
406 Realm is invalid due to not being a root realm
409 Email address has already been registered for the specified realm
410 Communication cannot be made to attach the camera to the bridge
412 User is disabled
415 Device associated with the given GUID is unsupported
423 The resource that is being accessed is locked
429 Too many requests. Client has exceeded the maximum requests per second, please slow down.
460 Account is inactive
461 Account is pending
462 User is pending
463 Unable to communicate with the camera or bridge, contact support
HTTP Status Code Description
500 Internal Error. Please contact our support department.
502 Bad Gateway. We were unable to return the requested data. Please try again.
503 Internal Camera Tag Maps Error. Please contact our support department.
504 Gateway Timeout. We were unable to return the requested data inside our time limit. Please try again.

Authentication

Overview

Gaining access to the Eagle Eye API is a two-stage process. Clients first present their credentials and Realm to obtain a single-use Authentication Token. This single use token is valid for a predefined duration or until it has been used. Once the Authentication Token is obtained the Client must utilize it in an Authorize service call to obtain a session ID (via the 'auth_key' cookie) that provides access to resources. This two-phase approach allows Clients to authenticate and operate in multiple domains. The first step is done using Authenticate. The second step is done using Authorize. Note that the Authenticate call must be done over a HTTPS connection

In addition to the Simple Authentication described above, a more secure Authentication method known as Two-Factor Authentication (TFA) may be used. TFA is a method of confirming the user’s identity by utilizing a combination of two different components. The first component is a user’s password and the second is a one-time TFA code delivered to the user via another communication channel - email or a text message sent to the user’s mobile phone

Whether Simple or Two-Factor Authentication is used for a particular user’s login is determined by this user’s settings in the system. Note, however, that an Account Superuser may enforce all users in a particular Account to use TFA

If TFA is enforced, the Authorize call will expect the TFA code to be passed in addition to the token obtained from the Authenticate call

There are several methods to use the 'auth_key' cookie (obtained from the Authorize call) to authenticate subsequent API calls:

The order of precedence for session ID retrieval is as follows:

  1. 'A' parameter in the query string of any method (GET, PUT, POST, DELETE)
  2. 'A' parameter in the POST data
  3. 'A' parameter in the request body (e.g. PUT)
  4. 'auth_key' cookie

Note: HTTP response status codes are listed throughout the document in order of precedence with the request successfully completed codes at the very end - meaning amongst the negative result codes the last one listed is the one that will be returned if none of the preceding codes’ conditions are met

1. Authenticate

Login is a two-step process when using Simple Authentication and a three-step process using TFA

Simple Authentication

  1. Authenticate with username and password
  2. Authorize with the token returned by Authenticate

Two-Factor Authentication

  1. Authenticate
  2. Instruct the system to send the TFA code
  3. Authorize with the token received from 1. and the TFA code received from 2.

Request

curl -X POST https://login.eagleeyenetworks.com/g/aaa/authenticate -d '{"username": "[USERNAME]", "password": "[PASSWORD]"}' -H "content-type: application/json" -H "Authentication: [API_KEY]"

HTTP Request

POST https://login.eagleeyenetworks.com/g/aaa/authenticate

Parameter Data Type Description Is Required
username string The username defined by the user (email address) true
password string The password defined by the user (alphanumeric, min 10 characters) true

Json Response (Simple Authentication)

{
    "token": "MiDUwMQqwP1JsfKqbqT1DQ8hJFHEOZfROEUtBvnuqv0ICxvcOybkS1n9/awjrJ9YKijb60GqdUDPP8TW4o8Ei8iI8OXC/dj74KC2cLMxJ2vs/hmYPfbW8OpCwf0k683a2LfIbjcC3Uy/SmDpOsxVdPMTXQEGJHXD3ItmAvoQ5MOoRKfHBNOu7OJBWQjPUjeP0fkHSrx8JgAHSqT5SwRM0mLysFmiFHF0h7/5Apt81dDhZwLBDwwSrl+kTqgn+wnw6rJ432liESdK+yp3Qefk1wAtytoTJkkBE2srqsHJdW4ryVYKk9SKA62Cz7pO3VUaD8Yxx9Ff2Os9ez6TdfBmqg=="
}

Json Response (Two-Factor Authentication)

{
    "token": "MiDUwMQqwP1JsfKqbqT1DQ8hJFHEOZfROEUtBvnuqv0ICxvcOybkS1n9/awjrJ9YKijb60GqdUDPP8TW4o8Ei8iI8OXC/dj74KC2cLMxJ2vs/hmYPfbW8OpCwf0k683a2LfIbjcC3Uy/SmDpOsxVdPMTXQEGJHXD3ItmAvoQ5MOoRKfHBNOu7OJBWQjPUjeP0fkHSrx8JgAHSqT5SwRM0mLysFmiFHF0h7/5Apt81dDhZwLBDwwSrl+kTqgn+wnw6rJ432liESdK+yp3Qefk1wAtytoTJkkBE2srqsHJdW4ryVYKk9SKA62Cz7pO3VUaD8Yxx9Ff2Os9ez6TdfBmqg==",
    "two_factor_authentication_code": {
        "sms": "*** *** 779",
        "email": "***********@gmail.com"
    }
}

HTTP Response (Json Attributes)

Parameters Data Type Description
token string Token to be used in Authorize
two_factor_authentication_code json Defines which method can be used for TFA code delivery:
'sms' - scrubbed user’s SMS number
'email' - scrubbed user’s email address

(present only if TFA is enabled, displays partial information about the defined email address or phone number)

NOTE 1:

Token expiration:

NOTE 2:

For TFA, the system uses the parameter 'sms_phone' from the User Model
If SMS-based authentication is to be used, that parameter must be specified at the user’s creation time (See Create User)
If user’s parameter 'sms_phone' has not been set, the value of the 'sms' key will be 'No sms phone found'

NOTE 3:

The TFA-related user’s data (i.e. SMS phone or email), once set at the time of user’s account creation, can only be modified by that user alone. Any such modification will also be TFA authenticated. Account superuser cannot change this data for security reasons

HTTP Status Codes

HTTP Status Code Description
200 User has been authenticated (Body contains Json-formatted result)
400 Unexpected or non-identifiable arguments are supplied
401 Invalid credentials supplied
402 Account is suspended
460 Account is inactive
461 Account is pending
412* User is disabled
462 User is pending (This will be thrown before 401 if the username is valid and account is active)
465 IP Address Invalid

*Code 412 is also returned if TFA is used and the user’s account has been locked due to more than 3 failed attempts to authorize with a TFA code

2. Send TFA Code (only if using TFA)

This step is only to be executed when TFA is used for the user log in (i.e. if the Authenticate call returned 'two_factor_authentication_code' key in response). Otherwise proceed to Step 3: Authorize

Request (Two-Factor Authentication)

curl -D - -X POST https://login.eagleeyenetworks.com/g/aaa/two_factor_authenticate -d '{"token": "[TOKEN]", "two_factor_authentication_type": "[TFA_TYPE]"}' -H "content-type: application/json" -H "Authentication: [API_KEY]"

HTTP Request

POST https://login.eagleeyenetworks.com/g/aaa/two_factor_authenticate

Parameter Data Type Description Is Required
token string Token received in Step 1 true
two_factor_authentication_type string TFA type:
'sms' - TFA code will be sent via SMS
'email' - TFA code will be sent via email
true

HTTP Response

This API call does not return data in response

NOTE 1:

TFA code expiration is 15 minutes

Response Status Codes

HTTP Status Code Description
200 Request succeeded (TFA code has been sent to the user)
400 Unexpected or non-identifiable arguments are supplied
412 Unable to send TFA code with the TFA type selected
415 Specified TFA type not supported

3. Authorize

Authorize is the final step of the login process performed by utilizing the token from Authenticate and (if TFA is enabled) the TFA code delivered to the user by SMS or email. A successful Authorize call returns an authorized user object and sets the 'auth_key' cookie. For all subsequent API calls either the cookie can be set or the value of it can be sent as the 'A' parameter. When TFA is used, this call will also set the 'tfa_key' cookie (See Authorized devices for more details)

API calls can initially be done against 'https://login.eagleeyenetworks.com' (The host url), but after the authorization response is returned, API calls should then use the branded subdomain. At this stage the branded host url will become 'https://[active_brand_subdomain].eagleeyenetworks.com', where the 'active_brand_subdomain' field is returned in the authorization response

Following the authorization in the example on the right, the host url should be changed to: 'https://c001.eagleyenetworks.com'

Each account will consistently have the same branded subdomain and as such will not change throughout the life of the session. Caching the subdomain is safe as long as the client software validates against the 'active_brand_subdomain' after authorization. Using the branded subdomain is important for speed and robustness

Request (Simple Authentication)

curl -D - -X POST https://login.eagleeyenetworks.com/g/aaa/authorize -d '{"token": "[TOKEN]"}' -H "content-type: application/json" -H "Authentication: [API_KEY]"

Request (Two-Factor Authentication)

curl -D - -X POST https://login.eagleeyenetworks.com/g/aaa/authorize -d '{"token": "[TOKEN]", "two_factor_authentication_code": "[TFA_CODE]"}' -H "content-type: application/json" -H "Authentication: [API_KEY]"

HTTP Request

POST https://login.eagleeyenetworks.com/g/aaa/authorize

Parameter Data Type Description Is Required
token string Token received in Authenticate true
two_factor_authentication_code string 4 decimal digits
Used only for TFA (Not during Simple Authentication)

NOTE 1:

More than 3 failed attempts to Authorize with TFA code will lock the user’s account. It then can only be unlocked by Eagle Eye’s technical support staff When the user’s account has been locked the user is notified of this fact by email

Json Response

{
    "id": "ca0e1cf2",
    "user_id": "ca0e1cf2",
    "first_name": "John",
    "last_name": "Doe",
    "email": "john.doe@nodomain.com",
    "owner_account_id": "00004206",
    "active_account_id": "00004206",
    "uid": "",
    "is_superuser": 0,
    "is_account_superuser": 1,
    "is_staff": 0,
    "is_active": 1,
    "is_pending": 0,
    "is_master": 1,
    "is_user_admin": 1,
    "is_layout_admin": 1,
    "is_edit_map": 0,
    "is_live_video": 1,
    "is_export_video": 1,
    "is_recorded_video": 1,
    "is_view_preview_video": 1,
    "is_edit_admin_users": 1,
    "is_edit_all_users": 1,
    "is_edit_users": 1,
    "is_edit_account": 1,
    "is_device_admin": 1,
    "is_edit_cameras": 1,
    "is_edit_camera_on_off": 1,
    "is_edit_camera_less_billing": 1,
    "is_edit_ptz_stations": 1,
    "is_edit_all_and_add": 1,
    "is_edit_motion_areas": 1,
    "is_edit_sharing": 1,
    "is_ptz_live": 1,
    "is_mobile_branded": 0,
    "is_view_contract": 1,
    "is_view_audit_trail": 1,
    "is_two_factor_authentication_enabled": 0,
    "user_authenticated_clients": null,
    "account_utc_offset": -25200,
    "account_work_days": "1111100",
    "account_work_hours": [
        "0900",
        "1700"
    ],
    "language": "en-us",
    "inactive_session_timeout": 15,
    "street": [
        "address line 1",
        "address line 2"
    ],
    "city": "New York",
    "state": "Alaska",
    "country": "US",
    "postal_code": "9980-999",
    "phone": "111111111",
    "mobile_phone": "000000000",
    "utc_offset": -25200,
    "timezone": "US/Pacific",
    "last_login": "20181006173752.672",
    "alternate_email": "alternate.email@nodomain.com",
    "sms_phone": "222111222",
    "json": "{\"een\":{\"notify_levels\":[], \"permissions\":{}}}",
    "camera_access": [
        [
            "1005f2ed",
            "r"
        ],
        [
            "100bd708",
            "r"
        ],
        [...]
    ],
    "layouts": [
        "217f0fd4-450f-11e4-a983-ca8312ea370c"
    ],
    "is_notify_enable": 1,
    "notify_period": [
        "0-0000-2359",
        "1-0000-2359",
        "2-0000-2359",
        "3-0000-2359",
        "4-0000-2359",
        "5-0000-2359",
        "6-0000-2359"
    ],
    "notify_rule": [
        "one-email-0"
    ],
    "is_branded": 1,
    "active_brand_subdomain": "c001",
    "account_map_lines": null,
    "access_period": [
        "0-0000-2359",
        "1-0000-2359",
        "2-0000-2359",
        "3-0000-2359",
        "4-0000-2359",
        "5-0000-2359",
        "6-0000-2359"
    ],
    "user_log_level": 0,
    "saved_filters": [],
    "temp_account_access": [],
    "is_terms_noncompliant": 1,
    "is_system_notifications_disabled": 0
}

HTTP Response (Json Attributes)

When successful, this API call returns Json data structure following the User Model with the additional 'user_id' field, which is present during Authorize and is identical to 'id'

HTTP Status Codes

When using Simple Authentication

HTTP Status Code Description
200 User has been authorized for access to the realm
400 Unexpected or non-identifiable arguments are supplied
401 Invalid token supplied

When using TFA

HTTP Status Code Description
200 User has been authorized for access to the realm
400 Unexpected or non-identifiable arguments are supplied
401 Invalid token supplied, missing TFA code or attempting to authorize with expired TFA code
406 Invalid TFA supplied or invalid TFA and invalid token supplied
429 This user’s account has been locked due to more than 3 failed attempts to Authorize

Forced vs. Optional TFA

Depending whether the account to which the user belongs enforces TFA or not, the user may be able to select Simple Authentication for their future Logins rather than TFA

In order to find out whether the account enforces TFA examine the 'is_two_factor_authentication_forced' flag in the account record returned by the Get Account API Call. This flag can be set or cleared by the account superuser with the Update Account API call

If the account TFA flag is set as follows 'is_two_factor_authentication_forced=0', the user is allowed switch to Simple Authentication. That is achieved by clearing 'is_two_factor_authentication_enabled=1' flag in the user record. This action can only be done by the user themselves (not by an account superuser)

Update of any TFA-related field in the user record is performed through a dedicated TFA update endpoint: '/g/aaa/two_factor_authenticate/update'

TFA Update

Data present in the user record that affects the TFA is security-sensitive and therefore may only be altered using a dedicated endpoint, whose operation is itself TFA protected. This data includes three fields in the user model:

Field Description Remarks Is Required
sms_phone Phone number to which text messages (SMS) containing TFA code will be delivered Can only be changed when using SMS for TFA code delivery
Code will be delivered to the new phone number
true
email E-mail address to which messages containing TFA code will be delivered Can only be changed when using email for TFA code delivery
Code will be delivered to the new email address
true
is_two_factor_authentication_enabled 1 - required to authenticate via TFA
0 - authenticate via Simple Authentication
Can be updated with either SMS or email delivery of TFA code true

TFA Update is a two-step process:

1. Request Update

This step initiates the TFA data update process

HTTP Request

POST https://[active_brand_subdomain].eagleeyenetworks.com/g/aaa/two_factor_authenticate/update

Parameter Data Type Description Is Required
two_factor_authentication_type string Defines which method to use for TFA code delivery to verify this update request:
'sms' - TFA code will be sent via SMS
'email' - TFA code will be sent via email
true
password string The user’s password true
update_json json Json structure containing the name of the updated field and its new value

(Only one field can be updated at a time)

Example:
{
    'sms_phone': '+123456789'
}
true

HTTP Response

This API call returns no data

HTTP Status Code Description
200 Request succeeded (Proceed to verification)
400 Unexpected or non-identifiable arguments are supplied (i.e. update of 'sms_phone' is requested with 'two_factor_authentication_type' set to 'email' or vice versa)
401 Invalid credentials supplied
415 Invalid TFA code delivery method supplied in 'two_factor_authentication_type'

2. Verify update request with TFA

HTTP Request

POST https://[active_brand_subdomain].eagleeyenetworks.com/g/aaa/two_factor_authenticate/verify

Parameter Data Type Description Is Required
two_factor_authentication_code string The 4-digit code received via SMS or email true

HTTP Response

This API call returns no data

HTTP Status Code Description
200 Request succeeded
400 Unexpected or non-identifiable arguments are supplied
406 Invalid TFA code supplied

Authorized Devices

In order to make the log-in process as convenient as possible for the user, the system will allow Simple Authentication on devices previously used by that user for a successful TFA-based log in

Upon a successful TFA-based log in, the Authorize API call sets a cookie 'tfa_key' in the browser. Subsequent execution of the Authenticate API Call with the correct username and password will initiate the Simple Authentication process, which can be differentiated from TFA by absence of the 'two_factor_authentication_code' field in the response of Authenticate. In this scenario the Send TFA Code API call can be skipped and the Authorize API call can be executed directly as via the non-TFA-enabled login

NOTE 1:

The same 'tfa_key' value may be applied for multiple users, who have successfully authorized in the past from the particular device

NOTE 2:

The list of authorized devices for any user is stored in the field 'user_authenticated_clients' in the user record (See User Model)

AAA

Overview

This service enables the creation of new Independent Accounts and provides the means to recover them. If you are creating Sub-Accounts tied to your current Account refer to the Account section

Create Account

Create a new account and the superuser for the account. As a part of the creation process, the service sends a confirmation email containing a link (with Account ID and activation token), which the user must click to activate the account (cannot be used until it is activated)

Request

curl -X POST https://login.eagleeyenetworks.com/g/aaa/create_account -d "email=[EMAIL]" -d "password=[PASSWORD]" -H "Authentication: [API_KEY]" -v

HTTP Request

POST https://login.eagleeyenetworks.com/g/aaa/create_account

Parameter Data Type Description Is Required
email string Email address true
password string Password true
name string Account name
realm string Realm (defaults to current user’s realm)
first_name string User first name
last_name string User last name
timezone string Timezone name (defaults to 'US/Pacific')
is_api_access_needed boolean Grant API access to this new account

HTTP Status Codes

HTTP Status Code Description
202 Account has been created and a confirmation email has been sent to the provided email address
400 Unexpected or non-identifiable arguments are supplied
406 Realm is invalid due to not being a root realm
409 Email address has already been registered for the specified realm

Validate Account

Verify the email address supplied when the account is created. When successful, the account is set to active and a user session is created. User will not be required to login again

Request

curl -X POST https://[active_brand_subdomain].eagleeyenetworks.com/g/aaa/validate_account -d "id=[ID]" -d "token=[TOKEN]" -H "Authentication: [API_KEY]"

For information on active_brand_subdomain click here.

HTTP Request

POST https://login.eagleeyenetworks.com/g/aaa/validate_account

Parameter Data Type Description Is Required
id string Account ID true
token string Account validation token true

Json Response

{
    "user_id": "ca103fea"
}

HTTP Response (Json Attributes)

Parameter Data Type Description
user_id string Unique identifier for validated user

HTTP Status Codes

HTTP Status Code Description
200 User has been authorized for access to the realm
400 Unexpected or non-identifiable arguments are supplied
402 Account is suspended
406 Information supplied could not be verified
409 Account has already been activated
412 User is disabled
460 Account is inactive

1. Forgot Password

Password recovery is a multi-step process:

  1. Forgot Password requests a reset email to be sent to the email address of a registered user
  2. Check Password Reset Token verifies whether the reset token is valid (This step is optional but is provided to allow for a friendlier user experience)
  3. Reset Password allows the user to change the password (This step directly verifies whether the supplied token is a valid reset token). The result is that a user session is created for the user

Request

curl -X POST https://[active_brand_subdomain].eagleeyenetworks.com/g/aaa/forgot_password -d "email=[EMAIL]" -H "Authentication: [API_KEY]" -v

For information on active_brand_subdomain click here.

HTTP Request

POST https://[active_brand_subdomain].eagleeyenetworks.com/g/aaa/forgot_password

Parameter Data Type Description Is Required
email string Email address true

HTTP Status Codes

HTTP Status Code Description
202 A reset email has been sent to the supplied email address. This status will be provided even if the email address was not found. This prevents attacks to discover user accounts
400 Unexpected or non-identifiable arguments are supplied
402 Account is suspended
406 Information supplied could not be verified
412 User is disabled
460 Account is inactive
461 Account is pending
462 User is pending
465 IP Address Invalid

2. Check Password Reset Token

This is step two of the password recover/reset process. It verifies that the supplied token is a valid reset token

Request

curl -X POST https://[active_brand_subdomain].eagleeyenetworks.com/g/aaa/check_pw_reset_token -d "token=[TOKEN]" -H "Authentication: [API_KEY]" -v

For information on active_brand_subdomain click here.

HTTP Request

POST https://[active_brand_subdomain].eagleeyenetworks.com/g/aaa/check_pw_reset_token

Parameter Data Type Description Is Required
token string Password reset token provided in email true

HTTP Status Codes

HTTP Status Code Description
202 Token is valid
400 Unexpected or non-identifiable arguments are supplied
402 Account is suspended
406 Token not valid or not found
412 User is disabled
460 Account is inactive
461 Account is pending
465 IP Address Invalid

3. Reset Password

This is step three of the password recover/reset process. It both verifies that the supplied token is a valid reset token and then, if valid resets the password associated with the token to the newly supplied password. Upon completion, a user login session is created

Request

curl -X POST https://[active_brand_subdomain].eagleeyenetworks.com/g/aaa/reset_password -d "password=[PASSWORD]" -d "token=[TOKEN]" -H "Authentication: [API_KEY]"

For information on active_brand_subdomain click here.

HTTP Request

POST https://[active_brand_subdomain].eagleeyenetworks.com/g/aaa/reset_password

Parameter Data Type Description Is Required
token string Password reset token provided in email true
password string New password (alphanumeric, min 10 characters) true
accepted_terms_of_service_urls string New terms of service acceptance url

Json Response

{
    "user_id": "ca0e1cf2"
}

HTTP Response (Json Attributes)

Parameter Data Type Description
user_id string Unique identifier for validated user

HTTP Status Codes

HTTP Status Code Description
200 User has been authorized for access to the realm
400 Unexpected or non-identifiable arguments are supplied
402 Account is suspended
406 Token not valid or not found
412 User is disabled
460 Account is inactive
461 Account is pending
465 IP Address Invalid

Validation of the new password against Account’s password rules

Response Json object with failed requirements for the new password:

{
    "status_code": 400,
    "message": "New password does not meet all of the requirements.",
    "data": {
        "failed_requirements": {
            "same_password": {
              "description": "New password cannot be the same as the old one."
            },
            "length": {
                "description": "Password length must be between 12 and 126 characters long.",
                "required_value": {
                    "minimum_length": 12,
                    "maximum_length": 126
                }
            },
            "reuse": {
                "description": "Previous passwords cannot be reused."
            },
            "required_special_char": {
                "description": "New password needs to contain at least one symbol."
            },
            "required_numeric_char": {
                "description": "New password needs to contain at least one number."
            },
            "exclude_username": {
                "description": "New password should not contain the username."
            },
        }
    },
    "reason": "InvalidPassword"
}

If a new password fails against some of the Account’s password requirements, HTTP response with status code 400 and JSON object will be returned.

Most password management settings require feature flag, if you want to enable it ask support.

More details on Password management rules can be found here.

Resend Registration Email

For users who have registered for an account, but never confirmed the registration. This will allow the registration confirmation email to be re-sent

Request

curl -X POST https://[active_brand_subdomain].eagleeyenetworks.com/g/aaa/resend_registration_email -d "email=[EMAIL]" -H "Authentication: [API_KEY]" -v

For information on active_brand_subdomain click here.

HTTP Request

POST https://[active_brand_subdomain].eagleeyenetworks.com/g/aaa/resend_registration_email

Parameter Data Type Description Is Required
email string Email address of the account contact for a pending account true
realm string Realm (defaults to current user’s realm)

HTTP Status Codes

HTTP Status Code Description
202 Account was located and verified to be in the pending state. A registration email has been recreated and sent to the provided email address
400 Unexpected or non-identifiable arguments are supplied
402 Account is suspended
404 Account with this email address and realm could not be found
409 Account is already active (not pending)
412 User is disabled
460 Account is inactive

Resend User Verification Email

For users who have had a user account created, but never confirmed their user account. This will allow the user confirmation email to be re-sent

Request

curl -X POST https://[active_brand_subdomain].eagleeyenetworks.com/g/aaa/resend_user_verification_email -d "email=[EMAIL]" -H "Authentication: [API_KEY]" -v

For information on active_brand_subdomain click here.

HTTP Request

POST https://[active_brand_subdomain].eagleeyenetworks.com/g/aaa/resend_user_verification_email

Parameter Data Type Description Is Required
email string Email address of the new user true
realm string Realm (defaults to current user’s realm)

HTTP Status Codes

HTTP Status Code Description
202 User was located and verified to be in the pending state. A verification email has been recreated and sent to the provided email address
400 Unexpected or non-identifiable arguments are supplied
402 Account is suspended
404 User with this email address and realm could not be found
409 User is already active (not pending)
412 User is disabled
460 Account is inactive
461 Account is pending

Change Password

This allows a user to change their password directly while authenticated and also allows super users to change the password of the users they manage:

Request

curl -X POST https://[active_brand_subdomain].eagleeyenetworks.com/g/aaa/change_password -d "password=[PASSWORD]" -d "current_password=[CURRENT_PASSWORD]" -H "Authentication: [API_KEY]" --cookie "auth_key=[AUTH_KEY]"

For information on active_brand_subdomain click here.

HTTP Request

POST https://[active_brand_subdomain].eagleeyenetworks.com/g/aaa/change_password

Parameter Data Type Description Is Required
password string New password (alphanumeric, min 10 characters) true
id string User ID of the user having their password changed (Defaults to the ID of the authenticated user). If empty or equal to authenticated user, then 'current_password' becomes required
current_password string Current password of the user. If 'id' argument is empty or equal to the authenticated user’s ID, then this is required

Json Response

{
    "id": "ca02c000"
}

HTTP Response (Json Attributes)

Parameter Data Type Description
id string User ID of the user having their password changed

HTTP Status Codes

HTTP Status Code Description
200 User password was changed successfully
400 Unexpected or non-identifiable arguments are supplied
401 Unauthorized due to invalid session cookie
404 User with the 'id' provided cannot be found
406 The 'current_password' provided does not match the password of the authenticated user

Switch Account

Allows a user to ‘log in’ to another account which the they have access to (see Get List of Accounts). Most commonly this would be needed for a master account user accessing their sub-accounts. Only applicable to accounts from the Account model

Request

curl -X POST https://[active_brand_subdomain].eagleeyenetworks.com/g/aaa/switch_account -d "account_id=[ID]" -H "Authentication: [API_KEY]" --cookie "auth_key=[AUTH_KEY]" -v

For information on active_brand_subdomain click here.

HTTP Request

POST https://[active_brand_subdomain].eagleeyenetworks.com/g/aaa/switch_account

Parameter Data Type Description
account_id string Account ID of the account to login to. Defaults to the account which the user belongs to

HTTP Status Codes

HTTP Status Code Description
200 Account context switch successful
400 Unexpected or non-identifiable arguments are supplied
401 Unauthorized due to invalid session cookie
404 Account with the 'account_id' provided cannot be found

Single Sign On

SSO allows a reseller to maintain account management and act as an identity provider to have their system proxy the authorization requests to Eagle Eye Network servers after users have logged into the identity providers system. This is done through the standard SAML V2.0 (Security Assertion Markup Language)

Authenticate request

Request authentication from an Identity Provider Service. (Service provider initiated SSO)

HTTP Request

GET https://<branded_sub_domain>.eagleeyenetworks.com/g/aaa/sso/SAML2/SSO

Parameter Data Type Description Is required
identity_provider string Name of the account’s branded subdomain, which is linked with Identity Provider settings true
is_recycle_session boolean If true and the user is already logged in, redirect the user to its account, without authenticating with the Identity Provider false
RelayState string URL the Service Provider should redirect to after successful sign-on false
account_id string Account id, which holds Identity Provider settings false

After the successful creation of SAML AuthnRequest, redirection to the Identity Provider is going to be made.
If a user is authenticated in the Identity Provider Service, redirection to the Service Provider ACS (Assertion Consumer Service) is going to be made.

ACS (Assertion Consumer Service)

Decoded SAML response example

<saml2p:Response 
    Destination="https://branded_subsomain.eagleeyenetworks.com/g/aaa/sso/SAML2/Authenticate" 
    ID="id8972425978818166328589959" 
    IssueInstant="2019-11-05T16:53:17.411Z" 
    Version="2.0" 
    xmlns:saml2p="urn:oasis:names:tc:SAML:2.0:protocol" 
    xmlns:xs="http://www.w3.org/2001/XMLSchema">
    ...
    <saml2:Assertion 
        ID="id89724259788888402047455941" 
        IssueInstant="2019-11-05T16:53:17.411Z" 
        Version="2.0" 
        xmlns:saml2="urn:oasis:names:tc:SAML:2.0:assertion" 
        xmlns:xs="http://www.w3.org/2001/XMLSchema">
        <saml2:Issuer 
            Format="urn:oasis:names:tc:SAML:2.0:nameid-format:entity" 
            xmlns:saml2="urn:oasis:names:tc:SAML:2.0:assertion">exk1huy3reR4Fs9gL357
        </saml2:Issuer>
        <ds:Signature 
            xmlns:ds="http://www.w3.org/2000/09/xmldsig#">
            <ds:SignedInfo>
                <ds:CanonicalizationMethod 
                    Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/>
                <ds:SignatureMethod 
                    Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1"/>
                <ds:Reference 
                    URI="#id89724259788888402047455941">
                    <ds:Transforms>...<ds:DigestMethod 
                        Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>
                    <ds:DigestValue>...</ds:DigestValue>
                </ds:Reference>
            </ds:SignedInfo>
            <ds:SignatureValue>...</ds:SignatureValue>
            <ds:KeyInfo>
                <ds:X509Data>
                    <ds:X509Certificate>...</ds:X509Certificate>
                </ds:X509Data>
            </ds:KeyInfo>
        </ds:Signature>
        <saml2:Subject 
            xmlns:saml2="urn:oasis:names:tc:SAML:2.0:assertion">
            <saml2:NameID 
                Format="urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress">orion@belt.com
            </saml2:NameID>
            <saml2:SubjectConfirmation 
                Method="urn:oasis:names:tc:SAML:2.0:cm:bearer">
                <saml2:SubjectConfirmationData 
                    NotOnOrAfter="2019-11-05T16:58:17.411Z" 
                    Recipient="https://branded_subsomain.eagleeyenetworks.com/g/aaa/sso/SAML2/Authenticate"/>
            </saml2:SubjectConfirmation>
        </saml2:Subject>
        <saml2:Conditions 
            NotBefore="2019-11-05T16:48:17.411Z" 
            NotOnOrAfter="2019-11-05T16:58:17.411Z" 
            xmlns:saml2="urn:oasis:names:tc:SAML:2.0:assertion">
        </saml2:Conditions>
        <saml2:AuthnStatement 
            AuthnInstant="2019-11-05T16:53:17.411Z" 
            SessionIndex="id1572972797411.929762837" 
            xmlns:saml2="urn:oasis:names:tc:SAML:2.0:assertion">
            <saml2:AuthnContext>
                <saml2:AuthnContextClassRef>urn:oasis:names:tc:SAML:2.0:ac:classes:X509</saml2:AuthnContextClassRef>
            </saml2:AuthnContext>
        </saml2:AuthnStatement>
        <saml2:AttributeStatement 
            xmlns:saml2="urn:oasis:names:tc:SAML:2.0:assertion">
            <saml2:Attribute 
                Name="firstName" 
                NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:unspecified">
                <saml2:AttributeValue 
                    xmlns:xs="http://www.w3.org/2001/XMLSchema" 
                    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
                    xsi:type="xs:string">Orion
                </saml2:AttributeValue>
            </saml2:Attribute>
            <saml2:Attribute 
                Name="lastName" 
                NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:unspecified">
                <saml2:AttributeValue 
                    xmlns:xs="http://www.w3.org/2001/XMLSchema" 
                    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
                    xsi:type="xs:string">Belt
                </saml2:AttributeValue>
            </saml2:Attribute>
            <saml2:Attribute 
                Name="access" 
                NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:unspecified">
                <saml2:AttributeValue 
                    xmlns:xs="http://www.w3.org/2001/XMLSchema" 
                    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
                </saml2:AttributeValue>
            </saml2:Attribute>
        </saml2:AttributeStatement>
    </saml2:Assertion>
</saml2p:Response>

(Identity provider initiated SSO)

HTTP Request

POST https://<branded_sub_domain>.eagleeyenetworks.com/g/aaa/sso/SAML2/Authenticate

Parameter Data Type Description Is required
SAMLResponse string Encoded (base64) SAML2 Response message (see details) true
RelayState string URL the Service Provider should redirect to after successful sign-on false
HTTP Status Code Description
302 Relaying SSO authentication
400 Unexpected or non-identifiable arguments are supplied
403 SSO is disabled for this Account
501 SSO not active for this Account

Suported SAML elements

Attribute Statement

Supported Attributes Names Data Type Description
firstName string User’s first name
lastName string USer’s last name
SAML Signature Requirements Description
Signature Algorithm RSA-SHA1 The signing algorithm used to digitally sign the SAML assertion and response
Digest Algorithm SHA1 The digest algorithm used to digitally sign the SAML assertion and response
Authentication context class X.509 Certificate Authentication restriction

Single Log Out

HTTP Request

GET https://[active_brand_subdomain].eagleeyenetworks.com/g/aaa/sso/SAML2/LogOut

Parameter Data Type Description Is required
identity_provider string Name of the account’s branded subdomain, which is linked with Identity Provider settings true

This is done through the standard SAML2 (Security Assertion Markup Language) and as such the identity provider will setup their account with a brand_saml_publickey_ret and brand_saml_namedid_path

Once the identity provider’s account has been registered for SSO, then the identity provider can validate their users and then make a single sign on request with the users email address and the return link This 64 bit encrypted message will be extracted from the header to be decoded and verified using the saml public key Then using the saml named ID path, the user’s email will be extracted and an 'auth_key' will be provided for that user

Request

curl -X POST https://login.eagleeyenetworks.com/g/sso -H "Authentication: [API_KEY]"

HTTP Request

POST https://login.eagleeyenetworks.com/g/sso

HTTP Status Code Description
200 Account context switch successful
400 Unexpected or non-identifiable arguments are supplied
401 Unauthorized due to invalid session cookie
404 Account with the 'account_id' provided cannot be found

Check Authentication is valid

This call allows you to check if the current authentication is still valid. This is helpful to use before making subsequent calls using existing authentication.

Request

curl -X GET https://[active_brand_subdomain].eagleeyenetworks.com/g/aaa/isauth -H "Authentication: [API_KEY]" --cookie "auth_key=[AUTH_KEY]" -v

For information on active_brand_subdomain click here.

HTTP Request

GET https://[active_brand_subdomain].eagleeyenetworks.com/g/aaa/isauth

HTTP Status Codes

HTTP Status Code Description
200 User authentication is valid
401 Unauthorized due to invalid session cookie

Logout

Log out user and invalidate HTTP session cookie

Request

curl -X POST https://[active_brand_subdomain].eagleeyenetworks.com/g/aaa/logout -H "Authentication: [API_KEY]" --cookie "auth_key=[AUTH_KEY]" -v

For information on active_brand_subdomain click here.

HTTP Request

POST https://[active_brand_subdomain].eagleeyenetworks.com/g/aaa/logout

HTTP Status Codes

HTTP Status Code Description
204 User has been logged out
400 Unexpected or non-identifiable arguments are supplied
401 Unauthorized due to invalid session cookie

Account

Overview

The Account service allows managing Accounts by superusers and account superusers

Account Model

Account Model

{
    "is_master_video_disabled_allowed": 1,
    "is_inactive": 0,
    "is_suspended": 0,
    "brand_name": null,
    "alert_mode": [
        "default",
        "Weekend"
    ],
    "is_master_video_disabled": 0,
    "contact_state": null,
    "first_responders": [
        [
            "mark@responders.com",
            "Mark",
            "O'Malley",
            "Responders",
            "Fake Account"
        ],
        [
            "jeff@noaccount.com",
            "Jeff",
            "O'Unverified",
            "Unverified Organization",
            "No Account"
        ],
        [...]
    ],
    "responder_cameras": [
      "12345678",
      "1010fake"
    ],
    "contact_first_name": "Willem",
    "is_disable_all_settings": 0,
    "timezone": "US/Pacific",
    "id": "11111111",
    "contact_country": "US",
    "is_system_notifications_disabled": 0,
    "camera_shares": [
        [
            "12345678",
            "joe@em.com,His account",
            "joe2@dd.com,That account"
        ],
        [...]
    ],
    "camera_share_perms": {
        "12345678": {
            "joe@em.com,His account": [
                "edit_motion_areas",
                "ptz_live",
                "edit_ptz_stations"
            ],
            "joe2@dd.com,That account": [
                "ptz_live"
            ]
        },
        "<camera_id>": {...}
    },
    "owner_account_id": "1010101b",
    "product_edition": null,
    "cc_info": [
        {
            "city": "",
            "name": "",
            "default": "",
            "street1": "",
            "street2": "",
            "number": "",
            "state": "",
            "tag": "",
            "postal_code": "",
            "expire": "",
            "country": "US",
            "type": ""
        }
    ],
    "brand_saml_publickey_cert": null,
    "brand_support_email": null,
    "is_billing_disabled": 0,
    "is_advanced_disabled": 0,
    "inactive_session_timeout": 720,
    "brand_logo_large": null,
    "brand_corp_url": null,
    "responder_active": true,
    "contact_street": [],
    "is_system_notification_images_enabled": 1,
    "is_custom_brand_allowed": 0,
    "is_rtsp_cameras_enabled": 0,
    "brand_saml_nameid_path": null,
    "is_contract_recording": 0,
    "utc_offset": -28800,
    "session_duration": 480,
    "is_custom_brand": 0,
    "contact_postal_code": null,
    "brand_logo_small": null,
    "is_active": 1,
    "work_days": "1111111",
    "is_add_delete_disabled": 0,
    "is_master": 0,
    "contact_email": "support@eagleeyenetworks.com",
    "brand_support_phone": null,
    "map_lines": null,
    "contact_mobile_phone": null,
    "work_hours": [
        "0800",
        "1730"
    ],
    "login_attempt_limit": null,
    "default_cluster": "c000",
    "customer_id": "1234",
    "name": "Account Name",
    "contact_city": null,
    "default_camera_passwords": "pwordpword",
    "contact_phone": null,
    "access_restriction": [
        "enable_mobile"
    ],
    "active_alert_mode": "default",
    "allowable_ip_address_range": [],
    "contact_last_name": "Dafoe",
    "contact_utc_offset": null,
    "camera_quantity": null,
    "brand_subdomain": "c000",
    "password_management_rules": {
        "allowed_minimum_length": 10,
        "allowed_maximum_length": 64,
        "days_to_expire": 0,
        "exclude_username": 0,
        "minimum_length": 10,
        "maximum_length": 126,
        "required_numeric_char": 0,
        "required_special_char": 0,
        "reuse_number_limit": 0,
        "reuse_time_limit": 0
    }
}

Account (Attributes)

Parameter Data Type Description Editable Required
id string Account ID automatically generated and assigned during creation


name string Name of the account
contact_first_name string First name of primary contact for account
contact_last_name string Last name of primary contact for account
contact_email string Email of primary contact for account
contact_street array[string] Array of strings containing street addresses of the primary contact for account ['address line 1', 'address line 2']
contact_city string City of primary contact for account
contact_state string State/province of primary contact for account
contact_postal_code string Zip/postal code of primary contact for account
contact_country string Country code of primary contact for account
contact_phone string Phone number of primary contact for account
contact_mobile_phone string Mobile phone number of primary contact for account
owner_account_id string ID of the parent account (defaults to the account of the creating user)
timezone string Timezone of the account (defaults to 'US/Pacific')

Possible values:
'US/Alaska', 'US/Arizona', 'US/Central', 'US/Eastern', 'US/Hawaii', 'America/Anchorage', 'UTC', …
status array[string] Account status. This can only be edited by superusers and account superusers from the parent/owner account

Possible values:
'active' - normal working state
'inactive' - logins are not allowed
'suspended' - effectively no longer operational
'pending_validation' - default state after account creation (before the user has validated the account)
utc_offset int Signed integer offset in seconds of the timezone from UTC. Automatically generated based on the timezone field
access_restriction array[string] Array of strings containing access restrictions

Possible values:
'enable_mobile' - has access to mobile clients
'enable_ip_restrictions' - if present and if 'allowable_ip_address_range' has been specified, limits logins to the address ranges specified
allowable_ip_address_range array[string] Each entry in the array specifies one address range. Entries use the '/' format. For example, to limit access to '192.168.123.0-192.168.123.255', the entry would be '192.168.123.0/24'. If no entries are present, '0.0.0.0/0' is implied
session_duration int Session duration in minutes. Session duration of 0 means stay logged in forever
holiday array[string] This field is no longer being used (DEPRECATED)
work_days string String of length 7. Each position in the string corresponds to a day of the week. Monday is position 0, Tuesday is position 1, etc. Each character in the string can have a value of 1 or 0. 1 means that this day is a work day
work_hours array[string] Two entries. Each entry containing a time expressed in local time. The first entry in the array is the work day start time. The second entry in the array is the stop time. Times are represented using a 24 hour clock and are formatted as HHMM

Example: 8AM would be 0800 and 5PM would be 1700
alert_mode array[string] Array of strings containing possible alert modes as defined for this account. Accepts an array of any number of strings of varying length. This controls what values are able to be chosen for the 'active_alert_mode' field
active_alert_mode string A string chosen from values in the account 'alert_mode' array. Must be blank or one of the values defined in the alert_mode array. This is used to determine when to send motion alert notifications (defined by camera settings in the device model). If a motion alert is defined with an alert mode from one of the strings in the account ‘alert_mode’ array, then the notifications triggered from that motion alert will only be sent when the account 'active_alert_mode' is also set to that same alert mode string defined for that motion alert
default_camera_passwords string Comma-delimited string of default camera passwords
camera_shares array [
  array [
    string
  ]
]
Array of arrays with each sub-array representing a camera to be shared to 1 or more recipients. First position is camera ID. The next positions are populated by one or multiple recipients. All recipients are comma-separated string values of 'email,account', where the 'account' can be omitted (will be automatically populated if the email address is registered to an account in the system)

Example:
[
    [
        '12345678',
        'joe@em.com,His account',
        'joe2@dd.com,That account'
    ]
]

Note: camera_shares and camera_share_perms are co-dependent and need to be updated together
camera_share_perms json Json object keyed with camera IDs representing all recipients per camera and all permissions per recipient

Example:
'12345678': {
    'joe@em.com,His account': [
        'edit_motion_areas',
        'ptz_live',
        'edit_ptz_stations'
    ]
}

Note: camera_shares and camera_share_perms are co-dependent and need to be updated together
is_revoke_admins int Indicates whether to revoke all admin permissions for the users in the account (1) or not (0). This field doesn’t save anything on the account itself. It will revoke admin privileges of any admins in the account
is_master int Indicates whether the account is a master account (1) or not (0)
is_active int Indicates whether the account is active (1) or not (0)
is_inactive int Indicates whether the account is inactive (1) or not (0)
is_suspended int Indicates whether the account is suspended (1) or not (0)
product_edition string Product edition the account is using
camera_quantity int Total number of cameras the account is allowed to use
is_custom_brand_allowed int Indicates whether the account is allowed to have branding (1) or not (0)
is_custom_brand int Indicates whether the account has branding enabled (1) or not (0)
brand_logo_small string Base64 encoded image for the branded small logo (PNG, 160x52, transparent background)
brand_logo_large string Base64 encoded image for the branded large logo (PNG, 460x184, white background)
brand_subdomain string Sub domain for the branded url
brand_corp_url string Corporate website url
brand_name string Branded company name
brand_saml_publickey_cert string Public certificate which Eagle Eye Networks will use to decrypt the SAML for SSO
brand_saml_nameid_path string The path within the SAML xml to find the users email address
is_without_initial_user string Indicates whether to create the new account without an initial user (1) or not (0) (defaults to 0)

An initial user with 'is_account_superuser=1' will be created using the arguments 'contact_first_name/contact_last_name/contact_email' specified upon account creation
customer_id string Arbitrary ID assigned to a sub-account by a master account
is_master_video_disabled_allowed int Indicates whether a sub-account can block video access to reseller (1) or not (0)
is_master_video_disabled int Indicates whether video access is blocked to reseller (1) or not (0)
is_contract_recording int Indicates whether the account is of type contract_recording. Controls whether contract recording features are enabled for the users in this account on the front-end GUI (1) or not (0)
is_advanced_disabled int Indicates whether the reseller has disabled advanced functionality (1) or not (0) If this is set for a sub-account, the users in the sub-account cannot change any settings related to bandwidth, billing (retention and resolution) and certain account settings. Master users switched in still can modify these things if their permissions allow it
is_billing_disabled int Indicates whether the reseller has disabled editing settings in a sub-account that affect billing (1) or not (0). This controls whether users can change camera resolution/retention, add/delete cameras, etc
is_add_delete_disabled int Indicates whether the reseller has disabled adding or deleting devices (1) or not (0)
is_disable_all_settings int Indicates whether the reseller has disabled all device and most account settings (1) or not (0). Does not affect editing users, layouts, or sharing
first_responders array [
  array [
    string
  ]
]
Array of arrays with each sub-array representing an emergency responder. Accounts can identify a list of email accounts that will serve as emergency responders. Emergency responders get access to the identified 'responder_cameras' during an emergency (triggered by setting 'responder_active'). A responder is identified by their email, first name, last name, company and their account

Example:
[
    [
        'mark@responders.com',
        'Mark',
        'O'Malley',
        'Responders',
        'Fake Account'
    ]
]
responder_active Indicates whether the responder cameras can be seen by the users defined under 'first_responders'
responder_cameras array[string] Array of camera ESNs that are shared to first responders
inactive_session_timeout int Maximum time period in seconds without activity before web session expires
login_attempt_limit int Maximum incorrect login attempts before the user account access becomes locked
is_rtsp_cameras_enabled int Indicates whether the account can have cameras attached over RTSP (instead of ONVIF) (1) or not (0)
brand_support_phone string Branded support phone number
default_cluster string Indicates the data center cluster the account is assigned to
is_system_notification_images_enabled int Indicates whether email notifications about online/offlice status should contain images from those cameras (1) or not (0)
map_lines json This is used by the front end to overlay lines over a map of the cameras for the account
is_two_factor_authentication_forced int Indicates whether Two-Factor Authentication is forced for all users in the account (1) or not and users are able to choose between Simple Authentication and TFA (0)
contact_utc_offset int This field is no longer being used (DEPRECATED)
password_management_rules json JSON object representing settings for Users passwords. (with feature flag)
idp_settings json JSON object representing Identity Provider settinngs.

Account - camera_share_perms - <camera_id>

Parameter Data Type Description
<recipient> json Recipient object representing a recipient and their set of permissions for the specified camera

Example:
'joe@em.com,His account': [
        'edit_motion_areas',
        'ptz_live',
        'edit_ptz_stations'
    ]

Account - camera_share_perms - <camera_id> - <share_recipients>

Parameter Data Type Description
<permission> array[string] Array of strings each representing a set of predefined recipient permissions

Permissions:
'edit_motion_areas' - user can edit camera motion areas
'ptz_live' - user can control pan, tilt and zoom for a PTZ camera, recall PTZ stations
'edit_ptz_stations' - user can edit PTZ stations and control PTZ cameras

Example:
[
        'edit_motion_areas',
        'ptz_live'
]

Account - password_management_rules

Parameters of password_management_rules object. On password change by default users are disallow to set previous password.

Length requirements

Parameter Data Type Description
minimum_length int Minimum password length. This can be set if feature flag is On (Default value: 10)
maximum_length int Maximum password length. This is a constant value and it is equal to 126.
allowed_minimum_length int Bottom range of password minimum length. This is a constant value and it is equal to 10.
allowed_maximum_length int Upper range of password minimum length. This is a constant value and it is equal to 64.

Character requirements

Parameter Data Type Description
required_numeric_char int enum [0,1] At password reset, the user will be required to create a password with at least one numeric character.
required_special_char int enum [0,1] At password reset, the user will be required to create a password with at least one special character.

Reuse requirements

Parameter Data Type Description
reuse_number_limit int At password reset, the user will be required to create a password that was not previously used for the selected number of previous passwords of the given user.
reuse_time_limit int At password reset, the user will be required to create a password that was not previously used for the selected number of days.

Other requirements

Parameter Data Type Description
days_to_expire int The user will be required to create a new password in the given number of days.
exclude_username int enum [0,1] At password reset, the user will be required to create a password that does not contain a username of the given user.

Account - idp_settings

Account’s IdP (Identity Provider) settings.

JSON Property Data Type Description
is_enabled boolean Predicate, has the account enabled Authentication with Identity Provider?
is_subaccount_idp_allowed boolean Predicate, is the Authentication with Identity Provider allowed for sub-accounts? (Editable only at the level of the master account)
issuer string Identity Provider identifier to match SAML response with an appropriate account.
sso_url string Identity Provider URL to which send an Authentication request.

Notes on IdP settings in the context of the accounts hierarchy
There are three possible mutually exclusive modes of IdP configuration:

  1. SSO is disabled for all accounts (master and its subs)
    The standard login page is going to be loaded if an unauthenticated user requests EEN site.

  2. SSO enabled on the master account
    All of the accounts (master and its subs) use the master account’s IdP settings to SSO.

  3. SSO allowed for the sub-accounts
    Sub-accounts can have an individual set of settings for IdP to SSO. SSO to master account is disabled.

SSO Modes expressed with a master account idp_settings values

SSO Modes is_enabled is_subaccount_idp_allowed
1. disabled for all false false
2. enabled for all true false
3. enabled only for sub-accounts false true

Get Account

Returns an Account object by ID

Request

curl -X GET https://[active_brand_subdomain].eagleeyenetworks.com/g/account -d "id=[ACCOUNT_ID]" -H "Authentication: [API_KEY]" --cookie "auth_key=[AUTH_KEY]" -G

For information on active_brand_subdomain click here.

HTTP Request

GET https://[active_brand_subdomain].eagleeyenetworks.com/g/account

Parameter Data Type Description Is Required
id string Account ID true

HTTP Status Codes

HTTP Status Code Description
200 Request succeeded
400 Unexpected or non-identifiable arguments are supplied
401 Unauthorized due to invalid session cookie
403 Forbidden due to the user missing the necessary privileges
404 Account not found with the supplied ID

Create Account

Create a new Account

Request

curl -X PUT https://[active_brand_subdomain].eagleeyenetworks.com/g/account -d '{"name": "[NAME]", "contact_first_name": "[CONTACT_FIRST_NAME]", "contact_last_name": "[CONTACT_LAST_NAME]", "contact_email": "[CONTACT_EMAIL]"}' -H "content-type: application/json" -H "Authentication: [API_KEY]" --cookie "auth_key=[AUTH_KEY]"

For information on active_brand_subdomain click here.

HTTP Request

PUT https://[active_brand_subdomain].eagleeyenetworks.com/g/account

Parameter Data Type Description Is Required
name string Name of the account true
contact_first_name string First name of primary contact for account true
contact_last_name string Last name of primary contact for account true
contact_email string Email of primary contact for account true
contact_street array[string] Array of strings containing street addresses of the primary contact for account ['address line 1', 'address line 2']
contact_city string City of primary contact for account
contact_state string State/province of primary contact for account
contact_postal_code string Zip/postal code of primary contact for account
contact_country string Country code of primary contact for account
owner_account_id string ID of the parent account (defaults to the account of the creating user)
timezone string Timezone of the account (defaults to 'US/Pacific')

Possible values:
'US/Alaska', 'US/Arizona', 'US/Central', 'US/Eastern', 'US/Hawaii', 'America/Anchorage', 'UTC', …
status array[string] Account status. This can only be edited by superusers and account superusers from the parent/owner account

Possible values:
'active' - normal working state
'inactive' - logins are not allowed
'suspended' - effectively no longer operational
'pending_validation' - default state after account creation (before the user has validated the account)
access_restriction array[string] Array of strings containing access restrictions

Possible values:
'enable_mobile' - has access to mobile clients
'enable_ip_restrictions' - if present and if 'allowable_ip_address_range' has been specified, limits logins to the address ranges specified
allowable_ip_address_range array[string] Each entry in the array specifies one address range. Entries use the '/' format. For example, to limit access to '192.168.123.0-192.168.123.255', the entry would be '192.168.123.0/24'. If no entries are present, '0.0.0.0/0' is implied
session_duration int Session duration in minutes. Session duration of 0 means stay logged in forever
holiday array[string] This field is no longer being used (DEPRECATED)
work_days array[string] String of length 7. Each position in the string corresponds to a day of the week. Monday is position 0, Tuesday is position 1, etc. Each character in the string can have a value of 1 or 0. 1 means that this day is a work day
work_hours array[string] Two entries. Each entry containing a time expressed in local time. The first entry in the array is the work day start time. The second entry in the array is the stop time. Times are represented using a 24 hour clock and are formatted as HHMM

Example: 8AM would be 0800 and 5PM would be 1700
alert_mode array[string] Array of strings containing possible alert modes as defined for this account. Accepts an array of any number of strings of varying length. This controls what values are able to be chosen for the 'active_alert_mode field'
active_alert_mode string A string chosen from values in the account 'alert_mode' array. Must be blank or one of the values defined in the alert_mode array. This is used to determine when to send motion alert notifications (defined by camera settings in the device model). If a motion alert is defined with an alert mode from one of the strings in the account ‘alert_mode’ array, then the notifications triggered from that motion alert will only be sent when the account 'active_alert_mode' is also set to that same alert mode string defined for that motion alert
default_camera_passwords string Comma-delimited string of default camera passwords
is_without_initial_user int Indicates whether to create the new account without an initial user (1) or not (0) (defaults to 0)

An initial user with 'is_account_superuser=1' will be created using the arguments 'contact_first_name/contact_last_name/contact_email' specified upon account creation
is_initial_user_not_admin int Indicates whether the initial user is an admin (0) or not (1)
password_management_rules json JSON object representing settings for Users passwords.
idp_settings json JSON object representing Identity Provider settinngs.

Json Response

{
    "id": "1234abcd"
}

HTTP Response (Json Attributes)

Parameter Data Type Description
id string Account ID

HTTP Status Codes

HTTP Status Code Description
200 Request succeeded
400 Unexpected or non-identifiable arguments are supplied
401 Unauthorized due to invalid session cookie
403 Forbidden due to the user missing the necessary privileges
409 Another account with the supplied contact email address already exists

Update Account

Update Account information

Request

curl -X POST https://[active_brand_subdomain].eagleeyenetworks.com/g/account -d '{"id": "[ACCOUNT_ID]", "contact_first_name": "[CONTACT_FIRST_NAME]"}' -H "content-type: application/json" -H "Authentication: [API_KEY]" --cookie "auth_key=[AUTH_KEY]"

For information on active_brand_subdomain click here.

HTTP Request

POST https://[active_brand_subdomain].eagleeyenetworks.com/g/account

Parameter Data Type Description Is Required
id string Account ID generated during creation true
name string Name of the account
contact_first_name string First name of primary contact for account
contact_last_name string Last name of primary contact for account
contact_email string Email of primary contact for account
contact_street array[string] Array of strings containing street addresses of the primary contact for account ['address line 1', 'address line 2']
contact_city string City of primary contact for account
contact_state string State/province of primary contact for account
contact_postal_code string Zip/postal code of primary contact for account
contact_country string Country code of primary contact for account
contact_phone string Phone number of primary contact for account
contact_mobile_phone string Mobile phone number of primary contact for account
timezone string Timezone of the account (defaults to 'US/Pacific')

Possible values:
'US/Alaska', 'US/Arizona', 'US/Central', 'US/Eastern', 'US/Hawaii', 'America/Anchorage', 'UTC', …
status array[string] Account status. This can only be edited by superusers and account superusers from the parent/owner account

Possible values:
'active' - normal working state
'inactive' - logins are not allowed
'suspended' - effectively no longer operational
'pending_validation' - default state after account creation (before the user has validated the account)
access_restriction array[string] Array of strings containing access restrictions

Possible values:
'enable_mobile' - has access to mobile clients
'enable_ip_restrictions' - if present and if 'allowable_ip_address_range' has been specified, limits logins to the address ranges specified
allowable_ip_address_range array[string] Each entry in the array specifies one address range. Entries use the '/' format. For example, to limit access to '192.168.123.0-192.168.123.255', the entry would be '192.168.123.0/24'. If no entries are present, '0.0.0.0/0' is implied
session_duration int Session duration in minutes. Session duration of 0 means stay logged in forever
holiday array[string] This field is no longer being used (DEPRECATED)
work_days array[string] String of length 7. Each position in the string corresponds to a day of the week. Monday is position 0, Tuesday is position 1, etc. Each character in the string can have a value of 1 or 0. 1 means that this day is a work day
work_hours array[string] Two entries. Each entry containing a time expressed in local time. The first entry in the array is the work day start time. The second entry in the array is the stop time. Times are represented using a 24 hour clock and are formatted as HHMM

Example: 8AM would be 0800 and 5PM would be 1700
alert_mode array[string] Array of strings containing possible alert modes as defined for this account. Accepts an array of any number of strings of varying length. This controls what values are able to be chosen for the 'active_alert_mode field'
active_alert_mode string A string chosen from values in the account 'alert_mode' array. Must be blank or one of the values defined in the alert_mode array. This is used to determine when to send motion alert notifications (defined by camera settings in the device model). If a motion alert is defined with an alert mode from one of the strings in the account 'alert_mode' array, then the notifications triggered from that motion alert will only be sent when the account 'active_alert_mode' is also set to that same alert mode string defined for that motion alert
default_camera_passwords string Comma-delimited string of default camera passwords
camera_shares array [
  array [
    string
  ]
]
Array of arrays with each sub-array representing a camera to be shared to 1 or more recipients. First position of the sub-array is action, with 'M' for add/modify or 'D' for delete. Second position is camera ID. The next positions are populated by one or multiple recipients. All recipients are comma-separated string values of 'email,account', where the 'account' can be omitted (will be automatically populated if the email address is registered to an account in the system). Recipients are only present in the 'M' action

Example:
[
    [
        'M',
        '12345678',
        'joe@em.com,His account',
        'joe2@dd.com,That account'
    ]
]

Note: camera_shares and camera_share_perms are co-dependent and need to be updated together
camera_share_perms json Json object keyed with camera IDs representing all recipients per camera and all permissions per recipient

Example:
'12345678': {
    'joe@em.com,His account': [
        'edit_motion_areas',
        'ptz_live',
        'edit_ptz_stations'
    ]
}

Note: camera_shares and camera_share_perms are co-dependent and need to be updated together
is_revoke_admins int Indicates whether to revoke all admin permissions for the users in the account (1) or not (0). This field doesn’t save anything on the account itself. It will revoke admin privileges of any admins in the account
is_custom_brand int Indicates whether the account has branding enabled (1) or not (0)
brand_logo_small string Base64 encoded image for the branded small logo (PNG, 160x52, transparent background)
brand_logo_large string Base64 encoded image for the branded large logo (PNG, 460x184, white background)
brand_subdomain string Sub domain for the branded url
brand_corp_url string Corporate website url
brand_name string Branded company name
brand_saml_publickey_cert string Public certificate which Eagle Eye Networks will use to decrypt the SAML for SSO
brand_saml_nameid_path string The path within the SAML xml to find the users email address
is_master_video_disabled_allowed int Indicates whether a sub-account can block video access to reseller (1) or not (0)
is_master_video_disabled int Indicates whether video access is blocked to reseller (1) or not (0)
is_contract_recording int Indicates whether the account is of type contract_recording. Controls whether contract recording features are enabled for the users in this account on the front-end GUI (1) or not (0)
is_advanced_disabled int Indicates whether the reseller has disabled advanced functionality (1) or not (0). If this is set for a sub-account, the users in the sub-account cannot change any settings related to bandwidth, billing (retention and resolution) and certain account settings. Master users switched in still can modify these things if their permissions allow it
is_billing_disabled int Indicates whether the reseller has disabled editing settings in a sub-account that affect billing (1) or not (0). This controls whether users can change camera resolution/retention, add/delete cameras, etc
is_add_delete_disabled int Indicates whether the reseller has disabled adding or deleting devices (1) or not (0)
is_disable_all_settings int Indicates whether the reseller has disabled all device and most account settings (1) or not (0). Does not affect editing users, layouts, or sharing
first_responders array [
  array [
    string
  ]
]
Array of arrays with each sub-array representing an emergency responder. Accounts can identify a list of email accounts that will serve as emergency responders. Emergency responders get access to the identified 'responder_cameras' during an emergency (triggered by setting 'responder_active'). A responder is identified by their email, first name, last name, company and their account

Example:
[
    [
        'mark@responders.com',
        'Mark',
        'O'Malley',
        'Responders',
        'Fake Account'
    ]
]
responder_active Indicates whether the responder cameras can be seen by the users defined under 'first_responders'
responder_cameras array[string] Array of camera ESNs that are shared to first responders
inactive_session_timeout int Maximum time period in seconds without activity before web session expires
login_attempt_limit int Maximum incorrect login attempts before the user account access becomes locked
is_rtsp_cameras_enabled int Indicates whether the account can have cameras attached over RTSP (instead of ONVIF) (1) or not (0)
brand_support_phone string Branded support phone number
default_cluster string Indicates the data center cluster the account is assigned to
customer_id string Arbitrary ID assigned to a sub-account by a master account
is_system_notification_images_enabled int Indicates whether email notifications about online/offlice status should contain images from those cameras (1) or not (0)
map_lines json This is used by the front end to overlay lines over a map of the cameras for the account
contact_utc_offset int This field is no longer being used (DEPRECATED)
password_management_rules json JSON object representing settings for Users passwords.
idp_settings json JSON object representing Identity Provider settinngs.

Json Response

{
    "id": "1234abcd"
}

HTTP Response (Json Attributes)

Parameter Data Type Description
id string Account ID

HTTP Status Codes

HTTP Status Code Description
200 Request succeeded
400 Unexpected or non-identifiable arguments are supplied
401 Unauthorized due to invalid session cookie
403 Forbidden due to the user missing the necessary privileges
404 Account not found with the supplied ID

Delete Account

Delete an Account

Request

curl -X DELETE https://[active_brand_subdomain].eagleeyenetworks.com/g/account -d "id=[ACCOUNT_ID]" -H "Authentication: [API_KEY]" --cookie "auth_key=[AUTH_KEY]" -G

For information on active_brand_subdomain click here.

HTTP Request

DELETE https://[active_brand_subdomain].eagleeyenetworks.com/g/account

Parameter Data Type Description
id string Account ID

HTTP Status Codes

HTTP Status Code Description
200 Delete succeeded
400 Unexpected or non-identifiable arguments are supplied
401 Unauthorized due to invalid session cookie
403 Forbidden due to the user missing the necessary privileges
404 Account not found with the supplied ID

Get List of Accounts

Returns an array of arrays with each sub-array representing an Account available to the user

Request

curl -X GET https://[active_brand_subdomain].eagleeyenetworks.com/g/account/list -H "Authentication: [API_KEY]" --cookie "auth_key=[AUTH_KEY]" -G

For information on active_brand_subdomain click here.

HTTP Request

GET https://[active_brand_subdomain].eagleeyenetworks.com/g/account/list

Json Response

[
    [
        "00004206",
        "Greater God",
        0,
        0,
        1,
        0,
        0,
        1,
        null,
        0,
        0,
        0,
        0,
        0,
        0,
        "20180228234555.722",
        0,
        "Greater ID",
        0,
        {"is_sso_enabled":0, "timezone":"US/Central", "feature_flags":[]},
        "A@GFIMLNQSUTYZcedgfhmqpsutvz"
    ],
    [...],
    [...],
    [...]
]

HTTP Response (Array Attributes)

Array Index Attribute Data Type Description
0 id string Account ID
1 name string Name of the account
2 camera_online_count int Number of cameras currently online in the account
3 camera_count int Number of cameras currently in the account
4 user_count int Number of users currently in the account
5 is_suspended int Indicates whether the account is suspended (1) or not (0)
6 is_inactive int Indicates whether the account is inactive (1) or not (0)
7 is_active int Indicates whether the account is active (1) or not (0)
8 product_edition string Product edition the account is using
9 bridge_online_count int Number of online bridges owned by the account
10 bridge_active_count int Number of active bridges owned by the account
11 bridge_count int Number of bridges owned by the account
12 camera_off_count int Number of account cameras that are currently offline
13 camera_available_count int Number of available cameras in the account
14 is_account_active int Indicates the account is active (1) or not (0)
15 last_login string EEN timestamp of the last login by this account
16 average_retention_days int The average number of retention days for the account
17 customer_id string The customer ID assigned to this account
18 unknown_camera_count int The camera count where the status was ‘invalid’ (i.e. unknown) from all Archivers

When requesting details about an ESN from an Archiver they sometimes return ‘invalid’. The middleware handles asking each of the Archivers for an ESN and sends back the first result that is valid
19 json json Miscellaneous settings of the account as a Json structure
20 permissions string String of characters each defining a permission level of the current user

Account - json

Parameter Data Type Description
json string Miscellaneous settings of the account as a Json-formatted string

Account - json

Parameter Data Type Description
is_sso_enabled boolean Indicates whether single sign-on is enabled (1) or not (0)
timezone string Timezone of the account
feature_flags array[string] Array of strings representing the additional activated features

HTTP Status Codes

HTTP Status Code Description
200 Request succeeded
400 Unexpected or non-identifiable arguments are supplied
401 Unauthorized due to invalid session cookie
403 Forbidden due to the user missing the necessary privileges

Account Statistics

This service allows to retrieve Statistics about a specific Account or all Sub-Accounts (for a Master Account)

Obtains the total amount of:

Each statistics request extends the /g/account endpoint in the following way /g/account/statistics/<type_of_statistic>

Total Number of Sub-Accounts

Used to get the number of all sub-accounts for the specific account

Request

curl -X GET https://[active_brand_subdomain].eagleeyenetworks.com/g/account/statistics/sub_accounts -d "account_id=[ACCOUNT_ID]" -H "Authentication: [API_KEY]" --cookie "auth_key=[AUTH_KEY]" -G

For information on active_brand_subdomain click here.

HTTP Request

GET https://[active_brand_subdomain].eagleeyenetworks.com/g/account/statistics/sub_accounts

Parameter Data Type Description Is Required
account_id string Account ID for which the statistics will be returned (defaults to the account of the user) false

Json Response

{
    "account_total": 6
}

HTTP Response (Json Attributes)

Parameter Data Type Description
account_total int Total number of sub-accounts (defaults to 0 for sub-accounts)

HTTP Status Codes

HTTP Status Code Description
200 Request succeeded
400 Unexpected or non-identifiable arguments are supplied
401 Unauthorized due to invalid session cookie
403 Forbidden due to the user missing the necessary privileges
404 Account not found

Total Number of Users

Used to get the number of all users for the specific account

Request

curl -X GET https://[active_brand_subdomain].eagleeyenetworks.com/g/account/statistics/users -d "account_id=[ACCOUNT_ID]" -H "Authentication: [API_KEY]" --cookie "auth_key=[AUTH_KEY]" -G

For information on active_brand_subdomain click here.

HTTP Request

GET https://[active_brand_subdomain].eagleeyenetworks.com/g/account/statistics/users

Parameter Data Type Description Is Required
account_id string Account ID for which the statistics will be returned (defaults to the account of the user) false

Json Response

{
    "user_total": 26
}

HTTP Response (Json Attributes)

Parameter Data Type Description
user_total int Total number of users

HTTP Status Codes

HTTP Status Code Description
200 Request succeeded
400 Unexpected or non-identifiable arguments are supplied
401 Unauthorized due to invalid session cookie
403 Forbidden due to the user missing the necessary privileges
404 Account not found

Total Number of Bridges

Used to get the number of all bridges for the specific account

Request

curl -X GET https://[active_brand_subdomain].eagleeyenetworks.com/g/account/statistics/bridges -d "account_id=[ACCOUNT_ID]" -H "Authentication: [API_KEY]" --cookie "auth_key=[AUTH_KEY]" -G

For information on active_brand_subdomain click here.

HTTP Request

GET https://[active_brand_subdomain].eagleeyenetworks.com/g/account/statistics/bridges

Parameter Data Type Description Is Required
account_id string Account ID for which the statistics will be returned (defaults to the account of the user) false

Json Response

{
    "bridge_total": 1
}

Total Number of Cameras

Used to get the number of all cameras for the specific account

Request

curl -X GET https://[active_brand_subdomain].eagleeyenetworks.com/g/account/statistics/cameras -d "account_id=[ACCOUNT_ID]" -H "Authentication: [API_KEY]" --cookie "auth_key=[AUTH_KEY]" -G

For information on active_brand_subdomain click here.

HTTP Request

GET https://[active_brand_subdomain].eagleeyenetworks.com/g/account/statistics/cameras

Parameter Data Type Description Is Required
account_id string Account ID for which the statistics will be returned (defaults to the account of the user) false

Json Response

{
    "camera_total": 8
}

HTTP Response (Json Attributes)

Parameter Data Type Description
camera_total int Total number of cameras

HTTP Status Codes

HTTP Status Code Description
200 Request succeeded
400 Unexpected or non-identifiable arguments are supplied
401 Unauthorized due to invalid session cookie
403 Forbidden due to the user missing the necessary privileges
404 Account not found

HTTP Response (Json Attributes)

Parameter Data Type Description
bridge_total int Total number of bridges

HTTP Status Codes

HTTP Status Code Description
200 Request succeeded
400 Unexpected or non-identifiable arguments are supplied
401 Unauthorized due to invalid session cookie
403 Forbidden due to the user missing the necessary privileges
404 Account not found

Total Number of Online Users

Used to get the number of all online users for the specific account

Request

curl -X GET https://[active_brand_subdomain].eagleeyenetworks.com/g/account/statistics/online_users -d "account_id=[ACCOUNT_ID]" -H "Authentication: [API_KEY]" --cookie "auth_key=[AUTH_KEY]" -G

For information on active_brand_subdomain click here.

HTTP Request

GET https://[active_brand_subdomain].eagleeyenetworks.com/g/account/statistics/online_users

Parameter Data Type Description Is Required
account_id string Account ID for which the statistics will be returned (defaults to the account of the user) false

Json Response

{
    "online_user_total": 6
}

HTTP Response (Json Attributes)

Parameter Data Type Description
online_user_total int Total number of online users

HTTP Status Codes

HTTP Status Code Description
200 Request succeeded
400 Unexpected or non-identifiable arguments are supplied
401 Unauthorized due to invalid session cookie
403 Forbidden due to the user missing the necessary privileges
404 Account not found

Total Number of Online Cameras

Used to get the number of all online cameras for the specific account

Request

curl -X GET https://[active_brand_subdomain].eagleeyenetworks.com/g/account/statistics/online_cameras -d "account_id=[ACCOUNT_ID]" -H "Authentication: [API_KEY]" --cookie "auth_key=[AUTH_KEY]" -G

For information on active_brand_subdomain click here.

HTTP Request

GET https://[active_brand_subdomain].eagleeyenetworks.com/g/account/statistics/online_cameras

Parameter Data Type Description Is Required
account_id string Account ID for which the statistics will be returned (defaults to the account of the user) false

Json Response

{
    "camera_online_total": 5
}

HTTP Response (Json Attributes)

Parameter Data Type Description
camera_online_total int Total number of online cameras

HTTP Status Codes

HTTP Status Code Description
200 Request succeeded
400 Unexpected or non-identifiable arguments are supplied
401 Unauthorized due to invalid session cookie
403 Forbidden due to the user missing the necessary privileges
404 Account not found

User

Overview

The User service allows managing Users to a degree outlined by the permission level

User Model

User Model

{
    "id": "ca0e1cf2",
    "first_name": "John",
    "last_name": "Doe",
    "email": "john.doe@nodomain.com",
    "owner_account_id": "00004206",
    "active_account_id": "00004206",
    "uid": "",
    "is_superuser": 0,
    "is_account_superuser": 1,
    "is_staff": 0,
    "is_active": 1,
    "is_pending": 0,
    "is_master": 1,
    "user_pin": 342141,
    "is_user_admin": 1,
    "is_layout_admin": 1,
    "is_user_create_layout": 1,
    "is_edit_map": 1,
    "is_live_video": 1,
    "is_export_video": 1,
    "is_recorded_video": 1,
    "is_view_preview_video": 1,
    "is_edit_admin_users": 1,
    "is_edit_all_users": 1,
    "is_edit_users": 1,
    "is_edit_account": 1,
    "is_device_admin": 1,
    "is_edit_cameras": 1,
    "is_edit_camera_on_off": 1,
    "is_edit_camera_less_billing": 1,
    "is_edit_ptz_stations": 1,
    "is_edit_all_and_add": 1,
    "is_edit_motion_areas": 1,
    "is_edit_sharing": 1,
    "is_ptz_live": 1,
    "is_mobile_branded": 0,
    "is_view_contract": 1,
    "is_view_audit_trail": 1,
    "is_two_factor_authentication_enabled": 0,
    "user_authenticated_clients": null,
    "account_utc_offset": -25200,
    "account_work_days": "1111100",
    "account_work_hours": [
        "0900",
        "1700"
    ],
    "language": "en-us",
    "inactive_session_timeout": 15,
    "street": [
        "address line 1",
        "address line 2"
    ],
    "city": "New York",
    "state": "Alaska",
    "country": "US",
    "postal_code": "9980-999",
    "phone": "111111111",
    "mobile_phone": "000000000",
    "utc_offset": -25200,
    "timezone": "US/Pacific",
    "last_login": "20181006173752.672",
    "alternate_email": "alternate.email@nodomain.com",
    "sms_phone": "222111222",
    "json": "{\"een\":{\"notify_levels\":[], \"permissions\":{}}}",
    "camera_access": [
        [
            "1005f2ed",
            "r"
        ],
        [
            "100bd708",
            "r"
        ],
        [...]
    ],
    "layouts": [
        "217f0fd4-450f-11e4-a983-ca8312ea370c"
    ],
    "is_notify_enable": 1,
    "notify_period": [
        "0-0000-2359",
        "1-0000-2359",
        "2-0000-2359",
        "3-0000-2359",
        "4-0000-2359",
        "5-0000-2359",
        "6-0000-2359"
    ],
    "notify_rule": [
        "one-email-0"
    ],
    "is_branded": 1,
    "active_brand_subdomain": "c001",
    "account_map_lines": null,
    "access_period": [
        "0-0000-2359",
        "1-0000-2359",
        "2-0000-2359",
        "3-0000-2359",
        "4-0000-2359",
        "5-0000-2359",
        "6-0000-2359"
    ],
    "user_log_level": 0,
    "saved_filters": [],
    "temp_account_access": [],
    "is_terms_noncompliant": 1,
    "is_system_notifications_disabled": 0
}

User (Attributes)

Parameter Data Type Description Editable Required
id string User ID automatically generated and assigned during creation

first_name string First name of the user
last_name string Last name of the user
email string Email address of the user (must contain only ASCII characters)

For TFA: address to which messages containing TFA code will be delivered
uid string Identifier of the user (INTERNAL USE ONLY)
phone string Phone number
mobile_phone string Mobile phone number
street array[string] Array of strings containing street addresses ['address line 1', 'address line 2']
city string City
state string State/province
country string Two letter country code
postal_code string Zip/postal code
owner_account_id string Unique identifier of the account that the user belongs to
active_account_id string Unique identifier of the user’s active account. When switching to a sub-account the 'active_account_id' of that user in their session becomes the unique identifier of the sub-account that was switched into
user_pin string Six digit string that signifies a support pin
is_staff int Indicates whether the user is a staff member (1) or not (0) (INTERNAL USE ONLY)
is_superuser int Indicates whether the user is a superuser (1) or not (0). Only superusers can set this (INTERNAL USE ONLY)
is_account_superuser int Indicates whether the user is an account superuser (1) or not (0)
is_active int Indicates whether the user is active (1) or not (0)
is_pending int Indicates whether the user is pending (1) or not (0)
is_master int Indicates whether the user is in a master account (1) or not (0)
is_user_admin int This is for backwards compatibility (DEPRECATED)
is_layout_admin int Indicates whether the user is a layout administrator (1) or not (0)
is_user_create_layout int Indicates whether the user can create layouts (1) or not (0)
is_edit_map int Indicates whether the user can add and edit floors, lines and shapes on the map(1), or not(0).
is_live_video int Indicates whether the user is authorized to access live video (1) or not (0)
is_device_admin int This is for backwards compatibility (DEPRECATED)
is_export_video int Indicates whether the user is authorized to export video (1) or not (0)
is_recorded_video int Indicates whether the user is authorized to view recorded video (1) or not (0)
is_edit_cameras int Indicates whether the user is authorized to edit cameras (1) or not (0)
is_edit_all_users int Indicates whether the user is authorized to manage users who are not administrators in the master account (1) or not (0)
is_edit_account int Indicates whether the user is authorized to edit account settings (1) or not (0)
is_system_notifications_disabled int It reflects whether the account the user belongs to has system notifications disabled (1) or not (0). If true, then the user will not be able to receive any system alert notifications for the cameras in their account
is_edit_ptz_stations int Indicates whether the user is authorized to edit PTZ stations (1) or not (0)
is_view_preview_video int Indicates whether the user is authorized to view preview images from cameras (1) or not (0)
is_edit_camera_on_off int Indicates whether the user is authorized to turn cameras on and off (1) or not (0)
is_edit_camera_less_billing int Indicates whether the user is authorized to edit all camera settings except retention and full video resolution (1) or not (0)
is_edit_all_and_add int Indicates whether the user is authorized to add/edit/delete bridges and cameras (1) or not (0)
is_edit_sharing int Indicates whether the user is authorized to view/edit Sharing and Responders tabs under account settings (1) or not (0)
is_mobile_branded int Used by mobile devices
is_edit_admin_users int Indicates whether the user is authorized to manage all users in sub-account (1) or not (0)
is_view_contract int Indicates whether the user is authorized to view contracts and replay them (1) or not
is_ptz_live int Indicates whether the user is authorized to control pan, tilt, zoom and recall stations while viewing preview or live video of PTZ cameras (1) or not (0)
is_view_audit_trail int Indicates whether the user is authorized to view the audit trail feature (1) or not (0)
is_edit_users int Indicates whether the user is authorized to manage users who are not administrators in a sub-account (1) or not (0)
is_edit_motion_areas int Indicates whether the user is authorized to view and edit the Motion tab under camera settings (1) or not (0)
is_two_factor_authentication_enabled int Indicates whether Two-Factor Authentication is enabled for the user (1) or not (0)
user_authenticated_clients array[string] Array of strings containing trusted client devices that have been used for successful authorization of this user in the past (See Authorized Devices)
account_utc_offset int Signed integer offset in seconds of the timezone from UTC. This is the 'utc_offset' value from the user’s associated account model
account_work_days string The 'work_days' value from the user’s associated account model. Indicates which day is a work day
account_work_hours array[string] The 'work_hours' value from the user’s associated account model. Indicates work hours for the account
language string Language code. The API currently only supports languages listsed in the Create User section as display languages for the GUI. It accepts any valid language code as input, but it will show English text for the unsupported languages
inactive_session_timeout int Maximum time period in seconds without activity before web session expires. Defined in the settings of the account which the user belongs to
utc_offset int Signed integer offset in seconds of the timezone from UTC. Automatically generated based on the timezone field
timezone string Timezone of the user. Defaults to 'US/Pacific'

Possible values:
'US/Alaska', 'US/Arizona', 'US/Central', 'US/Eastern', 'US/Hawaii', 'America/Anchorage', 'UTC', …
last_login string EEN timestamp of the last login by the user. Format: YYYYMMDDHHMMSS.NNN
alternate_email string Alternate email address
sms_phone string For Two Factor Authentication: the phone number to which text messages (SMS) containing TFA code will be delivered
is_sms_include_picture int DEPRECATED
json string Miscellaneous settings of the user as a Json-formatted string
camera_access array [
  array [
    string
  ]
]
Array of arrays, defined on a per device basis (Only superusers or account superusers can edit this field). Each sub-array contains two elements. The first field is the device unique identifier and the second field is a string of 1 or more characters indicating permissions of the user

Example:
['1005f2ed','RWS'] = user can view, change and delete this device

Permissions include:
'R' - user has access to view images and video for this camera
'W' - user can modify and delete this camera
'S' - user can share this camera in a group share
layouts array[string] Array of strings each representing a layout unique identifier the user has access to
is_notify_enable int Indicates whether notifications are enabled for the user (1) or not (0)
notify_period array[string] Time periods during which the user will receive alert notifications. Each element of the array contains three fields separated by dashes. The first field is the day of the week where Monday is 0. The second element is the start time. The third element is the end time. If empty, user will not receive any alert notifications

All times are expressed in local time and use a 24 hour clock formatted as HHMM
notify_rule array[string] Alert notification rules. Each rule contains three fields separated by dashes in the form of: '<alert_label>-<notification_method>-<delay>'

'<alert_label>' - name defined by the user
'<notification_method>' - either 'email', or 'gui'
'<delay>' - amount of time in minutes between notifications
is_branded int Indicates whether the user is associated with an account that currently has branding enabled (1) or not (0)
active_brand_subdomain string If the user is associated with an account that has branding enabled, this will have that brand’s subdomain if one exists
account_map_lines json Automatically retrieved from the user’s current account setting 'map_lines'
access_period array[string] Contains the time periods during which the user has access to the account. Each element of the array contains three field separated by dashes. The first field is the day of the week where Monday is 0. The second element is the start time. The third element is the end time. If empty, user has no time restrictions for access to the account. All times are expressed in local time and use a 24 hour clock formatted as HHMM
is_terms_noncompliant int Indicates whether the terms of service have been accepted by the user (0) or not (1)

User - json

Parameter Data Type Description
een string EEN Object containing miscellaneous user settings

User - json - een

Parameter Data Type Description
show_AMPM boolean Indicates whether times should be shown with AM/PM (True) or not (False)
milliseconds_display boolean Indicates whether times should be shown with milliseconds (True) or not (False)
layout_rotation_seconds int If set, indicates how long to wait between layout changes during auto-rotation. If not set or set to 0, then no auto-rotation will occur
motion_boxes boolean Indicates whether motion boxes should be shown (True) or not (False)
notify_levels array[int] Array of integers indicating what level of notification should be set for the user

Notify level:
1 - 'Low' - low alert notification setting
2 - 'High' - high alert notification setting
3 - 'System' - not a user-defined notification setting (encompasses camera status changes: online/offline/off/internet offline/…)

When creating motion alerts for a camera, 'High' or 'Low' can be assigned to the motion box trigger. When a camera changes status, any user who has chosen to receive 'System' alert notifications will get notified of the camera status changes in their account. When an event triggers a motion alert within a motion box set to 'High', all users with notify levels 'High' will be notified of the occurrence
permissions json This is for backwards compatibility (DEPRECATED)
employee_id string Identifier which a user with the necessary permissions can set for other users
layouts json Json-formatted data keyed by the account unique identifier, where each value is an array of globally unique identifiers of layouts in the account, ordered by how the user wants to see them in their graphical user interface

Permissions

User Types

Account superuser

The account superuser has a full set of permissions. This user can manage all users in their account and sub-account

Regular user

After being created the regular user has several default permissions : 'is_live_video', 'is_recorded_video', 'is_export_video'

List of Permissions

Required Parameter Description
is_superuser (INTERNAL USE ONLY)
is_staff (INTERNAL USE ONLY)
is_account_superuser Highest permission level possible for a user. All permissions are enabled (including the view permission)
is_edit_account View and edit all account settings (including categories: Control, Days, Security, Camera, Alerts, Notifications, Privacy, Sharing, Responders, and Retention). Ability to create new sub-accounts and access any sub-accounts created
is_edit_camera_on_off Ability to turn cameras on and off. If this is the only camera permission granted all others are hidden
is_edit_cameras Allows editing all camera settings (does not allow adding or deleting cameras). View previews is enabled automatically with this permission
is_edit_motion_areas Enables the Motion tab under camera settings. View previews and view recorded video is enabled automatically with this permission
is_edit_ptz_stations Enables the PTZ tab under camera settings. Set PTZ mode and add/edit/delete stations. View previews is enabled automatically with this permission
is_edit_sharing Enables the Sharing and Responders tabs under Account Settings (This setting is not required if 'is_edit_account' is enabled)
is_edit_users Enables the management of non-administrator users in a sub-account (add/delete/modify users). Gives the ability to grant access to cameras and layouts
is_export_video Enables to download preview and full resolution video. View previews is enabled automatically with this permission
is_edit_all_and_add Enables the management of bridges and cameras (add/edit/delete). Refers to devices only. View previews is enabled automatically with this permission
is_edit_camera_less_billing Allows editing all camera settings except retention and full video resolution (no ability to add/delete). View Previews is enabled automatically with this permission
is_layout_admin Enables the management of layouts (any user can create/edit/delete their own layouts. User layouts are always visible to admin users)
is_user_create_layout Enables creation of layouts.
is_edit_map Ability to add and edit floors, lines and shapes on the map.
is_live_video Allows viewing full resolution video live from cameras. View previews is enabled automatically with this permission
is_ptz_live Enables the control over pan, tilt, zoom and recall stations while viewing preview or live video of PTZ cameras. View previews is enabled automatically with this permission
is_recorded_video View history browser and archived video from cameras. View previews is enabled automatically with this permission
is_view_preview_video Enables the preview of images from cameras
is_edit_admin_users Enables the management of all users in a sub-account (add/delete/modify all users including administrators. Only available to Master Users). Also allows to create new sub-accounts and access any sub-accounts created. (Only available to Master Users.)
is_edit_all_users Enables the management of master users who are not administrators (add/delete/modify master account users)

Ability to grant access to sub-accounts. No user permissions are granted in sub-accounts. Only available to master account users
is_device_admin This is for backwards compatibility (DEPRECATED)
is_user_admin This is for backwards compatibility (DEPRECATED)

User Permission Matrix

The table below shows which user management actions a user can execute depending on the account they belong to and which permission flags they have enabled

Who I am
In Master Account In Child Account
Account Superuser (ASU) Regular User (RU) Account Superuser (ASU) Regular User (RU)
What I can do In own account To ASU Get, Create, Update, Delete nothing Get, Create, Update, Delete nothing
To RU Get, Create, Update, Delete Get, Create, Update, Delete when is_edit_all_users == True Get, Create, Update, Delete Get, Create, Update, Delete when is_edit_users == True
Get list of users yes no yes no
In parent account To ASU Master Accounts have no parents nothing nothing
To RU nothing nothing
Get list of users no no
In child account To ASU Get, Create, Update, Delete Get, Create, Update, Delete when is_edit_admin_users == True Child accounts have no children
To RU Get, Create, Update, Delete Get, Create, Update, Delete when is_edit_users==True or is_edit_admin_users==True
Get list of users yes yes when is_edit_admin_users == True
In sibling account To ASU Master Accounts have no siblings nothing nothing
To RU nothing nothing
Get list of users no no

TFA Enforcing

The following entities can edit the Two-Factor Authentication settings for an account:

Get User

Returns a User object by ID

Request

curl -X GET https://[active_brand_subdomain].eagleeyenetworks.com/g/user -d "id=[USER_ID]" -H "Authentication: [API_KEY]" --cookie "auth_key=[AUTH_KEY]" -G

For information on active_brand_subdomain click here.

HTTP Request

GET https://[active_brand_subdomain].eagleeyenetworks.com/g/user

Parameter Data Type Description Is Required
id string User ID false

HTTP Status Codes

HTTP Status Code Description
200 Request succeeded
400 Unexpected or non-identifiable arguments are supplied
401 Unauthorized due to invalid session cookie
403 Forbidden due to the user missing the necessary privileges
404 No user matching the unique identifier was found

Create User

Create a new User. After being created the user is in the pending state ('is_pending=1', 'is_active=0'). The user creation email will be sent to the email address passed in the request. Then the user will be able to enter a password (In this step they may need to accept Terms of Service). After this operation the user will be active ('is_pending=0', 'is_active=1')

Request

curl -X PUT https://[active_brand_subdomain].eagleeyenetworks.com/g/user -d '{"first_name": "[FIRST_NAME]", "last_name": "[LAST_NAME]", "email": "[EMAIL]"}' -H "content-type: application/json" -H "Authentication: [API_KEY]" --cookie "auth_key=[AUTH_KEY]"

For information on active_brand_subdomain click here.

HTTP Request

PUT https://[active_brand_subdomain].eagleeyenetworks.com/g/user

Parameter Data Type Description Is Required
first_name string The first name of the user true
last_name string The last name of the user true
email string The email address of the user true
sms_phone string Phone number to be used for SMS notifications false
is_user_create_layout int Indicates whether the user can create layouts (1) or not (0) false
is_edit_map int Indicates whether the user can add and edit floors, lines and shapes on the map(1), or not(0). false
language string The language of the user in the ISO-639 format. Used for the welcome email message. If not specified, the language of the logged in user will be used, or, if unavailable - en-us. false
Language code Language
en-us English
ja-jp #日本語
de-de Deutsch
es-es Español
fr-fr Français
it-it Italiano
nl-nl Nederlands
pl-pl Polski
tr-tr Türkçe

Json Response

{
    "id": "ca0ffa8c"
}

HTTP Response (Json Attributes)

Parameter Data Type Description
id string User ID

HTTP Status Codes

HTTP Status Code Description
200 Request succeeded
400 Unexpected or non-identifiable arguments are supplied
401 Unauthorized due to invalid session cookie
403 Forbidden due to the user missing the necessary privileges
409 The email address is currently already in use

Update User

Update User information

Request

curl -X POST https://[active_brand_subdomain].eagleeyenetworks.com/g/user -d '{"id": "[USER_ID]", "first_name": "[FIRST_NAME]"}' -H "content-type: application/json" -H "Authentication: [API_KEY]" --cookie "auth_key=[AUTH_KEY]"

For information on active_brand_subdomain click here.

HTTP Request

POST https://[active_brand_subdomain].eagleeyenetworks.com/g/user

Parameter Data Type Description Is Required
id string User ID generated during creation true
first_name string First name of the user
last_name string Last name of the user
email string Email address of the user (email must only contain ASCII characters)
uid string Identifier of the user. Only superusers can set this (INTERNAL USE ONLY)
phone string Phone number
mobile_phone string Mobile phone number
street array[string] Array of strings containing street addresses ['address line 1', 'address line 2']
city string City
state string State/province
country string Two letter country code
postal_code string Zip/postal code
user_pin string Six digit string that signifies a support pin
is_staff int Indicates whether the user is a staff member (1) or not (0). Only superusers can set this (INTERNAL USE ONLY)
is_superuser int Indicates whether the user is a superuser (1) or not (0). Only superusers can set this (INTERNAL USE ONLY)
is_account_superuser int Indicates whether the user is an account superuser (1) or not (0). Only superusers and account superusers can set this
is_layout_admin int Indicates whether the user is a layout administrator (1) or not (0)
is_user_create_layout int Indicates whether the user can create layouts (1) or not (0)
is_edit_map int Indicates whether the user can add and edit floors, lines and shapes on the map(1), or not(0).
is_device_admin int This is for backwards compatibility (DEPRECATED)
is_user_admin int This is for backwards compatibility (DEPRECATED)
is_live_video int Indicates whether the user is authorized to access live video (1) or not (0)
is_export_video int Indicates whether the user is authorized to export video (1) or not (0)
is_recorded_video int Indicates whether the user is authorized to view recorded video (1) or not (0)
is_edit_cameras int Indicates whether the user is authorized to edit cameras (1) or not (0)
is_edit_all_users int Indicates whether the user is authorized to manage users who are not administrators in master account (1) or not (0)
is_edit_account int Indicates whether the user is authorized to edit account settings (1) or not (0)
is_edit_ptz_stations int Indicates whether the user is authorized to edit PTZ stations (1) or not (0)
is_view_preview_video int Indicates whether the user is authorized to view preview images from cameras (1) or not (0)
is_edit_camera_on_off int Indicates whether the user is authorized to turn cameras on and off (1) or not (0)
is_edit_camera_less_billing int Indicates whether the user is authorized to edit all camera settings except retention and full video resolution (1) or not (0)
is_edit_all_and_add int Indicates whether the user is authorized to add/edit/delete bridges and cameras (1) or not (0)
is_edit_sharing int Indicates whether the user is authorized to view/edit Sharing and Responders tabs under account settings (1) or not (0)
is_edit_admin_users int Indicates whether the user is authorized to manage all users in sub-account (1) or not (0)
is_view_contract int Indicates whether the user is authorized to view contracts and replay them (1) or not (0)
is_ptz_live int Indicates whether the user is authorized to control pan, tilt, zoom and recall stations while viewing preview or live video of PTZ cameras (1) or not (0)
is_edit_users int Indicates whether the user is authorized to manage users who are not administrators in a sub-account (1) or not (0)
is_edit_motion_areas int Indicates whether the user is authorized to view and edit the Motion tab under camera settings (1) or not (0)
language string Language code. The API currently only supports languages listsed in the Create User section as display languages for the GUI. It accepts any valid language code as input, but it will show English text for the unsupported languages
timezone string Timezone of the user. Defaults to 'US/Pacific'

Possible values:
'US/Alaska', 'US/Arizona', 'US/Central', 'US/Eastern', 'US/Hawaii', 'America/Anchorage', 'UTC', …
alternate_email string Alternate email address
sms_phone string Phone number to be used for Two Factor authentication code delivery when SMS method is selected
is_sms_include_picture int DEPRECATED
json string Miscellaneous settings of the user as a Json-formatted string
camera_access array [
  array [
    string
  ]
]
This is for backwards compatibility (DEPRECATED)
is_notify_enable int Indicates whether notifications are enabled for the user (1) or not (0)
notify_period array[string] Time periods during which the user will receive alert notifications. Each element of the array contains three fields separated by dashes. The first field is the day of the week where Monday is 0. The second element is the start time. The third element is the end time. If empty, user will not receive any alert notifications

All times are expressed in local time and use a 24 hour clock formatted as HHMM
notify_rule array[string] Alert notification rules. Each rule contains three fields separated by dashes in the form of: '<alert_label>-<notification_method>-<delay>'

'<alert_label>' - name defined by the user
'<notification_method>' - either 'email', or 'gui'
'<delay>' - amount of time in minutes between notifications
access_period array[string] Contains the time periods during which the user has access to the account. Each element of the array contains three field separated by dashes. The first field is the day of the week where Monday is 0. The second element is the start time. The third element is the end time. If empty, user has no time restrictions for access to the account. All times are expressed in local time and use a 24 hour clock formatted as HHMM

Json Response

{
    "id": "ca0ffa8c"
}

HTTP Response (Json Attributes)

Parameter Data Type Description
id string User ID

HTTP Status Codes

HTTP Status Code Description
200 Request succeeded
400 Unexpected or non-identifiable arguments are supplied
401 Unauthorized due to invalid session cookie
403 Forbidden due to the user missing the necessary privileges
404 No user matching the unique identifier was found

Delete User

Delete a User

Request

curl -X DELETE https://[active_brand_subdomain].eagleeyenetworks.com/g/user -d "id=[USER_ID]" -H "Authentication: [API_KEY]" --cookie "auth_key=[AUTH_KEY]" -G

For information on active_brand_subdomain click here.

HTTP Request

DELETE https://[active_brand_subdomain].eagleeyenetworks.com/g/user

Parameter Data Type Description Is Required
id string User ID true

HTTP Status Codes

HTTP Status Code Description
200 Request succeeded
400 Unexpected or non-identifiable arguments are supplied
401 Unauthorized due to invalid session cookie
403 Forbidden due to the user missing the necessary privileges
404 No user matching the unique identifier was found

Get List of Users

Returns array of arrays with each sub-array representing a User available to the current User

Request

curl --request GET https://[active_brand_subdomain].eagleeyenetworks.com/g/user/list -H "Authentication: [API_KEY]" --cookie "auth_key=[AUTH_KEY]"

For information on active_brand_subdomain click here.

Parameter Data Type Description Is Required
email string Email address of the user. The returned array will contain only the user which this email address is assigned to (empty if the user does not exist)

The search scope for a master account will be extended to all sub-accounts
false

HTTP Request

GET https://[active_brand_subdomain].eagleeyenetworks.com/g/user/list

Json Response

[
    [
        "ca0555c7",
        "Katherine",
        "Xiao",
        "katherine.xiao@fakeemail.com",
        [
            "export_video",
            "recorded_video",
            "live_video",
            "device_admin",
            "layout_admin",
            "account_superuser",
            "user_admin",
            "active"
        ],
        "20180929154619.000",
        { 
            "weekly_newsletter": 0
        }
    ],
    [
        "ca00783b",
        "George",
        "Adams",
        "george.adams@fakeemail.com",
        [
            "export_video",
            "recorded_video",
            "live_video",
            "active"
        ],
        "20180716205645.000",
        { 
            "weekly_newsletter": 1
        }
    ],
    [...],
    [...],
    [...]
]

HTTP Response (Array Attributes)

Array Index Attribute Data Type Description
0 id string User ID
1 first_name string First name of the user
2 last_name string Last name of the user
3 email string Email address of the user
4 permissions array[string] Array of strings representing user permissions
5 last_login string EEN timestamp of the last login by the user. Format: YYYYMMDDHHMMSS.NNN
6 weekly_newsletter string Json-formatted string representing the weekly newsletter subscription defined in the following way:

1 - subscribed to the weekly newsletter
0 - not subscribed to the weekly newsletter

HTTP Status Codes

HTTP Status Code Description
200 Request succeeded
401 Unauthorized due to invalid session cookie
403 Forbidden due to the user missing the necessary privileges

Bridge

Overview

The Bridge is a product of Eagle Eye that is deployed at the customer location and communicates with industry standard cameras. It converts the cameras to be compatible with the EEVB and record Assets. The Bridge is configured and controlled via a cloud-based user interface (has no built-in user interface). The Bridge may serve local assets directly to local clients. The Bridge will also store assets until they are transferred to the EEVB. The Bridge can be configured via DHCP or have a static IP address

Bridge Model

Bridge Model

{
    "id": "1002d096",
    "name": "Kitchen Bridge",
    "utcOffset": -18000,
    "timezone": "US/Central",
    "guid": "835b391f-6554-4e0a-902d-e989b3b46dba",
    "permissions": "A@FIMLNSUTZcgfhmpsruwz",
    "tags": [],
    "bridges": null,
    "camera_settings_status_code": 200,
    "camera_settings": "{}",
    "settings": {
        "local_display_layout_ids": [
            "default"
        ],
        "bridge": null
    },
    "camera_info_status_code": 200,
    "camera_info": {
        "ssn": "EEN-BR305-15721",
        "esn": "1002d096",
        "class": "bridge",
        "run_mode": "normal",
        "no_video": 1,
        "camera_property_model": "305%2Faa",
        "camera_property_make": "een",
        "model": "305%2Faa",
        "make": "een",
        "uuid": "835b391f-6554-4e0a-902d-e989b3b46dba",
        "service": "ATTD",
        "status": "1179649",
        "status_hex": "00120001",
        "ipaddr": "192.168.8.100",
        "proxy": "secondary",
        "camera_state_version": 1,
        "tagmap_status_state": 2,
        "version": "0.3.38",
        "camera_property_version": "0.3.38",
        "register_id": 4224224322,
        "camera_retention_asset": 1209600000,
        "camera_newest": "20180704112818.435",
        "camera_oldest": "20180627000000.000",
        "camera_retention_etag": 1209600000,
        "now": "20180704120834.922",
        "camera_property_analog": false,
        "camera_retention_interval": 1209600000,
        "camera_now": "20180704120834.448",
        "camera_abs_newest": "20180704112818.435",
        "camera_abs_oldest": "20180620000000.000",
        "camera_valid_ts": "20180627000000.000"
    },
    "camera_parameters_status_code": 200,
    "camera_parameters": {
        "active_settings": {
            "pos_interface_enable": {
                "max": 1,
                "min": 0,
                "d": 0,
                "v": 0
            },
            "bandwidth_auto_measure": {
                "max": 1,
                "min": 0,
                "d": 1,
                "v": 1
            },
            "display_layouts": {
                "d": {},
                "v": {}
            },
            "rtp_streaming": {
                "min": [
                    "udp",
                    "tcp"
                ],
                "d": "tcp",
                "v": "tcp"
            },
            "esn_logs": {
                "d": {},
                "v": {}
            },
            "preview_aggregate_bandwidth": {
                "max": 10000000000,
                "min": 0,
                "d": 0,
                "v": 100000
            },
            "health_report_disable": {
                "max": 1,
                "min": 0,
                "d": 0,
                "v": 0
            },
            "uuid_logs": {
                "d": {},
                "v": {}
            },
            "analog_channel_map": {
                "d": {},
                "v": {}
            },
            "retention_days": {
                "max": 10000,
                "min": 0,
                "d": 14,
                "v": 14
            },
            "bridge_retention_days": {
                "max": 100000,
                "min": 0,
                "d": 0,
                "v": 0
            },
            "stream_stats": {
                "d": "none",
                "v": "none"
            },
            "display_default_enabled": {
                "max": 1,
                "min": 0,
                "d": 1,
                "v": 1
            },
            "purge_non_retention_days": {
                "max": true,
                "min": false,
                "d": false,
                "v": false
            },
            "http_local_enable": {
                "max": 1,
                "min": 0,
                "d": 0,
                "v": 0
            },
            "encryption_type": {
                "max": 1,
                "min": 0,
                "d": 1,
                "v": 1
            },
            "bandwidth_recover": {
                "max": 10000000000,
                "min": 100000,
                "d": 5000000,
                "v": 5000000
            },
            "upnp_enable": {
                "max": 1,
                "min": -1,
                "d": 0,
                "v": 0
            },
            "bandwidth_upload": {
                "max": 10000000000,
                "min": 100000,
                "d": 1000000,
                "v": 1033591.7312661498
            },
            "interface_info": {
                "d": {},
                "v": {
                    "eth1": {
                        "type": "ethernet",
                        "state": 10,
                        "carrier": true,
                        "speed": 1000,
                        "settings": {}
                    },
                    "eth0": {
                        "type": "ethernet",
                        "state": 100,
                        "carrier": true,
                        "speed": 100,
                        "settings": {}
                    }
                }
            },
            "uplink_bw_bps": {
                "max": 10000000000,
                "min": 1000,
                "d": 1000000,
                "v": 3445305.7708871663
            },
            "uplink_measured_bw_bps": {
                "max": 10000000000,
                "min": 0,
                "d": 0,
                "v": 3445305.7708871663
            },
            "config_feature_local": {
                "max": 1,
                "min": 0,
                "d": 1,
                "v": 1
            },
            "local_display_enable": {
                "max": 1,
                "min": 0,
                "d": 0,
                "v": 0
            },
            "local_audio_device": {
                "d": "none",
                "v": "none"
            },
            "stream_stats_present_only": {
                "max": 1,
                "min": 0,
                "d": 1,
                "v": 1
            },
            "uuid_base_log": {
                "max": 4294967295,
                "min": 0,
                "d": 256,
                "v": 256
            },
            "applications": {
                "d": {
                    "eenivi": {
                        "version": 3,
                        "features": {
                            "tamper": {
                                "minh": 200,
                                "version": 1,
                                "minw": 300,
                                "cpu": 0.1,
                                "minrate": 4
                            },
                            "object": {
                                "minh": 200,
                                "version": 1,
                                "minw": 300,
                                "cpu": 0.1,
                                "minrate": 4
                            },
                            "intrusion": {
                                "minh": 200,
                                "version": 1,
                                "minw": 300,
                                "cpu": 0.1,
                                "minrate": 4
                            },
                            "linecross": {
                                "minh": 200,
                                "version": 1,
                                "minw": 300,
                                "cpu": 0.1,
                                "minrate": 4
                            }
                        },
                        "settings": {
                            "name": "eenivi",
                            "stream": "metadata"
                        }
                    }
                },
                "v": {
                    "eenivi": {
                        "version": 3,
                        "features": {
                            "tamper": {
                                "minh": 200,
                                "version": 1,
                                "minw": 300,
                                "cpu": 0.1,
                                "minrate": 4
                            },
                            "object": {
                                "minh": 200,
                                "version": 1,
                                "minw": 300,
                                "cpu": 0.1,
                                "minrate": 4
                            },
                            "intrusion": {
                                "minh": 200,
                                "version": 1,
                                "minw": 300,
                                "cpu": 0.1,
                                "minrate": 4
                            },
                            "linecross": {
                                "minh": 200,
                                "version": 1,
                                "minw": 300,
                                "cpu": 0.1,
                                "minrate": 4
                            }
                        },
                        "settings": {
                            "name": "eenivi",
                            "stream": "metadata"
                        }
                    }
                }
            },
            "bandwidth_demand": {
                "max": 10000000000,
                "min": 100000,
                "d": 10000000,
                "v": 10000000
            },
            "preview_aggregate_default_bandwidth": {
                "max": 10000000000,
                "min": 0,
                "d": 0,
                "v": 100000
            },
            "pos_device_config": {
                "d": {},
                "v": {}
            },
            "audio_status": {
                "d": {},
                "v": {}
            },
            "uplink_shaping_ratio": {
                "max": 1,
                "min": 0,
                "d": 0.3,
                "v": 0.3
            },
            "max_disk_usage": {
                "max": 0.98,
                "min": 0.05,
                "d": 0.8,
                "v": 0.8
            },
            "min_bw_settings": {
                "d": {
                    "log_disable": 1,
                    "bandwidth_auto_measure": 0,
                    "bandwidth_background": 0,
                    "bandwidth_upload": 0
                },
                "v": {
                    "log_disable": 1,
                    "bandwidth_auto_measure": 0,
                    "bandwidth_background": 0,
                    "bandwidth_upload": 0
                }
            },
            "bandwidth_background": {
                "max": 10000000000,
                "min": -1000,
                "d": 100000,
                "v": 1033591.7312661498
            },
            "pos_device_status": {
                "d": {},
                "v": {}
            },
            "monitor_class": {
                "min": [
                    "critical",
                    "prod",
                    "friend",
                    "beta",
                    "dev",
                    "ignore"
                ],
                "d": "prod",
                "v": "prod"
            },
            "min_bandwidth_mode": {
                "max": 1,
                "min": 0,
                "d": 0,
                "v": 0
            },
            "retention_priority": {
                "max": 10000,
                "min": 1,
                "d": 100,
                "v": 100
            },
            "log_disable": {
                "max": 1,
                "min": 0,
                "d": 0,
                "v": 0
            },
            "esn_base_log": {
                "max": 4294967295,
                "min": 0,
                "d": 16782719,
                "v": 16782719
            },
            "video_standard": {
                "min": [
                    "ntsc",
                    "pal"
                ],
                "d": "ntsc",
                "v": "ntsc"
            }
        },
        "active_filters": [
            "user_user",
            "bridge_filter",
            "bridge_aggregate"
        ],
        "user_settings": {
            "versions": {},
            "settings": {},
            "filters": {
                "bridge_filter": {
                    "priority": 50,
                    "persistent": true,
                    "name": "bridge_filter",
                    "settings": {
                        "bandwidth_background": 1033591.7312661498,
                        "audio_status": {},
                        "bandwidth_upload": 1033591.7312661498,
                        "interface_info": {
                            "eth1": {
                                "type": "ethernet",
                                "state": 10,
                                "carrier": true,
                                "speed": 1000,
                                "settings": {}
                            },
                            "eth0": {
                                "type": "ethernet",
                                "state": 100,
                                "carrier": true,
                                "speed": 100,
                                "settings": {}
                            }
                        },
                        "uplink_bw_bps": 3445305.7708871663,
                        "uplink_measured_bw_bps": 3445305.7708871663
                    }
                }
            },
            "schedules": {
                "bandwidth_background": {
                    "priority": 1,
                    "start": {
                        "seconds": 0,
                        "hours": 8,
                        "months": "*",
                        "minutes": 0,
                        "wdays": [
                            1,
                            2,
                            3,
                            4,
                            5,
                            6,
                            7
                        ]
                    },
                    "end": {
                        "seconds": 0,
                        "hours": 17,
                        "months": "*",
                        "minutes": 30,
                        "wdays": [
                            1,
                            2,
                            3,
                            4,
                            5,
                            6,
                            7
                        ]
                    },
                    "when": "work",
                    "settings": {
                        "bandwidth_background": "100000"
                    }
                }
            }
        }
    }
}

Bridge (Attributes)

Parameter Data Type Description Editable Required
id string Bridge ID automatically generated and assigned while adding the device to the EEVB


name string Name of the bridge
settings json Json object of basic settings (location, etc.)
camera_settings_status_code int Indicates whether it was possible to retrieve the device settings (200) or not (404) (DEPRECATED)
camera_settings string Miscellaneous device settings (DEPRECATED)
utcOffset int Signed UTC offset in seconds of the set 'timezone'
timezone string Indicates the timezone of where the device is installed (defaults to the account timezone)

Example: 'US/Alaska', 'US/Arizona', 'US/Central', 'US/Eastern', 'US/Hawaii', 'America/Anchorage' or 'UTC'
guid string The GUID (Globally Unique Identifier) is an immutable device identifier assigned to a device during the production process
permissions string String of characters each defining a permission level of the current user
tags array[string] Array of strings each representing a tag name
bridges json Json object of bridges (ESNs) this device is seen by (APPLIES ONLY TO CAMERAS)
camera_parameters_status_code int Indicates whether it was possible to retrieve parameters of the device (200) or not (404)
camera_parameters json Json object of bridge parameters. If bridge parameters cannot be retrieved for whatever reason (example: communication with the bridge has been lost), this will be empty and camera_parameters_status_code will be 404
camera_info_status_code int Indicates whether it was possible to retrieve information about the device (200) or not (404)
camera_info json Json object of basic bridge information. If bridge information cannot be retrieved for whatever reason (example: communication with the bridge has been lost), this will be empty and camera_info_status_code will be 404

Bridge - settings

Parameter Data Type Description
latitude float Latitude of the bridge location
longitude float Longitude of the bridge location
street_address string Street address of the bridge location
site_name string User-defined bridge location name
floor int The floor of the building given that it is a multi-storey
retention_days int Total amount of days the bridge should store data. Data exceeding this threshold will gradually be deleted
local_retention_days int Total amount of days the bridge should store data locally. Normally data is not being stored and the value is set to '-1', meaning the bridge should directly upload any and all data during the specified times. Data exceeding this threshold will gradually be deleted
local_display_layout_ids array[string] An array of available layouts on a local display
analog_inputs_ignored array[string] An array of numbers of analog inputs which the user wants to ignore

Bridge - camera_info

Parameter Data Type Description
ssn string Serial Number of the device
esn string Electronic Serial Number of the device
class string Camera or bridge, etc.
run_mode string Run mode of the device
no_video int Whether the device is delivering video locally (0) or not (1)
model string Model of the device
make string Make of the device
uuid string UUID uniquely identifying the device
service string Device service status. For bridges this field will always be 'ATTD' for regular functionality
status string Decimal status of the device
status_hex string Status bitmask
ipaddr string IP addresses assigned to the device (comma-delimited) with the one in use prefixed by an asterisk (*)
proxy string Proxy
camera_state_version int Bridge state version
tagmap_status_state int Tag map status state
admin_user string Web username
admin_password string Web password
subclass string Firmware/driver type of the device
version string Firmware/driver version of the device
register_id int Bridge register ID
camera_retention int Retention period in milliseconds
camera_retention_etag int Retention period in milliseconds
camera_retention_asset int Retention period in milliseconds
camera_retention_interval int Retention interval in milliseconds
camera_newest string Timestamp of newest event available in EEN Timestamp format: YYYYMMDDHHMMSS.NNN
camera_oldest string Timestamp of oldest event available in EEN Timestamp format: YYYYMMDDHHMMSS.NNN
now string Current timestamp in EEN Timestamp format: YYYYMMDDHHMMSS.NNN
ts string Timestamp in EEN Timestamp format: YYYYMMDDHHMMSS.NNN
camera_property_analog boolean Whether there are devices connected via analog input (1) or not (0)
camera_info_version int Device info version
camera_min_time string Minimum timestamp available in EEN Timestamp format: YYYYMMDDHHMMSS.NNN
camera_now string Device’s current timestamp in EEN Timestamp format: YYYYMMDDHHMMSS.NNN
camera_abs_newest string Timestamp of newest event available in EEN Timestamp format: YYYYMMDDHHMMSS.NNN
camera_abs_oldest string Timestamp of oldest event available in EEN Timestamp format: YYYYMMDDHHMMSS.NNN
camera_property_model string Model of the device
(DEPRECATED)
camera_property_make string Make of the device
(DEPRECATED)
camera_property_version string Driver version of the device
(DEPRECATED)
camera_valid_ts string Timestamp of oldest event available
(DEPRECATED)
r_model string Model of the device
(DEPRECATED)
r_make string Make of the device
(DEPRECATED)
r_version string Firmware/driver version of the device
(DEPRECATED)

Get Bridge

Returns a Bridge object by ID

Request

curl -X GET https://[active_brand_subdomain].eagleeyenetworks.com/g/device -d "id=[BRIDGE_ID]" -H "Authentication: [API_KEY]" --cookie "auth_key=[AUTH_KEY]" -G

For information on active_brand_subdomain click here.

HTTP Request

GET https://[active_brand_subdomain].eagleeyenetworks.com/g/device

Parameter Data Type Description Is Required
id string Bridge ID true

HTTP Status Codes

HTTP Status Code Description
200 Request succeeded
400 Unexpected or non-identifiable arguments are supplied
401 Unauthorized due to invalid session cookie
403 Forbidden due to the user missing the necessary privileges
404 No device matching the Connect ID or GUID has been found

Add Bridge to EEVB

Adds a Bridge to the Eagle Eye Video Bank

Request

curl -X PUT https://[active_brand_subdomain].eagleeyenetworks.com/g/device -d '{"name":"[NAME]","connectID":[CONNECT_ID]}' -H "content-type: application/json"-H "Authentication: [API_KEY]" --cookie "auth_key=[AUTH_KEY]"

For information on active_brand_subdomain click here.

HTTP Request

PUT https://[active_brand_subdomain].eagleeyenetworks.com/g/device

Parameter Data Type Description Is Required
name string Bridge name true
connectID string Connect ID is the code delivered with a bridge and assigned to it (All non-alphanumeric characters will be stripped) true

Json Response

{
    "id": "100d88a8"
}

HTTP Response (Json Attributes)

Parameter Data Type Description
id string Bridge ID

HTTP Status Codes

HTTP Status Code Description
200 Request succeeded
400 Unexpected or non-identifiable arguments are supplied
401 Unauthorized due to invalid session cookie
403 Forbidden due to the user missing the necessary privileges
404 No device matching the Connect ID or GUID was found
409 Connect ID or GUID is currently already in use by an account
410 Communication cannot be made to attach the camera to the bridge
415 Device associated with the given GUID is unsupported
423 The resource that is being accessed is locked

Update Bridge

Update Bridge information

Request

curl -X POST https://[active_brand_subdomain].eagleeyenetworks.com/g/device -d '{"id": "[BRIDGE_ID], "name": "[NAME]"}' -H "content-type: application/json" -H "Authentication: [API_KEY]" --cookie "auth_key=[AUTH_KEY]"

For information on active_brand_subdomain click here.

HTTP Request

POST https://[active_brand_subdomain].eagleeyenetworks.com/g/device

Parameter Data Type Description Is Required
id string Bridge ID true
name string Bridge name
timezone string Indicates the timezone of where the device is installed (defaults to the account timezone)

Example: 'US/Alaska', 'US/Arizona', 'US/Central', 'US/Eastern', 'US/Hawaii', 'America/Anchorage' or 'UTC'
tags array[string] Array of strings each representing a tag name
settings json Json object of basic settings (location, etc.)
camera_parameters_add json Json object of camera settings to add/update
camera_parameters_delete json Json object of camera settings to delete

Json Response

{
    "id": "100d88a8"
}

HTTP Response (Json Attributes)

Parameter Data Type Description
id string Bridge ID

HTTP Status Codes

HTTP Status Code Description
200 Request succeeded
400 Unexpected or non-identifiable arguments are supplied
401 Unauthorized due to invalid session cookie
403 Forbidden due to the user missing the necessary privileges
404 Device matching the ID was not found
463 Unable to communicate with the camera to add/delete camera settings, contact support

Delete Bridge

Delete a Bridge from the Eagle Eye Video Bank

Request

curl -X DELETE https://[active_brand_subdomain].eagleeyenetworks.com/g/device -d "id=[BRIDGE_ID]" -H "Authentication: [API_KEY]" --cookie "auth_key=[AUTH_KEY]" -G

For information on active_brand_subdomain click here.

HTTP Request

DELETE https://[active_brand_subdomain].eagleeyenetworks.com/g/device

Parameter Data Type Description Is Required
id string Bridge ID true

HTTP Status Codes

HTTP Status Code Description
200 Request succeeded
400 Unexpected or non-identifiable arguments are supplied
401 Unauthorized due to invalid session cookie
403 Forbidden due to the user missing the necessary privileges
404 Device matching the ID was not found
463 Unable to communicate with the camera or bridge, contact support

Get List of Bridges

Returns array of arrays with each sub-array representing a Bridge available to the user

Request

curl -X GET https://[active_brand_subdomain].eagleeyenetworks.com/g/device/list -H "Authentication: [API_KEY]" --cookie "auth_key=[AUTH_KEY]" -G

For information on active_brand_subdomain click here.

HTTP Request

GET https://[active_brand_subdomain].eagleeyenetworks.com/g/device/list

Parameter Data Type Description
e string Bridge ID
n string Bridge name
t string Device type
s string Device service status

Json Response

[
    [
        "00014750",
        "1000f60d",
        "Kitchen Camera",
        "camera",
        [
            [
                "1002d096",
                "ATTD"
            ]
        ],
        "ATTD",
        "A@FIMLNSUTZcgfhmpsruwz",
        [],
        "c6d11f36-9e63-11e1-a5b0-00408cdf9191",
        "20180224143453844",
        1441847,
        "US/Central",
        -18000,
        0,
        "*10.143.55.140",
        0,
        "Panucci's Account",
        false,
        null,
        null,
        [
            null,
            null,
            null,
            null,
            "",
            null,
            ""
        ],
        null,
        null,
        0,
        [],
        0,
        {}
    ],
    [
        "00014750",
        "1002d096",
        "Kitchen Bridge",
        "bridge",
        [
            [
                "10053bf6",
                "ATTD"
            ]
        ],
        "ATTD",
        "A@FIMLNSUTZcgfhmpsruwz",
        [],
        "835b391f-6554-4e0a-902d-e989b3b46dba",
        "EEN-BR305-15721",
        1179649,
        "US/Central",
        -18000,
        0,
        "192.168.8.100",
        0,
        "Panucci's Account",
        false,
        null,
        null,
        [
            null,
            null,
            null,
            null,
            null,
            null,
            null
        ],
        null,
        null,
        0,
        [],
        0,
        {}
    ],
    [...],
    [...],
    [...]
]

HTTP Response (Array Attributes)

Array Index Attribute Data Type Description
0 account_id string Account ID of the device’s account
1 id string Bridge ID
2 name string Device name
3 type string, enum Device type

enum: bridge, camera, mobile_camera, multiview_camera, mca_camera
4 cameras array [
  array [
    string
  ]
]
This is an array of string arrays, each array representing a camera that is attached to the bridge. The first element of the array is the camera ESN. The second element is the service status
5 service_status string, enum Device service status:
'ATTD' - camera is attached to a bridge
'IGND' - camera is unattached from all bridges and is available to be attached to a bridge
'IDLE' - camera will register but will not operate (unregistered bridges)
'ERSE' - one shot, all camera data will be erased

For bridges this field is always 'ATTD'

enum: ATTD, IGND, IDLE, ERSE
6 permissions string String of zero or more characters each defining a permission level (of the current user)
7 tags array[string] Array of strings each representing a tag name
8 guid string The GUID (Globally Unique Identifier) is an immutable device identifier assigned to a device during the production process
9 serial_number string Serial number of the device
10 device_status int The device status bitmask
11 timezone string Indicates the timezone of where the device is installed (defaults to the account timezone)

Example: 'US/Alaska', 'US/Arizona', 'US/Central', 'US/Eastern', 'US/Hawaii', 'America/Anchorage' or 'UTC'
12 timezone_utc_offset int The signed integer offset in seconds of a timezone from UTC
13 is_unsupported int Indicates whether the device is NOT supported (1) or is supported (0)
14 ip_address string IP address assigned to the device
15 is_shared int Indicates whether the device is shared (1) or not (0) (APPLIES ONLY TO CAMERAS)
16 owner_account_name string Name of the account that owns the device
17 is_upnp boolean Indicates whether the device is a UPNP device (1) or not (0) (APPLIES ONLY TO CAMERAS THAT HAVEN’T YET BEEN ATTACHED TO THE ACCOUNT, IN WHICH THEY COULD HAVE BEEN DETECTED VIA ONVIF OR UPNP)
18 video_input string Indicates the video input channel of the camera (APPLIES TO ANALOG CAMERAS)
19 video_status string Indicates the video status of the camera: (APPLIES TO ANALOG CAMERAS)
'0x00000000' - signal ok
'0x00000102' - no signal
20 location array Location of the device specified in the following way:

[
    latitude(float),
    longitude(float),
    azimuth(float/null for bridge),
    range(int/null for bridge),
    street address(string),
    floor(int),
    location name(string)
]

Note: If any field is not set, the value is null
21 parent_camera_id string Parent camera ID
22 child_camera_view string Child camera view
23 is_hidden int GUI control to not show device
24 ignored_inputs array[string] Array of analog port numbers which should be ignored by the bridge
25 responder_camera int Indicates whether the camera is a first responder camera (1) or not (0)

HTTP Status Codes

HTTP Status Code Description
200 Request succeeded
400 Unexpected or non-identifiable arguments are supplied
401 Unauthorized due to invalid session cookie
403 Forbidden due to the user missing the necessary privileges

Managed Switch

Overview

To simplify Camera troubleshooting Eagle Eye Networks provides managed Ethernet switches to be integrated into camera LAN. The managed switch uses PoE (Power over Ethernet) to provide power to cameras connected to its LAN ports the same way a typical PoE switch would, but it can additionally switch the power in individual ports on or off in response to commands delivered via Eagle Eye Network API (Thus forcing a camera hard reset by simply cycling its power supply)

For each reference in this section to port being ‘on’, ‘off’, ‘enabled’ or ‘disabled’, only the PoE power delivery function is meant. Communication function of the ports is not affected by this API

Manged Switches may be standalone or built into EEN bridges (e.g. model 305)

Managed Switch Model

Managed Switch Model

{
    "comment": "switch",
    "name": null,
    "ip": "10.143.70.77",
    "state": "REDY",
    "port_details": [
        {
            "index": "port_2",
            "power": 0,
            "ip": null,
            "enabled": "true",
            "mac": null,
            "camera_guid": null,
            "esn": null
        },
        {
            "index": "port_3",
            "power": 0,
            "ip": "10.143.176.211",
            "enabled": "true",
            "mac": "00:FC:14:18:08:05",
            "camera_guid": "(null)",
            "esn": null
        },
        {
            "index": "port_1",
            "power": 0,
            "ip": null,
            "enabled": "true",
            "mac": null,
            "camera_guid": null,
            "esn": null
        },
        {
            "index": "port_4",
            "power": 2.3,
            "ip": "10.143.63.240",
            "enabled": "true",
            "mac": "00:1C:27:09:B1:9E",
            "camera_guid": "36e3dbx0-15c5-11e6-a8c2-e9134ac9c158",
            "esn": "1007fdae"
        }
    ],
    "version": "IM-V122.1",
    "guid": "cb407e63-99f8-5dbx-86a6-d1d78ac6ffb0",
    "ports": 4
}

HTTP Response

Parameter Data Type Description Editable Required
guid string GUID of the managed switch

name string Name of the switch
state string State of the managed switch:
'REDY' - idle and ready to control
'PROB' - probing for the data behind ports like mac/voltage/enabled etc.
'CTRL' - busy actively changing settings
ports integer Number of controllable PoE ports available on the switch
ip string IP address of managed switch
version string Version information
comment string Comment stored on switch
port_details array[obj] List of port details objects

Managed Switch - port_details

Parameter Data Type Description
index string Port index in the form of 'port_N', where N gets substituted by an integer (starting from 1)
enabled string Indicates whether the port is on (true) or off (false)
mac string MAC address behind the port, string “Multiple(N)” for N number of MAC addresses found behind this port
ip string If a single MAC address is found this is the arp lookup corresponding to that MAC address. Empty string '' if more MAC addresses are found behind this port
power float Power in Watts that this port is drawing
camera_guid string GUID of the camera that is tied to the MAC/IP address
esn string ESN of the camera that is tied to the MAC/IP address

Get Managed Switch

Returns a Managed Switch object by GUID

Request

curl -X GET https://[active_brand_subdomain].eagleeyenetworks.com/g/managed_switch -d "switch_guid=[SWITCH_GUID]" -H "Authentication: [API_KEY]" --cookie "auth_key=[AUTH_KEY]" -G

For information on active_brand_subdomain click here.

HTTP Request

GET https://[active_brand_subdomain].eagleeyenetworks.com/g/managed_switch

Parameter Data Type Description Required
switch_guid string GUID of the managed switch
bridge_id string Bridge ID of the connected or integrated bridge

HTTP Status Codes

HTTP Status Code Description
200 Request succeeded
400 Unexpected or non-identifiable arguments are supplied
401 Unauthorized due to invalid session cookie
403 Forbidden due to the user missing the necessary privileges
404 Bridge or managed switch not found

Update Managed Switch

Update Managed Switch information

Request

curl -X POST https://[active_brand_subdomain].eagleeyenetworks.com/g/managed_switch -d "switch_guid=[SWITCH_GUID]" -d "name=[SWITCH_NAME]" -H "Authentication: [API_KEY]" --cookie "auth_key=[AUTH_KEY]"

For information on active_brand_subdomain click here.

HTTP Request

POST https://[active_brand_subdomain].eagleeyenetworks.com/g/managed_switch

Parameter Data Type Description Required
switch_guid string GUID of the managed switch
name string Name of the managed switch

HTTP Status Codes

HTTP Status Code Description
200 Request succeeded
400 Unexpected or non-identifiable arguments are supplied
401 Unauthorized due to invalid session cookie
403 Forbidden due to the user missing the necessary privileges
404 Bridge or managed switch not found

Control Managed Switch

This API call enables control of the Managed Switch (i.e. for turning ports on or off)

Request

curl -X POST https://[active_brand_subdomain].eagleeyenetworks.com/g/managed_switch/control -d '{"switch_guid": "[SWITCH_GUID]", "ports": ["port_1", "port_2"], "command": "reboot"}'  -H "Content-type: application/json" -H "Authentication: [API_KEY]" --cookie "auth_key=[AUTH_KEY]"

For information on active_brand_subdomain click here.

HTTP Request

POST https://[active_brand_subdomain].eagleeyenetworks.com/g/managed_switch/control

Parameter Data Type Description Required
switch_guid string Globally Unique Identifier of the switch
command string Control commands:
'enable' - turn port on
'disable' - turn port off
'reboot' - cycle ports’ power
ports array[string] Ports to be affected by the command

Json Response

{
    "status": "Success",
    "details": "Bridge sent command to managed switch"
}

HTTP Response

Parameter Data Type Description
status string Command status (e.g. 'Success')
details string Command resolution

HTTP Status Codes

HTTP Status Code Description
200 Request succeeded
400 Unexpected or non-identifiable arguments are supplied
401 Unauthorized due to invalid session cookie
403 Forbidden due to the user missing the necessary privileges
404 Bridge or managed switch not found
406 Managed switch is not currently in a valid state to be controlled
415 Invalid command supplied

Control Camera Power

This API call enables control of camera power using the camera identifier rather than port number of the switch

Request

curl -X POST https://[active_brand_subdomain].eagleeyenetworks.com/g/camera/power_cycle -d '{"identifier": "[ESN]"}' -H "Content-type: application/json" -H "Authentication: [API_KEY]" --cookie "auth_key=[AUTH_KEY]"

For information on active_brand_subdomain click here.

HTTP Request

POST https://[active_brand_subdomain].eagleeyenetworks.com/g/camera/power_cycle

Parameter Data Type Description Required
identifier string Device identifier:
<GUID> - Global Unique Identifier of the camera
<ESN> - ID of the camera
<MAC> - MAC address of the camera

Json Response

{
    "status": "success",
    "command": {
        "status": "Success",
        "details": "Bridge sent command to managed switch"
    }
}

HTTP Response

Parameter Data Type Description
status string Command status (e.g. 'Success')
details string Command resolution

HTTP Status Codes

HTTP Status Code Description
200 Request succeeded
400 Unexpected or non-identifiable arguments are supplied
401 Unauthorized due to invalid session cookie
403 Forbidden due to the user missing the necessary privileges
404 Bridge or managed switch not found
406 Managed switch is not currently in a valid state to be controlled
415 Invalid command supplied

Get List of Managed Switches

Returns an array of switch objects with each entry representing a Managed Switch available to the user

Request (basic)

curl -X GET https://[active_brand_subdomain].eagleeyenetworks.com/g/managed_switch/list -H "Authentication: [API_KEY]" --cookie "auth_key=[AUTH_KEY]" -G

For information on active_brand_subdomain click here.

Request (detailed)

curl -X GET https://[active_brand_subdomain].eagleeyenetworks.com/g/managed_switch/list -d "is_detailed=true" -H "Authentication: [API_KEY]" --cookie "auth_key=[AUTH_KEY]" -G

For information on active_brand_subdomain click here.

HTTP Request

GET https://[active_brand_subdomain].eagleeyenetworks.com/g/managed_switch/list

Parameter Data Type Description Required
is_detailed boolean Whether to include detailed data in the response (true) or not (false)

(Default value: false)

Json Response (basic)

[
    {
        "name": null,
        "bridges": [
            "10107f40"
        ],
        "state": "REDY",
        "guid": "cb407e63-99f8-5dbx-86a6-d1d78ac6ffb0",
        "available_bridges": [],
        "ports": 4
    },
    {...}
]

Json Response (detailed)

[
    {
        "comment": "switch",
        "bridges": [
            "10107f40"
        ],
        "name": null,
        "ip": "10.143.70.77",
        "state": "PROB",
        "port_details": [
            {
                "index": "port_2",
                "power": 0,
                "ip": null,
                "enabled": "true",
                "mac": null,
                "camera_guid": null,
                "esn": null
            },
            {
                "index": "port_3",
                "power": 0,
                "ip": "10.143.176.211",
                "enabled": "true",
                "mac": "00:FC:14:18:08:05",
                "camera_guid": "(null)",
                "esn": null
            },
            {
                "index": "port_1",
                "power": 0,
                "ip": null,
                "enabled": "true",
                "mac": null,
                "camera_guid": null,
                "esn": null
            },
            {
                "index": "port_4",
                "power": 2.3,
                "ip": "10.143.63.240",
                "enabled": "true",
                "mac": "00:1C:27:09:B1:9E",
                "camera_guid": "36e3dbx0-15c5-11e6-a8c2-e9134ac9c158",
                "esn": "1007fdae"
            }
        ],
        "available_bridges": [],
        "version": "IM-V122.1",
        "guid": "cb407e63-99f8-5dbx-86a6-d1d78ac6ffb0",
        "ports": 4
    },
    {...}
]

HTTP Response

The response body will be in EEN JSON-RPC format. The payload body will return a list of switch objects containing the 'guid', 'state', 'bridges', 'name', 'available_bridges' and 'ports' keys. If 'is_detailed=true', the response will contain all of the below information:

Parameter Data Type Description Basic Model
guid string Globally Unique Identifier of the switch
state string State of the managed switch:
'REDY' - idle and ready to control
'PROB' - probing for the data behind ports like mac/voltage/enabled etc.
'CTRL' - busy actively changing settings
bridges array[string] List of bridge ESNs this managed switch was found on
ports integer Number of controllable PoE ports available on the switch
name string Name of the switch
available_bridges array[string] List of available bridge ESNs, i.e. bridges that this switch can be attached to
ip string IP address of managed switch
version string Version information
comment string Comment stored on switch
port_details array[obj] List of port details objects

HTTP Status Codes

HTTP Status Code Description
200 Request succeeded
400 Unexpected or non-identifiable arguments are supplied
401 Unauthorized due to invalid session cookie
403 Forbidden due to the user missing the necessary privileges

Camera

Overview

The Device service allows access to create new logical devices (Cameras or Bridges) and establish a relationship between logical and physical devices. The GET method is available to any user with Camera 'R' (Read) permission. Methods POST, DELETE are available to account superusers and users with Camera 'W' (Write) permissions for the indicated camera. PUT method is only available to account superusers

When adding a new Camera, the name and settings parameters are required. The settings parameter should contain the ID of the bridge and the GUID of the Camera

Camera Settings Overview

The camera setting system is based on an inheritance model. User settings are overlaid on top of default settings for a device. By removing the user settings, the camera setting will automatically go back to the default value provided and maintained by Eagle Eye for the camera

Under the covers this works as follows:

The implication of this is that if a user has not pinned a setting by changing/managing it, it will track any system or make/model/version release updates. That is, EEN can optimize operating parameters and they will automatically propagate unless the user has changed/pinned them. Further, the user should be aware of this, which works well with an open/closed control metaphor or a check box - any setting control that is open/checked is manually set by the user, whereas closed controls will track EEN system wide recommendations. Finally, it is expected that the user settings will be managed to be only the value specifically modified by users, not all settings

The set of all settings is potentially large and far more than most users will ever want or need to manage. A separate table will be maintained which lists the normal settings - settings most users may want to interact with. This is standard across all devices and contains a list of settings names that should be accessible to the user. This list should be joined with the list of all settings to result in a subset of controls to be displayed in basic mode. An advanced mode should make all settings available with primitive controls to set or delete a value

An implication of this model the user settings object is a generic object that is only lightly interpreted by the device. Settings that match a known names (i.e. are within the camera base or mmv settings) will be utilized, but all values will be stored and returned as part of the user settings field. This can be used to support user interface elements on a per camera basis with values the bridge/camera do not interpret

Read Camera Settings (GET device 'camera_settings' property)

When getting the camera settings, a Json string representing a Json object is returned containing:

Update Camera Settings (POST device 'camera_settings_add' argument)

To update/set settings (i.e. override default setting value with a user setting), a Json string is sent representing a Json object containing:

Delete Camera Settings (POST device 'camera_settings_delete' argument)

To delete/unset settings (i.e. return to default setting value), a Json string is sent representing a Json object containing:

Camera Settings (Currently Supported)

Each camera make/model/version is different, thus not every setting is supported for some cameras, but here is list of core camera settings that are relevant to most applications:

Regions of Interest (ROIs)

ROIs will be defined by simple polygons - sequences of x,y coordinates that form a closed object, edge crosses are illegal and will have bizarre results. Each ROI will describe a portion of the screen. ROIs can overlap and priority (higher wins) determines what sensitivity settings to use. For overlapping ROIs, all will get motion block detection and can trigger ROI motion spans

ROIs can:

ROIs within settings will be 'rois': { '<roiname>': { 'roiid': 1437974150, 'name': 'Rusty Region', … }. ROIs are enabled and disabled by 'active_rois': { '<roiname>': true, … } to allow ROIs to easily be turned on and off to support schedules and ROI based alerts. To remove an active ROI delete it with the same arguments

Like the alert logic, 'rois' and 'active_rois' are accumulation settings - adding an object adds it to the holding object instead of replacing the entire object like most settings. Similarly, deleting an object removes it from the parent object, but leaves the parent in place. Both also automatically trigger updates to the active ESN data streams

ROIs can produce events and force video recording on activity within them. These events are distinct from motion events (whole screen events). Each ROI event has a simple snapshot algorithm the grabs a snapshot immediately, as opposed to the optimized object tracking for motion events. Since ROIs are presumed to be smaller, this should result in good summary images

ROI events are reported by the ROMS and ROME etags:

ROMS

ROME

Camera Model

Camera Model

{
    "id": "1000f60d",
    "name": "Kitchen Camera",
    "utcOffset": -18000,
    "timezone": "US/Central",
    "guid": "c6d11f36-9e63-11e1-a5b0-00408cdf9191",
    "permissions": "A@FIMLNSUTZcgfhmpsruwz",
    "tags": [
        "austin",
        "kitchen"
    ],
    "bridges": {
        "100a9af6": "ATTD"
    },
    "camera_settings_status_code": 200,
    "camera_settings": "{}",
    "settings": {
        "username": "onvif",
        "password": "securityCameraz",
        "bridge": "100a9af6",
        "alert_modes": {},
        "alert_levels": {},
        "alert_notifications": {},
        "longitude": -97.740715,
        "latitude": 30.269064,
        "street_address": "717-799 Brazos Street, Austin, TX 78701, USA",
        "site_name": "Panucci's Pizza",
        "floor": 0,
        "alert_throttle_types": {},
        "alert_throttle_seconds": {},
        "alert_throttle_hour_limits": {},
        "retention_days": 14,
        "local_retention_days": -1,
        "preview_only_cloud_retention": 0,
        "cloud_retention_days": 14,
        "roi_names": {},
        "range": null,
        "azimuth": null,
        "audio_clone_targets": [],
        "notes": "Previously used for laser eye surgery. Records pizzas as squares"
    },
    "camera_info_status_code": 200,
    "camera_info": {
        "esn": "1000f60d",
        "class": "camera",
        "camtype": "ONVIF",
        "camera_property_model": "EN-CDUM-005a",
        "camera_property_make": "Eagle Eye Networks",
        "r_model": "EN-CDUM-005a",
        "r_make": "Eagle Eye Networks",
        "model": "EN-CDUM-005a",
        "make": "Eagle Eye Networks",
        "uuid": "c6d11f36-9e63-11e1-a5b0-00408cdf9191",
        "bridgeid": "100a9af6",
        "bridge": "835b391f-6554-4e0a-902d-e989b3b46dba",
        "service": "ATTD",
        "connect": "STRM",
        "status": "1441831",
        "status_hex": "00160027",
        "intf": "Camera LAN",
        "mac": "00:1C:27:09:B1:98",
        "ipaddr": "*10.143.55.140",
        "proxy": "secondary",
        "camera_state_version": 1,
        "tagmap_status_state": 2,
        "admin_user": "admin",
        "admin_password": "admin",
        "subclass": "camdriver.onvif.GenericOnvifDriver",
        "r_version": "v2.0.0801.1002.88.1.33.1.45",
        "version": "v2.0.0801.1002.88.1.33.1.45",
        "camera_property_version": "v2.0.0801.1002.88.1.33.1.45",
        "register_id": 2242242234,
        "camera_retention_asset": 1209600000,
        "camera_newest": "20180704065509.359",
        "camera_oldest": "20180627000000.000",
        "camera_retention_etag": 1209600000,
        "now": "20180704090822.975",
        "ts": "20180704085738.391",
        "camera_property_analog": false,
        "camera_retention_interval": 1209600000,
        "camera_now": "20180704090823.543",
        "camera_abs_newest": "20180704040237.058",
        "camera_abs_oldest": "20180620000000.000",
        "camera_valid_ts": "20180627000000.000"
    },
    "camera_parameters_status_code": 200,
    "camera_parameters": {
        "active_settings": {
            "video_confirm_stream_bw": {
                "max": 1,
                "min": 0,
                "d": 0,
                "v": 0
            },
            "bridge_retention_days": {
                "max": 100000,
                "min": 0,
                "d": 0,
                "v": 0
            },
            "metadata_enable": {
                "max": 1,
                "min": 0,
                "d": 0,
                "v": 0
            },
            "motion_event_holdon_ms": {
                "max": 10000,
                "min": 0,
                "d": 300,
                "v": 300
            },
            "display_name": {
                "d": "none",
                "v": "none"
            },
            "encryption_type": {
                "max": 1,
                "min": 0,
                "d": 1,
                "v": 1
            },
            "event_postroll_ms": {
                "max": 60000,
                "min": 0,
                "d": 1000,
                "v": 1000
            },
            "bandwidth_recover": {
                "max": 10000000000,
                "min": 0,
                "d": 0,
                "v": 0
            },
            "metadata_config": {
                "d": {},
                "v": {}
            },
            "preview_min_limit_change_ms": {
                "max": 500000,
                "min": 2000,
                "d": 10000,
                "v": 10000
            },
            "bandwidth_demand": {
                "max": 10000000000,
                "min": 0,
                "d": 0,
                "v": 0
            },
            "display_height": {
                "max": 64000,
                "min": 80,
                "d": 180,
                "v": 180
            },
            "motion_sensitivity": {
                "max": 1,
                "min": 0,
                "d": 0.8,
                "v": 0.8
            },
            "video_bitrate": {
                "max": 12000,
                "min": 100,
                "d": 100,
                "v": 100
            },
            "motion_snap_excellent_hold_ms": {
                "max": 5000,
                "min": 100,
                "d": 1000,
                "v": 1000
            },
            "preview_noise_change_threshold": {
                "max": 64,
                "min": 1,
                "d": 2,
                "v": 2
            },
            "display_features": {
                "max": 255,
                "min": 0,
                "d": 255,
                "v": 255
            },
            "event_preroll_ms": {
                "max": 120000,
                "min": 0,
                "d": 1000,
                "v": 1000
            },
            "preview_jcmp_enable": {
                "max": 1,
                "min": 0,
                "d": 1,
                "v": 1
            },
            "preview_first_frame_delta_target": {
                "max": 0.99,
                "min": 0.01,
                "d": 0.25,
                "v": 0.25
            },
            "audio_clone_targets": {
                "d": [],
                "v": []
            },
            "preview_resolution": {
                "min": [
                    "cif",
                    "std"
                ],
                "d": "cif",
                "v": "cif"
            },
            "motion_event_holdoff_ms": {
                "max": 10000,
                "min": 0,
                "d": 500,
                "v": 500
            },
            "active_rois": {
                "d": {},
                "v": {}
            },
            "video_capture_mode": {
                "min": [
                    "always",
                    "event"
                ],
                "d": "event",
                "v": "event"
            },
            "motion_size_ratio": {
                "max": 0.99,
                "min": 0.0001,
                "d": 0.001,
                "v": 0.001
            },
            "preview_interval_ms": {
                "max": 16000,
                "min": 250,
                "d": 1000,
                "v": 1000
            },
            "local_retention_days": {
                "max": -1,
                "min": -1,
                "d": -1,
                "v": -1
            },
            "preview_frame_interval_min": {
                "max": 16000,
                "min": 0,
                "d": 0,
                "v": 0
            },
            "display_width": {
                "max": 64000,
                "min": 80,
                "d": 320,
                "v": 320
            },
            "preview_log_mask": {
                "max": 15,
                "min": 0,
                "d": 0,
                "v": 0
            },
            "motion_snap_age_threshold_ms": {
                "max": 2000,
                "min": 100,
                "d": 200,
                "v": 200
            },
            "preview_noise_limit_min": {
                "max": 16,
                "min": 2,
                "d": 3,
                "v": 3
            },
            "display_size": {
                "max": 3,
                "min": 1,
                "d": 1,
                "v": 1
            },
            "stream_stats_present_only": {
                "max": 1,
                "min": 0,
                "d": 1,
                "v": 1
            },
            "motion_weights": {
                "max": 64,
                "length": 8,
                "min": 1,
                "d": [
                    8,
                    4,
                    2,
                    1,
                    1,
                    1,
                    1,
                    1
                ],
                "v": [
                    8,
                    4,
                    2,
                    1,
                    1,
                    1,
                    1,
                    1
                ]
            },
            "min_bw_settings": {
                "d": {
                    "video_transmit_mode": "on demand",
                    "preview_transmit_mode": "on demand",
                    "always_transmit_mode": "on demand"
                },
                "v": {
                    "video_transmit_mode": "on demand",
                    "preview_transmit_mode": "on demand",
                    "always_transmit_mode": "on demand"
                }
            },
            "camera_class": {
                "d": "script",
                "v": "script"
            },
            "camera_applications": {
                "d": {},
                "v": {}
            },
            "shaping_mode": {
                "max": 127,
                "min": 0,
                "d": 31,
                "v": 31
            },
            "video_config": {
                "d": {
                    "preview_encoder": "videoencoder_config_cam1_stream2",
                    "video_profile": "UserCreatedProfileToken_3332364559",
                    "video_source": "videosource_config_cam1",
                    "preview_profile": "UserCreatedProfileToken_1903767221",
                    "preview_quality_settings": {
                        "std": {
                            "h": 360,
                            "quality": {
                                "high": {
                                    "q": 8,
                                    "bw": 0,
                                    "kbps": 3000,
                                    "fps": 8
                                },
                                "med": {
                                    "q": 6,
                                    "bw": 0,
                                    "kbps": 3000,
                                    "fps": 8
                                },
                                "low": {
                                    "q": 5,
                                    "bw": 0,
                                    "kbps": 3000,
                                    "fps": 8
                                }
                            },
                            "w": 640
                        },
                        "cif": {
                            "h": 240,
                            "quality": {
                                "high": {
                                    "q": 8,
                                    "bw": 0,
                                    "kbps": 1000,
                                    "fps": 8
                                },
                                "med": {
                                    "q": 6,
                                    "bw": 0,
                                    "kbps": 1000,
                                    "fps": 8
                                },
                                "low": {
                                    "q": 5,
                                    "bw": 0,
                                    "kbps": 1000,
                                    "fps": 8
                                }
                            },
                            "w": 320
                        }
                    },
                    "video_encoder": "videoencoder_config_cam1_stream1",
                    "preview_source": "videosource_config_cam1",
                    "video_quality_settings": {
                        "high": {
                            "h": 720,
                            "quality": {
                                "high": {
                                    "q": 8,
                                    "bw": 0,
                                    "kbps": 2000,
                                    "fps": 15
                                },
                                "med": {
                                    "q": 6,
                                    "bw": 0,
                                    "kbps": 1000,
                                    "fps": 12
                                },
                                "max-fps": {
                                    "q": 8,
                                    "bw": 0,
                                    "kbps": 2000,
                                    "fps": 30
                                },
                                "low": {
                                    "q": 5,
                                    "bw": 0,
                                    "kbps": 500,
                                    "fps": 10
                                }
                            },
                            "w": 1280
                        },
                        "std": {
                            "h": 360,
                            "quality": {
                                "high": {
                                    "q": 8,
                                    "bw": 0,
                                    "kbps": 600,
                                    "fps": 15
                                },
                                "med": {
                                    "q": 6,
                                    "bw": 0,
                                    "kbps": 400,
                                    "fps": 12
                                },
                                "max-fps": {
                                    "q": 8,
                                    "bw": 0,
                                    "kbps": 600,
                                    "fps": 30
                                },
                                "low": {
                                    "q": 5,
                                    "bw": 0,
                                    "kbps": 200,
                                    "fps": 10
                                }
                            },
                            "w": 640
                        },
                        "1080P": {
                            "h": 1080,
                            "quality": {
                                "high": {
                                    "q": 8,
                                    "bw": 0,
                                    "kbps": 4000,
                                    "fps": 15
                                },
                                "med": {
                                    "q": 6,
                                    "bw": 0,
                                    "kbps": 2000,
                                    "fps": 12
                                },
                                "max-fps": {
                                    "q": 8,
                                    "bw": 0,
                                    "kbps": 4000,
                                    "fps": 30
                                },
                                "low": {
                                    "q": 5,
                                    "bw": 0,
                                    "kbps": 1000,
                                    "fps": 10
                                }
                            },
                            "w": 1920
                        },
                        "cif": {
                            "h": 240,
                            "quality": {
                                "high": {
                                    "q": 8,
                                    "bw": 0,
                                    "kbps": 300,
                                    "fps": 15
                                },
                                "med": {
                                    "q": 6,
                                    "bw": 0,
                                    "kbps": 140,
                                    "fps": 12
                                },
                                "max-fps": {
                                    "q": 8,
                                    "bw": 0,
                                    "kbps": 300,
                                    "fps": 30
                                },
                                "low": {
                                    "q": 5,
                                    "bw": 0,
                                    "kbps": 100,
                                    "fps": 10
                                }
                            },
                            "w": 352
                        }
                    }
                },
                "v": {
                    "video_profile": "UserCreatedProfileToken_3332364559",
                    "video_source": "videosource_config_cam1",
                    "preview_profile": "UserCreatedProfileToken_1903767221",
                    "preview_encoder": "videoencoder_config_cam1_stream2",
                    "preview_quality_settings": {
                        "std": {
                            "h": 360,
                            "quality": {
                                "high": {
                                    "q": 8,
                                    "bw": 0,
                                    "kbps": 3000,
                                    "fps": 8
                                },
                                "med": {
                                    "q": 6,
                                    "bw": 0,
                                    "kbps": 3000,
                                    "fps": 8
                                },
                                "low": {
                                    "q": 5,
                                    "bw": 0,
                                    "kbps": 3000,
                                    "fps": 8
                                }
                            },
                            "w": 640
                        },
                        "cif": {
                            "h": 240,
                            "quality": {
                                "high": {
                                    "q": 8,
                                    "bw": 0,
                                    "kbps": 1000,
                                    "fps": 8
                                },
                                "med": {
                                    "q": 6,
                                    "bw": 0,
                                    "kbps": 1000,
                                    "fps": 8
                                },
                                "low": {
                                    "q": 5,
                                    "bw": 0,
                                    "kbps": 1000,
                                    "fps": 8
                                }
                            },
                            "w": 320
                        }
                    },
                    "video_encoder": "videoencoder_config_cam1_stream1",
                    "preview_source": "videosource_config_cam1",
                    "video_quality_settings": {
                        "high": {
                            "h": 720,
                            "quality": {
                                "high": {
                                    "q": 8,
                                    "bw": 0,
                                    "kbps": 2000,
                                    "fps": 15
                                },
                                "med": {
                                    "q": 6,
                                    "bw": 0,
                                    "kbps": 1000,
                                    "fps": 12
                                },
                                "max-fps": {
                                    "q": 8,
                                    "bw": 0,
                                    "kbps": 2000,
                                    "fps": 30
                                },
                                "low": {
                                    "q": 5,
                                    "bw": 0,
                                    "kbps": 500,
                                    "fps": 10
                                }
                            },
                            "w": 1280
                        },
                        "std": {
                            "h": 360,
                            "quality": {
                                "high": {
                                    "q": 8,
                                    "bw": 0,
                                    "kbps": 600,
                                    "fps": 15
                                },
                                "med": {
                                    "q": 6,
                                    "bw": 0,
                                    "kbps": 400,
                                    "fps": 12
                                },
                                "max-fps": {
                                    "q": 8,
                                    "bw": 0,
                                    "kbps": 600,
                                    "fps": 30
                                },
                                "low": {
                                    "q": 5,
                                    "bw": 0,
                                    "kbps": 200,
                                    "fps": 10
                                }
                            },
                            "w": 640
                        },
                        "1080P": {
                            "h": 1080,
                            "quality": {
                                "high": {
                                    "q": 8,
                                    "bw": 0,
                                    "kbps": 4000,
                                    "fps": 15
                                },
                                "med": {
                                    "q": 6,
                                    "bw": 0,
                                    "kbps": 2000,
                                    "fps": 12
                                },
                                "max-fps": {
                                    "q": 8,
                                    "bw": 0,
                                    "kbps": 4000,
                                    "fps": 30
                                },
                                "low": {
                                    "q": 5,
                                    "bw": 0,
                                    "kbps": 1000,
                                    "fps": 10
                                }
                            },
                            "w": 1920
                        },
                        "cif": {
                            "h": 240,
                            "quality": {
                                "high": {
                                    "q": 8,
                                    "bw": 0,
                                    "kbps": 300,
                                    "fps": 15
                                },
                                "med": {
                                    "q": 6,
                                    "bw": 0,
                                    "kbps": 140,
                                    "fps": 12
                                },
                                "max-fps": {
                                    "q": 8,
                                    "bw": 0,
                                    "kbps": 300,
                                    "fps": 30
                                },
                                "low": {
                                    "q": 5,
                                    "bw": 0,
                                    "kbps": 100,
                                    "fps": 10
                                }
                            },
                            "w": 352
                        }
                    }
                }
            },
            "preview_compress_keyframes": {
                "max": 1,
                "min": 0,
                "d": 0,
                "v": 0
            },
            "driver_info": {
                "d": {
                    "descriptor_version": "20180315070114.234",
                    "descriptor": "EN-CDU-1080P_v2.0",
                    "version": "20160216085458.870",
                    "local": false
                },
                "v": {
                    "descriptor_version": "20180315070114.234",
                    "descriptor": "EN-CDU-1080P_v2.0",
                    "version": "20160216085458.870",
                    "local": false
                }
            },
            "preview_key_frame_hold_ms": {
                "max": 3600000,
                "min": 30000,
                "d": 1800000,
                "v": 1800000
            },
            "rois": {
                "d": {},
                "v": {}
            },
            "rtp_streaming": {
                "min": [
                    "udp",
                    "tcp",
                    "default"
                ],
                "d": "default",
                "v": "default"
            },
            "video_transmit_mode": {
                "min": [
                    "always",
                    "event",
                    "background",
                    "on demand"
                ],
                "d": "background",
                "v": "background"
            },
            "preview_noise_limit_default": {
                "max": 16,
                "min": 2,
                "d": 16,
                "v": 16
            },
            "retention_days": {
                "max": 10000,
                "min": 0,
                "d": 14,
                "v": 14
            },
            "always_transmit_mode": {
                "min": [
                    "always",
                    "event",
                    "background",
                    "on demand"
                ],
                "d": "background",
                "v": "background"
            },
            "retention_max_bytes": {
                "max": 1000000000000,
                "min": 0,
                "d": 0,
                "v": 0
            },
            "motion_noise_filter": {
                "max": 1,
                "min": 0,
                "d": 0.7,
                "v": 0.7
            },
            "video_source_bounds": {
                "max": [
                    1920,
                    1080,
                    1920,
                    1080
                ],
                "min": [
                    0,
                    0,
                    0,
                    0
                ],
                "d": [
                    0,
                    0,
                    1920,
                    1080
                ],
                "v": [
                    0,
                    0,
                    1920,
                    1080
                ]
            },
            "ptz_tours": {
                "d": {},
                "v": {}
            },
            "audio_clone_time_offset": {
                "max": 32,
                "min": -32,
                "d": 0,
                "v": 0
            },
            "pos_info_attach": {
                "d": {},
                "v": {}
            },
            "video_resolution": {
                "min": [
                    "cif",
                    "std",
                    "high",
                    "1080P"
                ],
                "d": "high",
                "v": "high"
            },
            "preview_min_gop_ms": {
                "max": 180000,
                "min": 1000,
                "d": 4000,
                "v": 4000
            },
            "motion_logmask": {
                "max": 7,
                "min": 0,
                "d": 0,
                "v": 0
            },
            "ptz_user_to_idle": {
                "max": 500000,
                "min": 5,
                "d": 300,
                "v": 300
            },
            "active_alerts": {
                "d": {},
                "v": {}
            },
            "preview_transmit_mode": {
                "min": [
                    "always",
                    "event",
                    "background",
                    "on demand"
                ],
                "d": "always",
                "v": "always"
            },
            "audio_enable": {
                "d": false,
                "v": false
            },
            "video_bandwidth_factor": {
                "max": 64,
                "min": 1,
                "d": 1,
                "v": 1
            },
            "model_default_password": {
                "d": "admin",
                "v": "admin"
            },
            "motion_size_metric_active": {
                "max": 1,
                "min": 0,
                "d": 0,
                "v": 0
            },
            "bandwidth_background": {
                "max": 10000000000,
                "min": -1000,
                "d": 0,
                "v": 0
            },
            "preview_max_gop_ms": {
                "max": 180000,
                "min": 5000,
                "d": 30000,
                "v": 30000
            },
            "retention_priority": {
                "max": 10000,
                "min": 1,
                "d": 100,
                "v": 100
            },
            "motion_expand_ratio": {
                "max": 0.99,
                "min": 0.001,
                "d": 0.1,
                "v": 0.1
            },
            "camera_on": {
                "max": 1,
                "min": 0,
                "d": 1,
                "v": 1
            },
            "ptz_active_tours": {
                "d": {},
                "v": {}
            },
            "active_application": {
                "d": {},
                "v": {}
            },
            "stream_stats": {
                "d": "none",
                "v": "none"
            },
            "motion_edge_expand_ratio": {
                "max": 0.99,
                "min": 0.001,
                "d": 0.1,
                "v": 0.1
            },
            "model_default_username": {
                "d": "admin",
                "v": "admin"
            },
            "preview_realtime_bandwidth": {
                "max": 100000000,
                "min": 8000,
                "d": 50000,
                "v": 50000
            },
            "motion_snap_size_ratio": {
                "max": 0.99,
                "min": 0.0001,
                "d": 0.001,
                "v": 0.001
            },
            "preview_history_depth_ms": {
                "max": 32000,
                "min": 1000,
                "d": 4000,
                "v": 4000
            },
            "ptz_stations": {
                "d": {},
                "v": {}
            },
            "alerts": {
                "d": {},
                "v": {}
            },
            "motion_hold_interval": {
                "max": 120,
                "min": 0,
                "d": 5,
                "v": 5
            },
            "display_audio_enabled": {
                "max": 1,
                "min": 0,
                "d": 0,
                "v": 0
            },
            "preview_only_cloud_retention": {
                "max": 1,
                "min": 0,
                "d": 0,
                "v": 0
            },
            "applications": {
                "d": {
                    "eenivi": {
                        "version": 3,
                        "features": {
                            "tamper": {
                                "minh": 200,
                                "version": 1,
                                "minw": 300,
                                "cpu": 0.1,
                                "minrate": 4
                            },
                            "object": {
                                "minh": 200,
                                "version": 1,
                                "minw": 300,
                                "cpu": 0.1,
                                "minrate": 4
                            },
                            "intrusion": {
                                "minh": 200,
                                "version": 1,
                                "minw": 300,
                                "cpu": 0.1,
                                "minrate": 4
                            },
                            "linecross": {
                                "minh": 200,
                                "version": 1,
                                "minw": 300,
                                "cpu": 0.1,
                                "minrate": 4
                            }
                        }
                    }
                },
                "v": {
                    "eenivi": {
                        "version": 3,
                        "features": {
                            "tamper": {
                                "minh": 200,
                                "version": 1,
                                "minw": 300,
                                "cpu": 0.1,
                                "minrate": 4
                            },
                            "object": {
                                "minh": 200,
                                "version": 1,
                                "minw": 300,
                                "cpu": 0.1,
                                "minrate": 4
                            },
                            "intrusion": {
                                "minh": 200,
                                "version": 1,
                                "minw": 300,
                                "cpu": 0.1,
                                "minrate": 4
                            },
                            "linecross": {
                                "minh": 200,
                                "version": 1,
                                "minw": 300,
                                "cpu": 0.1,
                                "minrate": 4
                            }
                        }
                    }
                }
            },
            "cloud_retention_days": {
                "max": 2190,
                "min": 1,
                "d": 14,
                "v": 14
            },
            "always_retention_days": {
                "max": 100000,
                "min": 0,
                "d": 0,
                "v": 0
            },
            "motion_snap_push_min_delay_ms": {
                "max": 5000,
                "min": 1000,
                "d": 2000,
                "v": 2000
            },
            "audio_clone_source": {
                "d": "0",
                "v": "0"
            },
            "video_source_flip": {
                "d": false,
                "v": false
            },
            "motion_boxes_metric_active": {
                "max": 1,
                "min": 0,
                "d": 0,
                "v": 0
            },
            "monitor_class": {
                "min": [
                    "critical",
                    "prod",
                    "friend",
                    "beta",
                    "dev",
                    "ignore"
                ],
                "d": "prod",
                "v": "prod"
            },
            "preview_quality": {
                "min": [
                    "low",
                    "med",
                    "high"
                ],
                "d": "low",
                "v": "low"
            },
            "video_quality": {
                "min": [
                    "low",
                    "med",
                    "high",
                    "max-fps"
                ],
                "d": "med",
                "v": "med"
            },
            "preview_queue_ms": {
                "max": 20000,
                "min": 1000,
                "d": 10000,
                "v": 10000
            }
        },
        "active_filters": [
            "user_user"
        ],
        "user_settings": {
            "versions": {},
            "settings": {
                "rois": {},
                "active_rois": {}
            },
            "schedules": {}
        }
    }
}

Camera (Attributes)

Parameter Data Type Description Editable Required
id string Camera ID automatically generated and assigned while adding the camera to a Bridge


name string Device name
settings json Json object of basic settings (location, motion regions, etc.)
camera_settings_status_code int Indicates whether it was possible to retrieve the device settings (200) or not (404) (DEPRECATED)
camera_settings string Miscellaneous device settings (DEPRECATED)
utcOffset int Signed UTC offset in seconds of the set 'timezone' (defaults to the cameras’s bridge offset)
timezone string Indicates the timezone of the camera (defaults to the cameras’s bridge timezone)

Example: 'US/Alaska', 'US/Arizona', 'US/Central', 'US/Eastern', 'US/Hawaii', 'America/Anchorage' or 'UTC'
guid string The GUID (Globally Unique Identifier) is an immutable device identifier assigned to a device during the production process
permissions string String of characters each defining a permission level of the current user

Permissions include:
'R' - user has access to view images and video for this camera
'W' - user can modify and delete this camera
'S' - user can share this camera in a group share
tags array[string] Array of strings each representing a tag name
bridges json Json object of bridges (ESNs) this device is seen by and the camera attach status:
'ATTD' - the camera is attached to a bridge
'IGND' - the camera is unattached and is available to be attached
camera_parameters_status_code int Indicates whether it was possible to retrieve the device parameters (200) or not (404)
camera_parameters json Json object of camera parameters. If camera parameters cannot be retrieved for whatever reason (example: communication with the bridge has been lost), this will be empty and camera_parameters_status_code will be 404
camera_info_status_code int Indicates whether it was possible to retrieve information about the device (200) or not (404)
camera_info json Json object of basic information related to a camera. If camera information cannot be retrieved for whatever reason (example: communication with camera has been lost), then this will be empty and camera_info_status_code will be 404

Camera - settings

Parameter Data Type Description Required
bridge string Device ID of bridge the camera is currently attached to (or ID of the bridge to attach camera to) (APPLIES ONLY TO CAMERAS)
guid string The GUID (Globally Unique Identifier) is an immutable device identifier assigned to a device during the production process
username string Username to login to camera (APPLIES ONLY TO CAMERAS)
password string Password to login to camera (APPLIES ONLY TO CAMERAS)
roi_names json Json object of ROI names keyed by ROI ID (APPLIES ONLY TO CAMERAS)
alert_notifications json Json object of user IDs keyed by ROI ID (APPLIES ONLY TO CAMERAS)
alert_modes json Json object of alert modes keyed by ROI ID (APPLIES ONLY TO CAMERAS)
alert_levels json Json object of alert levels keyed by ROI ID (APPLIES ONLY TO CAMERAS)
notes string Notes
latitude float Latitude of the camera’s location
longitude float Longitude of the camera’s location
street_address string Street address of the camera’s location
azimuth float Direction which the camera faces. Possible values: 0.0-360.0 (North=0.0)
range float Effective distance the camera can see in feet
floor int The floor of the building given that it is a multi-storey building
share_email string Comma-delimited list of emails to share this device with
local_retention_days json Json object of total retention days defined in the following way:

{
    'max': 10000,
    'min': 1,
    'd': 14,
    'v': 14
}

‘d’ - default value
‘v’ - currently set value
cloud_retention_days json Json object of total retention days defined in the following way:

{
    'max': 10000,
    'min': 1,
    'd': 14,
    'v': 14
}

‘d’ - default value
‘v’ - currently set value
bridge_retention_days json Json object of total retention days defined in the following way:

{
    'max': 10000,
    'min': 1,
    'd': 14,
    'v': 14
}

‘d’ - default value
‘v’ - currently set value

Camera - settings - roi_names

Parameter Data Type Description
<roi_id> string Object with keys being ROI IDs and values being the name

Camera - settings - alert_notifications

Parameter Data Type Description
<roi_id> array[string] Object with keys being ROI IDs and values being the array of User IDs

Camera - settings - alert_modes

Parameter Data Type Description
<roi_id> array[string] Object with keys being ROI IDs and values being the array of alert modes

Camera - settings - alert_levels

Parameter Data Type Description
<roi_id> array[string] Object with keys being ROI IDs and values being the array of alert levels

Camera - bridges

Parameter Data Type Description
<device_id> string Object with keys being bridge IDs and values being the service status of the camera on that bridge

Camera - camera_info

Parameter Data Type Description
esn string Electronic Serial Number of the device
class string Camera or bridge, etc.
camtype string Type of device:
'ONVIF' - onvif-compliant device
model string Model of the device
make string Make of the device
uuid string UUID uniquely identifying the device
bridgeid string ID of the bridge this device is attached to
bridge string GUID of the bridge the device is attached to
service string Device service status:
'ATTD' - camera is attached to a bridge
'IGND' - camera is unattached from all bridges and is available to be attached to a bridge
'IDLE' - camera will register but will not operate (unregistered bridges)
'ERSE' - one shot, all camera data will be erased

enum: ATTD, IGND, IDLE, ERSE
connect string Device connect status:
'STRM' - camera is connected and streaming
status string Decimal status of the device
status_hex string Status bitmask as head string
status_hex64 string Extended status bitmask as hex string
intf string Interface of the device (not present for analog):
'Camera LAN' - camera is connected via LAN
mac string MAC address of the device
ipaddr string IP addresses assigned to the device (comma-delimited) with the one in use prefixed by an asterisk (*)
proxy string Proxy
camera_state_version int Camera state version
tagmap_status_state int Tag map status state
admin_user string Web username
admin_password string Web password
subclass string Firmware/driver type of the device
version string Firmware/driver version of the device
register_id int Camera register ID
camera_retention int Retention period in milliseconds
camera_retention_etag int Retention period in milliseconds
camera_retention_asset int Retention period in milliseconds
camera_retention_interval int Retention interval in milliseconds
camera_newest string Timestamp of newest event available in EEN Timestamp format: YYYYMMDDHHMMSS.NNN
camera_oldest string Timestamp of oldest event available in EEN Timestamp format: YYYYMMDDHHMMSS.NNN
now string Current timestamp in EEN Timestamp format: YYYYMMDDHHMMSS.NNN
ts string Timestamp in EEN Timestamp format: YYYYMMDDHHMMSS.NNN
camera_property_analog boolean Whether the device is connected via analog input (1) or not (0)
camera_info_version int Device info version
camera_min_time string Minimum timestamp available in EEN Timestamp format: YYYYMMDDHHMMSS.NNN
camera_now string Device’s current timestamp in EEN Timestamp format: YYYYMMDDHHMMSS.NNN
camera_abs_newest string Timestamp of newest event available in EEN Timestamp format: YYYYMMDDHHMMSS.NNN
camera_abs_oldest string Timestamp of oldest event available in EEN Timestamp format: YYYYMMDDHHMMSS.NNN
camera_property_model string Model of the device
(DEPRECATED)
camera_property_make string Make of the device
(DEPRECATED)
camera_property_version string Driver version of the device
(DEPRECATED)
camera_valid_ts string Timestamp of oldest event available
(DEPRECATED)
r_model string Model of the device
(DEPRECATED)
r_make string Make of the device
(DEPRECATED)
r_version string Firmware/driver version of the device
(DEPRECATED)

Get Camera

Returns a Camera object by ID

Request

curl -X GET https://[active_brand_subdomain].eagleeyenetworks.com/g/device -d "id=[CAMERA_ID]" -H "Authentication: [API_KEY]" --cookie "auth_key=[AUTH_KEY]" -G

For information on active_brand_subdomain click here.

HTTP Request

GET https://[active_brand_subdomain].eagleeyenetworks.com/g/device

Parameter Data Type Description Is Required
id string Camera ID true

HTTP Status Codes

HTTP Status Code Description
200 Request succeeded
400 Unexpected or non-identifiable arguments are supplied
401 Unauthorized due to invalid session cookie
403 Forbidden due to the user missing the necessary privileges

Get Camera’s RTSP URLs

Returns the full RTSP URLs for a Camera object by ID.

Request

curl -X GET https://[active_brand_subdomain].eagleeyenetworks.com/g/device/rtsp -d "id=[CAMERA_ID]" -H "Authentication: [API_KEY]" --cookie "auth_key=[AUTH_KEY]" -G

For information on active_brand_subdomain click here.

HTTP Request

GET https://[active_brand_subdomain].eagleeyenetworks.com/g/device/rtsp

Parameter Data Type Description Is Required
id string Camera ID true

Json Response

{
  "preview_url": "rtsp://...",
  "video_url": "rtsp://..."
}

HTTP Status Codes

HTTP Status Code Description
200 Request succeeded
400 Unexpected or non-identifiable arguments are supplied
401 Unauthorized due to invalid session cookie
403 Forbidden due to the user missing the necessary privileges

Add Camera to Bridge

Adds an unattached Camera to the bridge

Request

curl -X PUT https://[active_brand_subdomain].eagleeyenetworks.com/g/device -d '{"name":"[NAME]","timezone":[TIMEZONE],"settings":{"bridge":"[BRIDGE_ID]","guid":"[CAMERA_GUID]","username":"","password":""}}' -H "content-type: application/json" -H "Authentication: [API_KEY]" --cookie "auth_key=[AUTH_KEY]"

For information on active_brand_subdomain click here.

HTTP Request

PUT https://[active_brand_subdomain].eagleeyenetworks.com/g/device

Parameter Data Type Description Is Required
name string Camera name true
settings json Json object of basic settings (bridge, GUID, username, password, location, motion regions, etc.) Please note that the GUID value is case-sensitive and should exactly match what is returned by the camera. true
timezone string If unspecified, this will default to the camera’s bridge timezone
tags array[string] Array of strings each representing a tag name

Example JSON settings object

{
  "name": "",
  "settings": {
    "bridge": "",
    "guid": "",
    "username": "",
    "password": ""
  }
}

Json Response

{
    "id": "1000f60d"
}

HTTP Response (Array Attributes)

Parameter Data Type Description
id string Camera ID

HTTP Status Codes

HTTP Status Code Description
200 Request succeeded
400 Unexpected or non-identifiable arguments are supplied
401 Unauthorized due to invalid session cookie
403 Forbidden due to the user missing the necessary privileges
404 No device matching the Connect ID or GUID was found
409 Connect ID or GUID is currently already in use by an account
410 Communication cannot be made to attach the camera to the bridge
415 Device associated with the given GUID is unsupported

Update Camera

Update Camera information

Request

curl -X POST https://[active_brand_subdomain].eagleeyenetworks.com/g/device -d '{"id": "[CAMERA_ID], "name": "[NAME]"}' -H "content-type: application/json" -H "Authentication: [API_KEY]"  --cookie "auth_key=[AUTH_KEY]"

For information on active_brand_subdomain click here.

HTTP Request

POST https://[active_brand_subdomain].eagleeyenetworks.com/g/device

Parameter Data Type Description Is Required
id string Camera ID true
name string Camera name
timezone strings If unspecified, this will default to the camera’s bridge timezone
tags array[string] Array of strings each representing a tag name
settings json Json object of basic settings (location, motion regions, etc.)
camera_parameters_add json Json object of camera parameters/settings to add/update
camera_parameters_delete json Json object of camera parameters/settings to delete

Json Response

{
    "id": "1000f60d"
}

HTTP Response (Json Attributes)

Parameter Data Type Description
id string Camera ID

HTTP Status Codes

HTTP Status Code Description
200 Request succeeded
400 Unexpected or non-identifiable arguments are supplied
401 Unauthorized due to invalid session cookie
403 Forbidden due to the user missing the necessary privileges
404 Device matching the ID was not found
463 Unable to communicate with the camera to add/delete camera settings, contact support

Delete Camera

Delete a Camera from the bridge (effectively unassigning it, the camera can then be added to another or the same device)

Request

curl -X DELETE https://[active_brand_subdomain].eagleeyenetworks.com/g/device -d "id=[CAMERA_ID]" -H "Authentication: [API_KEY]" --cookie "auth_key=[AUTH_KEY]" -G

For information on active_brand_subdomain click here.

HTTP Request

DELETE https://[active_brand_subdomain].eagleeyenetworks.com/g/device

Parameter Data Type Description Is Required
id string Camera ID true

HTTP Status Codes

HTTP Status Code Description
200 Request succeeded
400 Unexpected or non-identifiable arguments are supplied
401 Unauthorized due to invalid session cookie
403 Forbidden due to the user missing the necessary privileges
404 Device matching the ID was not found
463 Unable to communicate with the camera or bridge, contact support

Get List of Cameras

Returns an array of arrays with each sub-array representing a Camera available to the user. The 'service_status' attribute is set either to 'ATTD', 'IGND', 'IDLE' or 'ERSE'. If the 'service_status' is 'ATTD', the camera is attached to a bridge. If the 'service_status' is 'IGND', the camera is unattached from any bridge and is available to be attached. If the 'service_status' is 'IDLE', the camera will register but will not operate (unregistered bridges). The 'ERSE' status is used to erase all camera data from the bridge

Request

curl --request GET https://[active_brand_subdomain].eagleeyenetworks.com/g/device/list -H "Authentication: [API_KEY]" --cookie "auth_key=[AUTH_KEY]"

For information on active_brand_subdomain click here.

HTTP Request

GET https://[active_brand_subdomain].eagleeyenetworks.com/g/device/list

Parameter Data Type Description
e string Camera ID
n string Camera Name
t string Device Type
s string Device Service Status

Json Response

[
    [
        "00014750",
        "1000f60d",
        "Kitchen Camera",
        "camera",
        [
            [
                "1002d096",
                "ATTD"
            ]
        ],
        "ATTD",
        "A@FIMLNSUTZcgfhmpsruwz",
        [],
        "c6d11f36-9e63-11e1-a5b0-00408cdf9191",
        "20180224143453844",
        1441847,
        "US/Central",
        -18000,
        0,
        "*10.143.55.140",
        0,
        "Panucci's Account",
        false,
        null,
        null,
        [
            null,
            null,
            null,
            null,
            "",
            null,
            ""
        ],
        null,
        null,
        0,
        [],
        0,
        {}
    ],
    [
        "00014750",
        "1002d096",
        "Kitchen Bridge",
        "bridge",
        [
            [
                "10053bf6",
                "ATTD"
            ]
        ],
        "ATTD",
        "A@FIMLNSUTZcgfhmpsruwz",
        [],
        "835b391f-6554-4e0a-902d-e989b3b46dba",
        "EEN-BR305-15721",
        1179649,
        "US/Central",
        -18000,
        0,
        "192.168.8.100",
        0,
        "Panucci's Account",
        false,
        null,
        null,
        [
            null,
            null,
            null,
            null,
            null,
            null,
            null
        ],
        null,
        null,
        0,
        [],
        0,
        {}
    ],
    [...],
    [...],
    [...]
]

HTTP Response (Array Attributes)

Array Index Attribute Data Type Description
0 account_id string Account ID of the device’s account
1 id string Camera ID
2 name string Device name
3 type string, enum Device type

enum: bridge, camera, mobile_camera, multiview_camera, mca_camera
4 bridges array [
  array [
    string
  ]
]
This is an array of string arrays, each array representing a bridge that can see the camera. The first element of the array is the bridge ESN. The second element is the service status
5 service_status string, enum Device service status:
'ATTD' - camera is attached to a bridge
'IGND' - camera is unattached from all bridges and is available to be attached to a bridge
'IDLE' - camera will register but will not operate (unregistered bridges)
'ERSE' - one shot, all camera data will be erased

enum: ATTD, IGND, IDLE, ERSE
6 permissions string String of one or more characters each defining a permission level

Permissions include:
'R' - user has access to view images and video for this camera
'W' - user can modify and delete this camera
'S' - user can share this camera in a group share
7 tags array[string] Array of strings each representing a tag name
8 guid string The GUID (Globally Unique Identifier) is an immutable device identifier assigned to a device during the production process
9 serial_number string Serial number of the device
10 device_status int The device status bitmask
11 timezone string Indicates the timezone of the camera
12 timezone_utc_offset int Timezone UTC offset as signed integer in seconds (example: -25200 translates to -7 hours from UTC)
13 is_unsupported int Indicates whether the camera is NOT supported (1) or is supported (0)
14 ip_address string IP addresses assigned to the device (comma-delimited) with the one in use prefixed by an asterisk (*)
15 is_shared int Indicates whether the camera is shared (1) or not (0)
16 owner_account_name string Name of the account that owns the device. This only applies to shared cameras, since they will be owned by a different account
17 is_upnp boolean Indicates whether the camera is a UPNP device. Note that this property is different then all the other 'is_*' properties in the API, which normally are integers (0 or 1). Currently this property only applies to cameras that haven’t yet been attached to the account, in which they could have been detected via ONVIF or UPNP
18 video_input string For analog cameras only, this indicates the video input channel of the camera
19 video_status string For analog cameras only, this indicates the video status of the camera
20 location array Location of the device specified in the following way:

[
    latitude(float),
    longitude(float),
    azimuth(float/null for bridge),
    range(float/null for bridge),
    street address(string),
    floor(int),
    location name(string)
]

Note: If any field is not set, the value is null
21 parent_camera_id string Parent Camera ID
22 child_camera_view string Child camera view
23 is_hidden int GUI control to not show device
24 ignored_inputs array[string] Array of analog port numbers which should be ignored by the bridge
25 responder_camera int Indicates whether the camera is a first responder camera (1) or not (0)
26 super_tags json Semantically classified device metadata
27 discovered_state json Information regarding the connection state of discovered devices that have not been registered. created_at is the last time the device was detected, connect indicates the registration state of the device. Connect state:
'NONE' - camera no longer available.
'IGND' - camera is unattached from all bridges and is available to be attached to a bridge
'PEND' - camera driver found and camera is ready for add.
'CERR' camera network error.
28 flags json Collection of boolean properties used internally for VMS GUI

HTTP Status Codes

HTTP Status Code Description
200 Request succeeded
400 Unexpected or non-identifiable arguments are supplied
401 Unauthorized due to invalid session cookie
403 Forbidden due to the user missing the necessary privileges

Action

Overview

This service defines several macro actions that can be attached to Devices. These are convenience functions. The same functionality provided herein can also be accomplished via individual setting calls. Most actions can be scheduled to occur now or at some point in the future

Given the macro nature and the number of devices and operations that may occur, as long as the arguments are correct, the service will return success status code regardless of the result on each individual device. The application should monitor the vent stream to determine success or failure of the action on a device to device basis

Turn Cameras On

Used to turn on cameras with given ids’ OR given bridge id in the user’s account. User must be an account superuser. Has no effect on body worn cameras.

Request

curl -X POST https://[active_brand_subdomain].eagleeyenetworks.com/g/action/allon -H "Authentication: [API_KEY]" -H "Content-Type: application/json" --cookie "auth_key=[AUTH_KEY]" -d '{"camera_ids":[IDS_OF_CAMERAS]}'

curl -X POST https://[active_brand_subdomain].eagleeyenetworks.com/g/action/allon -H "Authentication: [API_KEY]" -H "Content-Type: application/json" --cookie "auth_key=[AUTH_KEY]" -d '{"bridge_id":"ID_OF_BRIDGE"}'

For information on active_brand_subdomain click here.

HTTP Request

POST https://[active_brand_subdomain].eagleeyenetworks.com/g/action/allon

Parameter Data Type Description Is Required
camera_ids array[string] IDs of the cameras you want to turn on false
bridge_id string ID of bridge with all the cameras you want to turn on false

HTTP Status Codes

HTTP Status Code Description
202 Request succeeded
400 Unexpected or non-identifiable arguments are supplied
401 Unauthorized due to invalid session cookie
403 Forbidden due to the user missing the necessary privileges

Turn Cameras Off

Used to turn off cameras with given ids’ OR given bridge id in the user’s account. User must be an account superuser. Has no effect on body worn cameras.

Request

curl -X POST https://[active_brand_subdomain].eagleeyenetworks.com/g/action/alloff -H "Authentication: [API_KEY]" -H "Content-Type: application/json" --cookie "auth_key=[AUTH_KEY]" -d '{"camera_ids":[IDS_OF_CAMERAS]}'

curl -X POST https://[active_brand_subdomain].eagleeyenetworks.com/g/action/alloff -H "Authentication: [API_KEY]" -H "Content-Type: application/json" --cookie "auth_key=[AUTH_KEY]" -d '{"bridge_id":"ID_OF_BRIDGE"}'

For information on active_brand_subdomain click here.

HTTP Request

POST https://[active_brand_subdomain].eagleeyenetworks.com/g/action/alloff

Parameter Data Type Description Is Required
camera_ids array[string] IDs of the cameras you want to turn off false
bridge_id string ID of bridge with all the cameras you want to turn off false

HTTP Status Codes

HTTP Status Code Description
202 Request succeeded
400 Unexpected or non-identifiable arguments are supplied
401 Unauthorized due to invalid session cookie
403 Forbidden due to the user missing the necessary privileges

Recording On

Used to turn on recording for cameras in a specific layout. The result of this to the affected cameras will be that all 'operating_hours' schedules are removed, 'camera_on' is set to 1 (on) and 'video_capture_mode' is set to 'always'. The layout object will have it’s recording_key set to the value specified in the request. Has no effect on unmanaged cameras (bodycam, mobile cam, analog, etc.).

Request

curl -X POST https://[active_brand_subdomain].eagleeyenetworks.com/g/action/recordnow -H "Authentication: [API_KEY]" -H "Content-Type: application/json" --cookie "auth_key=[AUTH_KEY]" -d '{"recording_key":"[RECORDING_KEY]", "layout_id":"[LAYOUT_ID]"}'

For information on active_brand_subdomain click here.

HTTP Request

POST https://[active_brand_subdomain].eagleeyenetworks.com/g/action/recordnow

Parameter Data Type Description
layout_id string ID of the layout for which cameras will be set to record. All cameras in the layout will be affected.
recording_key string A key used to tag this recording. Can be used to retrieve this recording info later using the GET 'recording' service

HTTP Status Codes

HTTP Status Code Description
202 Request succeeded
400 Unexpected or non-identifiable arguments are supplied
401 Unauthorized due to invalid session cookie
403 Forbidden due to the user missing the necessary privileges

Recording Off

Used to turn off recording for cameras in a specific layout. The result of this to the affected cameras will be that all 'operating_hours' schedules are removed, 'camera_on' is set to 0 (off) and 'video_capture_mode' is set back to 'event' (default). The layout will have it’s recording_key nulled out.

Request

curl -X POST https://[active_brand_subdomain].eagleeyenetworks.com/g/action/recordoff -H "Authentication: [API_KEY]" -H "Content-Type: application/json" --cookie "auth_key=[AUTH_KEY]" -d '{"layout_id":"[LAYOUT_ID]"}'

For information on active_brand_subdomain click here.

HTTP Request

POST https://[active_brand_subdomain].eagleeyenetworks.com/g/action/recordoff

Parameter Data Type Description
layout_id string ID of the layout for which cameras will have recording turned off. All cameras in the layout will be affected.

HTTP Status Codes

HTTP Status Code Description
202 Request succeeded
400 Unexpected or non-identifiable arguments are supplied
401 Unauthorized due to invalid session cookie
403 Forbidden due to the user missing the necessary privileges

Images and Video

Overview

Asset services provide access to Media Assets - previews and video in appropriate formats. Asset services are used in conjunction with list transactions to enumerate and identify Assets. All assets are tagged with and can be identified by the EEN Timestamp

EEN Timestamp

Type Meaning
EEN Timestamp Format:  YYYYMMDDhhmmss.xxx (string)
System: Coordinated Universal Time (UTC)
Synchronized time zone: Greenwich Mean Time (GMT)

Example: Jan 2, 2018 08:30:20.00 == 20180102083020.000

Assets Identifiers

Retrieve Image

The image request model provides an efficient mechanism for accessing image sequences for several usage models. Image requests can be done directly using the next/after/prev virtual model. This returns images before or after specified timestamps. Alternatively, the timestamp and event information can be fetched through the List interface (to get Events for history) and Poll interface to track new images as they become available in real-time. The following description provides typical usage models for various events:

Image Formats

Retrieve List of Images

There are numerous different ways to get a list of images:

Get all preview images between April 1st and April 2nd
https://[active_brand_subdomain].eagleeyenetworks.com/asset/list/image.jpeg?id=100676b2&start_timestamp=20180401000000.000&end_timestamp=20180402000000.000&asset_class=all

Get 500 images before April 1st
https://[active_brand_subdomain].eagleeyenetworks.com/asset/list/image.jpeg?id=100676b2&start_timestamp=20180401000000.000&count=-500&asset_class=all

Get the next 500 images after April 1st
https://[active_brand_subdomain].eagleeyenetworks.com/asset/list/image.jpeg?id=100676b2&start_timestamp=20180401000000.000&count=500&asset_class=all

Retrieve Video

Video is accessed via the 'play' command. Video is captured in segments and is limited to 5 minutes per segment in storage. The video command will seamlessly rewrite headers within the video format to join segments as necessary to deliver the requested data span. However, we highly encourage developers to fetch only 5 minutes at a time to ensure that users aren’t filling storage on their bridge needlessly

If the end time of the segment is in the future, the video will follow the data stream as it arrives, delivering live video streaming with minimal latency (if the camera is not streaming video, the video will stop (and start again) as video is captured, which is typically not what is desired). MP4 format cannot be live streamed

The keyword 'stream_<streamid>' can be used for the starting timestamp. This forces the camera to capture video and stream it to the cloud live. The stream ID should be globally unique(ish) string - combination of a timestamp and user ID works well

The start timestamp must match the starting timestamp of a video if the video already exists. Subsegments of a video span can be specified by using the 'time_offset' argument. For example assume a 5 minute video has been recorded from 12:30 to 12:35. The query '?start_timestamp=20181120123000.000&end_timestamp=20181120123400.000&time_offset=180000&...' will play one minute of video (timestamped at 12:33), 3 minutes into the video starting at 12:30, clipping off the last minute of the recorded segment

API calls can initially be done against 'https://login.eagleeyenetworks.com' (The host url), but after the authorization response is returned, API calls should then use the branded subdomain. At this stage the branded host url will become 'https://[active_brand_subdomain].eagleeyenetworks.com', where the 'active_brand_subdomain' field is returned in the authorization response

Each account will consistently have the same branded subdomain and as such will not change throughout the life of the session. Caching the subdomain is safe as long as the client software validates against the 'active_brand_subdomain' after authorization. Using the branded subdomain is important for speed and robustness

Video Formats

The video system is based on H264 video and AAC audio. These streams are encapsulated in different formats for compatibility with different playback modes

Get Image

Get a JPEG image based on the specified timestamp. This will return binary image data in JPEG format

Cache control headers to allow asset caching if not 'now'-relative:

Header Data Type Description
x-ee-timestamp type-timestamp Specifies asset type and timestamp of the provided image

Type: video, preview, thumb, event
x-ee-prev type-timestamp
(or 'unknown')
Specifies asset type of the previous image matching the class filter or 'unknown' if the previous image was too complex to figure out
x-ee-next type-timestamp
(or 'unknown')
Specifies asset type of the following image matching the class filter or 'unknown' if the following image was too complex to figure out
content-type 'image/jpeg' Specifies the content type
location '/asset/asset/image.jpeg?timestamp=20180917213405.700&id=xxxxxxxx&asset_class=thumb' Identifies actual asset time of the image in response

Request

curl -X GET https://[active_brand_subdomain].eagleeyenetworks.com/asset/prev/image.jpeg -d "id=[CAMERA_ID]" -d "timestamp=[TIMESTAMP]" -d "asset_class=[ASSET_CLASS]" -H "Authentication: [API_KEY]" --cookie "auth_key=[AUTH_KEY]" -G -v

For information on active_brand_subdomain click here.

Provide the ‘-O’ option at the end of the request for file output to the current directory

Provide the ‘-o “/<file_path/<filename>.<extension>”’ option to specify output filename, path and extension

HTTP Request

GET https://[active_brand_subdomain].eagleeyenetworks.com/asset/asset/image.jpeg
Get the image at the specified timestamp

GET https://[active_brand_subdomain].eagleeyenetworks.com/asset/prev/image.jpeg
Get the first image before the specified timestamp

GET https://[active_brand_subdomain].eagleeyenetworks.com/asset/next/image.jpeg
Get the first image after the specified timestamp. Used with 'timestamp=now' will wait until the new image comes into existence and return it

GET https://[active_brand_subdomain].eagleeyenetworks.com/asset/after/image.jpeg
Get the first image after the specified timestamp. Used with 'timestamp=now' will return 404 - Image not found

Parameter Data Type Description Is Required
id string Camera ID true
timestamp string Timestamp in EEN format: YYYYMMDDHHMMSS.NNN true
asset_class string, enum Asset Class of the image

enum: all, pre, thumb
true

Response

JPEG<file_content>

HTTP Response

The returned response is binary image data in JPEG format

HTTP Status Codes

HTTP Status Code Description
200 Request succeeded
301 Asset has been moved to a different archiver
400 Unexpected or non-identifiable arguments are supplied
401 Unauthorized due to invalid session cookie
403 Forbidden due to the user missing the necessary privileges
404 Image not found

Get Video

Get a video stream in FLV format based on the specified timestamps. Returns binary video data or video id.

Request (flv)

curl -X GET https://[active_brand_subdomain].eagleeyenetworks.com/asset/play/video.flv -d "id=[CAMERA_ID]" -d "start_timestamp=[START_TIMESTAMP]" -d "end_timestamp=[END_TIMESTAMP]" -H "Authentication: [API_KEY]" --cookie "auth_key=[AUTH_KEY]" -G -v

For information on active_brand_subdomain click here.

Request (mp4)

curl -X GET https://[active_brand_subdomain].eagleeyenetworks.com/asset/play/video.mp4 -d "id=[CAMERA_ID]" -d "start_timestamp=[START_TIMESTAMP]" -d "end_timestamp=[END_TIMESTAMP]" -H "Authentication: [API_KEY]" --cookie "auth_key=[AUTH_KEY]" -G -v

For information on active_brand_subdomain click here.

Provide the ‘-O’ option at the end of the request for file output to the current directory (timestamps must coincide with existing video)

Provide the ‘-o “/<file_path/<filename>.<extension>”’ option to specify output filename, path and extension (timestamps must coincide with existing video)

HTTP Request

GET https://[active_brand_subdomain].eagleeyenetworks.com/asset/play/video.flv
Get video in the .flv format

GET https://[active_brand_subdomain].eagleeyenetworks.com/asset/play/video.mp4
Get video in the .mp4 format

Parameter Data Type Description Is Required
id string Camera ID true
start_timestamp string Start timestamp in EEN format: YYYYMMDDHHMMSS.NNN true
end_timestamp string End timestamp in EEN format: YYYYMMDDHHMMSS.NNN true

Response (flv)

FLV<file_content>

Response (mp4)

MP4<file_content>

Json Response (either)

{
    "id": "79a8cbc0-7e2e-11e9-8523-0a580af402b2"
}

HTTP Response

The returned response can be binary video data in FLV or MP4 format(depending on request) with status code 200.

Alternatively, if you request a MP4 and it is not able to be transcoded immediately it will return a video id as JSON data with a status code of 201. You can safely request the same video again. if video is not immediately available, video id as JSON data with status code 202. This will continue until the video has been transcoded. The next request for that video will result in a status code of 200 and the HTTP response will include the MP4 as binary data.

HTTP Status Codes

HTTP Status Code Description
200 Request succeeded
201 Created, video download job has been created
202 Pending, video download job is in progress
301 Asset has been moved to a different archiver
400 Unexpected or non-identifiable arguments are supplied
401 Unauthorized due to invalid session cookie
403 Forbidden due to the user missing the necessary privileges
404 Camera not provisioned
404 Camera get error
410 Video is out of retention
502 Bad Gateway. We were unable to return the requested data. Please try again.
503 Internal Camera Tag Maps Error. Please contact our support department.
504 Gateway Timeout. We were unable to return the requested data inside our time limit. Please try again.

Get Live Stream (RTSP)

This API will return live stream in RTSP format. Get a live stream video in RTSP format first needs to retrieve streams URL. To do that follow steps as below:

HTTP Request

Parameter Data Type Description Is Required
camera_id string Camera id true
auth_key string User authentication key from login.eagleeyenetworks.com true

Response ( Stream URLs)

{
    "status_code": 200,
    "message": "OK",
    "data": {
        "rtsp_over_http": "http://[active_brand_subdomain].eagleeyenetworks.com:31180/api/v2/media/streams/[Session ID that generated by server]/rtsp",
        "rtsp": "rtsp://[active_brand_subdomain].eagleeyenetworks.com:554/api/v2/media/streams/[Session ID that generated by server]/rtsp",
        "rtsps": "rtsps://[active_brand_subdomain].eagleeyenetworks.com:322/api/v2/media/streams/[Session ID that generated by server]/rtsp"
    }
}

HTTP Status Codes

HTTP Status Code Description
200 Request succeeded
400 Request is not valid
401 Unauthorized due to invalid session cookie
404 Session not found
500 Server internal error

Play streams

These streams are valid for 15 minutes. You can use them to get a live stream on camera in RTSP format. Now you can use a player that support RTSP like ffplay to start live-streaming. For example: ffplay [stream url] if you are going to use rtsp_over_http stream url, first you need do some setting in VLC. Please go to Tools > Preferences > Input/Codecs > Demuxers > RTP/RTSP in VLC and select option Tunnel RTSP and RTP over HTTP and set HTTP tunnel port as 31180. Now use RTSP stream url one to start live-streaming in VLC. In this case VLC will create an HTTP tunnel to send RTSP commands.

Prefetch Video

This API call will ensure the video is in the cloud. If the video is not in the cloud it will do a background upload request to the bridge to acquire the video into the cloud. A webhook provided with the call will be triggered when the upload is successful or an error has occurred. The webhook will be triggered as a POST with Json-formatted data.

In the event the video was successfully retrieve by the cloud, the success_hook will be called. If there was a failure, the optional failure_hook will be called. The request will try to retrieve the video for 24 hours before giving up and calling failure_hook.

Request

curl -X GET https://[active_brand_subdomain].eagleeyenetworks.com/asset/cloud/video.flv -d "id=[CAMERA_ID]" -d "start_timestamp=[START_TIMESTAMP]" -d "end_timestamp=[END_TIMESTAMP]" -d "success_hook=[WEBHOOK_URL]" -d "failure_hook=[WEBHOOK_URL]" -H "Authentication: [API_KEY]" --cookie "auth_key=[AUTH_KEY]" -G

For information on active_brand_subdomain click here.

HTTP Request

GET https://[active_brand_subdomain].eagleeyenetworks.com/asset/cloud/video.flv

Parameter Data Type Description Is Required
id string Camera ID true
start_timestamp string Start timestamp in EEN format: YYYYMMDDHHMMSS.NNN true
end_timestamp string End timestamp in EEN format: YYYYMMDDHHMMSS.NNN true
success_hook string The webhook url (must be urlencoded) to trigger if reqeust was successful true
failure_hook string The webhook url (must be urlencoded) to trigger if request failed false
webhook_url string Depricated, please use success_hook instead false

Webhook Json POST Response

{
    "data": [
    {
      "uuid": "<UUID>",
      "ui_message": "Notifying webhooks.",
      "arguments": {
        "end_timestamp": "<EETIMESTAMP>",
        "failure_hook": "<URL>",
        "id": "<ID>",
        "start_timestamp": "<EETIMESTAMP>",
        "success_hook": "<URL>"
      }
    }
  ]

}

Status Codes

HTTP Status Code Description
201 Request has been created and webhook will be triggered upon completion or error
400 Unexpected or non-identifiable arguments are supplied
401 Unauthorized due to invalid session cookie
403 Forbidden due to the user missing the necessary privileges

Get List of Images

Get a list of objects, where each object contains the type of event delivering the image and timestamp

Request

curl -X GET https://[active_brand_subdomain].eagleeyenetworks.com/asset/list/image -d "id=[CAMERA_ID]" -d "start_timestamp=[START_TIMESTAMP]" -d "end_timestamp=[END_TIMESTAMP]" -d "asset_class=[ASSET_CLASS]" -H "Authentication: [API_KEY]" --cookie "auth_key=[AUTH_KEY]" -G

For information on active_brand_subdomain click here.

HTTP Request

GET https://[active_brand_subdomain].eagleeyenetworks.com/asset/list/image

Parameter Data Type Description Is Required
id string Camera ID true
start_timestamp string Start timestamp in EEN format: YYYYMMDDHHMMSS.NNN true
end_timestamp string End timestamp in EEN format: YYYYMMDDHHMMSS.NNN true
asset_class string, enum Asset Class of the image

enum: all, pre, thumb
true
count int Used instead or with an 'end_timestamp' argument. If used with an 'end_timestamp' argument, the count is a limit on the number of entries to return, starting at the starting timestamp. If used without the 'end_timestamp' argument, returns N entries. Support negative value, which returns N entries before, sorted in reverse order - example -5 return 5 events previous to the specified time

Json Response

[
    {
        "t":"PRFR",
        "s":"20181001000000.045"
    },
    {
        "t":"PRFR",
        "s":"20181001000001.045"
    },
    {
        "t":"PRFR",
        "s":"20181001000002.064"
    },
    {
        "t":"PRFR",
        "s":"20181001000003.064"
    },
    {
        "t":"PRFR",
        "s":"20181001000004.064"
    },
    {...}
]

HTTP Response (Json Attributes)

Parameter Data Type Description
t string Type of the requested event denoted by the object’s Four CC
s string Timestamp of the image in EEN format: YYYYMMDDHHMMSS.NNN

HTTP Status Codes

HTTP Status Code Description
200 Request succeeded
301 Asset has been moved to a different archiver
400 Unexpected or non-identifiable arguments are supplied
401 Unauthorized due to invalid session cookie
403 Forbidden due to the user missing the necessary privileges

Get List of Videos

Get a list of objects, where each object contains the ID, start and end timestamp of a single video clip

If the option 'options=coalesce' has been added, the videos with overlapping start and end timestamps with the previous or next video will be merged into one single video (one single object)

Request

curl -X GET https://[active_brand_subdomain].eagleeyenetworks.com/asset/list/video -d "id=[CAMERA_ID]" -d "start_timestamp=[START_TIMESTAMP]" -d "end_timestamp=[END_TIMESTAMP]" -d "options=coalesce" -H "Authentication: [API_KEY]" --cookie "auth_key=[AUTH_KEY]" -G

For information on active_brand_subdomain click here.

HTTP Request

GET https://[active_brand_subdomain].eagleeyenetworks.com/asset/list/video

Parameter Data Type Description Is Required
id string Camera ID true
start_timestamp string Start timestamp in EEN format: YYYYMMDDHHMMSS.NNN true
end_timestamp string End timestamp in EEN format: YYYYMMDDHHMMSS.NNN
count int Used instead of or with an 'end_timestamp' argument. If used with an 'end_timestamp' argument, the count is a limit on the number of entries to return, starting at the starting timestamp. If used without the 'end_timestamp' argument, returns N entries. Supports negative values, which return N entries before sorted in reverse order (i.e. '-5' will return 5 events prior to the specified time)
options string, enum Additional modifier options

enum: coalesce (coalesces spans together if the start or end timestamp of either object overlaps with another, otherwise returns the same output)

Json Response

[
    {
        "s":"20181001000016.768",
        "e":"20181001000100.758",
        "id":4177006339
    },
    {
        "s":"20181001000220.825",
        "e":"20181001000242.774",
        "id":4177006850
    },
    {
        "s":"20181001000256.811",
        "e":"20181001000320.869",
        "id":4177006866
    },
    {
        "s":"20181001000354.761",
        "e":"20181001000422.812",
        "id":4177006912
    },
    {
        "s":"20181001000526.821",
        "e":"20181001000632.829",
        "id":4177007014
    },
    {...}
]

HTTP Response (Json Attributes)

Parameter Data Type Description
s string Start timestamp of the image in EEN format: YYYYMMDDHHMMSS.NNN
e string End timestamp of the image in EEN format: YYYYMMDDHHMMSS.NNN
id int Unique identifier of the video

HTTP Status Codes

HTTP Status Code Description
200 Request succeeded
301 Asset has been moved to a different archiver
400 Unexpected or non-identifiable arguments are supplied
401 Unauthorized due to invalid session cookie
403 Forbidden due to the user missing the necessary privileges

Get Snapshot of recording

Get a full resolution jpeg image at the specified timestamp, from a recording. Returns binary image data at the timestamp either equal to, or the closest point before, the requested timestamp. The closest timestamp is a function of the configured GOP for the camera and the frame rate. The resolution of the image returned is the full resolution of camera.

Snapshots are only available where there is video recorded from the camera. Get List of Videos can be used to identify when video has be recorded.

Request (jpeg)

curl -X GET https://[active_brand_subdomain].eagleeyenetworks.com/api/v2/media/{camera_id}/Snapshot?timestamp={timestamp}
 --cookie "auth_key=[AUTH_KEY]"

For information on active_brand_subdomain click here.

HTTP Request

GET https://[active_brand_subdomain].eagleeyenetworks.com/api/v2/media/{camera_id}/Snapshot?timestamp={timestamp}
Get the image at, or closest image before, the specified timestamp.

Parameter Data Type Description Is Required
camera_id string Camera ID true
timestamp string Image timestamp in EEN format: YYYYMMDDHHMMSS.NNN true

Response (jpeg)

JPEG<file_content>

HTTP Response

The returned response can be binary data in JPEG format with status code 200, or a json error message.

Json Error Response

{
    "status_code": "<int>",
    "message": "<string>",
    "reason": "<string>",
    "data": null,
}

HTTP Status Codes

HTTP Status Code Description
200 Request succeeded
400 Unexpected or non-identifiable arguments are supplied
401 Unauthorized due to invalid session cookie
403 Forbidden due to the user missing the necessary privileges
404 Image not found
405 Camera not provisioned
410 Video is out of retention
502 Bad Gateway. We were unable to return the requested data. Please try again.
503 Internal Camera Tag Maps Error. Please contact our support department.
504 Gateway Timeout. We were unable to return the requested data inside our time limit. Please try again.

Metric

Overview

This service defines Metrics that can be queried from the system

Bridge Bandwidth

Used to query the Bridge Bandwidth usage for a particular device

Request

curl -X GET https://[active_brand_subdomain].eagleeyenetworks.com/g/metric/bridgebandwidth -d "id=[BRIDGE_ID]" -H "Authentication: [API_KEY]" --cookie "auth_key=[AUTH_KEY]" -G

For information on active_brand_subdomain click here.

HTTP Request

GET https://[active_brand_subdomain].eagleeyenetworks.com/g/metric/bridgebandwidth

Parameter Data Type Description Is Required
id string Bridge ID true
start_timestamp string Start timestamp of query in EEN format: YYYYMMDDHHMMSS.NNN (defaults to 7 days ago)
end_timestamp string End timestamp of query in EEN format: YYYYMMDDHHMMSS.NNN (defaults to now)
group_by string, enum Hour or day indicating how the results should be grouped

enum: day, hour, minute

Json Response

{
    "core": [
        [
            "20181002170000.000",
            711610368,
            673860608,
            21533380,
            10299,
            10064282,
            9903
        ],
        [
            "20181002180000.000",
            711610368,
            673802922.666667,
            139693604,
            16579176,
            30849223,
            70446106
        ],
        [
            "20181009170000.000",
            711610368,
            674052608,
            20663486,
            8637204,
            18879693,
            19383808
        ],
        [...],
        [...],
        [...]
    ],
    "bandwidth": [
        [
            "20181002180000.000",
            253117.370892
        ],
        [
            "20181002220000.000",
            240255.523535
        ],
        [
            "20181009150000.000",
            232692.093023
        ],
        [...],
        [...],
        [...]
    ],
    "storage": [
        [
            "20181002170000.000",
            21523477
        ],
        [
            "20181002180000.000",
            69247498
        ],
        [
            "20181009170000.000",
            1279678
        ],
        [...],
        [...],
        [...]
    ]
}

HTTP Response (Json Attributes)

Parameter Data Type Description
core array[obj] Array of core metrics
bandwith array[obj] Array of bandwidth metrics
storage array[obj] Array of storage metrics

Bridge - core

Index Data Type Description
0 string EEN Timestamp: YYYYMMDDHHMMSS.NNN
1 float Average kilobytes on disk
2 float Average days on disk
3 float Bytes stored
4 float Bytes shaped
5 float Bytes streamed
6 float Bytes freed

Bridge - bandwidth

Index Data Type Description
0 string EEN Timestamp: YYYYMMDDHHMMSS.NNN
1 float Bytes per second

Bridge - storage

Index Data Type Description
0 string EEN Timestamp: YYYYMMDDHHMMSS.NNN
1 float Bytes difference

HTTP Status Codes

HTTP Status Code Description
200 Request succeeded
400 Unexpected or non-identifiable arguments are supplied
401 Unauthorized due to invalid session cookie
403 Forbidden due to the user missing the necessary privileges
404 Metrics not found

Camera Bandwidth

Used to query the Camera Bandwidth usage for a particular device

Request

curl -X GET https://[active_brand_subdomain].eagleeyenetworks.com/g/metric/camerabandwidth -d "id=[CAMERA_ID]" -H "Authentication: [API_KEY]" --cookie "auth_key=[AUTH_KEY]" -G

For information on active_brand_subdomain click here.

HTTP Request

GET https://[active_brand_subdomain].eagleeyenetworks.com/g/metric/camerabandwidth

Parameter Data Type Description Is Required
id string Camera ID true
start_timestamp string Start timestamp of query in EEN format: YYYYMMDDHHMMSS.NNN (defaults to 7 days ago)
end_timestamp string End timestamp of query in EEN format: YYYYMMDDHHMMSS.NNN (defaults to now)
group_by string, enum Hour or day indicating how the results should be grouped

enum: day, hour, minute
motion_interval int Motion interval used for motion activity metric in milliseconds (defaults to 15000)
metrics string, enum String delimited list used to filter which metrics get returned. Setting this parameter to 'core,motion' will return data only for core and motion

enum: core, packets, motion

Json Response

{
    "core": [
        [
            "20181002190000.000",
            0,
            0,
            215910545,
            76733036,
            32049659,
            52716510
        ],
        [
            "20181002200000.000",
            0,
            0,
            252051927,
            164214711,
            36128066,
            223484133
        ],
        [
            "20181009190000.000",
            0,
            0,
            41425890,
            10373660,
            5029677,
            78599812
        ],
        [...],
        [...],
        [...]
    ],
    "packets": [
        [
            "20181002190000.000",
            0.00183
        ],
        [
            "20181002200000.000",
            0.001844
        ],
        [
            "20181009190000.000",
            0
        ],
        [...],
        [...],
        [...]
    ],
    "motion": []
}

HTTP Response (Json Attributes)

Parameter Data Type Description
core array[obj] Array of core metrics
packets array[obj] Array of packet metrics
motion array[obj] Array of motion metrics

Camera - core

Index Data Type Description
0 string EEN Timestamp: YYYYMMDDHHMMSS.NNN
1 float Average kilobytes on disk
2 float Average days on disk
3 float Bytes stored
4 float Bytes shaped
5 float Bytes streamed
6 float Bytes freed

Camera - packets

Index Data Type Description
0 string EEN Timestamp: YYYYMMDDHHMMSS.NNN
1 float Packet loss percentage (decimal)

Camera - motion

Index Data Type Description
0 string EEN Timestamp: YYYYMMDDHHMMSS.NNN
1 int Motion activity value

HTTP Status Codes

HTTP Status Code Description
200 Request succeeded
400 Unexpected or non-identifiable arguments are supplied
401 Unauthorized due to invalid session cookie
403 Forbidden due to the user missing the necessary privileges
404 Metrics not found

Poll

Overview

The Poll service provides a mechanism for an application to receive Notifications of Events or spans from Eagle Eye Networks. These entities are grouped by resource

Resources

Poll is a stateful request for updates any time a matching event occurs within the service. The initial Poll request is a POST (Default GET with WebSocket) with a Json-formatted body indicating the resources to track. Resources that are video, pre and thumbnail automatically register the API caller to their respective events. However, resource type 'event' requires the API caller to tell the API what events to listen for

Each object consists of an ID element and a list of resource types to be monitored. The POST transaction receives and immediately responds with a Json-formatted body indicating the current timestamp for all requested resources. The response also includes a cookie, which can be used to track changes to the indicated resources via GET transaction

Event Sources

Camera and device events include: on, off, online, offline, currently recording, currently sensing motion, start/stop schedule event, being controlled with PTZ, etc.

Event Objects

Event Objects

{
    "status_code": 200,
    "message": "OK",
    "data": {
        "100e1e23": {
            "event": {
                "PRSS": {
                    "status": 31,
                    "format": 1,
                    "frame_delay": 1000,
                    "timestamp": "20180425100000.000",
                    "cameraid": "10087ff5",
                    "flags": 0,
                    "duration": 3600000,
                    "previewid": 1493114470
                }
            }
        },
        "<object_id>": {...},
        "<object_id>": {...},
        "<object_id>": {...}
    }
}

Note: Event object descriptions marked with ‘◦’ can be expanded for additional information on the event

Four CC Description Returned parameters
VRES Video record start event cameraid, videoid, format, status
VREE Video record end event cameraid, videoid, videosize, format, status
VRKF Video record key frame event cameraid, videoid, file_offset, format
EAES
Always record video start event ◦


Background “always” record video event has started

cameraid, videoid, eventid
EAEE
Always record video end event ◦


Background “always” record video event has ended

cameraid, eventid
AEDO Video download event cameraid, status, source_userid, source_accountid, resource_type, deviceid, endtime
EVVS
Video swap event ◦


The event spans across two different video IDs: 'eventid' and 'videoid' (new swapped-in ID)

cameraid, videoid, eventid
PRTH Thumbnail event cameraid, previewid, eventid, file_offset, frame_size
PRFR
Preview event ◦


indicates a preview frame has been recorded

cameraid, previewid, file_offset, frame_size
PRFB Preview backing event cameraid, previewid, file_offset, frame_size
EMES Motion start event cameraid, videoid, eventid
EMEE Motion end event cameraid, eventid
EMEU
Motion update event ◦


Heartbeat for a motion event
(10 sec interval)

cameraid, videoid, eventid
MRBX
Motion box event ◦


Motion has occurred in the indicated region (coordinates are from top right corner in fraction of 0xffff)

cameraid
MRSZ
Motion size reports event ◦


Indicates the amount of motion on screen and for each active ROI (in ratio over 0xffff as percentage of screen)

Flag is '0x1' - motion greater than defined threshold (region is in motion)

cameraid, flags, motion
ALMS
Motion alert start event ◦


Motion event has occurred (related to the indicated alert)

cameraid, eventid, alertid, alertmotionid
ALME
Motion alert end event ◦


Motion event has ended (related to the indicated alert)

cameraid, alertmotionid
ROMS
ROI motion start event ◦


Region of interest motion start event

cameraid, roiid, videoid, eventid
ROME
ROI motion end event ◦


Region of interest motion end event

cameraid, eventid
ROMU
ROI motion update event ◦


Heartbeat for a ROI motion event

cameraid, roiid, videoid, eventid
ALRS
ROI alert start event ◦


ROI motion event linked to alert has started

cameraid, eventid, alertid, alertroiid
ALRE
ROI alert end event ◦


ROI motion event linked to alert has ended

cameraid, alertroiid
AEDA Device alert event cameraid, status, deviceid, source_userid, source_accountid, values
AEDN Device alert notification event cameraid, status, target_deviceid, triggerid, starttime, endtime, target_userid, json
AEDC
Create device event ◦


'cameraid' understood as ESN. It can represent an account, bridge, camera or user

cameraid, status, deviceid, source_userid, source_accountid
AEDD
Delete device event ◦


'cameraid' understood as ESN. It can represent an account, bridge, camera or user

cameraid, status, deviceid, source_userid, source_accountid
AEDH
Device change event ◦


'cameraid' understood as ESN. It can represent an account, bridge, camera or user

cameraid, status, deviceid, source_userid, source_accountid, values
ESES
Stream start event ◦


User-requested stream event has started

cameraid, videoid, eventid
ESEE
Stream end event ◦


User-requested stream event has ended

cameraid, eventid
SBWS
Stream bw sample event ◦


If enabled, the last N seconds of bandwidth from the camera

cameraid, bw10, bw60, bw300, streamtype
SBW0
Stream bw sample 0 event ◦


Samples of camera bandwidth for stream 0

'PREV' - base bandwidth preview channel+thumbs (all frames at selected rate/quality, no compression)

cameraid, bw10, bw60, bw300
SBW1
Stream bw sample 1 event ◦


Samples of camera bandwidth for stream 1

'PSND' - bandwidth of what should be sent
'VIDC' - video captured bandwidth (video and audio together)

cameraid, bw10, bw60, bw300
SBW2
Stream bw sample 2 event ◦


Samples of camera bandwidth for stream 2

'VIDE' - base bandwidth of the video stream (not motion filtered)

cameraid, bw10, bw60, bw300
SBW3
Stream bw sample 3 event ◦


Samples of camera bandwidth for stream 3

'AUDI' - base bandwidth of the audio stream (not motion filtered)

cameraid, bw10, bw60, bw300
SBW4
Stream bw sample 4 event ◦


Samples of camera bandwidth for stream 4

'VIDC' - video captured bandwidth (video and audio together)

cameraid, bw10, bw60, bw300
SSTE Streamer status event cameraid, stype, event, seconds
CSAU
Camera stream attach event ◦


Camera has started streaming data to bridge ('streamid' is common with CSDU and CSSU)

cameraid, streamid, stream_format, stream_type
CSDU
Camera stream detach event ◦


Camera has stopped streaming data to bridge

cameraid, streamid, stream_format, stream_type
CSSU
Camera stream stats event ◦


Camera is sending stats for the stream between camera and bridge (Heartbeat for CSAU/CSDU)

cameraid, streamtype, streamformat, total_expected, total_rcvd, delta_expected, delta_rcvd, interval, streamid
CECF
Camera found event ◦


Camera has been detected by the bridge

cameraid, uuid, svc_state
CECL
Camera lost event ◦


Camera has stopped responding correctly after being found by the bridge

cameraid
RCON Camera online event cameraid, registerid
RCOF Camera offline event cameraid, registerid
CONN Camera on event cameraid
COFF Camera off event cameraid
RCHB
Camera heartbeat event ◦


Heartbeat indicating a camera is still registered

cameraid, registerid
ABRT
Camera abort event ◦


Bridge process restarted (abort all camera streams)

cameraid, aborted
COBC
Camera bounce event ◦


Camera has camera has been forced to restart

cameraid
CZTC
Camera setting change event ◦


Indicated camera setting has changed to the new value (data is zlib compressed)

cameraid, userid, flags, command, change
CZTS
Camera settings change event ◦


Camera settings have been changed (data is zlib compressed)

cameraid, sequence, settings
CZDC
Camera settings change event ◦


Camera settings have changed from old to new (data is zlib compressed)

cameraid, userid, flags, command, change
CPRG
Camera purge event ◦


Camera has purged data due to storage limitations

cameraid, day, bytes
CDLT
Camera data lost event ◦


Camera has deleted data within retention interval due to storage limitations

cameraid, day, bytes
CBWS
Camera bw sample event ◦


Data amount a camera has captured/sent to the cloud

cameraid, kbytesondisk, bytesstored, bytesshaped, bytesstreamed, bytesfreed, daysondisk
BBWS
Bridge bw sample event ◦


Stats regarding the amount of data all devices on this bridge have captured and sent to the cloud

cameraid, kbytessize, kbytesavail, bytesstored, bytesshaped, bytesstreamed, bytesfreed
BBTW
Bridge bw tagflow event ◦


Stats regarding bandwidth between bridge and cloud

cameraid, ip, bytes_sent, bytes_rcvd, active_write_us, paused_write_us
BUBW
Upload bw sample event ◦


Metric of data being periodically sent to the cloud to test bandwidth ('bytessent' in N millisec)

cameraid, bytessent, millisecs
BBOO Bridge boot event cameraid, booted
NOOP No operation event cameraid
AEAC Create account event cameraid, status, new_accountid, source_userid, source_accountid
AEAD Delete account event cameraid, status, source_userid, source_accountid
AEAH Account change event cameraid, status, source_userid, source_accountid, values
AELI Account log in event cameraid, status, source_userid
AELO Account log out event cameraid, status, source_userid
AEUC Create user event cameraid, status, target_userid, source_userid, source_accountid
AEUD Delete user event cameraid, status, target_userid, source_userid, source_accountid
AECC User setting change event cameraid, status, target_userid, source_userid, source_accountid, values
AEEC Create layout event cameraid, status, source_userid, source_accountid, layoutid
AEED Delete layout event cameraid, status, source_userid, source_accountid, layoutid
AEEL Layout change event cameraid, status, source_userid, source_accountid, layoutid, values
CCCF
Curl fail event ◦


Failed communication between bridge and camera with indicated cURL error code

cameraid, errcode
ANNT Annotation event cameraid, ns, flags, uuid, seq, op, mpack
NVPT Name value table event cameraid, ns, key_offset, op, mpack
ITFU Interface update event cameraid, ip, flags, valid, mpack
SCRN Screen connect event cameraid, ns, uuid, mpack
AELD Live display event cameraid, status, source_userid, deviceid
CCLC
Cloud connect event ◦


Bridge connected to the cloud over indicated connection

cameraid, src_ip, dest_ip, src_port, dest_port, ctype
CCLD
Cloud disconnect event ◦


Bridge lost connection to the cloud

cameraid, src_ip, dest_ip, src_port, dest_port, ctype, reason, seconds
ENES App-specific event start cameraid, videoid, eventid, ns
ENEE App-specific event end cameraid, eventid, ns
ENEU
App-specific update event ◦


Heartbeat for an application event
(10 sec interval)

cameraid, videoid, eventid, ns
AEPT
PTZ event ◦


Pan tilt zoom event

cameraid, status, source_userid, deviceid
EPES
PTZ camera event start ◦


PTZ camera move/change event has started

cameraid, videoid, eventid
EPEE
PTZ camera event end ◦


PTZ camera move/change event has ended

cameraid, eventid
PTZS
PTZ status event ◦


Snapshot of the PTZ state as point in time (For tracking PTZ during movement)

cameraid, userid, flags, reason, pan_status, zoom_status, x, y, z
PRSS Preview stream start event
(INTERNAL USE ONLY)
cameraid, previewid, frame_delay, duration, flags, format, status
PRSE Preview stream end event
(INTERNAL USE ONLY)
cameraid, previewid, status
PRFU Preview upload event
(INTERNAL USE ONLY)
cameraid, file_offset, frame_size
AABT Camera archiver abort event
(INTERNAL USE ONLY)
cameraid, aborted
ECON Camera online event
(DEPRECATED)
cameraid
ECOF Camera offline event
(DEPRECATED)
cameraid
CSTS Camera settings change event
(DEPRECATED)
cameraid, sequence, settings
CSTC Camera settings change event
(DEPRECATED)
cameraid, sequence, settings
CSAT Camera stream attach event
(DEPRECATED)
cameraid, stream_format, stream_type
CSDT Camera stream detach event
(DEPRECATED)
cameraid, stream_format, stream_type
CSST Camera stream stats event
(DEPRECATED)
cameraid, streamtype, total_expected, total_rcvd, delta_expected, delta_rcvd, interval
PRSU Preview stream update event
(DEPRECATED)
cameraid, previewid, status
VRSU Video update event
(DEPRECATED)
cameraid, videoid, format, status

Status Bitmask

This status Bitmask is used to determine what the high-level/overall device status is

HEX Value Status
0x100000 Camera registered (internet online)
0x020000 Camera on (user setting)
0x080000 Camera recording (video stream is being recorded)
0x000010 Camera sending previews
0x040000 Camera streaming (camera is talking to bridge)
0x000020 Camera located (bridge has found the camera)
0x000080 Camera configuration in process (bridge configuring camera)
0x000100 Camera needs ONVIF password
0x000200 Camera available but not yet attached
0x000040 Camera not supported
0x000800 Camera error
0x010000 Invalid state (unknown state)
0x000400 Internal status
0x001000 Internal status
0x002000 Internal status
0x004000 Reserved
0x008000 Reserved
0x000001 Camera online
(DEPRECATED)
0x000004 Camera on (user setting)
(DEPRECATED)
0x000008 Camera recording
(DEPRECATED)
0x000002 Stream attached (camera communicating with bridge)
(DEPRECATED)

The extended status bits are filtered and processed to provide more stable and faster event updates than legacy status bits. As a result, they may reflect different status in some transition cases and extended bits should be considered authoritative. Lower order 32 bits are per legacy status definition above.

NOTE: in the legacy status, if “camera off” (camera on false), the registered bit was suppressed. In the extended bits, the registered bit always reflects the current bridge to cloud connection status. NOTE: the extended status bits have a much shorter status filter, so will change to not registered/not streaming significantly faster than legacy status bits

Extended status bits (upper 32 bits of status64 et. al.)

HEX Value Status
0x00000001 Camera Valid
0x00000002 Camera on (user setting)
0x00000004 Camera registered (internet online)
0x00000008 Camera pending/error (configuration issue prevents streaming)
0x00000010 Camera streaming (camera is talking to bridge)

Overall status

IF 0 THEN “No Change”
ELSE IF “Camera On” (bit 17)==0 THEN “Off” (orange forbidden icon)
ELSE IF “Registered” (bit 20)==0 THEN “Internet Offline” (red exclamation icon)
ELSE IF “Streaming” (bit 18)==1 THEN “Online” (green check icon)
ELSE IF “Password” (bit 8)==1 THEN “Password Needed” (effectively “Offline”) (red padlock icon)
ELSE “Offline” (red X icon)

Recording status

IF “Recording” (bit 19) THEN Recording (green circle icon) IF “Invalid” (bit 16)==1 THEN no status change (use whatever status bits were set previously)

Initialize Poll

Response includes 2 session cookies and a returned token (which are identical). Only one of the session cookies has to be provided to the GET /poll request

Request

curl -X POST https://[active_brand_subdomain].eagleeyenetworks.com/poll -d '{"cameras":{"[ID]":{"resource":["event","pre"],"event":["VREE","PRFR","CPRG"]}}}' -H 'Content-Type: application/json' -H "Authentication: [API_KEY]" --cookie "auth_key=[AUTH_KEY]" -v

For information on active_brand_subdomain click here.

Request Json

{
    "cameras": {
        "100e1e23": {
            "resource": [
                "pre",
                "thumb",
                "status",
                "event"
            ],
            "event": [
              "MRBX"
            ]
        },
        "10097d15": {
            "resource": [
                "pre",
                "thumb",
                "status",
                "event"
            ],
            "event": [
              "MRBX"
            ]
        },
        "<object_id>": {...},
        "<object_id>": {...},
        "<object_id>": {...}
    }
}

HTTP Request

POST https://[active_brand_subdomain].eagleeyenetworks.com/poll

Resource Types

Each resource type has a specific object format in response:

Type Response Description
pre prets Timestamp of latest preview image
thumb thumbts Timestamp of latest thumbnail image
video [startts, endts] List of start and end timestamps for a video segment. Updates at start and per key frame received until end
status bitmask A numerical bitmask defining the status. Bit position defines status
status64 bitmask A numerical bitmask defining the status. Bit position defines status
status_hex string A string hexadecimal version of status (ws only)
status_hex64 string A string hexadecimal version of status (ws only)
event object Events are a key value pair, where the key is the Four CC of the event and event structure is the actual meta data for that specific event

Due to the progressing expansion of the event polling mechanic, the parameter 'cameras' has undergone numerous changes and has been kept as such for backwards compatibility. It should be understood as device/account

Parameter Data Type Description
cameras json Json attribute keyed with the <object_id> (can contain multiple Json objects, even of different types)

Object Structure

Parameter Data Type Description
<object_id> json Json attribute keyed with 'resource' and/or 'event'

The Json object allows to narrow down the polling scope by specifying which type of entity to poll for. The types include:

Parameter Data Type Description Is Required
resource array[string] Array of one or more string containing which type of data should be retrieved from the provided device/account

enum: pre, thumb, video, status, event
true
event array[string] Array of one or more string containing the event Four CC (if resource contains 'event', the array of events specified here will narrow down the scope of retrieved events)

Json Response

{
    "cameras": {
        "100e1e23": {
            "status": 1441847
        },
        "10097d15": {
            "status": 1441847
        },
        "<object_id>": {...},
        "<object_id>": {...},
        "<object_id>": {...}
    },
    "token": "ooe0eoEAMNsF"
}

HTTP Response (Json Attributes)

Parameter Data Type Description
cameras json Json attribute keyed with the <object_id> (can contain multiple Json objects, even of different types)
token string Token to be used for subsequent GET /poll requests

Response Object Structure

Parameter Data Type Description
<object_id> json Json attribute keyed with resource types. Retrieved values are the most recent entities for the specified resource

The amount of keys depends on the sent request inquiry (if the request entailed 'pre' and 'video', then the retrieved data will only cover 'pre' and 'video' information)

If a specified event has not been triggered on the device/account, it will not be listed by the poll service (no error will be reported)

HTTP Status Codes

HTTP Status Code Description
200 Request succeeded
400 Unexpected or non-identifiable arguments are supplied
401 Unauthorized due to invalid session cookie
403 Forbidden due to the user missing the necessary privileges

Polling

Request

curl -X GET https://[active_brand_subdomain].eagleeyenetworks.com/poll -H "Authentication: [API_KEY]" --cookie "auth_key=[AUTH_KEY];ee-poll-ses=[TOKEN]" -G

For information on active_brand_subdomain click here.

HTTP Request

GET https://[active_brand_subdomain].eagleeyenetworks.com/poll

Json Response

{
    "cameras": {
        "100e1e23": {
            "pre": "20181121165011.233",
            "event": {
                "MRBX": {
                    "timestamp": "20181121165011.499",
                    "cameraid": "100c299e",
                    "boxes": [
                        {
                            "x": 24575,
                            "y": 29126,
                            "w": 4095,
                            "h": 5825
                        }
                    ]
                },
                "PRFU": {
                    "timestamp": "20181121165011.233",
                    "cameraid": "100c299e",
                    "file_offset": 26311872,
                    "frame_size": 7838
                },
                "PRFR": {
                    "timestamp": "20181121165011.233",
                    "cameraid": "100c299e",
                    "previewid": 1416585600,
                    "file_offset": 26311872,
                    "frame_size": 7830
                }
            }
        },
        "10097d15": {
            "pre": "20181121165011.281",
            "event": {
                "PRFU": {
                    "timestamp": "20181121165011.281",
                    "cameraid": "1002a2a4",
                    "file_offset": 6126297,
                    "frame_size": 4014
                },
                "PRFR": {
                    "timestamp": "20181121165011.281",
                    "cameraid": "1002a2a4",
                    "previewid": 1416585600,
                    "file_offset": 6126297,
                    "frame_size": 4006
                }
            }
        }
    }
}

HTTP Response (Json Attributes)

Parameter Data Type Description
cameras json Json attribute keyed with the <object_id> (can contain multiple Json objects, even of different types)

Response Object Structure

Parameter Data Type Description
<object_id> json Json attribute keyed with resource types. Retrieved values are the most recent entities for the specified resource

The amount of keys depends on the sent POST request (if the request entailed 'pre' and 'video', then the retrieved data will only cover 'pre' and 'video' information)

If a specified event has not been triggered on the device/account, it will not be listed by the poll service (no error will be reported)

The returned values are in accordance with the returned resource types

HTTP Status Codes

HTTP Status Code Description
200 Request succeeded
400 Unexpected or non-identifiable arguments are supplied
401 Unauthorized due to invalid session cookie
403 Forbidden due to the user missing the necessary privileges

WebSocket Polling

WebSockets provide a persistent connection between a client and server. This uplink enables a two-way data stream over which chunked data can be sent and received as messages. This protocol provides a full-duplex communications channel over a single TCP connection, allowing the client to receive event-driven responses without having to poll the server for a reply (effectively decreasing data traffic)

Request Json

{
    "cameras": {
        "100e1e23": {
            "resource": [
                "pre",
                "thumb",
                "status",
                "event"
            ],
            "event": [
              "MRBX"
            ]
        },
        "10097d15": {
            "resource": [
                "pre",
                "thumb",
                "status",
                "event"
            ],
            "event": [
              "MRBX"
            ]
        },
        "<object_id>": {...},
        "<object_id>": {...},
        "<object_id>": {...}
    }
}

Client Handshake Request

GET /api/v2/Device/00001007/Events HTTP/1.1
Upgrade: websocket
Connection: Upgrade
Host: c000.eagleeyenetworks.com
Origin: http://c000.eagleeyenetworks.com
Sec-WebSocket-Key: dGhlIHNhbXBsZSBub25jZQ==
Sec-WebSocket-Version: 13
Cookie: auth_key=[AUTH_KEY]

The WebSocket protocol has two parts:

The handshake process has to be initiated from the client side via a standard HTTP request
(HTTP version must be 1.1 or greater and the method must be GET)

The WebSocket request URL is composed in the following way:
wss:// c000. eagleeyenetworks.com /api/v2 /Device /00001007 /Events
secure
websocket
protocol
branded
subdomain
server API version resource account ID ‘Events’ suffix

WebSocket URLs use the WS scheme or alternatively WSS for secure connections which is the equivalent of HTTPS

Parameter Data Type Description Is Required
A string Used to replace the 'auth_key' cookie false

Server Handshake Response

HTTP/1.1 101 Switching Protocols
Server: openresty
Date: Wed, 08 Mar 2018 14:01:06 GMT
Connection: upgrade
upgrade: websocket
sec-websocket-accept: s3pPLMBiTxaQ9kYGzzhZRbK+xOo=
set-cookie: ee-ws-poll-ses=kjxZXVrDyIkK
x-een-lb-tried-proxies: 209.94.238.21:80

The server reply completes the handshake. A successful server reply is followed by data transfer

HTTP Status Codes

HTTP Status Code Description
101 Switching protocols
400 Header is not understood or has an incorrect value

Data Exchange

The client communicates with the server after a successful handshake by sending an object as Json-formatted string. The message send is being triggered by the client by calling the appropriate WebSocket send function (the method depends on the client environment)

The client has to specify via Json what kind of data it is going to be polling and from which devices (See Initialize Poll, Resource Type, Event Objects)

WebSocket is an event-driven API. When messages are received a message event is delivered to the the onmessage function, where the message is being received and parsed

The connection can be severed at any given time using the close function

WebSocket polling will additionally return message response error codes for each individual encountered problem based on the Errors section

Message HTTP Status Codes

Status Code Description
200 OK
400 Invalid resource
401 Access denied
412 Auth lost

Annotation

Overview

The Annotation service allows to push data (including HTML elements) into the Event stream to add additional information about a camera/video. Annotations are associated with a Device and a Timestamp

Annotation Model

Annotation Model

[
    [
        "3f06b432-41f9-11e7-aaf2-1c1b0daef2f5",
        "20180526095347.742",
        2,
        {
            "data": "{\"info\":\"Annotation1\";}"
            "_hb": [
                [
                    "20180526095350.742",
                    {
                        "field1": "Heartbeat",
                        "field2": "for",
                        "field3": "cafedead"
                    }
                ],
                [...],
                [...]
            ]
        }
    ],
    [
        "595e4b9c-41f9-11e7-aaf2-0d5g1hafj2z6",
        "20180526095435.831",
        11,
        {
            "info": "Annotation by cafedead"
            "_end": "20180526095440.831"
        }
    ],
    [...]
]

Annotation (Attributes)

Array Index Attribute Data Type Description Editable Required
0 uuid string Unique identifier for the annotation assigned to it during creation
1 timestamp string Time of the annotation creation in EEN Timestamp format: YYYYMMDDHHMMSS.NNN
2 ns int Namespace grouping assigned to the annotation (in the EEN structure namespaces can describe a specific category of annotations)

Note: Can only be defined during Create Annotation

3 <data> json Content of the annotation

Data attributes

Parameter Descriptive Name Data Type Description Required
_s Screen json Creates object to be displayed on screen False

Screen attributes

Parameter Descriptive Name Data Type Description Required
b Bounding box array[array[float]] Array contained two arrays. The first array is the coordinates of the top left corner of the bounding box [x1, y1]. The second one holds coordinates of the right bottom corner [x2, y2]. Therefore x1 must be less or equal to x2 and y1 must be less or equal to y2. Values are in range between 0 and 1 and represent % value of the image False
d Display string Display parameter to choose if annotation should be displayed on the history browser timeline. Possible values are “tick”, “span”, or “none”. Default value = “span” False
l Label string Label to be displayed above bounding box False
lt Line thickness string Preferred, not guaranteed, line thickness of bounding box. Possible values are “thin”, “normal” or “thick”. Default value = “thin” False
sc Box Stroke Color string Preferred, not guaranteed, color as a web-safe hexadecimal value. #FFFFFF = white False
t Text string Text to be displayed as provided including newlines, line breaks, etc False
tt Tool Tip string Tooltip is to be displayed when the mouse hovers over pngSpan on timeline False
tw Text line width int Number of characters to display per line of text True, if text is not null
u URL string If supplied, the label will be rendered with the ability to link to the supplied URL False

Get Annotation

Returns an Annotation object by ID/UUID

Request

curl -X GET https://[active_brand_subdomain].eagleeyenetworks.com/annt/annt/get -d "id=[DEVICE_ID]" -d "uuid=[UUID1],[UUID2],[UUID3]" -H "Authentication: [API_KEY]" --cookie "auth_key=[AUTH_KEY]" -G

For information on active_brand_subdomain click here.

HTTP Request

GET https://[active_brand_subdomain].eagleeyenetworks.com/annt/annt/get

Parameter Data Type Description Required
id string Camera ID the annotation is associated with
uuid array[string] Array of comma-separated annotation UUIDs to return

HTTP Status Codes

HTTP Status Code Description
200 Request succeeded
400 Unexpected or non-identifiable arguments are supplied
401 Unauthorized due to invalid session cookie
403 Forbidden due to the user missing the necessary privileges

Create Annotation

Create an Annotation for a device with a specific timestamp and data describing it

Request

curl -X PUT "https://[active_brand_subdomain].eagleeyenetworks.com/annt/set?c=[DEVICE_ID]&ts=[TIMESTAMP]&ns=[NAMESPACE]" -d '{"[KEY_NAME]": "[ANNOTATION_DATA]"}' -H "content-type: application/json" -H "Authentication: [API_KEY]" --cookie "auth_key=[AUTH_KEY]"

For information on active_brand_subdomain click here.

HTTP Request

PUT https://[active_brand_subdomain].eagleeyenetworks.com/annt/set

Parameter Data Type Description Required
c string Camera ID the annotation should be associated with
<data> json Json object representing the data to be used as the annotation content (can include HTML elements)
ts string Timestamp associated with the annotation (If left out the system will automatically provide a timestamp)
ns int The numerical namespace value assigned by Eagle Eye Networks

Json Response

{
    "uuid": "595e4b9c-41f9-11e7-aaf2-0d5g1hafj2z6",
    "cameraid": "1000f60d",
    "ts": "20180526095435.831",
    "ns": 11
}

HTTP Response (Json Attributes)

Parameter Data Type Description
uuid string Unique identifier of the annotation
cameraid string Camera ID the annotation has been associated with
ts string Timestamp associated with the annotation
ns string Namespace associated with the annotation

HTTP Status Codes

HTTP Status Code Description
200 Request succeeded
400 Unexpected or non-identifiable arguments are supplied
401 Unauthorized due to invalid session cookie
403 Forbidden due to the user missing the necessary privileges

Update Annotation

Update an Annotation for a device with a particular timestamp. Simple modifications ('type=mod') require to pass the original 'timestamp' from when the Annotation was created. Zero to N 'heartbeats' ('type=hb') can also be applied to describe changes over time for the Annotation

The Annotation can be ended at any given time by specifying an end event ('type=end'), which closes the Annotation and allows to attach additional information. Each Annotation event is assumed to last for 10 seconds in the absence of a heartbeat extending it (After a heartbeat, it is assumed to last for another 10 seconds)

Request

curl -X POST "https://[active_brand_subdomain].eagleeyenetworks.com/annt/set?u=[UUID]&c=[DEVICE_ID]&ns=[NAMESPACE]&ts=[TIMESTAMP]" -d '{"[KEY_NAME]": "[ANNOTATION_DATA]"}' -H "content-type: application/json" -H "Authentication: [API_KEY]" --cookie "auth_key=[AUTH_KEY]"

For information on active_brand_subdomain click here.

HTTP Request

POST https://[active_brand_subdomain].eagleeyenetworks.com/annt/set

Parameter Data Type Description Required
u string Unique identifier (UUID) of the annotation being updated returned during Create Annotation
c string Camera ID associated with the annotation being updated
ts string Timestamp associated with the annotation when originally created in EEN format: YYYYMMDDHHMMSS.NNN
ns int The numerical namespace value assigned by Eagle Eye Networks (can be omitted for heartbeat events 'type=hb')
<data> json Json object representing the data to be used as the annotation content (can include HTML elements)
type string, enum The type of annotation update to make (defaults to 'mod'):

'mod' - simple modification of the annotation
'hb' - indicates a heartbeat event, adding information on parameters that have changed and extending duration
'end' - indicates the end of the event and updates the annotation if changes have been specified, no 'hb' with a later timestamp will be accepted

enum: mod, hb, end

Json Response

{
    "uuid": "595e4b9c-41f9-11e7-aaf2-0d5g1hafj2z6",
    "cameraid": "1000f60d",
    "ts": "20180526095435.831",
    "ns": 11
}

HTTP Response (Json Attributes)

Parameter Data Type Description
uuid string Unique identifier of the annotation
cameraid string Camera ID the annotation has been updated for
ts string Timestamp associated with the annotation
ns string Namespace associated with the annotation

HTTP Status Codes

HTTP Status Code Description
200 Request succeeded
400 Unexpected or non-identifiable arguments are supplied
401 Unauthorized due to invalid session cookie
403 Forbidden due to the user missing the necessary privileges

Next Annotation

Returns an object populated by Annotation events occurring around the defined timestamp by searching for the next event in the indicated direction (across create, update, hb, end events)

Request

curl -X GET https://[active_brand_subdomain].eagleeyenetworks.com/annt/annt/next -d "id=[DEVICE_ID]" -d "start_timestamp=[START_TIMESTAMP]" -H "Authentication: [API_KEY]" --cookie "auth_key=[AUTH_KEY]" -G

For information on active_brand_subdomain click here.

HTTP Request

GET https://[active_brand_subdomain].eagleeyenetworks.com/annt/annt/next

Parameter Data Type Description Required
id string Camera ID the annotation is associated with
start_timestamp string Timestamp as a point in time to get annotation event(s) after in EEN format: YYYYMMDDHHMMSS.NNN
end_timestamp string Timestamp as optional limiter for the searched annotation event(s) in EEN format: YYYYMMDDHHMMSS.NNN (defaults to now). Matches events with identical start timestamps as the specified 'end_timestamp'
namespace string Namespace(s) as optional comma-separated limiter for the searched annotation event(s). Excludes all except for the specified namespace(s) by excluding results in both categories: 'new' and 'active' (defaults to include all)
uuid string Unique identifier(s) as optional comma-separated limiter for the searched annotation event(s). Includes all except for the specified UUID(s) by excluding results from the 'new' category (defaults to include all)
flat string Flatten the search results to merge heartbeats into the main annotation level and produce one consistent prolonged searchable event. No value is required

Example: 'flat='

Json Response

{
    "ts": "20180526095435.831",
    "new": [
        [
            "595e4b9c-41f9-11e7-aaf2-0d5g1hafj2z6",
            "20180526095435.831",
            11,
            {
                "info": "Annotation by cafedead"
                "_end": "20180526095440.831"
            }
        ],
        [...],
        [...]
    ],
    "active": [
        "595e4b9c-41f9-11e7-aaf2-0d5g1hafj2z6",
        "<uuid>",
        "<uuid>"
    ]
}

HTTP Response (Json Attributes)

Parameter Data Type Description
ts string Closest matching timestamp to the requested (to get annotations after) in EEN format: YYYYMMDDHHMMSS.NNN
new array[array[obj]] Array of arrays with each returned element being an annotation object with Json-formatted data
(See Annotation Model for the returned annotation array structure)
active array[string] Array of all annotation UUIDs active around the specified 'st' (or within the defined time window)

HTTP Status Codes

HTTP Status Code Description
200 Request succeeded
400 Unexpected or non-identifiable arguments are supplied
401 Unauthorized due to invalid session cookie
403 Forbidden due to the user missing the necessary privileges

Previous Annotation

Returns an object populated by Annotation events occurring around the defined timestamp by searching for the previous event in the indicated direction (across create, update, hb, end events)

Request

curl -X GET https://[active_brand_subdomain].eagleeyenetworks.com/annt/annt/prev -d "id=[DEVICE_ID]" -d "end_timestamp=[END_TIMESTAMP]" -H "Authentication: [API_KEY]" --cookie "auth_key=[AUTH_KEY]" -G

For information on active_brand_subdomain click here.

HTTP Request

GET https://[active_brand_subdomain].eagleeyenetworks.com/annt/annt/prev

Parameter Data Type Description Required
id string Camera ID the annotation is associated with
end_timestamp string Timestamp as a point in time to get annotation event(s) before in EEN format: YYYYMMDDHHMMSS.NNN
start_timestamp string Timestamp as optional limiter for the searched annotation event(s) in EEN format: YYYYMMDDHHMMSS.NNN (defaults to maximum retention). Matches events with identical start timestamps as the specified 'start_timestamp'
namespace string Namespace(s) as optional comma-separated limiter for the searched annotation event(s). Excludes all except for the specified namespace(s) by excluding results in both categories: 'new' and 'active' (defaults to include all)
uuid string Unique identifier(s) as optional comma-separated limiter for the searched annotation event(s). Includes all except for the specified UUID(s) by excluding results from the 'new' category (defaults to include all)
flat string Flatten the search results to merge heartbeats into the main annotation level and produce one consistent prolonged searchable event. No value is required

Example: 'flat='

Json Response

{
    "ts": "20180526095435.831",
    "new": [
        [
            "595e4b9c-41f9-11e7-aaf2-0d5g1hafj2z6",
            "20180526095435.831",
            11,
            {
                "info": "Annotation by cafedead"
                "_end": "20180526095440.831"
            }
        ],
        [...],
        [...]
    ],
    "active": [
        "595e4b9c-41f9-11e7-aaf2-0d5g1hafj2z6",
        "<uuid>",
        "<uuid>"
    ]
}

HTTP Response (Json Attributes)

Parameter Data Type Description
ts string Closest matching timestamp to the requested (to get annotations before) in EEN format: YYYYMMDDHHMMSS.NNN
new array[array[obj]] Array of arrays with each returned element being an annotation object with Json-formatted data
(See Annotation Model for the returned annotation array structure)
active array[string] Array of all annotation UUIDs active around the specified 'et' (or within the defined time window)

HTTP Status Codes

HTTP Status Code Description
200 Request succeeded
400 Unexpected or non-identifiable arguments are supplied
401 Unauthorized due to invalid session cookie
403 Forbidden due to the user missing the necessary privileges

Window of Annotations

Return an object populated by active annotation events as a point in time (optionally including annotations that have recently ended). The result can be filtered (across create, update, hb, end events) by passing UUIDs to be excluded from the list. By specifying 'start_timestamp' the result will include any documents ended between 'start_timestamp' and 'end_timestamp' (specifying 'start_timestamp' does not change the search interval)

Request

curl -X GET https://[active_brand_subdomain].eagleeyenetworks.com/annt/annt/window  -d "id=[DEVICE_ID]" -d "start_timestamp=[START_TIMESTAMP]" -d "end_timestamp=[END_TIMESTAMP]" -H "Authentication: [API_KEY]" --cookie "auth_key=[AUTH_KEY]" -G

For information on active_brand_subdomain click here.

HTTP Request

GET https://[active_brand_subdomain].eagleeyenetworks.com/annt/annt/window

Parameter Data Type Description Required
id string Camera ID the event is associated with
end_timestamp string End timestamp of query in EEN format: YYYYMMDDHHMMSS.NNN
start_timestamp string Timestamp as optional limiter for the searched annotation event(s) in EEN format: YYYYMMDDHHMMSS.NNN (defaults to maximum retention). Matches events with identical start timestamps as the specified 'start_timestamp'
namespace string Namespace(s) as optional comma-separated limiter for the searched annotation event(s). Excludes all except for the specified namespace(s) by excluding results in both categories: 'new' and 'active' (defaults to include all)
uuid string Unique identifier(s) as optional comma-separated limiter for the searched annotation event(s). Includes all except for the specified UUID(s) by excluding results from the 'new' category (defaults to include all)
flat string Flatten the search results to merge heartbeats into the main annotation level and produce one consistent prolonged searchable event. No value is required

Example: 'flat='

Json Response

{
    "ts": "20180526095435.831",
    "new": [
        [
            "595e4b9c-41f9-11e7-aaf2-0d5g1hafj2z6",
            "20180526095435.831",
            11,
            {
                "info": "Annotation by cafedead"
                "_end": "20180526095440.831"
            }
        ],
        [...],
        [...]
    ],
    "active": [
        "595e4b9c-41f9-11e7-aaf2-0d5g1hafj2z6",
        "<uuid>",
        "<uuid>"
    ]
}

HTTP Response (Json Attributes)

Parameter Data Type Description
ts string Closest matching timestamp to the requested (to get annotations for) in EEN format: YYYYMMDDHHMMSS.NNN
new array[array[obj]] Array of arrays with each returned element being an annotation object with Json-formatted data
(See Annotation Model for the returned annotation array structure)
active array[string] Array of all annotation UUIDs returned based on the specified criteria

HTTP Status Codes

HTTP Status Code Description
200 Request succeeded
400 Unexpected or non-identifiable arguments are supplied
401 Unauthorized due to invalid session cookie
403 Forbidden due to the user missing the necessary privileges

Get List of Annotations

Returns an array of Annotations by count or time range

Request

curl -X GET https://[active_brand_subdomain].eagleeyenetworks.com/annt/annt/list -d "id=[DEVICE_ID]" -d "start_timestamp=[START_TIMESTAMP]" -d "end_timestamp=[END_TIMESTAMP]" -H 'Content-type: application/json' -H "Authentication: [API_KEY]" --cookie "auth_key=[AUTH_KEY]" -G

For information on active_brand_subdomain click here.

HTTP Request

GET https://[active_brand_subdomain].eagleeyenetworks.com/annt/annt/list

Parameter Data Type Description Required
id string Camera ID the annotation should be associated with
start_timestamp string Start timestamp of the annotations to return
end_timestamp string End timestamp of the annotations to return
count int N number of annotations to return (can be used to replace the 'end_timestamp', in which case will return the first N number of annotations after 'start_timestamp')
uuid array[string] Array of comma-separated UUIDs to list
namespace array[int] Array of 1 to N comma-separated namespaces to list
exclusive boolean Whether to exclude annotations that are active during, but have not started within the specified span (1) or not (0)
jsonp string JSONP (JSON with padding) is a convention used to invoke cross-domain scripts by generating script tags in the current request data. The result is returned wrapped in a specified callback function

Json Response

[
    [
        "3f06b432-41f9-11e7-aaf2-1c1b0daef2f5",
        "20180526095347.742",
        2,
        {
            "data": "{\"info\":\"Annotation1\";}"
            "_hb": [
                [
                    "20180526095350.742",
                    {
                        "field1": "Heartbeat",
                        "field2": "for",
                        "field3": "cafedead"
                    }
                ],
                [...],
                [...]
            ]
        }
    ],
    [
        "595e4b9c-41f9-11e7-aaf2-0d5g1hafj2z6",
        "20180526095435.831",
        11,
        {
            "info": "Annotation by cafedead"
            "_end": "20180526095440.831"
        }
    ],
    [...]
]

HTTP Response (Array Attributes)

Array Index Attribute Data Type Description
0 uuid string Unique identifier for the annotation assigned to it during creation
1 timestamp string Time of the annotation creation in EEN Timestamp format: YYYYMMDDHHMMSS.NNN
2 namespace int Namespace grouping assigned to the annotation (in the EEN structure namespaces can describe a specific category of annotations)
3 <data> json Content of the annotation

HTTP Status Codes

HTTP Status Code Description
200 Request succeeded
400 Unexpected or non-identifiable arguments are supplied
401 Unauthorized due to invalid session cookie
403 Forbidden due to the user missing the necessary privileges

Get List of Events

Returns an array of Events by count or time range

Request

curl -X GET https://[active_brand_subdomain].eagleeyenetworks.com/annt/event/list -d "id=[DEVICE_ID]" -d "st=[START_TIMESTAMP]" -d "et=[END_TIMESTAMP]" -H 'Content-type: application/json' -H "Authentication: [API_KEY]" --cookie "auth_key=[AUTH_KEY]" -G

For information on active_brand_subdomain click here.

HTTP Request

GET https://[active_brand_subdomain].eagleeyenetworks.com/annt/event/list

Parameter Data Type Description Required
id string Camera ID the annotation should be associated with
start_timestamp string Start timestamp of the annotations to return
end_timestamp string End timestamp of the annotations to return
count int N number of annotations to return (can be used to replace the 'end_timestamp', in which case will return the first N number of annotations after 'start_timestamp')
uuid array[string] Array of comma-separated UUIDs to list
namespace array[int] Array of 1 to N comma-separated namespaces to list
exclusive boolean Whether to exclude annotations that are active during, but have not started within the specified span (1) or not (0)
jsonp string JSONP (Json with padding) is a convention used to invoke cross-domain scripts by generating script tags in the current request data. The result is returned wrapped in a specified callback function

Json Response

[
    [
        "3f06b432-41f9-11e7-aaf2-1c1b0daef2f5",
        "20180526095347.742",
        2,
        4,
        {
            "data": "{\"info\":\"Annotation1\";}"
            "_hb": [
                [
                    "20180526095350.742",
                    {
                        "field1": "Heartbeat",
                        "field2": "for",
                        "field3": "cafedead"
                    }
                ],
                [...],
                [...]
            ]
        }
    ],
    [
        "595e4b9c-41f9-11e7-aaf2-0d5g1hafj2z6",
        "20180526095435.831",
        11,
        5,
        {
            "info": "Annotation by cafedead"
            "_end": "20180526095440.831"
        }
    ],
    [...]
]

HTTP Response (Array Attributes)

Array Index Attribute Data Type Description
0 uuid string Unique identifier for the annotation assigned to it during creation
1 timestamp string Time of the annotation creation in EEN Timestamp format: YYYYMMDDHHMMSS.NNN
2 namespace int Namespace grouping assigned to the annotation (in the EEN structure namespaces can describe a specific category of annotations)
3 type int An additional array element is present in the event list, describing the event type

Event type:
1 - Create
2 - Update
3 - Reserved
4 - Heartbeat
5 - End
4 <data> json Content of the annotation

HTTP Status Codes

HTTP Status Code Description
200 Request succeeded
400 Unexpected or non-identifiable arguments are supplied
401 Unauthorized due to invalid session cookie
403 Forbidden due to the user missing the necessary privileges

Png Span

Overview

This service offers native PNG Span rendering to support metric visualization. For spans the image is filled with the foreground color, where the specified span is active and with the background, where it is inactive. At least one pixel will be filled for a span independent of scale (the span may overlap others). For etags one pixel is filled for each active Event, but the pixel may overlap others

Response Headers

'content-location': resource actually rendered, absolute start/end ts and either table/etag depending on whether an index was used

Use Cases

The PNG span is a very efficient mechanism for visualizing where metrics and spans are active. Scale the image vertically as needed. PNG are extremely compact - a day of spans will be a few hundred bytes

The following description provides a typical use model:

PNG Type List

Get Png Span

PNG images can be retrieved for supporting metric visualization

PNG Types

Request

curl -X GET https://[active_brand_subdomain].eagleeyenetworks.com/pngspan/etag.png -d "start_timestamp=[START_TIMESTAMP]" -d "end_timestamp=[END_TIMESTAMP]" -d "width=[WIDTH]" -d "id=[CAMERA_ID]" -d "foreground_color=[COLOR_CODE]" -d "background_color=[COLOR_CODE]" -d "etag=[FOUR_CC]" -H "Authentication: [API_KEY]" --cookie "auth_key=[AUTH_KEY]" -G -v

For information on active_brand_subdomain click here.

Provide the ‘-O’ option at the end of the request for file output to the current directory

Provide the ‘-o “/<file_path/<filename>.<extension>”’ option to specify output filename, path and extension

HTTP Request

GET https://[active_brand_subdomain].eagleeyenetworks.com/pngspan/{pngspan_type}.png

Parameter Data Type Description Is Required
id string Camera ID true
width int Width in pixels of resulting PNG. Must be an integer greater than 0 true
start_timestamp string Start Timestamp in EEN format: YYYYMMDDHHMMSS.NNN true
end_timestamp string End Timestamp in EEN format: YYYYMMDDHHMMSS.NNN true
foreground_color string Color of foreground (active). If both foreground and background have 0 for alpha, assumed fully opaque (0xff)

Example (32 bit ARGB color): '0xf0000000'
background_color string Color of background (inactive)

Example (32 bit ARGB color): '0xffffffff'
table string, enum If provided, specifies name of table to be rendered. Required for type 'span' and 'event'

enum: stream, onoff, video, register
etag string Identifies etag to be rendered, using the 4 character string identifier (Four CC). Will utilize matching event tables where possible. Ignored for type 'span' and 'event'
flval string Identified value of the filter field from the starting etag. Only applicable for type 'span'
flname string Name of field within span start etag to match to flval. Interesting fields are roiid in roim table and videoid for video. Only applicable for type 'span'
flflags string Limits span rendering to spans with the flag asserted. ALERTS is asserted for roim and motion spans when an alert is active
HTTP Status Code Description
200 Request succeeded
400 Unexpected or non-identifiable arguments are supplied
401 Unauthorized due to invalid session
404 Not found if camera, etag or table cannot be found

Layout

Overview

Layouts contain panes, which are groups of Cameras arranged for viewing on screen. Layouts are associated with an Account and Users are granted view/write/share permissions for the Layout. Users who would otherwise have no access to a camera gain access to all cameras included in Layouts shared with them

Important information on accessing Layouts:

The ordering of the panes is determined by the order of the configuration panes returned by the API. Each pane will have a size of 1, 2, or 3. A size of 1 is the smallest and fills up 1x1 on the Layout grid. A size of 3 is the largest and fills up 3x3 on the Layout grid. If the grid does not have enough columns to fit the pane, then the size of the pane is decreased until it is able to fit on the grid

Rendered Layouts on Web and Mobile: Example 1 Example 2

Layout Model

Layout Model

{
    "id": "0b58ec7a-61e4-11e3-8f7d-523445989f37",
    "name": "Everything",
    "types": [
        "mobile"
    ],
    "permissions": "SWRD",
    "current_recording_key": null,
    "shares": [
        [
            "ca01ce6d",
            "SWRD"
        ],
        [
            "ca0c7d2c",
            "R"
        ],
        [
            "ca05e8c2",
            "R"
        ],
        [...],
        [...],
        [...]
    ],
    "configuration": {
        "panes": [
            {
                "cameras": [
                    "100ace90"
                ],
                "type": "preview",
                "pane_id": 0,
                "name": "",
                "size": 1
            },
            {
                "cameras": [
                    "10045dd6"
                ],
                "type": "preview",
                "pane_id": 0,
                "name": "",
                "size": 1
            },
            {
                "cameras": [
                    "100891b7"
                ],
                "type": "preview",
                "pane_id": 0,
                "name": "",
                "size": 1
            },
            {...},
            {...},
            {...}
        ],
        "settings": {
            "camera_row_limit": 3,
            "camera_name": true,
            "camera_aspect_ratio": 0.5625,
            "camera_border": false
        }
    }
}

Layout (Attributes)

Property Data Type Description Editable Required
id string Layout ID automatically generated and assigned during creation


name string Name of the layout
types array[string] Specifies target(s) for layout. Multiple values are allowed
configuration json Json object of layout configuration
json string Json encoded string. The same content as the 'configuration' field (DEPRECATED)
permissions string String of zero or more characters. Each character defines a permission that the current user has for the layout

Permissions include:
'R' - user can view this layout
'W' - user can modify this layout
'D' - user can delete this layout
'S' - user can share this layout
current_recording_key string String key representing a recording currently being made with the cameras in the layout, which was initiated using the action/recordnow service
shares array [
  array [
    string
  ]
]
Array of arrays each representing a user for whom sharing is enabled for this layout. Each string contains two comma-separated fields. The first field is a user ID and the second field are permissions for the user. Setting the first field to 'account' specifies that the layout is shared with all users of the account

Example:
['1005f2ed','RWDS'] - user can view, change, delete or share this layout
['1005f2ed','RW'] - user can view and change this layout
['1005f2ed', 'R'] - user can view this layout

Permissions for the user issuing the /layout GET are not included in this array

Layout - configuration

Parameter Data Type Description Is Required
panes array[obj] Array of Json objects with each object representing a pane structure true
settings json Json object of layout settings

Layout - configuration - panes

Parameter Data Type Description
name string Layout pane name
type string Layout types:
'preview' - shows live preview images form cameras
'carousel' - rotates between preview images, IDs of cameras need to be included in the cameras array along with an integer in the delay array. The delay is an integer value of milliseconds as too how long the Camera will be displayed before switching to the next Camera. A 'carousel' with only one camera is the same as preview
'click' - respond to click for other cameras in layout
'motion' - respond to motion for other cameras in layout
'map' - a static map with camera icons located on it
'url' - displays the contents of the url in the pane as a frame
pane_id int ID given to pane when created by the Layout Manager
size int Size of displayed image:
1 - small
2 - medium
3 - large
cameras array[string] Array of camera IDs (For 'carousel' cycle through the camera IDs with the delay setting in the corresponding 'delay' property)

Layout - configuration - settings

Parameter Data Type Description
camera_border boolean Show camera pane borders
camera_name boolean Show camera name
camera_aspect_ratio float Aspect ratio of images:
0.5625 - 16x9
0.75 - 4x3
camera_row_limit int Max number of cameras to show per row:
3 - 3 cameras per row
4 - 4 cameras per row
5 - 5 cameras per row
custom_id string

Get Layout

Returns a Layout object by ID

Request

curl -X GET https://[active_brand_subdomain].eagleeyenetworks.com/g/layout -d "id=[LAYOUT_ID]" -H "Authentication: [API_KEY]" --cookie "auth_key=[AUTH_KEY]" -G

For information on active_brand_subdomain click here.

HTTP Request

GET https://[active_brand_subdomain].eagleeyenetworks.com/g/layout

Parameter Data Type Description Is Required
id string Layout ID true

HTTP Status Codes

HTTP Status Code Description
200 Request succeeded
400 Unexpected or non-identifiable arguments are supplied
401 Unauthorized due to invalid session cookie
403 Forbidden due to the user missing the necessary privileges
404 Layout ID not found

Create Layout

Create a new Layout

Request

curl -X PUT https://[active_brand_subdomain].eagleeyenetworks.com/g/layout -d '{"name": "[LAYOUT_NAME]", "types": [""], "configuration": {"panes": [{}] }}' -H "content-type: application/json" -H "Authentication: [API_KEY]" --cookie "auth_key=[AUTH_KEY]"

For information on active_brand_subdomain click here.

HTTP Request

PUT https://[active_brand_subdomain].eagleeyenetworks.com/g/layout

Parameter Data Type Description Is Required
name string Layout name true
types array[string] Specifies target(s) for layout. Multiple values are allowed true
configuration json Json object of layout configuration true
shares array [
  array [
    string
  ]
]
Array of arrays each representing a user for whom sharing is enabled for this layout. Each string contains two comma-separated fields. The first field is a user ID and the second field are permissions for the user. Setting the first field to 'account' specifies that the layout is shared with all users of the account

Example:
['1005f2ed','RWDS'] - user can view, change, delete or share this layout
['1005f2ed','RW'] - user can view and change this layout
['1005f2ed', 'R'] - user can view this layout

Permissions for the user issuing the /layout GET are not included in this array

Json Response

{
    "id": "80ca9ee0-4f28-11e4-81bf-523445989f37"
}

HTTP Response (Json Attributes)

Parameter Data Type Description
id string Layout ID

HTTP Status Codes

HTTP Status Code Description
200 Request succeeded
400 Unexpected or non-identifiable arguments are supplied
401 Unauthorized due to invalid session cookie
403 Forbidden due to the user missing the necessary privileges

Update Layout

Update Layout information

Request

curl -X POST https://[active_brand_subdomain].eagleeyenetworks.com/g/layout -d '{"id": "[LAYOUT_ID]", "name": "[LAYOUT_NAME]", "types": [""], "configuration": {"panes": [{}] }}' -H "content-type: application/json" -H "Authentication: [API_KEY]" --cookie "auth_key=[AUTH_KEY]"

For information on active_brand_subdomain click here.

HTTP Request

POST https://[active_brand_subdomain]/eagleeyenetworks.com/g/layout

Parameter Data Type Description Is Required
id string Layout ID generated during creation true
name string Layout name
types array[string] Specifies target(s) for layout. Multiple values are allowed
configuration json Json object of layout configuration
shares array [
  array [
    string
  ]
]
Array of arrays each representing a user for whom sharing is enabled for this layout. Each string contains two comma-separated fields. The first field is a user ID and the second field are permissions for the user. Setting the first field to 'account' specifies that the layout is shared with all users of the account

Example:
['1005f2ed','RWDS'] - user can view, change, delete or share this layout
['1005f2ed','RW'] - user can view and change this layout
['1005f2ed', 'R'] - user can view this layout

Permissions for the user issuing the /layout GET are not included in this array

Json Response

{
    "id": "80ca9ee0-4f28-11e4-81bf-523445989f37"
}

HTTP Response (Json Attributes)

Parameter Data Type Description
id string Layout ID

HTTP Status Codes

HTTP Status Code Description
200 Request succeeded
400 Unexpected or non-identifiable arguments are supplied
401 Unauthorized due to invalid session cookie
403 Forbidden due to the user missing the necessary privileges
404 Layout ID not found

Delete Layout

Delete a Layout

Request

curl -X DELETE https://[active_brand_subdomain].eagleeyenetworks.com/g/layout -d "id=[LAYOUT_ID]" -H "Authentication: [API_KEY]" --cookie "auth_key=[AUTH_KEY]" -G

For information on active_brand_subdomain click here.

HTTP Request

DELETE https://[active_brand_subdomain].eagleeyenetworks.com/g/layout

Parameter Data Type Description Is Required
id string Layout ID true

HTTP Status Codes

HTTP Status Code Description
200 Request succeeded
400 Unexpected or non-identifiable arguments are supplied
401 Unauthorized due to invalid session cookie
403 Forbidden due to the user missing the necessary privileges
404 Layout matching the ID was not found

Get List of Layouts

Returns an array of arrays with each sub-array representing a Layout available to the user

Request

curl -X GET https://[active_brand_subdomain].eagleeyenetworks.com/g/layout/list -H "Authentication: [API_KEY]" --cookie "auth_key=[AUTH_KEY]" -G

For information on active_brand_subdomain click here.

HTTP Request

GET https://[active_brand_subdomain].eagleeyenetworks.com/g/layout/list

Json Response

[
    [
        "0b58ec7a-61e4-11e3-8f7d-523445989f37",
        "Everything",
        [
            "mobile"
        ],
        "SWRD"
    ],
    [
        "75c03026-719a-11e3-afba-ca8312ea370c",
        "Glenn",
        [
            "mobile"
        ],
        "SWRD"
    ],
    [...],
    [...],
    [...]
]

HTTP Response (Array Attributes)

Array Index Attribute Data Type Description
0 id string Layout ID
1 name string Name of the layout
2 types array[string] Array of types defined for the layout
3 permissions string String of zero or more characters. Each character defines a permission that the current user has for the layout

Permissions include:
'R' - user can view this layout
'W' - user can modify this layout
'D' - user can delete this layout
'S' - user can share this layout

HTTP Status Codes

HTTP Status Code Description
200 Request succeeded
400 Unexpected or non-identifiable arguments are supplied
401 Unauthorized due to invalid session cookie
403 Forbidden due to the user missing the necessary privileges

Terms of Service

Overview

The following API endpoints facilitate presenting and accepting the Terms of Service. By default, Eagle Eye Networks uses independent Terms of Service which will be presented through Get Terms of Service for User. On the other hand resellers can use their own Terms of Service (instead of default ones) through Create Terms of Service for Account. Switch between these two options can only be made by Eagle Eye Networks engineering staff.

Resellers can assign their own terms at the Master Account Level or give each Sub-Account custom terms at the Sub-Account Level

The basic workflow is as follows:

  1. Resellers create their own terms with the Create Terms of Service for Account
  2. Client UI will display terms if not accepted from a Get Terms of Service for User
  3. Client UI will accept the terms from a Accept Terms of Service for User

Get Terms of Service for User

This service allows to push important Terms of Service. The client software must call GET to see whether the user needs to agree to any new Terms of Service

If the user has a 'is_compliant=0', the client software should popup a message box containing the Terms of Service
(It is preferred to have this as a single combined message box)

If the user agrees to the terms, a PUT call should be placed containing an array of all the Terms of Service

Request

curl -X GET https://[active_brand_subdomain].eagleeyenetworks.com/g/user/terms -d "id=[USER_ID]" -H "Authentication: [API_KEY]" --cookie "auth_key=[AUTH_KEY]" -G

For information on active_brand_subdomain click here.

HTTP Request

GET https://[active_brand_subdomain].eagleeyenetworks.com/g/user/terms

Parameter Data Type Description
id string User ID

Json Response

[
    [
        "cafe81f5",
        "Terms_and_Conditions",
        "/een-terms-of-service/00013377/Terms_and_Conditions~2~20180523094504.txt",
        "2",
        0
    ],
    [...]
]

HTTP Response (Array Attributes)

Array Index Attribute Data Type Description
0 user_id string User ID of the user requesting the notice
1 title string Title of the term of service
2 url string URL of a file with the text of the terms of service
3 version string Version string for the title of the terms of service
4 is_compliant int If 0, the user needs to accept the terms of service

HTTP Status Codes

HTTP Status Code Description
200 User has been authorized for access to the realm
400 Unexpected or non-identifiable arguments are supplied
402 Account is suspended
406 Information supplied could not be verified
412 User is disabled
460 Account is inactive
409 Account has already been activated

Accept Terms of Service for User

This service is used to record Acceptance of the Terms of Service

Request

curl -X PUT https://[active_brand_subdomain].eagleeyenetworks.com/g/user/terms -d '{"urls": ["/een-terms-of-service/[USER_ID]/Test_Terms_of_Service~1~20180523100004.txt", "/een-terms-of-service/[USER_ID]/EEN_Terms_of_Service~1.2~20180626191610.txt"]}' -H "content-type: application/json" -H "Authentication: [API_KEY]" --cookie "auth_key=[AUTH_KEY]"

For information on active_brand_subdomain click here.

HTTP Request

PUT https://[active_brand_subdomain].eagleeyenetworks.com/g/user/terms

Parameter Data Type Description Is Required
urls array[string] Array of urls to be accepted true

Json Response

{
    "id": "cafe81f5"
}

HTTP Response (Json Attributes)

Parameter Data Type Description
id string User ID

HTTP Status Codes

HTTP Status Code Description
200 User has been authorized for access to the realm
400 Unexpected or non-identifiable arguments are supplied
402 Account is suspended
404 Notice title was not found
406 Information supplied could not be verified
409 Account has already been activated
412 User is disabled
460 Account is inactive

Get Terms of Service for Account

Returns the Terms of Service for an account

Request

curl -X GET https://[active_brand_subdomain].eagleeyenetworks.com/g/account/terms -d "id=[ACCOUNT_ID]" -H "Authentication: [API_KEY]" --cookie "auth_key=[AUTH_KEY]" -G

For information on active_brand_subdomain click here.

HTTP Request

GET https://[active_brand_subdomain].eagleeyenetworks.com/g/account/terms

Parameter Data Type Description Is Required
id string Account ID true

Json Response

[
    [
        "00013377",
        "UNIT_TEST_SUB_ACCOUNT",
        "Test_Terms_of_Service2",
        "2",
        1,
        0,
        "20180523094136",
        "/een-terms-of-service/00013377/Terms_and_Conditions~2~20170523094136.txt",
        "active"
    ],
    [
        "00013377",
        "UNIT_TEST_SUB_ACCOUNT",
        "Test_Terms_of_Service",
        "1",
        1,
        1,
        "20180222115243",
        "/een-terms-of-service/00013377/Terms_and_Conditions~1~20170222115243.txt",
        "retired"
    ],
    [
        "00013377",
        "UNIT_TEST_SUB_ACCOUNT",
        "Test_Terms_of_Service",
        "2",
        0,
        1,
        "20180523094504",
        "/een-terms-of-service/00013377/Terms_and_Conditions~2~20170523094504.txt",
        "active"
    ],
    [
        "00000001",
        "UNIT_TEST_SUB_ACCOUNT",
        "EEN_Terms_of_Service",
        "1.2",
        1,
        1,
        "20180426191610",
        "/een-terms-of-service/00000001/Terms_and_Conditions~1.2~20170523094504.txt",
        "active"
    ],
    [...],
    [...],
    [...]
]

HTTP Response (Array Attributes)

Array Index Attribute Data Type Description
0 account_id string Account ID of the account requesting the notice
1 account_name string Name of the account requesting this notice
2 title string Title of the notice
3 version string Version number for the notice title, a larger version number will retire other versions
4 is_admin_required int Whether administrators have to accept (1) or not (0)
5 is_user_required int Whether users have to accept (1) or not (0)
6 timestamp string Date of the term of service
7 url string URL of the file containing the text for the notice
8 status string Status of the term of service ('active', 'retired')

HTTP Status Codes

HTTP Status Code Description
200 User has been authorized for access to the realm
400 Unexpected or non-identifiable arguments are supplied
402 Account is suspended
406 Information supplied could not be verified
409 Account has already been activated
412 User is disabled
460 Account is inactive

Create Terms of Service for Account

Master accounts (Resellers) may require their own Terms of Service. This service allows to submit the text of customized Terms of Service

New terms can be submitted with a PUT command. GET can be done to verify the state of the terms. PUT will retire Terms of Service of the same title and account

Notices can be stored in the sub-account or the parent account of the user

Resellers are limited to 5 Terms of Service titles and each title will only have one active version

Request

curl -X PUT https://[active_brand_subdomain].eagleeyenetworks.com/g/account/terms -d '{"is_admin_required": 1, "is_user_required": 1, "title": "[TERMS_TITLE]", "text": "[TERMS_TEXT]", "version": "[TERMS_VERSION]", "id": "[ACCOUNT_ID]"}' -H "content-type: application/json" -H "Authentication: [API_KEY]" --cookie "auth_key=[AUTH_KEY]"

For information on active_brand_subdomain click here.

HTTP Request

PUT https://[active_brand_subdomain].eagleeyenetworks.com/g/account/terms

Parameter Data Type Description Required Default Limitation
text string Text of the term of service to accept Use single LF character for line break
id string Account ID requester’s account
title string Title of the term of service to accept ‘Terms and Conditions’ 32 bytes of alpha numeric characters
version string Version of the title, which should be unique auto incrementing number 32 bytes of alpha numeric characters
is_admin_required int Whether administrators have to accept (1) or not (0) not updating
is_user_required int Whether users have to accept (1) or not (0) not updating
timestamp string Date the term of service goes into effect now

Json Response

{
    "status": "active",
    "is_admin_required": 1,
    "is_user_required": 1,
    "title": "Test_Terms_of_Service",
    "url": "/een-terms-of-service/00013377/Test_Terms_of_Service~1~20180523100004.txt",
    "timestamp": "20180523100004",
    "version": "1",
    "user": "cafe81f5",
    "account_id": "00013377"
}

HTTP Response (Json Attributes)

Parameter Data Type Description
title string Title of the notice
version string Version number for the notice title, a larger version number will retire other versions
is_admin_required int Whether administrators have to accept (1) or not (0)
is_user_required int Whether users have to accept (1) or not (0)
timestamp string Date of the term of service
url string URL of the file containing the text for the notice
status string Status of the term of service ('active', 'retired')

HTTP Status Codes

HTTP Status Code Description
200 User has been authorized for access to the realm
400 Unexpected or non-identifiable arguments are supplied
402 Account is suspended
404 Terms Title was not found
406 Information supplied could not be verified
409 Account has already been activated
412 User is disabled
460 Account is inactive

Update Terms of Service for Account

Update an account’s Terms of Service

Users are not required to accept terms of the same version again, to force users to accept again use a PUT request

Request

curl -X POST https://[active_brand_subdomain].eagleeyenetworks.com/g/account/terms -d '{"is_admin_required": 0, "is_user_required": 1, "title": "[TERMS_TITLE]", "text": "[TERMS_TEXT]", "version": "[TERMS_VERSION]", "id": "[ACCOUNT_ID]"}' -H "content-type: application/json" -H "Authentication: [API_KEY]" --cookie "auth_key=[AUTH_KEY]"

For information on active_brand_subdomain click here.

HTTP Request

POST https://[active_brand_subdomain].eagleeyenetworks.com/g/account/terms

Parameter Data Type Description Required Default Limitation
text string Text of the term of service to accept use single LF character for line break
id string Account ID requester’s account
title string Title of the term of service to accept ‘Terms and Conditions’ 32 bytes of alpha numeric characters
version string Version of the title, which should be unique auto incrementing number 32 bytes of alpha numeric characters
is_admin_required int Whether administrators have to accept (1) or not (0) not updating
is_user_required int Whether users have to accept (1) or not (0) not updating
timestamp string Date the term of service goes into effect now

Json Response

{
    "status": "active",
    "is_admin_required": 0,
    "is_user_required": 1,
    "title": "Test_Terms_of_Service",
    "url": "/een-terms-of-service/00013377/Test_Terms_of_Service~1~20180523100004.txt",
    "timestamp": "20180523100004",
    "version": "2",
    "user": "cafe81f5",
    "account_id": "00013377"
}

HTTP Response (Json Attributes)

Parameter Data Type Description
title string Title of the notice
version string Version number for the notice title, a larger version number will retire other versions
is_admin_required int Whether administrators have to accept (1) or not (0)
is_user_required int Whether users have to accept (1) or not (0)
timestamp string Date of the term of service
url string URL of the file containing the text for the notice
status string Status of the term of service ('active', 'retired')

HTTP Status Codes

HTTP Status Code Description
200 User has been authorized for access to the realm
400 Unexpected or non-identifiable arguments are supplied
402 Account is suspended
404 Notice title was not found
406 Information supplied could not be verified
409 Account has already been activated
412 User is disabled
460 Account is inactive

Delete Terms of Service for Account

Delete an account’s Terms of Service

Request

curl -X DELETE https://[active_brand_subdomain].eagleeyenetworks.com/g/account/terms -d "id=[ACCOUNT_ID]" -H "Authentication: [API_KEY]" --cookie "auth_key=[AUTH_KEY]" -G

For information on active_brand_subdomain click here.

HTTP Request

DELETE https://[active_brand_subdomain].eagleeyenetworks.com/g/account/terms

Parameter Data Type Description Is Required
id string Account ID true
title string Title of the term of service

Json Response

{
    "00013377": {
        "EEN_Terms_of_Service": {
            "1.2": "20180626193818.274"
        },
        "Test_Terms_of_Service": {
            "2": "20180626193626.502"
        }
    }
}

HTTP Response (Json Attributes)‘

Parameter Data Type Description
account_id string Account ID of the account requesting the removal
account_name string Name of the account requesting the removal
title string Title of the term of service
version string Version number for the term title
is_admin_required int Whether administrators have to accept (1) or not (0)
is_user_required int Whether users have to accept (1) or not (0)
timestamp string Date of the term of service
url string URL of the file containing the text for the term of service
status string This field is no longer being used (DEPRECATED)

HTTP Status Codes

HTTP Status Code Description
200 User has been authorized for access to the realm
400 Unexpected or non-identifiable arguments are supplied
402 Account is suspended
404 Notice title was not found
406 Information supplied could not be verified
409 Account has already been activated
412 User is disabled
460 Account is inactive

Feedback

Overview

This service allows users to send Feedback to support

Send Feedback

Send feedback to support

Request

curl -X POST https://[active_brand_subdomain].eagleeyenetworks.com/g/feedback -d "subject=[SUBJECT]" -d "message=[MESSAGE]" -H "Authentication: [API_KEY]" --cookie "auth_key=[AUTH_KEY]" -v

For information on active_brand_subdomain click here.

HTTP Request

POST https://[active_brand_subdomain].eagleeyenetworks.com/g/feedback

Parameter Data Type Description Is Required
subject string Subject of the feedback true
message string Feedback message content true

HTTP Status Codes

HTTP Status Code Description
202 Request succeeded
400 Unexpected or non-identifiable arguments are supplied
401 Unauthorized due to invalid session cookie
403 Forbidden due to the user missing the necessary privileges

FAQ

Who can use the Eagle Eye APIs?
The Eagle Eye Video APIs are publicly open for anyone to use
Users will need a valid API key to successfully make API calls

How do I get my API key?
You can get an API key by filling out the form

I found an error with Eagle Eye Video API, where should I report it?
For API specific questions, issues or feature requests, please submit a request

How do you charge for the Eagle Eye Video API use?
The Eagle Eye Video API does not require any additional fees for use
The only fees are the per camera fees for the use of the Eagle Eye system

What can I do with the Eagle Eye API?
The Eagle Eye Video API provides a robust set of storage, analytics, indexing and interfaces for quickly building or integrating applications with both live and recorded video. The applications can range from very simple to highly complex

How To’s and Example Code

Making API Calls With Curl


cURL

Authenticate Request

curl -X POST https://login.eagleeyenetworks.com/g/aaa/authenticate -d '{"username": "[USERNAME]", "password": "[PASSWORD]"}' -H "content-type: application/json" -H "Authentication: [API_KEY]"

In this section we will walk you through the process of making API requests using the cURL command line tool. The Eagle Eye APIs are platform agnostic and we use them to create the web, Android and iOS Eagle Eye clients. Curl is a tool for transferring data to and from a server using a wide range of supported protocols including HTTP/HTTPS, which is what we are interested in

cURL can be installed by visiting this site (present on most linux systems by default)

With cURL installed the next step is to log in and have a valid session (visit the cURL cheat sheet for basic HTTP commands), so that we can freely use any of the APIs. Logging in is a two step process consisting of authentication and authorization. The authentication API takes in 2 parameters. Our cURL common will look like the example (Authenticate Request) code to the right

A certain degree of variation is possible within cURL for formulating HTTP requests:

curl -X GET https://[active_brand_subdomain].eagleeyenetworks.com/asset/prev/image.jpeg -d "id=[CAMERA_ID]" -d "timestamp=[TIMESTAMP]" -d "asset_class=[ASSET_CLASS]" -H "Authentication: [API_KEY]" --cookie "auth_key=[AUTH_KEY]" -G

For information on active_brand_subdomain click here.

Alternatively, the above request could be formulated as:

curl --request GET "https://[active_brand_subdomain].eagleeyenetworks.com/asset/prev/image.jpeg?id=[CAMERA_ID]&timestamp=[TIMESTAMP]&asset_class=[ASSET_CLASS]&A=[AUTH_KEY]" -H "Authentication: [API_KEY]"

For information on active_brand_subdomain click here.

It is important to disassociate the types of request data from one another:
(certain request types require data to be sent via parameters, other types require the data to be delivered via data - as HTTP body)

The same request can frequently be mimicked using all 3 methods like with the authentication key in the following examples:

Parameter (A=[AUTH_KEY])

curl -X GET "https://[active_brand_subdomain].eagleeyenetworks.com/asset/prev/image.jpeg?id=[CAMERA_ID]&timestamp=[TIMESTAMP]&asset_class=[ASSET_CLASS]&A=[AUTH_KEY]"

Request body (-d “A=[AUTH_KEY]”)
(sneaky way of forcing GET to accept parameters via the data field, in this case data is still pushed as parameters and not in the request body)

curl -G https://[active_brand_subdomain].eagleeyenetworks.com/asset/prev/image.jpeg -d "id=[CAMERA_ID]" -d "timestamp=[TIMESTAMP]" -d "asset_class=[ASSET_CLASS]" -d "A=[AUTH_KEY]" -H "Authentication: [API_KEY]"
or
curl -X GET https://[active_brand_subdomain].eagleeyenetworks.com/asset/prev/image.jpeg -d "id=[CAMERA_ID]&timestamp=[TIMESTAMP]&asset_class=[ASSET_CLASS]&A=[AUTH_KEY]" -H "Authentication: [API_KEY]" -G

Cookie (–cookie “auth_key=[AUTH_KEY]”)

curl -X GET https://[active_brand_subdomain].eagleeyenetworks.com/asset/prev/image.jpeg -d "id=[CAMERA_ID]" -d "timestamp=[TIMESTAMP]" -d "asset_class=[ASSET_CLASS]" -H "Authentication: [API_KEY]" --cookie "auth_key=[AUTH_KEY]" -G


Token

Json Response

{
    "token": "MiDUwMQqwP1JsfKqbqT1DQ8hJFHEOZfROEUtBvnuqv0ICxvcOybkS1n9/awjrJ9YKijb60GqdUDPP8TW4o8Ei8iI8OXC/dj74KC2cLMxJ2vs/hmYPfbW8OpCwf0k683a2LfIbjcC3Uy/SmDpOsxVdPMTXQEGJHXD3ItmAvoQ5MOoRKfHBNOu7OJBWQjPUjeP0fkHSrx8JgAHSqT5SwRM0mLysFmiFHF0h7/5Apt81dDhZwLBDwwSrl+kTqgn+wnw6rJ432liESdK+yp3Qefk1wAtytoTJkkBE2srqsHJdW4ryVYKk9SKA62Cz7pO3VUaD8Yxx9Ff2Os9ez6TdfBmqg=="
}

Upon running this command with valid credentials, we receive a Json-formatted response containing a key/value pair for 'token', which will look like the example (Json Response) on the right side

This token is a required parameter for making the authorize API request
(Copy the value of the token in order to have it on hand when creating the authorize API request)









Authorization

Authorize Request

curl -D - -X POST https://login.eagleeyenetworks.com/g/aaa/authorize -d "token=[TOKEN]"

We can make the authorization API request using the example cURL command

The output are headers of the API request followed by the response body. The -D flag is used to write the protocol headers. Here is the description from the man pages:

Argument Description
-D, –dump-header Write the protocol headers to the specified file. This option is handy to use when you want to store the headers that a HTTP site sends to you. Cookies from the headers could then be read in a second cURL invocation by using the -b, –cookie option! The -c, –cookie-jar option is however a better way to store cookies

Get List of Devices Request (Authorized)

curl -X GET https://[active_brand_subdomain].eagleeyenetworks.com/g/device/list -H "Authentication: [API_KEY]" --cookie "auth_key=[AUTH_KEY]"

For information on active_brand_subdomain click here.

Note that '-' after the -D indicates that the output file is stdout. One of the header elements will be 'Set-Cookie: auth_key=[AUTH_KEY]'. Copy 'auth_key=[AUTH_KEY]' into the clipboard as this cookie will need to be set for all other API requests. The cURL request for getting a list of devices will look like in the example to the right

Constructing Layouts

Get List of Layouts (Request)

curl -X GET https://[active_brand_subdomain].eagleeyenetworks.com/g/layout/list -H "Authentication: [API_KEY]" --cookie "auth_key=[AUTH_KEY]"

Get List of Layouts (Json Response)

[
    [
        "fc7fa3a4-66ea-11e3-8ca8-523445989f37",
        "Default",
        [
            "iphone"
        ],
        "SWRD"
    ],
    [
        "14fbd682-66eb-11e3-8ca8-523445989f37",
        "Ekta 2",
        [
            "iphone"
        ],
        "SWRD"
    ],
    [
        "23535930-66eb-11e3-977b-ca8312ea370c",
        "Ekta 3",
        [
            "desktop"
        ],
        "SWRD"
    ],
    [...]
]

HTTP Request

GET /layout/list
GET /layout

When a user logs onto the Eagle Eye system, they are greeted with a grid of cameras, with each cell representing a camera pane. These panes can be of varying size so that the user can customize the layout to their liking. In this tutorial, we will demonstrate how to use the APIs to build these layouts so they are consistent on all platforms

While logged in, we make a request to the GET /layout/list API. This returns an array of Layout objects. Do note that this is not the same model as what is returned by the GET /layout API request. The one returned by the /layout/list API is an abridged version with only the most important attributes. The response of the request will look like this

We take the layout ID attribute for each layout of interest and pass it to the GET /layout API request. This will contain the information we need to construct the layout

Get Layout (Request)

curl -X GET https://[active_brand_subdomain].eagleeyenetworks.com/g/layout -d "id=[LAYOUT_ID]" -G -H "Authentication: [API_KEY]" --cookie "auth_key=[AUTH_KEY]"

For information on active_brand_subdomain click here.

Get Layout (Json Response)

{
    "id": "811dbe48-66eb-11e3-8ca8-523445989f37",
    "shares": [
        [
            "ca0c35cb",
            "SWRD"
        ]
    ],
    "name": "mob dev 1",
    "permissions": "SWRD",
    "current_recording_key": null,
    "types": [
        "desktop"
    ],
    "configuration": {
        "settings": {
            "camera_row_limit": 3,
            "automatic_rotation": false,
            "camera_name": false,
            "camera_border": "false",
            "camera_aspect_ratio": "0.75"
        },
        "panes": [
            {
                "type": "preview",
                "pane_id": 0,
                "name": "Conference Room",
                "cameras": [
                    "100f6136"
                ],
                "size": 2
            },
            {
                "type": "preview",
                "pane_id": 1,
                "name": "NW Parking",
                "cameras": [
                    "10003254"
                ],
                "size": 2
            }
        ]
    }
}

We get a wealth of good information, but the information specific to setting up the pane layout is in the 'configuration' Json. Within that Json is an attribute called 'panes', which is an array of individual pane objects. Each pane specifies the <camera_id> and the size of the pane. The size represents the width and height in number of cells. A size of 2 means that the pane is 2 cells in width and height, so it occupies a total of 4 cells. A size of 3 would occupy 9 cells

The other important factor to know is the size of grid holding the panes, specifically the number of columns. For the Eagle Eye web client a browser can be resized to be a narrow strip or the full width of the screen. The layout will dynamically adjust the number of columns based on the width of the window. Mobile devices have fixed screen sizes, so for the iOS and Android smartphone clients the number of columns is set to three

Now that we have the order of panes, the size of each pane and the size of the grid, we can construct our layout. This proved to be of varying difficulty depending on the platform. The web client uses a robust packing library Packery, which is based on a bin packing algorithm. This library minimizes empty space while preserving the order as best as possible. Using Packery reduced the development time for this feature significantly

At this time Android does not have a robust library for packing the panes so the algorithm to do so was written from scratch. The goal was to mimic the Packery library as best as possible. The Android algorithm works as such:

  1. Remove the next image from the 'panes' array and place it in the 'panes_for_analysis' list
  2. Analyze the panes in 'panes_for_analysis'. If there is a fully packed block, remove those panes and add them to the layout
  3. If the 'panes' array is not empty, GOTO 1, else GOTO 4
  4. Add the remaining panes from 'panes_for_analysis' to the layout

This is the algorithm at a high level, though the specifics can get a little more complex, such as determining whether a fully packed block exists. The state of a fully packed block is also dependent on the number of columns for the grid

The ease of constructing layouts is highly dependent on the robustness of the 3rd party library. In the case that one does not exist, we fall back to our home-grown packing algorithm

Playing Live Video

Please see this article for a detailed version with reference material or continue in this section

Video playback functionality can be accessed through the '/asset/play/video.flv' API. We will show you how to use this API to play live video, though the same API can also be used to play historic video

Below is the Javascript code that creates the URL for playing live video footage with a HTML flash video player. You can run the javascript code on this site to generate the URL string

The caller of the API need to supply 2 parameters. which are [DEVICE_ID] and [AUTH_KEY]. The [DEVICE_ID] represents the ID of the camera of interest. The [AUTH_KEY] is used for authentication and can be found in the response header of the '/aaa/authorization' API

eagleEyeLiveVideoApiUrl = "https://[active_brand_subdomain].eagleeyenetworks.com/asset/play/video.flv" + "?id=[DEVICE_ID]" + "&start_timestamp=stream_"+(new Date().getTime()) + "&end_timestamp=+300000" + "&A=[AUTH_KEY]";

Long Polling

Json Request for POST /poll

{
     "cameras": {
         "100c30ea": {
             "resource": [
                 "event",
                 "pre",
                 "thumb",
                 "status"
             ],
             "event": [
                 "ECON",
                 "ECOF",
                 "AELI",
                 "AELO",
                 "EMES",
                 "EMEE",
                 "CECF",
                 "CSAT",
                 "CSDT",
                 "CONN",
                 "COFF",
                 "ESES",
                 "ESEE"
             ]
         },
         "100f6136": {
             "resource": [
                 "event",
                 "pre",
                 "thumb",
                 "status"
             ],
             "event": [
                 "ECON",
                 "ECOF",
                 "AELI",
                 "AELO",
             ]
         },
         "1009c1ab": {
             "resource": [
                 "event",
                 "pre",
                 "thumb",
                 "status"
             ],
             "event": [
                 "EMES",
                 "EMEE",
                 "CECF",
                 "CSAT",
                 "CSDT",
                 "CONN",
                 "COFF",
                 "ESES",
                 "ESEE"
             ]
         }
     }
}

Upon entering the Eagle Eye system, the user is presented with a grid of cameras. These cameras are retrieving images in real time through a poll stream. In this tutorial we will walk you through the steps to set up the poll stream for long polling using the /poll API

Long polling is used in the mobile clients. The process is to first register to the poll stream using the POST /poll API followed by constant API requests for GET /poll

The POST /poll API is used to initialize the poll stream and to register the events we want to listen for. For the mobile clients, we are listening to resource type 'pre' and 'status', which are the preview images and status bits. Since the data we are sending to the server is a Json, the content-type of this request will be 'application/json'

Response for GET /poll

{
    "cameras": {
        "10003254": {
            "event": {
                "PRFR": {
                    "cameraid": "10003254",
                    "timestamp": "20180528224954.312",
                    "file_offset": 17804500,
                    "frame_size": 6152,
                    "previewid": 1401314400
                }
            }
        },
        "100a9541": {
            "event": {
                "PRFR": {
                    "cameraid": "100a9541",
                    "timestamp": "20180528224955.507",
                    "file_offset": 12004385,
                    "frame_size": 3706,
                    "previewid": 1401314400
                }
            },
            "pre": "20180528224955.507"
        }
    }
}

Once the POST /poll request has been made successfully, a token is returned to the user. This token can be used to successfully make all subsequent GET /poll requests. If the token is not desired, the same requests can be made with the 'ee-poll-ses' cookie from the POST /poll request

The GET /poll request should be called frequently so that new data can arrive as soon as possible. The response may be empty or it may look something like the example to the right

Only attributes with updated information will be returned in the response payload. For the mobile apps, we monitor the 'pre' attribute for new timestamps and when a new timestamp does come in, we make the appropriate API call to retrieve the camera image

The power of this API lies in the ability of being able to control what events and resource types to listen to. This allows updates to the camera to be known in real time

Definition of Terms

Content

Press F8 to enable / disable Hover Modals
(onclick behavior will remain)

To close the Modal definition:

Definitions

The section content aims to define all unique Terms being used across the document

Eagle Eye Video Bank (EEVB) The service that Eagle Eye provides which safely, securely and easily stores video from surveillance and other cameras, allows access via the world wide web and provides a comprehensive control and management platform for multi camera surveillance

Eagle Eye Video Bank Services (EEVBS) This is the exposed WWW RESTful services that are used internally as well as externally for the interface of Cameras, User Interfaces, Mobile Applications and Image Analysis applications. This is described in this document

Electronic Serial Number (ESN) Electronic Serial Number used to identify resources. It can represent an Account, Bridge, Camera or User

Globally Unique Identifier (GUID) Globally Unique Identifier or Universally Unique Identifier that is a 128-bit integer number used to identify resources

Client A Client is a software application that interfaces with the EEVBS to display Assets, make changes or do analysis

Device This is either a Physical Camera or a Bridge

Device ID This is either a Camera ID or the equivalent ID for a Bridge. In the case of the Bridge there is no video stream associated with it

Bridge The Bridge is a product of Eagle Eye that sits at the customer location and talks to industry standard cameras. It converts the Cameras to be compatible with the EEVB and record the Assets. The Bridge is setup and controlled via a cloud based user interface. There is no user interface on the Bridge. The Bridge may serve local Assets directly to local Clients. The Bridge will also store Assets until they are transferred to the EEVB. The Bridge may be configured via DHCP or with a static IP address

Bridge ID A unique ID which is a 32 bit hex number. This unique ID is used to identify the Bridge. It is the logical ID of the device. If a Bridge is replaced (swapped out), it can be connected to the same Bridge ID maintaining other settings as part of the device swap

Camera A camera is a source of video data streams that are being delivered to the EEVB. Cameras produce streams of Assets over periods of time. These Assets are stored in the EEVB

Camera ID A unique ID which is a 32 bit hex number. This unique ID is used to identify the Camera and all of its Assets. This ID is not the Hardware ID of the Physical Camera. It is the logical ID of the data stream that has been or is being recorded from a conceptual camera location. If a Camera is replaced, it can be connected to the same Camera ID so the Asset streams can be continuous

Camera Name This is a non-unique name that the Administrator attaches to a Camera ID for easy reference in identifying the Assets generated by the Camera

Camera Tag Cameras are labeled using Camera Tags for basic configuration management. A Camera can have any number of Camera Tags. Tags are Global to the Account

Camera Tag ID Token assigned by EEVB to identify a Camera Tag

Physical Camera The actual physical Camera - different to the logical Camera which is referred to as the Camera

Connect ID This is a 16 character alphanumeric string broken into 4 sets of 4 digits. Bridges have a Connect ID printed on a sticker attached to them and on the inside of the cardboard box (not the outside). If the Device is preconfigured it will automatically attach to the User’s Account. However, if the Device is not pre-configured the Connect ID is entered by the Account Superuser to attach the Device to his Account. This will typically create one or more Cameras that correspond to the Physical Cameras and attach them to an Account. Connect ID is always displayed in UPPER CASE only. On entry it is case insensitive. There are no '0's (zero’s) or 'O's (letter Os) in the Connect ID to eliminate any possible confusion

Hardware ID This is the unique ID of the hardware of the Device. This ID varies based on the type of camera and other parameters. It is basically a string of up to 128 characters. A Hardware ID is mapped to a Camera ID by the EEVB when the Assets are stored. When Physical Cameras are attached to a Bridge we use the ONVIF GUID as the Hardware ID

Account An Account is the billing entity and the master control entity in the EEVB. All Cameras, Assets, Users and other items are associated with an Account. Accounts are identified by an Account Number. An Account has Users which are identified by email addresses (which is also their User Login). An Account can have multiple Sub-Accounts

Sub-Account A Sub-Account is an Account that is under another Account (called the Master Account) A Sub-Account is primarily a billing relationship and for most intents and purposes appears as a complete separate account. There is only 1 level of Sub-Accounts. An Administrator of a Master Account can get Administrator Access to a Sub-Account via a method still TBD. A Sub-Account has an indicator with regards to billing. A Sub-Account can either be billed via the Master Account or can be billed separately. If Billed separately the Sub-Account operates like any other account. If not billed separately then billing for a Master Account will show all the items of any Sub-Account broken out by Sub-Account and the Sub-Account will have NO billing of any kind (no permissions, no bill display, no credit card entry - nothing). There must be Eagle Eye administrator functionality to change the billing indicator, change Sub-Accounts to Accounts and move Sub-Accounts to other Master Accounts. Basically Sub-Accounts are used by Resellers; We can keep track of which Accounts are associated with which Reseller, Resellers can get administrator access and we can either bill to the Reseller or bill the customer directly. Sub-Accounts are also used by large companies who want separate billing by division

Account ID A 64 bit decimal number that uniquely identifies an Account. This is a numeric number that is assigned by the EEVB when a new Account is created. The Account Superuser is made aware of his Account Number, but does not need to know it for logging in. He may need it when calling in for billing questions. This Account Number is used to tie into the Eagle Eye accounting systems. All billing is based on an Account

Account Level This is a numeric code that identifies the type of Account. Currently we have 4 Account Levels; 1=Eval, 2=Basic, 3=Premium, 4=Enterprise. Different features are available on each of these Account Levels. Different Billing is performed on each of these Account Levels (per Camera costs are different). Each of these Account Levels has a different Default Retention Policy. There will likely be additional Account Levels in the future

User Every Account has Users. A User corresponds to a single person or a single station that requires access to the Eagle Eye Video Bank. Users can have different permissions and access. Access control may limit cameras that are visible or actions that can be taken on cameras

User ID A User ID is a 32 bit hex number that uniquely identifies a User. This User ID is assigned by the EEVB when the User is created

User Login A User’s Login is his email address. This uniquely identifies the user and enables password recovery. EEVB supports only email based User Logins. Each User is associated with only one Account and will only have one User ID assigned by the system

Account Superuser An Account must have at least one Account Superuser. The last Account Superuser cannot be deleted. An Account may have multiple Account Superusers. The Account Superuser can add and delete other users, can change permissions as well as make other Account Superusers, add/delete Cameras and view all Assets. The Account Superusers will be notified if there are any billing issues and can view the billing history. Account Superusers can change billing and purchase additional services

Layout A collection of Cameras, the position and size on the screen, the setting associated with the display of the cameras on the screen stored and named. Layouts are used to display camera feeds on monitor screens and to assist with research work. Layouts are created by Users and named by them. Layouts can be either User specific or global in nature. Account Layouts are visible to all Users of an Account. Each Camera Group has an associated implied Layout with it. Layouts have permissions for each User

Activation Process when a new Camera or Bridge comes online and the User acknowledges it, names it and brings into his system. Billing starts at the Activation time. Any terms and conditions might have to be agreed at activation time as well

Asset Assets are the items stored in the EEVB which have been captured or created by Cameras and Analysis Systems. All Assets are associated with a Camera which in turn is associated to an Account. Normally Assets are previews and video

Saved Assets Normally Assets are rotated in and rotated out. For example the EEVB might keep the last 14 days of video Assets from a Camera. Saved Assets are those Assets and associated data that a User has indicated need to be saved for a longer period of time. These Assets are copied from the normal rotation (Retention period) so that they are not deleted

Video Assets Video Assets are recorded streams of video that include audio

Shared Assets Shared Assets are Assets that a User has indicated should be shared to the public, other Users or other potential locations. These Assets are a subset of Saved Assets

Retention Policy Every Camera has associated with it a Retention Policy. The Retention Policy indicates how much and how long the Assets (the video) from the Camera should be retained. The Account has a Default Retention Policy which is used for all Cameras in that account. This Policy can be overridden on a per Camera basis

Timestamp All Assets have a Timestamp attached. The Timestamp records when the Asset happened. Timestamps are always in UTC and maintained to the nearest millisecond. Timestamps are rendered in text as YYYYMMDDhhmmss.xxx. Timestamps are represented numerically as milliseconds from the epoch (Jan 1 1970… same as time(), gettimeofday, etc. on Linux, timestamps in Javascript, etc.)

Event An Event is a span of time that is indicated as of interest. Events are meta data that adds value to Assets. Cameras generate Events based on detection - motion detection, audio detection, etc. Cameras may or may not provide Preview Assets or Video Assets when Events are generated. Many events trigger recording or saving of Assets. Events can also be User generated (A recording is scheduled, Video is streamed, tagged or saved). Events may be generated by Analysis Systems (identification of license plates). Events have Meta Data which indicate additional information about them (why they were recorded, specific details for each detection type, etc.). Events all start at a specific time and for a specific cameras. Events normally have length, but the length can also be zero. Data can be attached to an event when its created or later (Users can add comments to an event, an Analysis System can associate names with faces.) Events are a primary element of the Eagle Eye UI

Incomplete Event Events have a beginning and an end. Events may be received or obtained before they are completed. In this case they are considered an Incomplete Event. This is most common when using the Poll interface and receiving events in real time. In the Polling interface if an Incomplete Event is received, then when the event completes, it will be received again

Span A span is a duration of time between two Events that compliment each other

Key Frame Image that is the representative image of an Event. Generally selected from the middle of a motion segment

Analysis System Analysis Systems use the EEVBS to analyze existing or incoming Assets and attach meta data to the Assets in the form of Meta Data Assets. The Meta Data can identify people, places and things in the Asset Streams. This Meta Data can then be searched, organized, analyzed and alerted upon

Alert Events Alert Events are Events that are known to generate an Alert

Alert / Notification Alerts or Notifications are generated from Events when the User has created criteria to create them. Alerts may be given in any number of methods (on screen, email, text message, etc.). Alerts may have to be acknowledged by the User. The EEVBS will collapse alerts into a single alert to avoid creating too many that would be annoying. Alerts are almost always generated from Events. Alerts are commonly generated when Cameras are turned off, go offline or when motion is detected in areas where there should not be any motion. The Alert may or may not include the video or other Assets of interest. Alerts sent to Users automatically create a Save to provide organized access to the related image, video and meta-data. The URL to the save is provided within the Alert for immediate access

Motion Detection Region Each camera can have 1 or more Motion Detection Regions. These are areas where motion detection will be performed. Normally if there is motion in ANY Motion Detection Region video recording will be enabled. Motion Detection in any region will always generate an Event. The Events will generate Alerts if the User has configured it to generate Alerts on that Motion Detection Region

Privacy Region A Camera may have 1 or more Privacy Regions defined. This is a mask where all Asset images and video are blanked out

Meta Data Asset This is data that identifies items in the Video Assets. Used to identify faces, license plates, activity, motion and other items that are happening in the video Assets

Audit Trail All changes and activities by each user are recorded for audit trail. These items are stored on a per user basis. Things stored included: all configuration changes, all camera configuration changes (PTZ), all video’s viewed, all camera adds and deletes, all manual recordings, all changes to schedule, all changes to alerts

EE Director The Director is the URL first contacted when a Camera is connecting with the EEVBS. The Director performs verification of access, provides account information and lists of Cameras in an Account. Given a Camera ID it provides the URL of the appropriate EE Archiver(s) that have the Assets of the requested Camera so the application in question can get them for display. http://d.eagleeyenetworks.com. Cameras also contact the EE Director to determine where they should send their Assets

EE GUI Eagle Eye Graphical User Interface (built on HTTP Java script) to control and view Cameras. The EEN user interface is built on the EEVB API

EE Archiver The architectural element that communicates with the Cameras and stores all the Assets. It serves up the Assets to the EE GUI as well as the iOS App and Android App. EE Archivers are accessed via IP address

EE Locator The EE Locator has a fixed IP address that does not change. Camera and Bridges when they first installed attempt to contact the EE Locater using DNS at first, but then a fixed IP address if DNS does not work. The EE Locator provides the camera its Camera ID, authenticates it and directs it to the appropriate Archiver and other connections it will need to communicate with the EEVB. If the Locator goes down, the only function that will stop working is adding new Cameras

Hover Modals

Layout ID

Master Account

Superuser (internal use only)

Account Superuser

Asset Class

PNG Span

EENSDK

Overview

In order to get our technology partners up to speed quickly, we provide SDKs for integrations with iOS and Android. These are intended to be included in your own mobile apps. Please see the sections below for specifics on each platform.

Public Interface

class EENMediaPlayer

startWithMediaItem(EENMediaItem item); Starts stream with provided media item.

showControlBar(); Shows control bar.

hideControlBar(); Hides control bar.

play();

Resumes the stream that is in paused state. The playback state will be changed to either buffering or playing

pause();

Pauses the stream that is in playing state. The playback state will be changed to paused

destroy();

Disposes the resources that were used for streaming video. Player state changes to unknown, playback state changes to paused

weak EENMediaPlayerDelegate delegate; Indicates object which will receive and process callbacks.

readonly EENMediaItem currentItem; Indicates currently played item.

readonly EENSDKError failureReason; If status is failed, this property Indicates the error that caused the failure.

readonly EENMediaMetadata metadata; If status is readyToPlay, this property Indicates loaded metadata for current media item.

readonly EENMediaPlayerStatus status; Indicates current status of media player.

readonly EENMediaPlayerPlaybackState playbackState; Indicates current playback state of media item.

protocol EENMediaPlayerDelegate

onStatusChanged(EENMediaPlayer mediaPlayer, EENMediaPlayerStatus newStatus) Will be called on status change

onPlaybackStateChanged(EENMediaPlayer mediaPlayer, EENMediaPlayerPlaybackState newPlaybackState) Will be called on playback state change.

donePressed(EENMediaPlayer mediaPlayer) Will be called when done button was pressed.

enum EENMediaPlayerPlaybackState

case paused; This state is entered when user pressed pause button.

In this state, playback is paused indefinitely and will not resume until user presses play button.

case buffering; This state is entered when when sufficient media data has been buffered for playback to proceed.

case playing; In this state, playback is currently progressing. Should playback stall because of insufficient media data, playbackState will change to buffering.

enum EENMediaPlayerStatus

case unknown; Indicates that the status of the player is not yet known because it has not tried to load or currently loading media resources for playback.

case readyToPlay; Indicates that the player is ready to play MediaItem instance. Loaded data is described by the fields of the metadata property.

case failed; Indicates that the player can no longer play MediaItem instance because of an error. The error is described by the value of the failureReason property.

class EENMediaItem

readonly String cameraId; Represents the camera ID.

readonly String baseUrl; Represents the base URL of the video stream.

readonly String apiKey; Represents the API key of the authorized user.

readonly String title; Represents the title being shown in navigation bar.

readonly Date startDate; Represents the start date of the stream in Greenwich time (GMT+0). Will be nil for the item representing live stream.

readonly Date endDate; Represents the end date of the stream in Greenwich time (GMT+0). Will be nil for the item representing live stream.

readonly String dateFormat; Represents the date format of the current playback time being shown in navigation bar.

readonly TimeZone timeZone; Represents the time zone of the current playback time being shown in navigation bar.

class EENMediaItemBuilder

static EENMediaItemBuilder builderForLiveItem(String cameraId, String baseUrl); Creates a builder instance for the live item.

static EENMediaItemBuilder builderForHistoricalItem(String cameraId, String baseUrl, Date startDate, Date endDate); Creates a builder instance for the historical item.

EENMediaItemBuilder setApiKey(String apiKey); Configures the builder with a provided API key. Will override previously set value.

EENMediaItemBuilder setTitle(String title); Configures the builder with a provided title to be shown in navigation bar. Will override previously set value.

EENMediaItemBuilder setDateFormat(String dateFormat); Configures the builder with a provided date format. Will override previously set value.

EENMediaItemBuilder setTimeZone(TimeZone timeZone); Configures the builder with a provided time zone. Will override previously set value.

EENMediaItem build(); Builds EENMediaItem instance.

class EENMediaMetadata

readonly Data header; Represents the header of the media item.

readonly Date startDate; Represents the start date of the media item.

readonly Double duration; Represents the duration of the media item.

class EENSDKError

readonly EENSDKErrorCode code; Represents the code of the error.

readonly String generalReason; Represents the general description of the error.

readonly String detailedReason; Represents the detailed description of the error.

enum EENSDKErrorCode

case internalError = 1; General error occurred.

case authenticationError = 2; You are not authenticated to perform an action.

Class Diagrams

Class Relationship

EENSDK-iOS

Installation

  1. Add EENSDK-iOS.framework file to your project.
  2. Add EENSDK-iOS.framework to Embedded Binaries section of your target’s General tab.
  3. If you are using Swift, add import EENSDK_IOS to the file you want to import it from
  4. If you are using Objective-C, add #import <EENSDK_IOS/EENSDK_IOS.h> to the file file you want to import it from

Downloads

Please download the latest version to make sure you have the latest features and bug fixes.

Version Download Description
2.0.0 release-iphoneos-v200.zip Release version, built with Xcode 10.2.1 (10E1001)
2.0.0 debug-iphoneuniversal-v1200.zip Debug version, built with Xcode 10.2.1 (10E1001)
2.0.0 sample-app-v200.zip Demo application, built with Xcode 10.2.1 (10E1001) and EENSDK-iOS v2.0.0

Usage Examples

We have included example in both Swift and Objective-C. We will continue to provide more examples and updates.

Swift Example

// init media player
let mediaPlayer = EENMediaPlayer()

// set media player delegate
mediaPlayer.delegate = self

// add media player to a view
mediaPlayer.frame = view.frame
view.addSubview(mediaPlayer)

// init builder for live item
let builder = EENMediaItemBuilder.init(forLiveItem: cameraId, baseUrl: baseUrl)

// init builder for historical item
let builder = EENMediaItemBuilder.init(forHistoricalItem: cameraId, baseUrl: baseUrl, start: startDate, end: endDate)

// set api key for the builder
builder.setApiKey(apiKey)

// set time zone for the builder
builder.setTimeZone(timeZone)

// create  media item
let mediaItem = builder.build()

// start media player
mediaPlayer.start(with: mediaItem)

// show control bar
mediaPlayer.showControlBar()

// dispose of media player
mediaPlayer.removeFromSuperview()
mediaPlayer = nil

Objective-C Example

// init media player
EENMediaPlayer *mediaPlayer = [[EENMediaPlayer alloc] init];

// set media player delegate
mediaPlayer.delegate = self;

// add media player to a view
mediaPlayer.frame = view.frame;
[view addSubview:mediaPlayer];

// init builder for live item
EENMediaItemBuilder *builder = [EENMediaItemBuilder builderForLiveItem:cameraId baseUrl:baseUrl];

// init builder for historical item
EENMediaItemBuilder *builder = [EENMediaItemBuilder builderForHistoricalItem:cameraId baseUrl:baseUrl startDate:startDate endDate:endDate];

// set api key for the builder
[builder setApiKey:apiKey];

// set time zone for the builder
[builder setTimeZone:timezone];

// create  media item
EENMediaItem *mediaItem = [builder build];

// start media player
[mediaPlayer startWithMediaItem:mediaItem];

// show control bar
[mediaPlayer showControlBar];

// dispose of media player
[mediaPlayer removeFromSuperview];
mediaPlayer = nil;

EENSDK-Android

Import Dependencies

build.gradle

 dependencies {
    ...

    // ExoMedia
    implementation 'com.devbrackets.android:exomedia:4.3.0'
 }

The EENSDK-ANDROID is built using ExoMedia framework. In order to use EENSDK-ANDROID you need to import it.

  1. See example changes to build.gradle on the right

Import EENSDK-Android

build.gradle


repositories {
    ...

    flatDir {
        dirs 'libs'
    }
}

dependencies {
    ...

    implementation(name:'EENSDK', ext:'aar')
}
  1. Add EENSDK.aar file to your project (libs directory).
  2. See additional changes to build.gradle on the right

Downloads

Please download the latest version to make sure you have the latest features and bug fixes.

Version Download Description
2.0.0 sdk-v2.0.0.zip Release version, contains AAR file that should be imported
2.0.0 Sample-v2.0.0.zip Demo application

Usage Examples

We have included example in Java. We will continue to provide more examples and updates.

// init media player
EENMediaPlayer player = new EENMediaPlayer( context );

// init builder for live item
EENMediaItemBuilder builder = EENMediaItem.Builder.builderForLiveItem( cameraID,
                                                                       videoUrl );

// init builder for historical item
EENMediaItemBuilder builder = EENMediaItem.Builder.builderForHistoricalItem( cameraID,
                                                                             videoUrl,
                                                                             startDate,
                                                                             endDate );

// set api key for the builder
builder.setApiKey( apiKey );

// set title to show in controls bar
builder.setTitle( title );

// set time zone for the builder
builder.setTimeZone( timeZone );

// create  media item
EENMediaItem mediaItem = builder.build();

// start media player
player.startWithMediaItem( mediaItem );

// show controls bar
player.showControlBar();

// release resources of media player
player.release();