Eagle Eye Networks

Kisi x Eagle Eye Networks Integration

We will take advantage of Eagle Eye annotation api that allows us to annotate a video as well as retrieve the annotated data.

A good use case is when we want to send a Kisi lock/unlock event into eagle video stream data during a lock/unlock action.

Steps

1. A sample Kisi event (lock event) which we will try to send to Eagle Eye is as represented as a JSON below:

{

"id": 100000000,

"actor_type": "User",

"actor_id": XXXXXXXX,

"action": "unlocked",

"object_type": "Lock",

"object_id": 25992,

"success": true,

"code": "000000",

"message": "John Doe (jdoe@getkisi.com) unlocked lock Main Door.",

"created_at": "2022-09-04T17:52:55Z",

"references": [

{

"id": XXXXX,

"type": "Lock"

},

{

"id": XXXX,

"type": "Organization"

},

{

"id": XXXXX,

"type": "Place"

},

{

"id": XXXXXXX,

"type": "RoleAssignment"

}

]

}

]

}

2. We can send these events to eagle eye create annotation api, on a successful request to Eagle Eye Api, we get a response containing a UUID (Universal Unique Identifier), the camera id, and time stamp. The time stamp represents the time at which we sent the event to Eagle Eye

For example:

{

"uuid": "17081796-2c7c-11ed-944a-XXXXXXXXX",

"cameraid": "XXXXXX",

"ts": "20220904180459.227",

"ns": 0

}

3. Get annotation: We are now able to retrieve the annotation/events we sent via the Eagle Eye get annotation api.

Tying It Together

We can automate these steps using workflow automation tools like Zapier, we’ll go through how we can achieve that below:

Eagle Eye

Fig 1. An overview of the steps required to automate sending events to Eagle Eye from Kisi

Steps

1. Create Zap on Zapier

2. Select Kisi on Zapier

Eagle Eye

3. Define Kisi Trigger on Zapier

Currently, Kisi has only the event trigger listed on Zapier, select this and click on continue and choose your account.

Eagle Eye

4. Add Action 1 (Authenticate Eagle Eye)

The Eagle Eye api requires that you authenticate first. A token is given. This single use token is valid for a predefined duration or until it has been used. Once the Authentication Token is obtained, it will be used to authorize in the next step.

  • Chose Post in Webhooks by Zapier
  • Input https://login.eagleeyenetworks.com/g/aaa/authenticate in the url field
  • Specify payload type as JSON
  • Specify your Eagle Eye account username and password in the data field
  • Click continue and press action to ensure that the request is successful
Eagle Eye

5. Add Action 2 (Authorize Eagle Eye)

Authorize Eagle Eye by using the token returned in step 4 above. Authorization is the final step of the login process performed by utilizing the token from Authenticate. 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.

Eagle Eye

6. Send Events to Eagle (Create Annotation)

Using events retrieved in Kisi from Step 3, we define a webhook PUT request to Eagle Eye

Eagle Eyes

7. Test your action to confirm that Authentication, Authorization with Eagle Eye and sending Kisi events to Eagle Eye are now fully automated.

Conclusion

Sending Kisi Events to Eagle Eye is a simple three-step process that can be fully automated. Also, we can automate retrieving these events by using the Eagle Eye get annotation api. Preferably, you can automate this whole process as well.

Get in Touch About This Integration

Trusted by industry–leading companies