About

The eLog library was initially developed as a research prototype and later published for lifelogging researchers in 2010 to help them easily analyze heterogenous data and complex visualization. It has been kept growing with the progress of mobile computing environments and recently its UI part is released with GPL v3 license for wider usage. The eLog UI library is optimized for mobile environment and can get easily integrated with existing Web services.

Who We Are

The original work was proposed by Pil Ho and later extended the work with collaboration with 28 researchers around the world who contributed their lifelogs, collaborated for lifelog analysis and share research results to build up an open lifelogging platform for the public. Pil Ho has been keeping the development updating the library following up the progress in mobile computing.

Updates

  • Nov. 2014: Change the web page skin using bootstrap.
  • Nov. 2014: Published elog UI library as GPL v3.
  • Oct. 2014: Version up eLog library and documentation.

 

eLifeLog API

eLifeLog provides a set of web services to directly access research database contents. With your API key, you can access below API services. Your key is the md5 hash of a string looking like '1f3870be274f6c49b3e31a0c6728957f' -- this will not work, you know that :)

For user authentification, each user should attach the below key as the value of the user_key address arguement. You must log in to see your key.

[[[http://www.elifelog.org/client/elog_user_key.php height=50px]]]

Note that all server access activities using your API key are logged to efficiently maintain server resources for all users. So please treat your key just like your password. 

Below APIs are also available in your database as MySQL stored procedures. It's input and out could be slightly different due to JSON format conversion and url encoding. However you can directly manipulate results from a structured query. Please note that direct image or video access is not available in MySQL stored procedures since they are not stored in the database. You may retrieve the list of images from the database and use below GetImage JSON API to get the image binary data.

The syntax to query the server for clients should conform to the below structure:

http://www.elifelog.org/client/server/index.php?argument_name1=argument_value2&argument_name2=argument_value2&....&argument_nameN=argument_valueN

Remember that argument_values should be properly encoded to be the URL compatible (Ex. See urlencode of PHP or similar of other languages) so that the server can correctly parse your value. For instance, a timestamp value, "2010-10-04 09:02:55", should be encoded to "2010-10-04%2009:02:55" where the space is URL encoded as "%20".

APIs will be further expanded and will be updated at here. They have been tested throughly though in the early development stage. Your inputs for improvement will be appreciated. Leave a comment here or at the forum.

API Call Arguments

ArgumentData TypeComment
elog_commandstringAPI call command
callbackstringJSON data header name
latitude, longitudedoubleGPS value
lat1, log1doubleGPS region center location
lat2, log2doubleGPS region NE position
lat3, log3doubleGPS region SW position
daydoubleSearch time length in day
keywordstringSearch keyword value
faceidintegerFace ID
serverurlstringeLog server URL to tag the link in the data
timefrom, timeto, utctimestamp,timecenterstringStart timestamp (ex. 2010-10-01 10:00:00)
personnamestringSearch person name
statisticsstring

Currently supports: 'DATACOUNT', 'MONTHLY_STATISTICS'

thumbnailsizeintegerCurrently supports: 16 or 64
limitintegerLimit search results count
radius, maxradiusdoubleSearch region radius in Km
gpsregionid, startregionid, endregionidintegerUnique GPS region id
timespan, maxtimespanintegerSearch time span in seconds
pathidintegerSeach GPS route path ID
regionx, regionyintegerImage anonymizer selected region starting X, Y position
regionwidth, regionheightintegerImage anonymizer selected region width and height
timezonestringSet local time zone (ex. "+2:00")
user_keystringUser eLifeLog API key value

 

API Call Functions

Name (elog_command value)ArgumentsReturn (JSON format or Image/JPEG headered binary data)
GetTimeSpanbyGPSLocationlatitude, longitude, distance, day
Array((
  `id` int(11),
  `latitude` double,
  `longitude` double,
  `distance` double,
  `gps_UTC_timestamp` timestamp
))
GetImagethumbnailsize, (utctimestamp OR unixtimestamp) 
Array((
  `sImageURL` text,
  `sLastRecordingTime` timestamp,
  `sLocalTime`  timestamp
))
GetImageListserverurl, timefrom, timeto
Array((
  `sImageURL` text,
  `sLastRecordingTime` timestamp,
  `sLocalTime`  timestamp,
  `sUnixTimestamp` unixtimestamp
))
GetImageListbyGPSRegionIDserverurl, gpsregionid
Array((
  `start` timestamp,
  `end` timestamp,
  `durationEvent` bool, // Always 'true'
  `color` varchar, // color hex code, ex) '#CCCCCC'
  `event_count` int,
  `description` text
))
GetLocationbyTimetimefrom
Array((
  `start` timestamp,
  `durationEvent` bool, // Always 'false'
  `description` text,
  `longitude` double,
  `latitude` double,
  `gps_timestamp` timestamp,
  `image` varchar
  `icon` varchar
))
GetGPSRegionbyTimespan

timespan, timefrom, timecenter,

timeto, maxtimespan, timezone

Array((
  `start` timestamp,
  `end` timestamp,
  `durationEvent` bool, // Always 'true'
  `color` varchar, // color hex code, ex) '#CCCCCC'
   `description` text
  `event_count` int,
))
GetSensecamRegionbyGPSClustergpsregionid
Array ((
  `region_id` int(11),
  `count` int(11),
  `radius_km` double,
  `latitude_center` double,
  `longitude_center` double,
  `latitude_max` double,
  `longitude_max` double,
  `latitude_min` double,
  `longitude_min` double
))
GetSensecamRegionbyTimespan

timespan, timefrom, timecenter,

timeto, maxtimespan (Note: For this API, we use UNIX timestamp for timefrom, timecenter and timeto)

Array((
  `start` timestamp,
  `end` timestamp,
  `durationEvent` bool, // Always 'true'
  `color` varchar, // color hex code, ex) '#CCCCCC'
  `description` text
  `event_table` varchar,
 `start_region_id` int,
 `end_region_id` int,
 `path_id` int
))
GetGPSRegionbyRadius

radius, lat1, log1, lat2, log2,

lat3, log3, maxradius

Array((
  `id` int, // region id
  `latitude` double,
  `longitude` double,
  `gps_UTC_timestamp` timestamp
))
GetSensecamRegionbyPathstartregionid, endregionid
Array ((
  `start_region_id` int(11),
  `end_region_id` int(11),
  `path_id` int(11),
  `path_start_gps_UTC_timestamp` timestamp,
  `path_end_gps_UTC_timestamp` timestamp,
  `time_interval` time
))
QueryPathstartregionid, endregionid
Array ((
  `id` int(11),
  `latitude` double
  `longitude` double,
  `distance` double,
  `gps_UTC_timestamp` timestamp
)) 
QueryPathFromRegionIDstartregionid
Array ((
  `start_region_id` int(11),
  `end_region_id` int(11),
  `path_id` int(11),
  `path_start_gps_UTC_timestamp` timestamp,
  `path_end_gps_UTC_timestamp` timestamp,
  `time_interval` time
))
QueryPathTimeSpanpathid, timefrom, timeto
Array ((
  `id` int(11),
  `latitude` double,
  `longitude` double,
  `distance` double,
  `gps_UTC_timestamp` timestamp
))
GetPreviousImageTimestamputctimestamp
Array ((
  `timestamp` timestamp
)) 
GetContactListserverurl, keyword (if null, return full list)

Array ((
  `sName' varchar(255),
  `sFaceImageURL` text,
  `sLastRecordingTime` timestamp,
  `sInformation` text
))

GetPersonContactkeyword
Array ((
  `sName' varchar,
  `sLastRecordingTime` timestamp,
  `sInformation` text
))
GetEmailListserverurl, keyword, timefrom, timeto, limit
Array ((
  `iMsgNo` int,
  `sSubject` text,
  `sMailFrom` varchar,
  `sMailFromContactName` varchar,
  `sMailFromFaceImageURL` text,
  `sMailTo` varchar,
  `sMailToContactname` varchar,
  `sMailToFaceImageURL` text,
  `sDate` timestamp,
  `sPreview` text
))
GetPeopleListserverurl
Array ((
  `sName' varchar, // Person name
  `sID` int, // Face image ID
  `sLastRecordingTime` timestamp, // UTC timestamp
  `sLocalTime` timestamp, // Local timestamp
  `iTotalCount` int // Total number of images
))

 

API Call Example

Try below links by replacing your_key value with your key shown above.

Retrieve the image list

JSON query: Retrieve the image list taken from 2010-10-14 00:00:00 to 2010-10-15 23:59:59. Note that this URL call is URL encoded for compatibility. This example also shows an example using the "serverurl" argument to retrieve the thumbnail URL of an image.

http://www.elifelog.org/client/server/index.php?user_key=your_key&elog_command=GetImageList&timefrom=2010-10-14%200%3A0%3A0&timeto=2010-10-15%2023%3A59%3A59&callback=Ext.util.JSONP.callback&serverurl=https%3A%2F%2Fwww.elifelog.org%2Fclient%2Fserver%2Findex.php%3Fuser_key%3Dyour_key%26elog_command%3DGetImage%26thumbnailsize%3D64%26utctimestamp%3D

Return JSON data (sampled):

Ext.util.JSONP.callback({"root":[{"sImageURL":"https:\/\/www.elifelog.org\/client\/server\/index.php?user_key=your_key&elog_command=GetImage&thumbnailsize=64&utctimestamp=2010-10-14 09:32:49","sLastRecordingTime":"2010-10-14 09:32:49","sLocalTime":"Thu, 14 Oct 2010 09:32:49"},{"sImageURL":"https:\/\/www.elifelog.org\/client\/server\/index.php?user_key=your_key&elog_command=GetImage&thumbnailsize=64&utctimestamp=2010-10-14 09:32:59","sLastRecordingTime":"2010-10-14 09:32:59","sLocalTime":"Thu, 14 Oct 2010 09:32:59"},{"sImageURL":"https:\/\/www.elifelog.org\/client\/server\/index.php?user_key=your_key&elog_command=GetImage&thumbnailsize=64&utctimestamp=2010-10-14 13:19:35","sLastRecordingTime":"2010-10-14 13:19:35","sLocalTime":"Thu, 14 Oct 2010 13:19:35"}]});

Retrieve the time clustered image regions

JSON query:

http://www.elifelog.org/client/server/index.php?user_key=your_key&elog_command=GetSensecamRegionbyTimespan&timespan=60&maxtimespan=24000&timefrom=1286064000&timecenter=1286928000&timeto=1287446400&timezone=+2:00

Return JSON data:

{"events":[{"start":"Tue, 05 Oct 2010 12:06:02","end":"Tue, 05 Oct 2010 16:49:36","durationEvent":true,"description":"Taken images: 52<p>From: Tue, 05 Oct 2010 12:06:02<p>To: Tue, 05 Oct 2010 16:49:36","event_table":"sensecam_timespamp_region","event_count":"52"},{"start":"Tue, 05 Oct 2010 12:06:02","end":"Tue, 05 Oct 2010 16:49:36","durationEvent":true,"description":"Taken images: 44<p>From: Tue, 05 Oct 2010 12:06:02<p>To: Tue, 05 Oct 2010 16:49:36","event_table":"sensecam_timespamp_region","event_count":"44"},{"start":"Tue, 12 Oct 2010 10:11:09","end":"Tue, 12 Oct 2010 14:39:18","durationEvent":true,"description":"Taken images: 32<p>From: Tue, 12 Oct 2010 10:11:09<p>To: Tue, 12 Oct 2010 14:39:18","event_table":"sensecam_timespamp_region","event_count":"32"},{"start":"Mon, 04 Oct 2010 09:00:20","end":"Mon, 04 Oct 2010 13:23:12","durationEvent":true,"description":"Taken images: 888<p>From: Mon, 04 Oct 2010 09:00:20<p>To: Mon, 04 Oct 2010 13:23:12","event_table":"sensecam_timespamp_region","event_count":"888"},{"start":"Wed, 13 Oct 2010 14:49:14","end":"Wed, 13 Oct 2010 14:50:14","durationEvent":true,"description":"Taken images: 3<p>From: Wed, 13 Oct 2010 14:49:14<p>To: Wed, 13 Oct 2010 14:50:14","event_table":"sensecam_timespamp_region","event_count":"3"}]}

Get image

JSON query: Get the image thumbnail (size 16) taken on 2010-10-04 09:02:55

http://www.elifelog.org/client/server/index.php?user_key=your_key&elog_command=GetImage&thumbnailsize=16&utctimestamp=2010-10-04%2009:02:55

JSON query: Get the image thumbnail (size 64) taken on 2010-10-04 09:02:55

http://www.elifelog.org/client/server/index.php?user_key=your_key&elog_command=GetImage&thumbnailsize=64&utctimestamp=2010-10-04%2009:02:55

JSON query: Get the image taken on 2010-10-04 09:02:55

http://www.elifelog.org/client/server/index.php?user_key=your_key&elog_command=GetImage&utctimestamp=2010-10-04%2009:02:55

JSON query: Get the image taken on UNIX time 1286272247, which is 2010-10-04 09:02:55 in UTC timezone.

http://www.elifelog.org/client/server/index.php?user_key=your_key&elog_command=GetImage&unixtimestamp=1286272247

Return data:

JPEG image

Get GPS location by Timespan

JSON query:

http://www.elifelog.org/client/server/index.php?user_key=your_key&elog_command=GetTimeSpanbyGPSLocation&latitude=46.069&longitude=11.124&distance=1&day=220&callback=Ext.util.JSONP.callback

Return JSON data:

Ext.util.JSONP.callback({"root":[{"id":"1","latitude":"46.069541","longitude":"11.12388","distance":"0.0608645588179898","gps_UTC_timestamp":"2010-10-04 00:02:20"},{"id":"1","latitude":"46.069541","longitude":"11.12388","distance":"0.0608645588179898","gps_UTC_timestamp":"2010-10-04 00:02:49"},{"id":"1","latitude":"46.06903","longitude":"11.12381","distance":"0.0150324880803493","gps_UTC_timestamp":"2010-10-04 00:03:11"},{"id":"1","latitude":"46.06903","longitude":"11.12381","distance":"0.0150324880803493","gps_UTC_timestamp":"2010-10-04 00:03:24"},{"id":"1","latitude":"46.069139","longitude":"11.123446","distance":"0.0454477393308538","gps_UTC_timestamp":"2010-10-04 00:03:27"},{"id":"14","latitude":"46.069437","longitude":"11.136631","distance":"0.975639411703716","gps_UTC_timestamp":"2010-10-17 23:52:47"}]});

Get GPS location by Radius

JSON query:

http://www.elifelog.org/client/server/index.php?user_key=your_key&elog_command=GetGPSRegionbyRadius&radius=0.06584383023871346&lat1=46.06096338477338&log1=11.145286761962886&lat2=46.10888617871934&log2=11.230602466308596&lat3=46.01299895891832&log3=11.05997105761719&max_radius=6.584383023871346&timefrom=1287000000&timeto=1293746400&callback=Ext.util.JSONP.callback

Return JSON data:

Ext.util.JSONP.callback({"root":[{"region_id":"2416","count":"6","radius_km":"0.165349","latitude_center":"46.063946","longitude_center":"11.122689","latitude_max":"46.064259","longitude_max":"11.123318","latitude_min":"46.063442","longitude_min":"11.121525"},{"region_id":"2175","count":"17","radius_km":"0.162279","latitude_center":"46.070919","longitude_center":"11.121592","latitude_max":"46.071774","longitude_max":"11.122252","latitude_min":"46.070427","longitude_min":"11.121438"},{"region_id":"187","count":"8","radius_km":"0.070849","latitude_center":"46.064903","longitude_center":"11.145576","latitude_max":"46.065125","longitude_max":"11.145786","latitude_min":"46.064594","longitude_min":"11.145276"}]});

Comments

UTC timestamps need to be aware of a local timezone before data access. So for connivence, now GetImage API supports UNIX timestamps. Replace your current GetImage call with a new argument "unixtimestamp" and UNIX time values.