<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Rest Api : Link a File to a Site in Alfresco Forum</title>
    <link>https://connect.hyland.com/t5/alfresco-forum/rest-api-link-a-file-to-a-site/m-p/21884#M9592</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you just want to create a filelink it should work with the "create node" rest endpoint (see alfresco-API-explorer, see Axels create link above)&lt;/P&gt;&lt;P&gt;Type should be an &amp;nbsp;app:filelink and in the properties you need a cm:destination set to the targets nodeRef (with workspace://SpacesStore). I think adding ".lnk" or ".url" as Extension in the nodename will force share to show an appropriate icon.&amp;nbsp;&lt;/P&gt;&lt;P&gt;But I never tried it myself....&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 26 Jun 2017 05:48:43 GMT</pubDate>
    <dc:creator>mehe</dc:creator>
    <dc:date>2017-06-26T05:48:43Z</dc:date>
    <item>
      <title>Rest Api : Link a File to a Site</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/rest-api-link-a-file-to-a-site/m-p/21882#M9590</link>
      <description>Hi,&amp;nbsp;I m using Alfresco Community 5.2. I want to create link a file(this file is in another site) to site by using REST API. But I can not find any document about this issue.&amp;nbsp;How can I create link to site for folder or any document?Thanks in advance..</description>
      <pubDate>Fri, 23 Jun 2017 13:02:10 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/rest-api-link-a-file-to-a-site/m-p/21882#M9590</guid>
      <dc:creator>hilal_aslan</dc:creator>
      <dc:date>2017-06-23T13:02:10Z</dc:date>
    </item>
    <item>
      <title>Re: Rest Api : Link a File to a Site</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/rest-api-link-a-file-to-a-site/m-p/21883#M9591</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Depending on what kind of link you want to create (symlink- or hardlink-like, or even just a peer-reference) you would have to deal with either &lt;A _jive_internal="true" href="https://community.alfresco.com/community/ecm/blog/2016/10/24/v1-rest-api-part-3-creating-nodes" rel="nofollow noopener noreferrer"&gt;creating&lt;/A&gt;/&lt;A _jive_internal="true" href="https://community.alfresco.com/community/ecm/blog/2016/11/02/v1-rest-api-part-4-managing-nodes" rel="nofollow noopener noreferrer"&gt;managing&lt;/A&gt; a node or &lt;A _jive_internal="true" href="https://community.alfresco.com/community/ecm/blog/2016/11/23/v1-rest-api-part-6-associations" rel="nofollow noopener noreferrer"&gt;handling associations&lt;/A&gt; of a node. Depending on the&amp;nbsp;kind of link you may either have to know the type / property / association to use, or even create your own custom content model if nothing of the existing fits your requirement.&lt;/P&gt;&lt;P&gt;Unfortunately you did not really specify what the kind of link should be, e.g. what its purpose is and how it should be presented to the end-user, so my comment is rather abstract and you will probably not find any documentation on such an abstract level.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 24 Jun 2017 14:58:27 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/rest-api-link-a-file-to-a-site/m-p/21883#M9591</guid>
      <dc:creator>afaust</dc:creator>
      <dc:date>2017-06-24T14:58:27Z</dc:date>
    </item>
    <item>
      <title>Re: Rest Api : Link a File to a Site</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/rest-api-link-a-file-to-a-site/m-p/21884#M9592</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you just want to create a filelink it should work with the "create node" rest endpoint (see alfresco-API-explorer, see Axels create link above)&lt;/P&gt;&lt;P&gt;Type should be an &amp;nbsp;app:filelink and in the properties you need a cm:destination set to the targets nodeRef (with workspace://SpacesStore). I think adding ".lnk" or ".url" as Extension in the nodename will force share to show an appropriate icon.&amp;nbsp;&lt;/P&gt;&lt;P&gt;But I never tried it myself....&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Jun 2017 05:48:43 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/rest-api-link-a-file-to-a-site/m-p/21884#M9592</guid>
      <dc:creator>mehe</dc:creator>
      <dc:date>2017-06-26T05:48:43Z</dc:date>
    </item>
    <item>
      <title>Re: Rest Api : Link a File to a Site</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/rest-api-link-a-file-to-a-site/m-p/21885#M9593</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;How about below webscripts?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/alfresco/s/api/node/doclink/{store_type}/{store_id}/{id}&lt;BR /&gt;/alfresco/s/api/site/doclink/{site}/{container}/{path}&lt;BR /&gt;/alfresco/s/api/site/doclink/{site}/{container}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can find more info at webscript home.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Jun 2017 10:09:44 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/rest-api-link-a-file-to-a-site/m-p/21885#M9593</guid>
      <dc:creator>hardik1512</dc:creator>
      <dc:date>2017-06-26T10:09:44Z</dc:date>
    </item>
    <item>
      <title>Re: Rest Api : Link a File to a Site</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/rest-api-link-a-file-to-a-site/m-p/21886#M9594</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You should not rely on those web scripts - they are marked with the lifecycle "internal" which means they are meant to be consumed by the Alfresco&amp;nbsp;products and may change (without notice) between Alfresco versions. That is the reason that there exists a new v1 ReST API to get people off using these internal APIs.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Jun 2017 11:21:02 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/rest-api-link-a-file-to-a-site/m-p/21886#M9594</guid>
      <dc:creator>afaust</dc:creator>
      <dc:date>2017-06-26T11:21:02Z</dc:date>
    </item>
    <item>
      <title>Re: Rest Api : Link a File to a Site</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/rest-api-link-a-file-to-a-site/m-p/21887#M9595</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I m clicking "copy to" on myfiles folder or any site folder. And after that, it is appear a button called "create link". By clicking this button, I can create link for this document to any place. But now, I want to make this process (create link) with rest api.&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="image-1 jive-image j-img-original" src="https://connect.hyland.com/legacyfs/online/alfresco/14819_alfresco-create-link.jpg" style="width: 620px; height: 253px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Jun 2017 06:07:01 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/rest-api-link-a-file-to-a-site/m-p/21887#M9595</guid>
      <dc:creator>hilal_aslan</dc:creator>
      <dc:date>2017-06-28T06:07:01Z</dc:date>
    </item>
    <item>
      <title>Re: Rest Api : Link a File to a Site</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/rest-api-link-a-file-to-a-site/m-p/21888#M9596</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ok but what about&amp;nbsp;parameters ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Jun 2017 06:07:49 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/rest-api-link-a-file-to-a-site/m-p/21888#M9596</guid>
      <dc:creator>hilal_aslan</dc:creator>
      <dc:date>2017-06-28T06:07:49Z</dc:date>
    </item>
    <item>
      <title>Re: Rest Api : Link a File to a Site</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/rest-api-link-a-file-to-a-site/m-p/21889#M9597</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;any help!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 Jun 2017 10:37:47 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/rest-api-link-a-file-to-a-site/m-p/21889#M9597</guid>
      <dc:creator>hilal_aslan</dc:creator>
      <dc:date>2017-06-30T10:37:47Z</dc:date>
    </item>
    <item>
      <title>Re: Rest Api : Link a File to a Site</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/rest-api-link-a-file-to-a-site/m-p/21890#M9598</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Martin and Alex are correct. You should be able to use the new V1 REST API to create a node of the given node type (app:filelink) and set the property (cm:destination). We also have a basic&amp;nbsp;unit test for this specific scenario.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;See also:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://issues.alfresco.com/jira/browse/REPO-248" title="https://issues.alfresco.com/jira/browse/REPO-248" rel="nofollow noopener noreferrer"&gt;[REPO-248] Support creation of (custom) node types that do not descend from cm:content or cm:folder - Alfresco JIRA&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Jan&lt;/P&gt;&lt;PRE style="color: #a9b7c6; background-color: #2b2b2b; font-size: 9.0pt;"&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Jul 2017 13:41:26 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/rest-api-link-a-file-to-a-site/m-p/21890#M9598</guid>
      <dc:creator>janv</dc:creator>
      <dc:date>2017-07-03T13:41:26Z</dc:date>
    </item>
    <item>
      <title>Re: Rest Api : Link a File to a Site</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/rest-api-link-a-file-to-a-site/m-p/21891#M9599</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ok but what is Api URL ? my api url is "&lt;A class="link-titled" href="http://192.168.10.33:8091/alfresco/api/-default-/public/alfresco/versions/1/nodes/43ad4f37-7bff-491e-b636-0b3998ecae7b" title="http://192.168.10.33:8091/alfresco/api/-default-/public/alfresco/versions/1/nodes/43ad4f37-7bff-491e-b636-0b3998ecae7b" rel="nofollow noopener noreferrer"&gt;http://localhost:8080/alfresco/api/-default-/public/alfresco/versions/1/nodes/43ad4f37-7bff-491e-b636-0b3998ecae7b&lt;/A&gt;&amp;nbsp;" &amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and my parameters :&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;{&lt;BR /&gt; "name": "Test file link",&lt;BR /&gt; "nodeType": "app:filelink",&lt;BR /&gt; "properties" : {&lt;BR /&gt; "cm:destination" : "b3ee89c4-bf02-44dc-a0e9-9ca6fdc9b97b"&lt;BR /&gt; }&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but I get error "400 bad request"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;{&lt;BR /&gt; "error": {&lt;BR /&gt;&lt;SPAN&gt; "errorKey": "Failed to change (specialise) node type - from {&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://www.alfresco.org/model/content/1.0" rel="nofollow noopener noreferrer" target="_blank"&gt;http://www.alfresco.org/model/content/1.0&lt;/A&gt;&lt;SPAN&gt;}folder to {&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://www.alfresco.org/model/application/1.0" rel="nofollow noopener noreferrer" target="_blank"&gt;http://www.alfresco.org/model/application/1.0&lt;/A&gt;&lt;SPAN&gt;}filelink",&lt;/SPAN&gt;&lt;BR /&gt; "statusCode": 400,&lt;BR /&gt;&lt;SPAN&gt; "briefSummary": "06030125 Failed to change (specialise) node type - from {&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://www.alfresco.org/model/content/1.0" rel="nofollow noopener noreferrer" target="_blank"&gt;http://www.alfresco.org/model/content/1.0&lt;/A&gt;&lt;SPAN&gt;}folder to {&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://www.alfresco.org/model/application/1.0" rel="nofollow noopener noreferrer" target="_blank"&gt;http://www.alfresco.org/model/application/1.0&lt;/A&gt;&lt;SPAN&gt;}filelink",&lt;/SPAN&gt;&lt;BR /&gt; "stackTrace": "For security reasons the stack trace is no longer displayed, but the property is kept for previous versions",&lt;BR /&gt;&lt;SPAN&gt; "descriptionURL": "&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://api-explorer.alfresco.com" rel="nofollow noopener noreferrer" target="_blank"&gt;https://api-explorer.alfresco.com&lt;/A&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;BR /&gt; }&lt;BR /&gt;}&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Jul 2017 14:08:37 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/rest-api-link-a-file-to-a-site/m-p/21891#M9599</guid>
      <dc:creator>hilal_aslan</dc:creator>
      <dc:date>2017-07-03T14:08:37Z</dc:date>
    </item>
    <item>
      <title>Re: Rest Api : Link a File to a Site</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/rest-api-link-a-file-to-a-site/m-p/21892#M9600</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You need to "create [the symbolic] link" in a new parent folder, hence use POST .../nodes/{parentFolderNodeId}/children:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://api-explorer.alfresco.com/api-explorer/#!/nodes/createNode" title="https://api-explorer.alfresco.com/api-explorer/#!/nodes/createNode" rel="nofollow noopener noreferrer"&gt;Alfresco Content Services REST API Explorer&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The "cm:destination" property points to the source file. It should be noted that this is a pre-existing model as currently used by Share. Here the snippets from ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;applicationModel.xml&lt;/P&gt;&lt;PRE style="color: #a9b7c6; background-color: #2b2b2b; font-size: 9.0pt;"&gt;&lt;SPAN style="color: #e8bf6a;"&gt;&amp;lt;type &lt;/SPAN&gt;&lt;SPAN style="color: #bababa;"&gt;name&lt;/SPAN&gt;&lt;SPAN style="color: #6a8759;"&gt;="app:filelink"&lt;/SPAN&gt;&lt;SPAN style="color: #e8bf6a;"&gt;&amp;gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #e8bf6a;"&gt;&amp;nbsp;&amp;nbsp; &amp;lt;title&amp;gt;&lt;/SPAN&gt;File Link Object&lt;SPAN style="color: #e8bf6a;"&gt;&amp;lt;/title&amp;gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #e8bf6a;"&gt;&amp;nbsp;&amp;nbsp; &amp;lt;parent&amp;gt;&lt;/SPAN&gt;cm:link&lt;SPAN style="color: #e8bf6a;"&gt;&amp;lt;/parent&amp;gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #e8bf6a;"&gt;&amp;lt;/type&amp;gt;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;contentModel.xml&lt;/P&gt;&lt;PRE style="color: #a9b7c6; background-color: #2b2b2b; font-size: 9.0pt;"&gt;&lt;SPAN style="color: #e8bf6a;"&gt;&amp;lt;type &lt;/SPAN&gt;&lt;SPAN style="color: #bababa;"&gt;name&lt;/SPAN&gt;&lt;SPAN style="color: #6a8759;"&gt;="cm:link"&lt;/SPAN&gt;&lt;SPAN style="color: #e8bf6a;"&gt;&amp;gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #e8bf6a;"&gt;&amp;nbsp;&amp;nbsp; &amp;lt;title&amp;gt;&lt;/SPAN&gt;Link Object&lt;SPAN style="color: #e8bf6a;"&gt;&amp;lt;/title&amp;gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #e8bf6a;"&gt;&amp;nbsp;&amp;nbsp; &amp;lt;parent&amp;gt;&lt;/SPAN&gt;cm:cmobject&lt;SPAN style="color: #e8bf6a;"&gt;&amp;lt;/parent&amp;gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #e8bf6a;"&gt;&amp;nbsp;&amp;nbsp; &amp;lt;properties&amp;gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #e8bf6a;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;property &lt;/SPAN&gt;&lt;SPAN style="color: #bababa;"&gt;name&lt;/SPAN&gt;&lt;SPAN style="color: #6a8759;"&gt;="cm:destination"&lt;/SPAN&gt;&lt;SPAN style="color: #e8bf6a;"&gt;&amp;gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #e8bf6a;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;title&amp;gt;&lt;/SPAN&gt;Link Destination&lt;SPAN style="color: #e8bf6a;"&gt;&amp;lt;/title&amp;gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #e8bf6a;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;type&amp;gt;&lt;/SPAN&gt;d:noderef&lt;SPAN style="color: #e8bf6a;"&gt;&amp;lt;/type&amp;gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #e8bf6a;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;mandatory&amp;gt;&lt;/SPAN&gt;true&lt;SPAN style="color: #e8bf6a;"&gt;&amp;lt;/mandatory&amp;gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #e8bf6a;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/property&amp;gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #e8bf6a;"&gt;&amp;nbsp;&amp;nbsp; &amp;lt;/properties&amp;gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #e8bf6a;"&gt;&amp;lt;/type&amp;gt;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Jan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Jul 2017 15:03:25 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/rest-api-link-a-file-to-a-site/m-p/21892#M9600</guid>
      <dc:creator>janv</dc:creator>
      <dc:date>2017-07-03T15:03:25Z</dc:date>
    </item>
  </channel>
</rss>

