I am using Freshdocs for Android
I can login to the Alfresco server using this API call:
GET /alfresco/service/api/login?u={username}&pw={password?}
But how do I create a new folder in Alfresco?
I am using Freshdocs for Android
I can login to the Alfresco server using this API call:
GET /alfresco/service/api/login?u={username}&pw={password?}
But how do I create a new folder in Alfresco?
You should use
POST /alfresco/service/api/path/{store_type}/{store_id}/{id}/children
Read the docs for detailed information:
http://wiki.alfresco.com/wiki/Repository_RESTful_API_Reference#Create_folder_or_document_.28createDocument.2C_createFolder.29
To create a folder through api you can use the following queries:
a) To create defined type folder using full path to parent folder
siteName - website name created in Alfresco;
parentFolderPath - path to parent folder;
name -folder name;
type - folder type.
Example:
After making the request "Pushkin" folder is created. This folder is situated in “books” folder of documents library on the "example" website.
b) To create folder by nodeRef
nodeRef is an object id in Alfresco. Each object has its own nodeRef. This request creates new object inside given object of folder type.
folderName - folder name;
folderType - folder type;
nodeRef - folder id in Alfresco.
Example:
Other services and their description you can find here:
http://jazzteam.org/en/technical-articles/list-of-alfresco-services/
There are two main options, but it'll depend on what else you want to do, and what version of Alfresco you're running.
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 eitheror
To the API, which takes a URL like
/api/site/folder/{site}/{container}/{path}
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.