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 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.
<?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>
<?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>
String of session name
<session_name>Example Session</session_name>
<data_start_time>2013-04-29T18:46:25Z</data_start_time>
<data_end_time>2013-05-01T18:46:25Z</data_end_time>
id (integer) - The unique identifier for the object.
name (string) optional - Friendly name for the object.
<object> <id>1</id> <name>#v473</name> </object>
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.
<device> <object_id>1</object_id> <serial_number>AA-AA-AAAC</serial_number> <entry_type>replace</entry_type> </device>
log_entry_id (integer) - The id of the log entry to ignore.
<tombstone_log_entry> <log_entry_id>1</log_entry_id> </tombstone_log_entry>
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.
<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> <comment> <user_id>1</user_id> <message>Hello</message> </comment> </metadata>
2024-10-17T10:43:00Z 7b23735f9944f14dccb4ddc4c360c630738aa02e