Session Log Documentation

Introduction

The session log is an XML file used to describe everything that has or will happen in a particular session. We've designed the session logs to be simple XML that can be extended by an application to handle almost any situation. The XML schema can be found and referenced here.

Getting vs Adding Session Logs

Getting and adding session logs use the same tags with a few exceptions. When adding a session logs you don't set the ID or created at time of the log entry. There's also slight differences in the container elements documented below.

Adding Session Logs

<?xml version="1.0" encoding="UTF-8"?>
<session xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://www.igtimi.com/session_log.xsd">
  <id>1</id> <!-- This is the id of the session -->
  <content>
    <log_additions type="array"> <!-- Only used when adding session logs -->
      <new_entry> <!-- Only used when getting session logs -->
        <data>
          <session_name>Example Session</session_name>
        </data>
      </new_entry>
    </log_additions>
   </content>
 </session>
  	

Getting Session Logs

<?xml version="1.0" encoding="UTF-8"?>
<session xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://www.igtimi.com/session_log.xsd">
  <id>1</id> <!-- This is the id of the session -->
  <content>
    <log type="array"> <!-- Only used when getting session logs -->
      <log_entry> <!-- Only used when getting session logs -->
        <id>24050</id> <!-- Only used when getting session logs -->
        <created_at>2013-04-24T23:57:58.197Z</created_at> <!-- Only used when getting session logs -->
        <data>
          <session_name>Example Session</session_name>
        </data>
      </log_entry>
    </log>
   </content>
 </session>
  	

Elements

session_name

Description
Sets the name of the session
Contents

String of session name

Example
<session_name>Example Session</session_name>

data_start_time

Description
Sets the start time of the session
Contents

ISO 8601 date

Example
<data_start_time>2013-04-29T18:46:25Z</data_start_time>

data_end_time

Description
Sets the end time of the session
Contents

ISO 8601 date

Example
<data_end_time>2013-05-01T18:46:25Z</data_end_time>

object

Description
Sets up a new object to track
Contents

id (integer) - The unique identifier for the object.

name (string) optional - Friendly name for the object.

Example
<object>
  <id>1</id>
  <name>#v473</name>
</object>

device

Description
Attaches a device to an object
Contents

object_id (integer) - The id of the object to attach to.

serial_number (string) - The serial number of the device.

entry_type (Either "add" or "replace") - Different ways of attaching a device to an object. Conceptionally "adding" a device allows you to have multiple devices on one object, "replacing" a device replaces all the devices attached at that time.

Example
<device>
  <object_id>1</object_id>
  <serial_number>AA-AA-AAAC</serial_number>
  <entry_type>replace</entry_type>
</device>

tombstone_log_entry

Description
Marks a log entry as deleted
Contents

log_entry_id (integer) - The id of the log entry to ignore.

Example
<tombstone_log_entry>
  <log_entry_id>1</log_entry_id>
</tombstone_log_entry>

object_data

Description
Attaches data to an object
Contents

object_id (integer) - The id of the object to attach to

object_content (Anything) - You can add your own structure inside object_content to store whatever data you want.

Example
<object_data>
  <object_id>1</object_id>
  <object_content>
    <elephant>
      <size>Huge</size>
      <colour>grey</colour>
      <height>3.2</height>
    </elephant>
  </object_content>
</object_data>

metadata

Description
Holder for any other kind of information
Contents
Add any structure inside metadata to store whatever data you want.
Example
<metadata>
  <comment>
    <user_id>1</user_id>
    <message>Hello</message>
  </comment>
</metadata>

Examples

Support
Cookies help us deliver our services. By using our services, you agree to our use of cookies.

2024-10-17T10:43:00Z 7b23735f9944f14dccb4ddc4c360c630738aa02e

Igtimi Cloud will be undergoing maintenance for about 6 hours from . During this time Igtimi Cloud will be unavailable for use.