获取 Repository Alfresco Restful 中的所有文件夹和文档 [英] Get All Folder and Documents in Repository Alfresco Restful

查看:23
本文介绍了获取 Repository Alfresco Restful 中的所有文件夹和文档的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在学习 Alfresco.我想使用 Restful API 获取 Repository 中的所有文件夹和文档.我该怎么做?

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

推荐答案

Web 脚本是构建您自己的 API 的好方法,但在这种情况下,您应该可以使用 Alfresco 为您提供 OOTB 的内置 API.

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:

https://wiki.alfresco.com/wiki/Repository_RESTful_API_Reference#Retrieve_endants_of_of_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.

这篇关于获取 Repository Alfresco Restful 中的所有文件夹和文档的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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