Sharing a file with a community or communities
Share a file with a community or multiple communities programmatically.See Authenticating requests for information about how to authenticate the request.
Table 1. Atom API request details
Method Resource address Input representation Description POST /basic/api/myuserlibrary/document/{document-id}/feed Entry or Feed defining the community Adds a file to the specified community. {document-id} is the value of the <td:uuid> or <td:label> elements in the file's Atom entry document.
Provide the following headers.
Table 2. Input headers
Parameter Required Description Content-Type Yes Used to specify the mime type for the content being sent to the server. Content-Language Yes Specifies the language of the content being sent to the server. All contents are handled using UTF-8 encoding on the server. You can use the following input parameters.
Table 3. Input parameter
Parameter Description identifier Indicates how the document is identified in the {document-id} variable segment of the web address. By default, look up is performed with the expectation that the URL contains the value from the <td:uuid> element of a file Atom entry. Options are uuid and label . Specify label if the URL instead contains the value from the <td:label> element of a file Atom entry.
Input
Provide one of the following input types:
- Community Atom entry document that defines the community with which you want to share the file.
- Communities feed in which each entry identifies one of the communities with which you want to share the file.
Output
NoneReturned HTTP headers
HTTP/1.1 204 No Content
Indicates that the file was successfully shared. If an error occurs, this header contains one of the error codes.
- HTTP/1.1 401 Unauthorized
- HTTP/1.1 403 Forbidden
- HTTP/1.1 404 Not Found
- HTTP/1.1 409 Conflict
Parent topic
Work with files
});