Activity Log
============

.. _ActivityLogTeam: 

ActivityLogTeam
---------------

A single activity log item, normally an object holding one month's activity entries.

.. code-block:: json

 message ActivityLogItem {
  string id = 1;
  string dataroom_id = 2;
  string parent_id = 3;
  string name = 4;
  string type = 5;
  string group_title = 6;
  string title = 7;
  optional string path = 8;
  string document_size = 10;
  google.protobuf.Timestamp creation_date = 11;
  google.protobuf.Timestamp modification_date = 12;
  bool is_actual_log = 13;
  EffectivePermission effective_permission = 15;
  string document_class = 20;
  repeated ItemPermissionsEntry permissions = 22;
  ItemType item_type = 34;
 }

.. list-table::
   :widths: 20 25 55
   :header-rows: 1

   * - Field
     - Type
     - Description
   * - ``id``
     - ``string``
     - **Required.** The activity's id.
   * - ``dataroom_id``
     - ``string``
     - **Required.** The dataroom in which the activity was performed.
   * - ``parent_id``
     - ``string``
     - **Required.** The id from the parent item.
   * - ``name``
     - ``string``
     - **Required.** The activity's name?
   * - ``type``
     - ``string``
     - **Required.** The activity's type.
   * - ``group_title``
     - ``string``
     - **Required.** The activity's group_title, or who performed the activity.
   * - ``title``
     - ``string``
     - **Required.** 
   * - ``path``
     - ``string``
     - **Optional.** The API endpoint requested. 
   * - ``document_size``
     - ``string``
     - **Required.** The document's size.
   * - ``creation_date``
     - ``google.protobuf.Timestamp``
     - When the item was created.
   * - ``modification_date``
     - ``google.protobuf.Timestamp``
     - When the item was last modified.
   * - ``is_actual_log``
     - ``bool``
     - 
   * - ``effective_permission``
     - ``EffectivePermission``
     - Which type of permission was used.
   * - ``document_class``
     - ``string``
     - The document's class.
   * - ``permissions``
     - ``ItemPermissionsEntry``
     - **Repeated**
   * - ``item_Type``
     - ``ItemType``
     - The item's type.
  
.. _ActivityLogTeamEntry: 

ActivityLogTeamEntry
--------------------

An entry representing a single line (an activity entry) from an activity log item for documents or folders.

It is very similar to ``ActivityLogTeam``, but uses the string ``md5_checksum``, which means... , in place of ``is_actual_log``. 

.. code-block:: json

 message ActivityLogItemEntry {
  string id = 1;
  string dataroom_id = 2;
  string parent_id = 3;
  string name = 4;
  string type = 5;
  string group_title = 6;
  string title = 7;
  optional string path = 8;
  string document_size = 10;
  google.protobuf.Timestamp creation_date = 11;
  google.protobuf.Timestamp modification_date = 12;
  string md5_checksum = 13; // documents only
  EffectivePermission effective_permission = 15;
  string document_class = 20;
  repeated ItemPermissionsEntry permissions = 22;
  ItemType item_type = 34;
 }

.. list-table::
   :widths: 20 25 55
   :header-rows: 1

   * - Field
     - Type
     - Description
   * - ``id``
     - ``string``
     - **Required.** The activity's id.
   * - ``dataroom_id``
     - ``string``
     - **Required.** The dataroom in which the activity was performed.
   * - ``parent_id``
     - ``string``
     - **Required.** The id from the parent item.
   * - ``name``
     - ``string``
     - **Required.** The activity's name?
   * - ``type``
     - ``string``
     - **Required.** The activity's type.
   * - ``group_title``
     - ``string``
     - **Required.** The activity's group_title, or who performed the activity.
   * - ``title``
     - ``string``
     - **Required.** 
   * - ``path``
     - ``string``
     - **Optional.** The API endpoint requested. 
   * - ``document_size``
     - ``string``
     - **Required.** The document's size.
   * - ``creation_date``
     - ``google.protobuf.Timestamp``
     - When the item was created.
   * - ``modification_date``
     - ``google.protobuf.Timestamp``
     - When the item was last modified.
   * - ``md5_checksum``
     - ``string``
     - 
   * - ``effective_permission``
     - ``EffectivePermission``
     - Which type of permission was used.
   * - ``document_class``
     - ``string``
     - The document's class.
   * - ``permissions``
     - ``ItemPermissionsEntry``
     - **Repeated**
   * - ``item_Type``
     - ``ItemType``
     - The item's type.

.. _UserActivityLogItemEntry: 

UserActivityLogItemEntry
------------------------

Entry representing a single line (an activity entry) of an activity log item for users

.. code-block:: json

 message UserActivityLogItemEntry {
  string id = 1;
  string group_title = 2;
  string logins = 3;
  string views = 4;
  string downloads = 5;
  optional string qandas = 6;
 }

.. list-table::
   :widths: 20 25 55
   :header-rows: 1

   * - Field
     - Type
     - Description
   * - ``id``
     - ``string``
     - **Required.** The activity's id.
   * - ``group_title``
     - ``string``
     - **Required.** The activity's group_title, or who performed the activity.
   * - ``logins``
     - ``string``
     - **Required.** Number of logins.
   * - ``views``
     - ``string``
     - **Required.** Number of views. 
   * - ``downloads``
     - ``string``
     - **Required.** Number of downloads.
   * - ``qandas``
     - ``string``
     - **Optional** 

.. _GroupActivityLogItemEntry: 

GroupActivityLogItemEntry
-------------------------

Entry representing a single line (an activity entry) of an activity log item for groups.

.. code-block:: json

 message GroupActivityLogItemEntry {
  string id = 1;
  string group_title = 2;
  string logins = 3;
  string views = 4;
  string downloads = 5;
  optional string qandas = 6;
  string group_name = 7;
 }

.. list-table::
   :widths: 20 25 55
   :header-rows: 1

   * - Field
     - Type
     - Description
   * - ``id``
     - ``string``
     - **Required.** The activity's id.
   * - ``group_title``
     - ``string``
     - **Required.** The activity's group title, or what group performed the activity.
   * - ``logins``
     - ``string``
     - **Required.** Number of logins.
   * - ``views``
     - ``string``
     - **Required.** Number of views. 
   * - ``downloads``
     - ``string``
     - **Required.** Number of downloads.
   * - ``qandas``
     - ``string``
     - **Optional** 
   * - ``group_name``
     - ``string``
     - **Required**  

.. _CreateActivityLogEntry: 

CreateActivityLogEntry
----------------------

This message is used  by the client to create a new activity-log entry for activities happening only in the client the server doesn't know about, such as downloading from the PDF-Viewer

.. code-block:: json

 message CreateActivityLogEntry {
  string object_id = 1;
  ActivityKey activity = 2;
  optional string additional_info = 3;
  optional string username = 4;
 }

.. list-table::
   :widths: 20 25 55
   :header-rows: 1

   * - Field
     - Type
     - Description
   * - ``id``
     - ``string``
     - **Required.** The activity's id.
   * - ``activity``
     - :ref:`ActivityKey <ActivityKey>``
     - **Required.** 
   * - ``additional_info``
     - ``string``
     - **Optional.** Any additional info.
   * - ``username``
     - ``string``
     - **Optional.** The username.