cancel
Showing results for 
Search instead for 
Did you mean: 

Rest API for Creating a space from template

mcollins323
Champ in-the-making
Champ in-the-making
I'd like to be work with the repository with ColdFusion with cfhttp.

Are their http restful api's that will expose workign with folders and inviting users to folders.

I also need the url to work with users and groups.

Thanks.
1 REPLY 1

prignony
Champ on-the-rise
Champ on-the-rise
As seen on another post you could try this:

<cfset application.alfrescoRoot="http://127.0.0.1:8080/alfresco'/>
<cfset application.alfrescoUsername="admin"/>
<cfset application.alfrescoPassword="admin"/>
<cfset application.logfile="alf_log"/>

<cffunction name="getTicket" returntype="string">
   <cftry>
      <cfhttp url="#APPLICATION.alfrescoRoot#/service/api/login?u=#APPLICATION.alfrescoUsername#&pw=#APPLICATION.alfrescoPassword#" method="GET">
      <cfdump var="#XmlParse(Trim(cfhttp.FileContent))#">
      <cfscript>
         xmlTicketResponse = XmlParse(Trim(cfhttp.FileContent));
         ticket = xmlTicketResponse.ticket.xmlText;
         return ticket;
      </cfscript>
      <cfcatch type="any">
      <cfset message = "components.titlemanager.alfresco.getTicket() failed.">
      <cflog application="false" file="#APPLICATION.logfile#" type="error" text="#message#">
      </cfcatch>
   </cftry>
</cffunction>

<cfdump var="#getTicket()#"/>

Then you will find all info on service available here:
http://127.0.0.1:8080/alfresco/service/index/all.mediawiki