<?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 REST API: Add Group to Site in Alfresco Forum</title>
    <link>https://connect.hyland.com/t5/alfresco-forum/rest-api-add-group-to-site/m-p/90880#M27077</link>
    <description>&lt;P&gt;Hi everyone,&lt;/P&gt;&lt;P&gt;In the frontend of Alfresco DMS we can add a group to a site with for example role = "SiteContributor", so therefore all users within the group has access with this specific right for the site. I wasn't able to find the endpoint in the alfresco api explorer. I looked up for /sites/:id/groups or /groups/:id/sites, but I wasn't lucky. Also I tried PUT /nodes/:id with permissions, but I can't see an effect on the frontend.&lt;/P&gt;&lt;P&gt;Do I miss something? Could you help me please?&lt;/P&gt;</description>
    <pubDate>Mon, 12 Oct 2020 09:21:56 GMT</pubDate>
    <dc:creator>mlorentz</dc:creator>
    <dc:date>2020-10-12T09:21:56Z</dc:date>
    <item>
      <title>REST API: Add Group to Site</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/rest-api-add-group-to-site/m-p/90880#M27077</link>
      <description>&lt;P&gt;Hi everyone,&lt;/P&gt;&lt;P&gt;In the frontend of Alfresco DMS we can add a group to a site with for example role = "SiteContributor", so therefore all users within the group has access with this specific right for the site. I wasn't able to find the endpoint in the alfresco api explorer. I looked up for /sites/:id/groups or /groups/:id/sites, but I wasn't lucky. Also I tried PUT /nodes/:id with permissions, but I can't see an effect on the frontend.&lt;/P&gt;&lt;P&gt;Do I miss something? Could you help me please?&lt;/P&gt;</description>
      <pubDate>Mon, 12 Oct 2020 09:21:56 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/rest-api-add-group-to-site/m-p/90880#M27077</guid>
      <dc:creator>mlorentz</dc:creator>
      <dc:date>2020-10-12T09:21:56Z</dc:date>
    </item>
    <item>
      <title>Re: REST API: Add Group to Site</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/rest-api-add-group-to-site/m-p/90881#M27078</link>
      <description>&lt;P&gt;You can use this REST API to add groups to a site:&lt;/P&gt;
&lt;DIV class="section refsyn"&gt;&lt;SAMP class="ph codeph"&gt;POST &lt;A href="https://github.com/Alfresco/alfresco-remote-api/blob/master/src/main/resources/alfresco/templates/webscripts/org/alfresco/repository/site/membership/membership.put.json.js" target="_blank" rel="noopener nofollow noreferrer"&gt;/alfresco/service/api/sites/{shortname}/memberships&lt;/A&gt;&lt;/SAMP&gt;&lt;/DIV&gt;
&lt;DIV class="section refsyn"&gt;
&lt;DIV class="section refsyn"&gt;
&lt;P class="p"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class="p"&gt;'shortname' is the shortname of the web site, 'authorityname' is the full authority name for the membership. Required parameters,&lt;/P&gt;
&lt;P class="p"&gt;role, mandatory String, the new role name for this membership.&lt;/P&gt;
&lt;P class="p"&gt;person object, with userName property&lt;/P&gt;
&lt;P class="p"&gt;OR group object, with fullName property&lt;/P&gt;
&lt;P class="p"&gt;OR authority object, with fullName property&lt;/P&gt;
&lt;/DIV&gt;
&lt;DIV class="section refsyn"&gt;&lt;U&gt;The web script description document specifies the following options:&lt;/U&gt;&lt;/DIV&gt;
&lt;DIV class="section refsyn"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;TABLE class="simpletable properties" border="1" summary="" cellspacing="0" cellpadding="4"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TH id="d492841e113-value" align="left" valign="bottom"&gt;Value&lt;/TH&gt;
&lt;TH id="d492841e113-desc" align="left" valign="bottom"&gt;Description&lt;/TH&gt;
&lt;/TR&gt;
&lt;TR class="strow property"&gt;
&lt;TD valign="top" class="stentry propvalue"&gt;&lt;SAMP class="ph codeph"&gt;json&lt;/SAMP&gt;&lt;/TD&gt;
&lt;TD valign="top" class="stentry propdesc"&gt;The default response format&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR class="strow property"&gt;
&lt;TD valign="top" class="stentry propvalue"&gt;&lt;SAMP class="ph codeph"&gt;user&lt;/SAMP&gt;&lt;/TD&gt;
&lt;TD valign="top" class="stentry propdesc"&gt;The authentication access&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR class="strow property"&gt;
&lt;TD valign="top" class="stentry propvalue"&gt;&lt;SAMP class="ph codeph"&gt;required&lt;/SAMP&gt;&lt;/TD&gt;
&lt;TD valign="top" class="stentry propdesc"&gt;The transaction level&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR class="strow property"&gt;
&lt;TD valign="top" class="stentry propvalue"&gt;&lt;SAMP class="ph codeph"&gt;argument&lt;/SAMP&gt;&lt;/TD&gt;
&lt;TD valign="top" class="stentry propdesc"&gt;The format style&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;

&lt;P&gt;Example:&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;POST&lt;/STRONG&gt;:&amp;nbsp;&lt;SPAN&gt;http://localhost:8080/alfresco/service/api/sites/&lt;STRONG&gt;test&lt;/STRONG&gt;/memberships&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;'test', is a site short name.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;U&gt;&lt;STRONG&gt;JsonPayload&lt;/STRONG&gt;&lt;/U&gt;:&lt;/SPAN&gt;&lt;/P&gt;
&lt;PRE&gt;{
&lt;STRONG&gt;  "role" : "SiteContributor",
  "group" : {
      "fullName":"GROUP_EngineeringTeam"
&lt;/STRONG&gt;  }
}&lt;/PRE&gt;
&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;Make sure you add 'GROUP_' prefix to the group name you want to add to the site.&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;U&gt;You should be getting response something like:&lt;/U&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;PRE&gt;{
    "role": "SiteContributor",
    "authority": {
        "authorityType": "GROUP",
        "shortName": "EngineeringTeam",
        "fullName": "GROUP_EngineeringTeam",
        "displayName": "EngineeringTeam",
        "url": "/alfresco/service/api/groups/EngineeringTeam"
    },
    "url": "/alfresco/service/api/sites/test/memberships/GROUP_EngineeringTeam"
}&lt;/PRE&gt;

&lt;/DIV&gt;</description>
      <pubDate>Mon, 12 Oct 2020 15:58:10 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/rest-api-add-group-to-site/m-p/90881#M27078</guid>
      <dc:creator>abhinavmishra14</dc:creator>
      <dc:date>2020-10-12T15:58:10Z</dc:date>
    </item>
    <item>
      <title>Re: REST API: Add Group to Site</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/rest-api-add-group-to-site/m-p/90882#M27079</link>
      <description>&lt;P&gt;That's perfect, thank you so much for this example!&lt;/P&gt;</description>
      <pubDate>Tue, 13 Oct 2020 12:47:30 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/rest-api-add-group-to-site/m-p/90882#M27079</guid>
      <dc:creator>mlorentz</dc:creator>
      <dc:date>2020-10-13T12:47:30Z</dc:date>
    </item>
  </channel>
</rss>

