cancel
Showing results for 
Search instead for 
Did you mean: 

Endpoint CMIS 1.1 from dashlet

jdebat
Champ in-the-making
Champ in-the-making
Hello!

I'm bew on Alfresco and I'm develloping a site dashlet.
My problem :

I want to retrieve data from CMIS with this URL.
http://localhost:8080/alfresco/api/-default-/public/cmis/versions/1.1/browser/root/sites/test-xi/dat...

From the Browser i get the good JSON return but from the dashlet i can't because the url become :
http://localhost:8080/alfresco/s/api/-default-/public/cmis/versions/1.1/browser/root/sites/test-xi/d...

this is my code :
<blockcode>
var theUrl = "/api/-default-/public/cmis/versions/1.1/browser/root/sites/" + site + "/dataLists?cmisselector=children&succinct=true";
      
   var connectorCMIS = remote.connect("alfresco-cmis");
   var resJson = connectorCMIS.get(theUrl);
   var myJsonObject = eval('(' + resJson + ')');
</blockcode>

thank you !
1 REPLY 1

jdebat
Champ in-the-making
Champ in-the-making
I found my solution with a new endpoint in share-config-custom.xml, I had a new endpoint

<blockcode>
<endpoint>
<id>alfresco-cmis</id>
            <name>Alfresco - cmis access</name>
            <description>Access to cmis 1_1 of alfresco</description>
         <connector-id>http</connector-id>
            <endpoint-url>http://localhost:8080/alfresco</endpoint-url>
            <identity>user</identity>
         </endpoint>
</blockcode>

but now i have an http error (401), who say i have to be identified to access content