cancel
Showing results for 
Search instead for 
Did you mean: 

Alfresco 'Get all links' (/api/links/site/{site}/{container}

ddanninger
Champ in-the-making
Champ in-the-making
Hi,

i have a question do you know if it is a Bug:

I tried to get the Links which i created in Share my JSON Result is :

{
   "metadata":
   {
      "linkPermissions":
      {
         "create": "true"
      }
   },
   "total": 2,
   "pageSize": �,
   "startIndex": �,
   "itemCount": 0,
   "items":
   [
   ]
}


But if I look in Alfresco Share i can see the Links and as i can see in the Javascripts Alfresco Share use the same Url? Doesnt it use the some one??

I tried the URL:
http://localhost:8080/alfresco/service/api/links/site/test/links

{site}: "test"
{container}: "links"

Did I do something wrong or is it a Bug in the 3.3 Community Version?

But if it is a Bug how can Alfresco Share handle it ?

Best regards
Dominik
1 REPLY 1

thribhuvan
Champ in-the-making
Champ in-the-making
Hello Dominik,
Not sure if you found the solution for this, but I have  Smiley Happy 

I was also looking at the same "links" web scripts API (to get all links) and got into the same problem as you. After doing lot of googling and searching in alfresco forums, I found the solution by walking through Share's application WEB-INF/classes folder, where in there is a JS file which is expecting the pagination related query string parameters page and pageSize. Without this query string I get the output same as you. After modifying the url to "http://localhost:9090/alfresco/service/api/links/site/NMP/links?page=1&pageSize=5", now I get the right output Smiley Happy

Hope this helps!

Regards,
Thribhuvan