Community articleCreating a share
Added by IBM contributorIBM on March 25, 2014
Rate this article 1 starsRate this article 2 starsRate this article 3 starsRate this article 4 starsRate this article 5 stars

Create a file share programmatically.



Create a file share programmatically.

See Authenticating requests for information about how to authenticate the request.

Input

A Share Atom entry document. The content type must also be specified as application/atom+xml.

Output

None.

Input
Method URI Description
POST /files/basic/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
direction
enumerated Yes Share inbound or outbound
Authorized values:
  • inbound
  • outbound
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