Reputation: 1633
I want to retrieve the content details with API from Alfresco.
From alfresco document I got the following rest url. But I don't know how to get all the content id's from alfresco.
GET alfresco/api/-default-/public/cmis/versions/1.1/atom/content?id={content_id}
It would be grateful if someone explains me.
Upvotes: 0
Views: 3111
Reputation: 10538
Use children, like this: http://localhost:8080/alfresco/api/-default-/public/cmis/versions/1.0/atom/children?id=48237562-2534-45f2-b985-c72bf00c4f40
See https://developer.alfresco.com/resources/alfresco/pdf/AlfrescoAPIReference-v1.0.pdf
Upvotes: 2
Reputation: 2203
You can take reference of this Recursively get all content file names under a folder in Alfresco 5.0 (by WebScripts)
Just change getChildren.get.json.ftl to
{
"totalItems": "${totalItems}",
"nodes":
[<#list results as node>
{
"id" : "${node.id}"
}<#if (node_index + 1 < results?size)>,</#if>
</#list>
]
}
You will get content id's of all document of specific folder.
Upvotes: 0
Reputation: 3175
you can use nodeservice and searchservice to retrieve all node's id in alfresco.you can find usefull method in below links.
http://dev.alfresco.com/resource/docs/java/org/alfresco/service/cmr/repository/NodeService.html
If you are using rest api than you may need to create your custom webscript(alfresco provides rest api using webscript) in alfresco to retrieve all node from alfresco document repository and than using that response you can call above.
Upvotes: 0
Reputation: 1618
Each node (node = document or folder) with alfresco has a "NodeRef" property. That's the unique id to use.
You can obtain the NodeRef in many different ways:
Once you know the NodeRef you can access your content with the url like this (example)
/alfresco/api/-default-/public/cmis/versions/1.1/atom/content?id=824ba7cd-dcee-4908-8917-7b6ac0611c97
The returned object should be the node content.
Upvotes: 2