<?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 Share (5.2) Controller JS : Call Alfresco REST API  in Alfresco Forum</title>
    <link>https://connect.hyland.com/t5/alfresco-forum/share-5-2-controller-js-call-alfresco-rest-api/m-p/29381#M12505</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, &lt;/P&gt;&lt;P&gt;For call Alfresco Webscript from Share on a controller js we used this code :&lt;/P&gt;&lt;P&gt;var conn = remote.connect("alfresco");&lt;/P&gt;&lt;P&gt;var repoResponse = conn.post("/api/sites", clientRequest, "application/json");&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And this work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, How call Alfresco REST API on this same context?&lt;/P&gt;&lt;P&gt;See API information : &lt;A class="link-titled" href="https://api-explorer.alfresco.com/api-explorer/#!/sites/listSites" title="https://api-explorer.alfresco.com/api-explorer/#!/sites/listSites" rel="nofollow noopener noreferrer"&gt;Alfresco Content Services REST API Explorer&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;var conn = remote.connect("alfresco");&lt;BR /&gt;var repoResponse = conn.get("/sites");&lt;/P&gt;&lt;P&gt;Doesn't work...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thx&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 23 Nov 2017 11:02:14 GMT</pubDate>
    <dc:creator>gawel</dc:creator>
    <dc:date>2017-11-23T11:02:14Z</dc:date>
    <item>
      <title>Share (5.2) Controller JS : Call Alfresco REST API</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/share-5-2-controller-js-call-alfresco-rest-api/m-p/29381#M12505</link>
      <description>Hi, For call Alfresco Webscript from Share on a controller js we used this code :var conn = remote.connect("alfresco");var repoResponse = conn.post("/api/sites", clientRequest, "application/json");And this work.So, How call Alfresco REST API on this same context?See API information : Alfresco Conten</description>
      <pubDate>Thu, 23 Nov 2017 11:02:14 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/share-5-2-controller-js-call-alfresco-rest-api/m-p/29381#M12505</guid>
      <dc:creator>gawel</dc:creator>
      <dc:date>2017-11-23T11:02:14Z</dc:date>
    </item>
    <item>
      <title>Re: Share (5.2) Controller JS : Call Alfresco REST API</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/share-5-2-controller-js-call-alfresco-rest-api/m-p/29382#M12506</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You cannot use this "remote.connect"&amp;nbsp;for the new REST API, as is taking a root including an "extra s":&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://github.com/Alfresco/alfresco-sdk-samples/blob/master/samples/alfresco-rm-custom/share-amp/src/test/resources/alfresco/web-extension/share-config-custom.xml#L49" rel="nofollow noopener noreferrer"&gt;https://github.com/Alfresco/alfresco-sdk-samples/blob/master/samples/alfresco-rm-custom/share-amp/src/test/resources/alfresco/web-extension/share-config-custom.xml#L49&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Probably you can add a new connector &lt;STRONG&gt;"alfresco-new"&lt;/STRONG&gt; with &lt;STRONG&gt;"endpoint-url"&lt;/STRONG&gt; value at &lt;STRONG&gt;"${alfresco.repo.url}/api/-default-/public/alfresco/versions/1"&lt;/STRONG&gt; in &lt;STRONG&gt;"share-config-custom.xml"&lt;/STRONG&gt; and then you could use &lt;STRONG&gt;remote.connect("alfresco-new")&lt;/STRONG&gt;. Anyway I didn't tested this.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Nov 2017 14:52:13 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/share-5-2-controller-js-call-alfresco-rest-api/m-p/29382#M12506</guid>
      <dc:creator>angelborroy</dc:creator>
      <dc:date>2017-11-23T14:52:13Z</dc:date>
    </item>
    <item>
      <title>Re: Share (5.2) Controller JS : Call Alfresco REST API</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/share-5-2-controller-js-call-alfresco-rest-api/m-p/29383#M12507</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, &lt;/P&gt;&lt;P&gt;This work fine (Resolve) for Alfresco V5.2 :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var conn = remote.connect("alfresco-api");&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var repoResponse = conn.get("/-default-/public/alfresco/versions/1/sites");&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; logger.warn(repoResponse.status);&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Nov 2017 16:12:21 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/share-5-2-controller-js-call-alfresco-rest-api/m-p/29383#M12507</guid>
      <dc:creator>gawel</dc:creator>
      <dc:date>2017-11-24T16:12:21Z</dc:date>
    </item>
    <item>
      <title>Re: Share (5.2) Controller JS : Call Alfresco REST API</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/share-5-2-controller-js-call-alfresco-rest-api/m-p/29384#M12508</link>
      <description>Hello gawel I want to know what you configured in your alfresco to use remote object, because when I try to use it I get this error. 500 Internal Error Stacktrace-Details: org.springframework.extensions.webscripts.WebScriptException: 11150002 Wrapped Exception (with status template): 11150025 Failed to execute script 'Javascript Console Script': 11150024 ReferenceError: "remote" is not defined.</description>
      <pubDate>Fri, 15 Dec 2023 15:42:42 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/share-5-2-controller-js-call-alfresco-rest-api/m-p/29384#M12508</guid>
      <dc:creator>Santiago-Florez</dc:creator>
      <dc:date>2023-12-15T15:42:42Z</dc:date>
    </item>
  </channel>
</rss>

