Handling attachments
Added by IBM contributorIBM | Edited by Claudia R Elbourn on June 9, 2015
Rate this article 1 starsRate this article 2 starsRate this article 3 starsRate this article 4 starsRate this article 5 stars

An "attachment" is a reference to an external resource by url with additional meta-data. A single attachment can be added to a microblog post.

Details


The following attributes are supported:
  • url (mandatory) - link to the referenced object
  • id (mandatory) - the id of the referenced object. For example the id of a file
  • author - an ActivityObject representing the author of the attachment. Note that only the id attribute is handled on POST. The id must be the external id of a IBM Connections user.
  • displayName - human readable name of the attachment
  • image - a url to a thumbnail image for the attachment
  • summary - human readable description
  • published - timestamp representing the creation date of the attachment


Note: Only one attachment is supported in Connections - additional attachments will be ignored.

Sample POST with attachment


 {

   "content":"Hello",

   "attachments":[

      {

         "author":{

            "id":"urn:lsid:lconn.com.ibm:provides:person:abcd-12345678-absc-12345678abcd"

         },

         "id":"ba92ef84-86b9-4ae3-9b54-ecd696b499e2",

         "displayName":"landscape_10.jpg",

         "url":"{files}/form/anonymous/api/library/5c0284da-8b47-47f7-a5da-61a224b0f484/document/ba92ef84-86b9-4ae3-9b54-ecd696b499e2/media/landscape_10.jpg",

         "published":"2012-06-29T14:05:16Z",

         "image":{

            "url":"{files}/form/api/library/5c0284da-8b47-47f7-a5da-61a224b0f484/document/ba92ef84-86b9-4ae3-9b54-ecd696b499e2/thumbnail"

         }

      }

   ]

}