How to export person data to any application
(via AJAX / HTTP)

1. In the Options window select the Http tab. Make sure the Enable Http Server checkbox is checked. Optionally change port number to your choice, this step however shall be rarely needed.

2. Confirm your choice by pressing the OK button and restart the Glass-Reader application. Next time Glass-Reader is started the built in HTTP server is active and listening on the port of the choice (7208 by default).

Send GET HTTP request getPersonData from your application or simply as a test from curl program:

$ curl -v http://localhost:7208/getPersonData

The response will be JSON file with Emirates ID person data from card recently read:

< HTTP/1.0 200 OK
< Content-Type: application/json; charset="utf-8"
< Date: Mon Jun 7 13:50:27 2021
< Content-Length: 704
<
{ [704 bytes data]
100   704  100   704 0  0  88000      0 --:--:-- --:--:-- --:--:-- 88000{"body":{"data":{"CardReadDate":"07.06.2021",
"CardReadDateTime":"2021-06-07T13:50:27","CardReadTime":"13:50:27","DateOfBirth":"","ExpiryDate":"","FirstNameArabic":"",
"FirstNameEnglish":"","FullNameArabic":"","FullNameEnglish":"","Gender":"","HomeCityDescArabic":"","HomeCityDescEnglish":
"","HomeEmail":"",
"HomeMobilePhoneNumber":"","IdNumber":"","IssueDate":"","LastNameArabic":"","LastNameEnglish":"","NationalityArabic":"",
"NationalityEnglish":"","OccupationTypeArabic":"","OccupationTypeEnglish":"","PassportExpiryDate":"","PassportIssueDate":"",
"PassportNumber":"","ReadID":"","ResidencyExpiryDate":"","ResidencyNumber":"","SponsorName":"","WorkEmail":"",
"WorkMobilePhoneNumber":""},
"success":true}}

This response can be processed by any caller application and extracted data of choice put to its user interface or any form.


Copyright © 2022 Glass-Spider