Hi guys,I am working on Alfresco shared site creation. I want to use REST API, but I keep stumbling on various problems. The first and main issue is which interface to use??? I am reading forums and googling for 2 days and I found like 4 interfaces and none of them works properly:<ul>/wcservice/api/sites - doesn't work at all</ul><ul>/s/api/sites - doesn't work at all</ul><ul>/alfresco/service/api - works, but only creates site and nothing else</ul><ul>/share/service/modules/create-site - should be the one to use</ul>So I started to discover secrets of shared site creation. First mystery was to find what the json body looks like. I found this, but I am not sure if it is correct:
{
"sitePreset": "site-dashboard",
"shortName": "Sandbox",
"title": "Sandbox site",
"description": "This is a Sandbox site.",
"visibility": "PRIVATE",
"isVisible" : "false",
"id" : "SANDBOX"
}
This kind of worked, but I received error json with message error.loggedOut.Ok, no problem, I will just log in here /alfresco/service/api/login, ok I have the ticket ,,, and what??? Where should I put the ticket? It is very unclear and nowhere to be found. Someone says put it to json like this:
{
"sitePreset": "site-dashboard",
"shortName": "Sandbox",
"title": "Sandbox site",
"description": "This is a Sandbox site.",
"visibility": "PRIVATE",
"ticket":"TICKET_b80585cc24547951d13c9c5df16fe0957d4a11df"
}
It does not work! Then some says "put it as parameter alf_ticket, ticket or alfTicket" like this:<ul>/share/service/modules/create-site?ticket=TICKET_b80585cc24547951d13c9c5df16fe0957d4a11df</ul>or<ul>/share/service/modules/create-site?alf_ticket=TICKET_b80585cc24547951d13c9c5df16fe0957d4a11df</ul>or<ul>/share/service/modules/create-site?alfTicket=TICKET_b80585cc24547951d13c9c5df16fe0957d4a11df</ul>This does not work either and I keep getting this error json:
{
"status": {
"code": 401,
"name": "Unauthorized",
"description": "The request requires HTTP authentication."
},
"message": "error.loggedOut",
"exception": "",
"callstack": [],
"server": "Spring WebScripts - v5.0.0 (Release) schema 1 000",
"time": "3.9.2015 10:42:27"
}
Could someone please tell me how to create shared site or point me somewhere atleast?ThanksRoman