Pinning a file
Added by IBM contributorIBM | Edited by Claudia R Elbourn on July 21, 2015
Rate this article 1 starsRate this article 2 starsRate this article 3 starsRate this article 4 starsRate this article 5 stars

You can use the Files API with the POST method to pin a file.
Within the input, provide either an Atom document representing the file or identify the file by providing the itemld parameter. Send the POST request to the myfavorites feed.
Input
Method URI Description
POST /files/{auth}/api/myfavorites/documents/feed Pin a file
Content Type: application/atom+xml
Sample Request:
<entry> </entry>
Name Type Optional Description
auth
enumerated No The authorization protocol being used by your application to access Connections Cloud.
Authorized values:
  • basic
  • oauth
Name Type Optional Description
itemId
string Yes String. Uuid that uniquely identifies the document. The uuid is defined in the <td:uuid> element in the Atom entry document of the file.
Name Type Optional Description
Authorization
enumerated No The authentication mechanism selected by your application to access the API.
Basic is the Base64 encoding of the IBM Connections Cloud username and password: Base64(username:password). For example, Base64(twatson@us.ibm.com:password).
Bearer is the oauth 2.0 access token that is generated when the user grants your application access to IBM Connections Cloud services.
See the reference topic "OAuth 2.0 APIs for web server flow" for more information.
Authorized values:
  • bearer
  • basic
Output
Code Description
204
Indicates that the versions were successfully removed from the collection.
401
Unauthorized.
403
Forbidden.
404
Not Found.