user1941390
user1941390

Reputation: 520

How to use Alfresco rest api to create folder in a site/documentLibrary?

I have installed Alfresco and I would like to create folder in a specific site and under specific document library.

There is link hear saying the query should look like this:

POST /alfresco/service/api/node/folder/{store_type}/{store_id}/{id}
POST /alfresco/service/api/site/folder/{site}/{container}/{path}
POST /alfresco/service/api/site/folder/{site}/{container}

but if I try it in the postman I get the below error:

hxxp://127.0.0.1:8080/alfresco/service/api/site/folder/mikesite/documentLibrary/hello

enter image description here

enter image description here

And here is the response:

{
    "status": {
        "code": 404,
        "name": "Not Found",
        "description": "Requested resource is not available."
    },
    "message": "",
    "exception": "",
    "callstack": [],
    "server": "Community v5.2.0 (re21f2be5-b22) schema 10,057",
    "time": "May 29, 2018 1:10:51 AM"
}

Please let me know how I could do this.

Many thanks for any clue.

Upvotes: 1

Views: 1171

Answers (1)

Vikash Patel
Vikash Patel

Reputation: 1348

You need to specify the exact path of your site folder which has to be available in site.

So for your example hello folder has to be available in your site document library.

Upvotes: 3

Related Questions