Creating a share
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 File Sharing API with the POST method to share a file with a community.

 

Input
Method URI Description
POST /files/{auth}/api/shares/feed Creates a share to share a file resource with other people.
Content Type: application/atom+xml
Sample Request:
<?xml version="1.0" encoding="UTF-8"?>

<entry 

 xmlns="http://www.w3.org/2005/Atom" 

 xmlns:app="http://www.w3.org/2007/app"

xmlns:td="urn:ibm.com/td"

 xmlns:snx="http://www.ibm.com/xmlns/prod/sn">


<category scheme="tag:ibm.com,2006:td/type" term="share" label="share"/>

        <td:sharedWhat>f6740167-0e17-4dd6-b54d-01d3282a228b</td:sharedWhat>
<td:sharedWith>
        <td:user>

<snx:userid>67424a40-f730-1030-997a-e53eca77878a</snx:userid>

</td:user>
</td:sharedWith>

<title type="text">Share1</title>


</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
direction
enumerated Yes Share inbound or outbound
Authorized values:
  • inbound
  • outbound
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
201
Created. Indicates that the file share was successfully created. If an error occurs, this header contains one of the error codes.
401
Unauthorized.
404
Not Found.
References