Activity resource

Post activity

OVERVIEW

Used to add new activity to a microblog. This method cannot be used to add content to other content types.

·      Microblog activity desc expects text input rather than HTML text.

·      Use CDATA in your activitydesc tag to avoid any issues with special characters in text.

eg - <activitydesc><![CDATA[APiMicroblog [#!@%^*()+|-=\/.,;'":{}[\]? ~`$_><&mahir@mjt.com] [#)(_*&^%$@!~_+|?<":{}/.,;'[\]\=- 0987654321`]]]></activitydesc>

·      An existing HTTP image location is required for the image URL. The image is downloaded by the API and stored.  Max 5 images can be included in the post.

·      If there is a URL in the activity description it is not converted to a HTTP link.

·      Hashtags can be used with the following pattern

[#validHashText]

where hashtag should start with an opening brace "[#" and "]" as closing brace and in between the hashtag content.

·      "<" and ">" are not allowed within a hashtag text. Any tab, enter, newline, backspace characters will be removed if found in validHashText.

·      Mentions can be used by using the following pattern [~validemail]

where a mention should start with "[~" as opening brace and "]" as closing brace. The content between these braces should be a valid email address.

Request

POST:   /api/1/activities

Request body

<activity>
 <activitydesc>description 1 [~premal.lathiya@highq.com] working at [#highq] organisation</activitydesc>
 <share>
     <internalorganisation>true</internalorganisation>
     <sites>
        <site>
          <id>1</id>
        </site>
     </sites>
 </share>         
 <images>
    <image>
       <imagelink>https://collaborate.highq.com/sitepoint/flag/flag_instanceLogo.gif?refreshCacheKey=20140626T141132843</imagelink>
    </image>
    <image>
       <imagelink>http://cdn2.business2community.com/wp-content/uploads/2013/04/google-4.jpg</imagelink>
    </image>
  </images>
</activity>

 

Response

200 OK in case of success and an error object in case of error.

Error Response

<error>

<ref>{integer reference id, generated from the server side} </ref>

<summary>{Description for the error message}</summary>

</error>

Comments


0 Comments

Last Updated: Nov 08,2024