Creating community files
Added by IBM contributorIBM | Edited by Claudia R Elbourn on June 30, 2015
Rate this article 1 starsRate this article 2 starsRate this article 3 starsRate this article 4 starsRate this article 5 stars

To create a community file, send a POST request to the remote applications feed of the community to which you want to add the file.
Tags: commapi
Provide a file Atom entry document.
Input
Method URI Description
POST /files/{auth}/api/community/{communityUuid}/introspection From the entry in the Communities remote application feed that contains the following category: <category term="Files" scheme="http://www.ibm.com/xmlns/prod/sn/type" /> , find the value of the href attribute in the <link> element that has the following rel attribute value: rel="http://www.ibm.com/xmlns/prod/sn/remote-application/publish".
Content Type: application/atom+xml
Name Type Optional Description
communityUuid
string No The UUID of the community to which you want to add the file.
auth
enumerated No The authorization protocol being used by your application to access Connections Cloud.
Authorized values:
  • basic
  • oauth
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
Content Type: application/atom+xml
Name Type Optional Description
Location
string Yes Link to edit_url of the new community file. You can use the web address specified here to subsequently update the community file.
Code Description
201
Created. Indicates that the community file was successfully created. If an error occurs, this header contains one of the error codes.
400
Bad Request.
403
Forbidden. Authorization failed.
401
Unauthorized. Returned when no authenticated user or no userid, email, or key parameter are provided on the request.