如何通过 RESTful API 在 Alfresco 中创建文件夹

编程入门 行业动态 更新时间:2024-10-24 10:15:00
本文介绍了如何通过 RESTful API 在 Alfresco 中创建文件夹的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我在 Android 上使用 Freshdocs

I am using Freshdocs for Android

我可以使用这个 API 调用登录到 Alfresco 服务器:

I can login to the Alfresco server using this API call:

GET /alfresco/service/api/login?u={username}&pw={password?}

但是我如何在 Alfresco 中创建一个新文件夹?

But how do I create a new folder in Alfresco?

推荐答案

有两个主要选项,但这取决于您还想做什么,以及您运行的 Alfresco 版本.

There are two main options, but it'll depend on what else you want to do, and what version of Alfresco you're running.

假设您想让事情变得非常简单,并且您只想创建一个文件夹,并且您使用的是 Alfresco 4.1 或更高版本,那么您可以使用 org.alfresco.repository.node.folder.post 网页脚本.为此,只需像以下任一方式发布 JSON

Assuming you want to keep things very simple, and you just want to create one folder, and you're using Alfresco 4.1 or later, then you can use the org.alfresco.repository.node.folder.post webscript. For this, simply post JSON like either

{ "name": "NewNodeName" }

{ "name": "NewNodeName", "title": "New Node Title", "description": "A shiny new node", "type": "cm:folder" }

到 API,它采用类似 /api/site/folder/{site}/{container}/{path}

To the API, which takes a URL like /api/site/folder/{site}/{container}/{path}

或者,如果您想执行许多不同的文件和文件夹操作(例如浏览文件夹结构、创建文件夹、上传文件等),那么您应该使用 CMIS.Apache Chemistry 是一个很棒的用于 CMIS 的库,它甚至还有一个 Android 客户端!android 客户端的文档仍在编写中(刚刚添加了 Android 端口),因此您可能需要询问 邮件列表 如果您没有时间等待文档.

Alternately, if you want to do a number of different file and folder operations (eg navigate the folder structure, create a folder, upload a file to it etc), then you should instead use CMIS. Apache Chemistry is a great library to use for CMIS, and it even has an Android client! The docs for the android client are still being written thought (the Android port was only just added), so you might need to ask on the mailing list if you don't have time to wait for the docs.

更多推荐

如何通过 RESTful API 在 Alfresco 中创建文件夹

本文发布于:2023-11-28 09:36:40,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1641874.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:文件夹   RESTful   API   Alfresco

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!