Retrieve the Files service document
The first step perform if you plan to update resources made available through the Atom APIs is to retrieve the service document for the application.The Files service document defines workspaces for libraries, files, and collections. Each workspace has a set of collections that correspond to views in the product user interface. For example, the Files workspace has the My Files, Shared with me, and Shared by me collections. The collection addresses provides a reference to the corresponding feeds.
Table 1. Atom API request details
Method Resource URI Description GET Service Document /basic/api/introspection Retrieves the Files service document for the user whose credentials are used to authenticate the request.
Example
To retrieve the service document for the Files application, send the following HTTP request:
> GET /files/basic/api/introspection HTTP/1.1 > Authorization: Basic xxx > Host: enterprise.example.com:9087 > Accept: */*The HTTP response would look as follows:
< HTTP/1.1 200 OK < X-LConn-Auth: true < Content-Type: application/atomserv+xml; charset=UTF-8 < Content-Language: en-US < Set-Cookie: LtpaToken2=xxx < Set-Cookie: LtpaToken=xxx < Set-Cookie: JSESSIONID=xxx < Transfer-Encoding: chunked < Date: Fri, 06 Nov 2009 14:56:28 GMT < Server: WAS/6.1 < Expires: Thu, 01 Dec 1994 16:00:00 GMT < Cache-Control: private, must-revalidate, max-age=0, no-cache=set-cookieThe service document for Files is returned by the server. For example:
<app:service> <generator version="3.0.0.0" uri="http://www.ibm.com/xmlns/prod/sn" apiVersion="1.0.1"> IBM Connections - Files </generator> <app:workspace> <title type="text">Libraries</title> <app:collection href="https://enterprise.example.com/files/basic/api/libraries/feed"> <category term="libraries" scheme="http://www.ibm.com/xmlns/prod/sn/collection"/> <title type="text">Libraries Feed</title> <app:accept/> </app:collection> </app:workspace> <app:workspace> <title type="text">Files</title> <app:collection href="https://enterprise.example.com/files/basic/api/library/1b66a268-c615-49ab-9fdf-1ba12a13b9e2/feed"> <category term="files" scheme="http://www.ibm.com/xmlns/prod/sn/collection"/> <title type="text">My Files</title> <app:accept>*/*</app:accept> <app:categories fixed="yes"> <category term="document" scheme="tag:ibm.com,2006:td/type" label="document"/> <category term="draft" scheme="tag:ibm.com,2006:td/type" label="draft"/> <category term="page" scheme="tag:ibm.com,2006:td/type" label="page"/> </app:categories> </app:collection> <app:collection href="https://enterprise.example.com/files/basic/api/myshares/feed?direction=inbound"> <category term="files" scheme="http://www.ibm.com/xmlns/prod/sn/collection"/> <title type="text">Shared with me</title> <app:accept/> </app:collection> <app:collection href="https://enterprise.example.com/files/basic/api/myshares/feed?direction=outbound"> <category term="files" scheme="http://www.ibm.com/xmlns/prod/sn/collection"/> <title type="text">Shared by me</title> <app:accept/> </app:collection> <app:collection href="https://enterprise.example.com/files/basic/api/documents/feed?visibility=public"> <category term="files" scheme="http://www.ibm.com/xmlns/prod/sn/collection"/> <title type="text">Documents Feed</title> <app:accept/> </app:collection> <app:collection href="https://enterprise.example.com/files/basic/api/library/1b66a268-c615-49ab-9fdf-1ba12a13b9e2/view/ recyclebin/feed"> <category term="files" scheme="http://www.ibm.com/xmlns/prod/sn/collection"/> <title type="text">Removed Files</title> <app:accept/> <app:categories fixed="yes"> <category term="document" scheme="tag:ibm.com,2006:td/type" label="document"/> </app:categories> </app:collection> </app:workspace> <app:workspace> <title type="text">Folders</title> <app:collection href="https://enterprise.example.com/files/basic/api/collections/feed?creator= 4fda6cc0-0101-102e-88dd-f78755f7e0ed"> <category term="files" scheme="http://www.ibm.com/xmlns/prod/sn/collection"/> <title type="text">My Folders</title> <app:accept>application/atom+xml;type=entry;charset=UTF-8</app:accept> <app:categories fixed="yes"> <category term="document" scheme="tag:ibm.com,2006:td/type" label="document"/> </app:categories> </app:collection> <app:collection href="https://enterprise.example.com/files/basic/api/collections/feed?visibility=private"> <category term="files" scheme="http://www.ibm.com/xmlns/prod/sn/collection"/> <title type="text">Shared with me</title> <app:accept>application/atom+xml;type=entry;charset=UTF-8</app:accept> <app:categories fixed="yes"> <category term="document" scheme="tag:ibm.com,2006:td/type" label="document"/> </app:categories> </app:collection> <app:collection href="https://enterprise.example.com/files/basic/api/collections/feed?visibility=public"> <category term="files" scheme="http://www.ibm.com/xmlns/prod/sn/collection"/> <title type="text">Public Folders</title> <app:accept>application/atom+xml;type=entry;charset=UTF-8</app:accept> <app:categories fixed="yes"> <category term="document" scheme="tag:ibm.com,2006:td/type" label="document"/> </app:categories> </app:collection> </app:workspace> <app:workspace> <title type="text">Recycle Bin</title> <app:collection href="https://enterprise.example.com/files/basic/api/library/1b66a268-c615-49ab-9fdf-1ba12a13b9e2/view/ recyclebin/feed"> <category term="files" scheme="http://www.ibm.com/xmlns/prod/sn/collection"/> <title type="text">Removed Files</title> <app:accept/> <app:categories fixed="yes"> <category term="document" scheme="tag:ibm.com,2006:td/type" label="document"/> </app:categories> </app:collection> </app:workspace> </app:service>
Parent topic
Files API
});