获取资源库露天宁静的所有文件夹和文件 [英] Get All Folder and Documents in Repository Alfresco Restful

查看:278
本文介绍了获取资源库露天宁静的所有文件夹和文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在学露天。我希望得到库中的所有文件夹和文件REST风格的API。我怎样才能做到这一点?

I'm learning Alfresco. I want get all folder and documents in Repository with Restful API. How can I do this?

推荐答案

Webscripts是建立自己的API,但在这种情况下,你应该罚款的buildin的API,它的Alfresco为您提供开箱即用的一种很好的方式。

Webscripts are a nice way to build your own API but in this case you should be fine with the buildin API that Alfresco provides you OOTB.

您可以获取使用REST API的调用getDescendants所有文件夹/文件。
请参阅API规范的具体细节:

You can fetch all folders/documents using the REST APIs getDescendants call. Please see the API spec for the exact details:

<一个href=\"https://wiki.alfresco.com/wiki/Repository_RESTful_API_Reference#Retrieve_tree_of_descendants_.28getDescendants.29\" rel=\"nofollow\">https://wiki.alfresco.com/wiki/Repository_RESTful_API_Reference#Retrieve_tree_of_descendants_.28getDescendants.29

,它返回所定义的树中的级别数目的指定文件夹的子对象的列表。

It returns a list of descendant objects of the specified folder for the defined number of levels in the tree.

GET /alfresco/service/api/node/{store_type}/{store_id}/{id}/descendants?types={types}&filter={filter?}&depth={depth?}

它开始于与ID参数指定的文件夹,并应用可选参数您的来电。这意味着,你可以如按类型(文件,文件夹等)过滤,并定义一个深度来查询。使用-1将返回所有级别。

It starts at the folder identified with the ID param and applies the optional arguments to your call. This means that you can e.g. filter by type (document, folder,etc) and define a depth to query. Using -1 returns you all levels.

这篇关于获取资源库露天宁静的所有文件夹和文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆