You are looking at documentation for an older release. Not what you want? See the current release documentation.
Symlinks are used to organize the virtual access to documents in Content, which is implemented like links in Unix/Linux/Mac OS (refer to ln command for more details).
Via CMIS, you can get a file using its symlink as well as its real path.
Nodetype of symlinks is exo:symlink
.
Use Case: Follow Symlinks
Log in intranet website as a developer role.
Go to /intranet/documents
folder.
Upload any file (for example test.txt
) to /intranet/documents
.
Go to /intranet/categories/intranet
and add a new category: /intranet/categories/intranet/news
.
Back to /intranet/documents/test.txt
and add this file to that category.
This will create a symlink of /intranet/documents/test.txt
in /intranet/categories/intranet/news
.
Get content of the /intranet/categories/intranet/news
folder via CMIS:
curl -o news.xml -u root:gtn http://localhost:8080/rest/private/cmisatom/Managed%20Sites/objectbypath?path=/intranet/categories/intranet/news
The output file (news.xml
) contains the entry with information about the folder, in which you will find a link
(to get children) like this:
<link href="http://localhost:8080/rest/private/cmisatom/Managed%20Sites/children/03dcf0827f00000100cf3b9a4cbf3de4" rel="down" type="application/atom+xml; type=feed"/>
Get the children of /intranet/categories/intranet/news
using that link:
curl -o children.xml -u root:gtn http://localhost:8080/rest/private/cmisatom/Managed%20Sites/children/03dcf0827f00000100cf3b9a4cbf3de4
The output file (children.xml
contains an entry (related to test.txt
) that has an ID:
<entry>
<id>03dd409c7f000001010b7e050789d358</id>
...
<title type="text">test.txt</title>
...
</entry>
Finally get the test.txt
file by using file service and the ID:
curl -o test.txt -u root:gtn http://localhost:8080/rest/private/cmisatom/Managed%20Sites/file/03dd409c7f000001010b7e050789d358