Automation

Automation

EvTrack supports integration with external APIs via the Automation Module.

Instructions

  1. Add New Automation Entity
  2. Browse to the new entity, click on the Actions tab and click on the “Add” button:
  3. Configure the REST API Call parameters.
  4. Browse to the new entity, click on the Events tab and click on the “Add” button.
  5. Select the Event Type, Source Entity and Action:
  6. Confirmed or Troubleshoot the integration via the System Settings > System Logs

Step 1:

Add New Automation Entity

Step 2:

Browse to the new entity, click on the Actions tab and click on the “Add” button:

Step 3:

Configure the REST API Call parameters.

Please make sure that the correct Media Type is configured to match the Body Payload

Example JSON Payload with Template Placeholders

<#setting time_zone='GMT'>

{

"licensePlate": "${credential.uniqueIdentifier}",

"cameraId": "${accessControlPoint.id}",

"timestamp": "${createdTime?number_to_datetime?string["dd.MM.yyyy HH:mm"]}",

"location": "Main Rd Exit"

}

Internally EvTrack utilises Apache Freemarker Templating engine to process the URL and BODY parameters. Please see Annex A: Available Variables

${createdTime} is defined as Unix timestamp and can be transformed with Freemarker Date functions by casting (${createdTime?number_to_datetime) it to a Date object.

https://freemarker.apache.org/docs/ref_builtins_date.html

Once casted any of the Date functions can be used, ie:

${createdTime?number_to_datetime?string["dd.MM.yyyy HH:mm"]}

Step 4:

Browse to the new entity, click on the Events tab and click on the “Add” button.

Step 5:

Select the Event Type, Source Entity and Action:

Step 6:

Confirmed or Troubleshoot the integration via the System Settings > System Logs

Annex A: Available Variables

Automation Event AE Access_Control_Point_Read Access_Control_Point_Access_Granted Access_Control_Point_Access_Denied
long createdTime X X X
String eventClassName X X X
Integer tenantId X X X
String credential.uniqueIdentifier X X X
Date credential.activeDate X X X
Date credential.expiryDate X X X
Integer credential.pin X X X
Integer credential.useLimit X X X
Integer accessControlPoint.id X X X
String accessControlPoint.name X X X