<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: How to create a site with REST API from javascript? in Alfresco Forum</title>
    <link>https://connect.hyland.com/t5/alfresco-forum/how-to-create-a-site-with-rest-api-from-javascript/m-p/23693#M10341</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please check your&amp;nbsp;JSON payload. You do not need the top-level "entry" ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You may&amp;nbsp;find it useful to sanity check&amp;nbsp;via "curl" or Postman (or your favourite HTTP/REST client) ?&amp;nbsp;You may also find it useful to take a look at&amp;nbsp;&lt;A href="https://community.alfresco.com/community/ecm/blog/2017/02/24/v1-rest-api-part-8-sites" rel="nofollow noopener noreferrer"&gt;https://community.alfresco.com/community/ecm/blog/2017/02/24/v1-rest-api-part-8-sites&lt;/A&gt;&amp;nbsp;or simply "Try it out !" via the API explorer to see an example payload&amp;nbsp;&lt;A class="link-titled" href="https://api-explorer.alfresco.com/api-explorer/#!/sites/createSite" title="https://api-explorer.alfresco.com/api-explorer/#!/sites/createSite" rel="nofollow noopener noreferrer"&gt;Alfresco Content Services REST API Explorer&lt;/A&gt;&amp;nbsp;?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Another option is to have a look at how it is done via the&amp;nbsp;Alfresco JS API "&lt;A href="https://github.com/Alfresco/alfresco-js-api/blob/master/src/alfresco-core-rest-api/docs/SitesApi.md#createSite" rel="nofollow noopener noreferrer"&gt;create site&lt;/A&gt;" or use that instead ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope that helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Jan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 30 Aug 2017 11:05:08 GMT</pubDate>
    <dc:creator>janv</dc:creator>
    <dc:date>2017-08-30T11:05:08Z</dc:date>
    <item>
      <title>How to create a site with REST API from javascript?</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/how-to-create-a-site-with-rest-api-from-javascript/m-p/23692#M10340</link>
      <description>This is what am trying to do ,top create a site from REST API in javascript.(Alfresco community edition 201707)function CreateSite(){ /*TEST API - START*/ var siteBodyCreate = { "id": "NewTest", "title": "NewTest", "description": "NewTest", "visibility": "PUBLIC" };$.ajax({ type: 'POST', beforeSend:</description>
      <pubDate>Wed, 30 Aug 2017 08:49:33 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/how-to-create-a-site-with-rest-api-from-javascript/m-p/23692#M10340</guid>
      <dc:creator>anandhan</dc:creator>
      <dc:date>2017-08-30T08:49:33Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a site with REST API from javascript?</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/how-to-create-a-site-with-rest-api-from-javascript/m-p/23693#M10341</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please check your&amp;nbsp;JSON payload. You do not need the top-level "entry" ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You may&amp;nbsp;find it useful to sanity check&amp;nbsp;via "curl" or Postman (or your favourite HTTP/REST client) ?&amp;nbsp;You may also find it useful to take a look at&amp;nbsp;&lt;A href="https://community.alfresco.com/community/ecm/blog/2017/02/24/v1-rest-api-part-8-sites" rel="nofollow noopener noreferrer"&gt;https://community.alfresco.com/community/ecm/blog/2017/02/24/v1-rest-api-part-8-sites&lt;/A&gt;&amp;nbsp;or simply "Try it out !" via the API explorer to see an example payload&amp;nbsp;&lt;A class="link-titled" href="https://api-explorer.alfresco.com/api-explorer/#!/sites/createSite" title="https://api-explorer.alfresco.com/api-explorer/#!/sites/createSite" rel="nofollow noopener noreferrer"&gt;Alfresco Content Services REST API Explorer&lt;/A&gt;&amp;nbsp;?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Another option is to have a look at how it is done via the&amp;nbsp;Alfresco JS API "&lt;A href="https://github.com/Alfresco/alfresco-js-api/blob/master/src/alfresco-core-rest-api/docs/SitesApi.md#createSite" rel="nofollow noopener noreferrer"&gt;create site&lt;/A&gt;" or use that instead ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope that helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Jan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Aug 2017 11:05:08 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/how-to-create-a-site-with-rest-api-from-javascript/m-p/23693#M10341</guid>
      <dc:creator>janv</dc:creator>
      <dc:date>2017-08-30T11:05:08Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a site with REST API from javascript?</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/how-to-create-a-site-with-rest-api-from-javascript/m-p/23694#M10342</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;Hi Jan Vonkan&lt;SPAN style="background-color: #ffffff;"&gt;,&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff; color: #000000;"&gt;It was helpul.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff; color: #000000;"&gt;But now i have end up with error saying "Can not get preferences for admin because there was an error pasing the JSON data"&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 31 Aug 2017 10:15:40 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/how-to-create-a-site-with-rest-api-from-javascript/m-p/23694#M10342</guid>
      <dc:creator>anandhan</dc:creator>
      <dc:date>2017-08-31T10:15:40Z</dc:date>
    </item>
  </channel>
</rss>

