05-28-2018 01:16 PM
hi All,
I have been using Alfresco for past couple of weeks and it is a really great experience.
I use the below POST query along with the parameters to create documents via REST.
hxxp://localhost:8080/alfresco/api/-default-/public/alfresco/versions/1/nodes/-my-/children
However, the above creates the document under root folder. But, I need to create a document on specific site/documentLibrary/folder.
I have seen this reference but not cannot figure out how the altimate URL should look like.
Create child folder | Alfresco Documentation
How would l be able to do that pass all three arguments?
Please let me know and thank you in advance,
05-28-2018 05:28 PM
That documentation link points to an internal ReST API which should not be used for custom, external integrations. That API is used primarily for the Share user interface. As such, the operation may be removed in a future version of Alfresco (undetermined as of yet) when Share is finally removed.
The public v1 ReST API has its specific operation to retrieve a site container (i.e. documentLibrary), and with the container folder in hand you can then use the regular API to create a child in there.
P.S.: In the future, please make a selection of the categories - don't just check every single one of them, even though most don't make sense for the question.
05-28-2018 05:49 PM
Thanks a lot for the quick reply.
Just one more question, Having the container, would I be able to create folder in it? Which API should I use for that one?
Regards,
05-29-2018 06:18 AM
The one API you already listed, i.e. /alfresco/api/-default-/public/alfresco/versions/1/nodes/[nodeIdOfContainer]/children
I am wondering: Are you using the documentation / publicly available API explorer to find your way around the ReST API? It should be quite straightforward to connect which operations you can use for your specific use cases by looking at that.
05-29-2018 12:23 PM
Explore our Alfresco products with the links below. Use labels to filter content by product module.