Activity resource

Get activity list

OVERVIEW

This is the latest version of this API endpoint valid from Collaborate 4.1.4 and above, for older versions please see the child pages of this page

This API method can be used to obtain a collection of activity items. The activity is based on a specific filter.

By default the activity of the authenticated OAuth token are used to provide the activity, however if the OAuth token user has got administrative rights they are able to obtain activity on behalf of other users.

The type of activity returned can be altered by the filter parameters.

Each activity has an Actor, Verb and Object:

Actor: A person that performs the activity (user object) 

Verb : The activities verb, which indicates what action was performed

Object: The object of the activity

 

e.g. Mark posted a comment on the wiki page "Welcome to the show"

In the above activity description, "Mark" is the actor, "posted" is the verb and "wiki page" is the object.

<noofcomments> <nooflikes> <comments> <images> tags are only included in the returned xml when there are values available for those items.

The activity ID is only returned for microblog items and not for the any other activity.

Request

 GET         /api/1/activities{?filter parameters}

 Parameters
 

Parameter Name

Value

Description

site

String

If siteid is provided, the parameter for sitescope is ignored, sitescope parameter is only considered when no siteid is given. 

For System Admin (scope can be all or it can be the sites they are a member of)

/api/1/activities?sitescope=
{all / memberoff /favourite}

people

String

Default scope is All. At one time only, one option is sent. 

Author [supports only one author at this time] (As on the person’s personal profile page)

e.g Imran is the OAuth user, now Imran wants the activity for Keyur, then the call will be 
/api/1/activities?
people=author&authoremail=keyur@highq.com

Following
/api/1/activities?people=following

Followers
/api/1/activities?people=followers

MyOrganisation (People in my organisation)

MentionsMe

contenttype

String

The type of content to filter by. Default is All, however you can filter by all content types available in the activity stream like

/api/1/activities?contenttype=files

The possible values for content types are: Microblogs

Files

Wiki

Blog

Tasks

Events

Comments

The API supports filtering by multiple content types from Collaborate 4.1.4 onwards.

for example, to get activity by three content types use the following syntax.

contenttype=files,events,tasks

Implemented in JIRA 

offset

int

The no of last activity fetched. 

limit

int

No of items to return. Default is 20 (Max is 100, Activity to a maximum of 3 months can be provided)

 

Response

Collection of activities
<activities>
    <activity>
        <activitydesc></activitydesc>
        <timepublished>UTC date</timepublished>
        <actors>
            <actor>
                <username>{full name}</username>
                <email>{email address}</email>
                <httpavatar>{http link for download user avatar}</httpavatar>
                <avatar>{API link for download user avatar}</avatar>
                <userlink>{API link for user profile}</userlink>
                <httplink>{http link for user profile}</httplink>
            </actor>
        </actors>
        <sitename></sitename>
        <noofcomments></noofcomments>
        <nooflikes></nooflikes>
        <contentitem>
            <id></id>
            <title></title>
            <link>{URL to the content on HighQ Collaborate, this is not an API endpoint link}</link>
            <apilink></apilink> {ALL api endpoints have not yet been developed, so we will only provide the API link if it is available , e.g file link or micro blog}
            <type>{Content type}</type>
            <imagetype>{content type extension}</imagetype>
            <author>
                <username>{full name}</username>
                <email>{email address}</email>
                <httpavatar>{http link for download user avatar}</httpavatar>
                <avatar>{API link for download user avatar}</avatar>
                <userlink>{API link for user profile}</userlink>
                <httplink>{http link for user profile}</httplink>
            </author>
            <datepublished></datepublished>
            <parentcontent> {In case of file, what is the parent content to which the content item belongs too}
                <title></title>
                <link></link>
                <apilink></apilink> {ALL api endpoints have not yet been developed, so we will only provide the API link if it is available , e.g file link or micro blog}
            </parentcontent>
            <filesize>0</filesize>
            <comments>
                <comment>
                    <text></text>
                    <author>
                        <username>{full name}</username>
                        <email>{email address}</email>
                        <httpavatar>{http link for download user avatar}</httpavatar>
                        <avatar>{API link for download user avatar}</avatar>
                        <userlink>{API link for user profile}</userlink>
                        <httplink>{http link for user profile}</httplink>
                    </author>
                    <datepublished></datepublished>
                    <nooflikes></nooflikes>
                    <images>
                        <image>
                               <imagelink>{Http link}</imagelink>
                               <apilink>{API link to download image thumbnail}</apilink>
                        </image>
                    <images>
                    <attachments>
                         <attachment>
                             <id>{file/document id}</id>
                             <name>{file/document name}</name>
                             <extension>xml{file/document extension with pdf conversion logic}</extension>
                             <siteId>{file/document site id}</siteId>
                             <parentfolderid>{file/document parent folder id}</parentfolderid>
                             <filehttplink>{file/document http link}</filehttplink>
                             <folderpath{file/document parent folder path}</folderpath>
                             <folderhttplink>{file/document parent folder http link}</folderhttplink>
                             <filesize>0</filesize>
                         </attachment>
                    </attachments>
                </comment>
            </comments>
            <images>
                <image>
                    <imagelink>{Http link}</imagelink>
                    <apilink>{API link to download image thumbnail}</apilink>
                </image>
            </images>
            <attachments>
                <attachment>
                    <id>{file/document id}</id>
                    <name>{file/document name}</name>
                    <extension>xml{file/document extension with pdf conversion logic}</extension>
                    <siteId>{file/document site id}</siteId>
                    <parentfolderid>{file/document parent folder id}</parentfolderid>
                    <filehttplink>{file/document http link}</filehttplink>
                    <folderpath{file/document parent folder path}</folderpath>
                    <folderhttplink>{file/document parent folder http link}</folderhttplink>
                    <filesize>0</filesize>
                 </attachment>
             </attachments>
        <contentitem>
        </contentspecificdetail><contentspecificdetail>
    </activity>
<activities>
 

From Collaborate 4.1.4 we have introduced a new element '<contentspecificdetail>' to the "activity" element which provides content specific details of the particular content activity, the contents of this element are different for each type of content. 

Blog Activity

Blog activity is created with the following actions

  • Edited a blog post
  • Published a blog post
  • Liked a blog post 
  • Added a comment

<contentspecificdetail>
    <categories>
        <category>
            <id>{category ID}</id>
            <name>{category name}</name>
            <httplink>{category http link}</httplink>
        </category>
        <category>
            <id>{category ID}</id>
            <name>{category name}</name>
            <httplink>{category http link}</httplink>
        </category>
    </categories>
</contentspecificdetail>

Task activity

Task activity is created with the following actions

  • Added a task
  • Completed a task
  • Marked a task as Incomplete
  • Updated a task
  • Liked a blog post
  • Added a comment 
<contentspecificdetail>
    <duedate>{Task due date}</duedate> (if due date is set then the date format is e.g 25 Mar 2017 OR No due date)
    <priority>{task priority}</priority> (task priority LOW/NORMAL/HIGH)
    <assignees> (assigneetype [1=user, 2=group] )
        <assignee>
            <id>101</id>
            <name>first lastname</name>
            <assigneetype>1</assigneetype>
            <link>https://domain.com/instance/viewUserProfile.action?metaData.encryptTargetUserID=cPUeLsVolGA=&metaData.updateUserProfileProcess=true</link>
        </assignee>
        <assignee>
            <id>1</id>
            <name>Group One</name>
            <assigneetype>2</assigneetype>
            <link>https://domain.com/instance/api/1/sites/13/groups/1/users</link>
        </assignee>
    </assignees>
</contentspecificdetail>
Event activity

Event activity is created with the following actions

  • Created an event
  • Edited an event
  • Liked an event
  • Added a comment  

       <contentspecificdetail>
            <fullday>0</fullday> (1 : full day, 0 : specific time)
            <startdate>24 Mar 2017</startdate>
            <starttime>10:00</starttime>
            <enddate>24 Mar 2017</enddate>
            <endtime>11:00</endtime>
            <location>{Location}</location>
            <timezone>{site configure timezone}</timezone> (for ex, GMT-07:00)
        </contentspecificdetail>

Multiple file upload activity

Activity created when multiple files are uploaded 

<contentspecificdetail>
    <files>
        <file>
            <id>{file/document id}</id>
            <name>{file/document name}</name>
            <extension>{file/document extension with pdf conversion logic}</extension>
            <filehttplink>{file/document http link}</filehttplink>
            <folderpath>{file/document parent folder path}</folderpath>
            <folderhttplink>{file/document parent folder's http link}</folderhttplink>
            <filesize>0</filesize>
        </file>
        <file>
            <id>{file/document id}</id>
            <name>{file/document name}</name>
            <extension>{file/document extension with pdf conversion logic}</extension>
            <filehttplink>{file/document http link}</filehttplink>
            <folderpath>{file/document parent folder path}</folderpath>
            <folderhttplink>{file/document parent folder's http link}</folderhttplink>
            <filesize>0</filesize>
        </file>
    </files>
    <fileidcsv>{rest of file's csv}</fileidcsv> (for ex, 10948,10948)
    <parentfolderid>{parent folder's id}</parentfolderid>
    <filelistapilink>{to get reset of file's API call link}</filelistapilink> (for ex, /api/2/files?filelist=10948,10948&amp;q=&quot;folderid=6&quot;)
</contentspecificdetail>

 

File activity

File activity is created with the following actions

  • Uploaded a file
  • Updated a file
  • Liked a file
  • Added a comment

<contentspecificdetail>
    <versionnotes>{version's note}</versionnotes>
    <folderid>{parent folder's id}</folderid>
    <folderpath>{parent folder's path}</folderpath>
    <folderhttplink>{parent folder's http link}</folderhttplink>
</contentspecificdetail>

Microblog activity

 <contentspecificdetail>
   <sharewith>
        <sites>
            <site>
                <id>13</id>
                <sitename>{site name}</sitename>
                <sitehttplink>{site http link}</sitehttplink>
            </site>
            <site>
                <id>0</id> (If id = 0 then consider as Organization, and id > 0 then consider as site.)
                <sitename>{organization name}</sitename>
            </site>
        </sites>
    </sharewith>
    <linkpreview>
        <title>Google</title>
        <originalurl>http://www.google.com</originalurl>
        <previewurl>http://www.google.com</previewurl>
        <description>Search the world&apos;s information, including webpages, images, videos and more. Google has many special features to help you find exactly what you&apos;re looking for.</description>
        <provider>Google</provider>
        <providerurl>http://www.google.com</providerurl>
        <providerDisplay>www.google.com</providerDisplay>
        <faviconurl>http://www.google.com/images/branding/product/ico/googleg_lodp.ico</faviconurl>
        <dominantcolor>#4285f4</dominantcolor>
        <imageurl>https://www.domain.com/instance/api/2/getImageForLinkPreview?width=700&amp;height=250&amp;imgURL=https%3A%2F%2Fwww.google.com%2Flogos%2Fdoodles%2F2017%2Frichard-oakes-75th-birthday-5656537195347968.3-l.png</imageurl>
        <imagewidth>500</imagewidth>
        <imageheight>200</imageheight>
        <previewtype>LINK</previewtype>
    </linkpreview>
</contentspecificdetail>

Comment activity 

<attachments>
    <attachment>
        <id>{file/document id}</id>
        <name>{file/document name}</name>
        <extension>xml{file/document extension with pdf conversion logic}</extension>
        <siteId>{file/document site id}</siteId>
        <parentfolderid>{file/document parent folder id}</parentfolderid>
        <filehttplink>{file/document http link}</filehttplink>
        <folderpath{file/document parent folder path}</folderpath>
        <folderhttplink>{file/document parent folder http link}</folderhttplink>
        <filesize>0</filesize>
    </attachment>
    <attachment>
        <id>{file/document id}</id>
        <name>{file/document name}</name>
        <extension>xml{file/document extension with pdf conversion logic}</extension>
        <siteId>{file/document site id}</siteId>
        <parentfolderid>{file/document parent folder id}</parentfolderid>
        <filehttplink>{file/document http link}</filehttplink>
        <folderpath{file/document parent folder path}</folderpath>
        <folderhttplink>{file/document parent folder http link}</folderhttplink>
        <filesize>0</filesize>
    </attachment>
</attachments>

 

 

Comments


0 Comments

Last Updated: Jun 10,2023