Service: zimbraMail
Namespace: "urn:zimbraMail"
GetActivityStream SOAP Command

Get activity stream

Authorization token required true
Admin Authorization token required false

GetActivityStreamRequest

    <GetActivityStreamRequest id="{item-id}" [offset="{offset} (Integer)"] [limit="{limit} (Integer)"]> ## GetActivityStreamRequest
        <filter [account="{account-id}"] [op="{comma-sep-ops}"] [session="{session-id}"] /> ## ActivityFilter
    </GetActivityStreamRequest>

The following table describes elements and attributes you can define within a <GetActivityStreamRequest> element:

XPath Required / Optional Description
@id Required (only 1) Type:String
Item ID. If the id is for a Document, the response will include the activities for the requested Document. if it is for a Folder, the response will include the activities for all the Documents in the folder and subfolders.
@offset Optional (0 or 1) Type:Integer
Offset - for getting the next page worth of activities
@limit Optional (0 or 1) Type:Integer
Limit - maximum number of activities to be returned
/filter Optional (0 or 1) Optionally <filter> can be used to filter the response based on the user that performed the activity, operation, or both. the server will cache previously established filter search results, and return the identifier in session attribute. The client is expected to reuse the session identifier in the subsequent filter search to improve the performance.
/filter@account Optional (0 or 1) Type:String
Account ID
/filter@op Optional (0 or 1) Type:String
Comma separated list of Mailbox operations
/filter@session Optional (0 or 1) Type:String
Session ID

GetActivityStreamResponse

The response has three sections: user, op and activity.
User and op sections lists all the users and activities logged in the current stream to allow the client to show filter UI if the user wants to see activities from specific users or specific operation.
Activity section contains the who, what and when. Arg element contains extra data for some of the operations. e.g.

 AddDocumentRevision
   ver - old version
   filename - name of the Document
 MoveItem
   oldName
   filename - name of the item
 RenameItem
   oldName
   filename - name of the item
 GrantAccess
   target - name of the grantee, or
            "Authuser" for all authenticated users or
            "Public" for everyone
   role - "Read", "RW", or "Admin"
   filename - name of the item
 CreateComment
   parentId
   text
   filename - name of the parent item
 CreateMessage - for share notification
   from - the email address of the user who created the share
   subject - subject of the share notification
   sharedItemId - itemId of the shared item
   sharedItemName - name of the shared item
 

    <GetActivityStreamResponse [session="{session-id}"] [count="..."]> ## GetActivityStreamResponse
        (<op [name="..."] /> ## NamedElement)*
        (<user [id="{id}"] [email="{email}"] [name="{name}"] /> ## IdEmailName)*
        (<a op="{operation}" ts="{timestamp} (long)" itemId="{item-id}" [ver="{version} (Integer)"] [ua="{user-agent}"]
                [email="{email-address-of-user-performing-action}"]> ## ActivityInfo
            (<arg name="{name}">{value}</arg> ## NamedValue)*
          </a>)*
    </GetActivityStreamResponse>

The following table describes elements and attributes you can define within a <GetActivityStreamResponse> element:

XPath Required / Optional Description
@session Optional (0 or 1) Type:String
Session ID
@count Optional (0 or 1) Type:String
Count
/op Optional (0 or more) Operations
/op@name Optional (0 or 1) Type:String
Name
/user Optional (0 or more) Users
/user@id Optional (0 or 1) Type:String
ID
/user@email Optional (0 or 1) Type:String
Email
/user@name Optional (0 or 1) Type:String
Name
/a Optional (0 or more) Activities
/a@op Required (only 1) Type:String
Operation
/a@ts Required (only 1) Type:long
Timestamp
/a@itemId Required (only 1) Type:String
item-id
/a@ver Optional (0 or 1) Type:Integer
Version
/a@ua Optional (0 or 1) Type:String
User agent
/a@email Optional (0 or 1) Type:String
Email address of user performing action
/a/arg Optional (0 or more) Type:{value}
Extra data for some of the operations
Description for element text content:Value
/a/arg@name Required (only 1) Type:String
Name