<?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: REST API and curl to add a user to a site in Alfresco Forum</title>
    <link>https://connect.hyland.com/t5/alfresco-forum/rest-api-and-curl-to-add-a-user-to-a-site/m-p/148035#M39152</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;A href="https://migration33.stage.lithium.com/t5/user/viewprofilepage/user-id/86357"&gt;@wssupport&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Have you had a look at the &lt;A href="https://hub.alfresco.com/t5/alfresco-content-services-blog/v1-rest-api-part-1-introduction/ba-p/286874" target="_self" rel="nofollow noopener noreferrer"&gt;ReST API tutorials&lt;/A&gt;? These have Postman examples that you can use to test against your repository. Postman will also give code examples in various languages. Might be worth looking at?&lt;/P&gt;
&lt;P&gt;HTH,&lt;/P&gt;</description>
    <pubDate>Thu, 15 Jul 2021 12:56:46 GMT</pubDate>
    <dc:creator>EddieMay</dc:creator>
    <dc:date>2021-07-15T12:56:46Z</dc:date>
    <item>
      <title>REST API and curl to add a user to a site</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/rest-api-and-curl-to-add-a-user-to-a-site/m-p/148031#M39148</link>
      <description>&lt;P&gt;Hi everyone, so trying to programatically add a user to a site and failing currently. Saw some examples of using the REST API and trying to post with curl. I get no response back from the command. If I change the URL in the command I get a 404 back though, so it's as if the URL is correct.&lt;/P&gt;&lt;P&gt;From the alfresco box itself (Community version 6.1.2 in docker on Ubuntu 18.04)&lt;/P&gt;&lt;PRE&gt;curl -X POST -uadmin:mypass "http://localhost:8080/share/alfresco/service/api/sites/testsite/memberships" -H"content-type: application/json" -d "{"role":"SiteManager","person":{"userName" : "usernametoadd"}}"&lt;/PRE&gt;&lt;P&gt;Can anyone spot what I am doing wrong please? Or advise me of an alternative way to programatically add a user to a site? I have over 1000 sites to modify so I need to do it in code thanks.&lt;/P&gt;</description>
      <pubDate>Thu, 15 Jul 2021 08:50:20 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/rest-api-and-curl-to-add-a-user-to-a-site/m-p/148031#M39148</guid>
      <dc:creator>wssupport</dc:creator>
      <dc:date>2021-07-15T08:50:20Z</dc:date>
    </item>
    <item>
      <title>Re: REST API and curl to add a user to a site</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/rest-api-and-curl-to-add-a-user-to-a-site/m-p/148032#M39149</link>
      <description>&lt;P&gt;Hi!&lt;/P&gt;&lt;P&gt;I'm more comfortable doing this kind of task through &lt;A href="https://hub.alfresco.com/t5/alfresco-content-services-add/javascript-console/td-p/290313" target="_self" rel="nofollow noopener noreferrer"&gt;javascript console&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;If you consider use that, the script should be something like this:&lt;/P&gt;&lt;PRE&gt;var group = people.getGroup("GROUP_site_testsite_SiteCollaborator");
var authority = people.getPerson("user.name"); 
people.addAuthority(group,authority);&lt;/PRE&gt;&lt;P&gt;You can play with Javascript api to get reports about this kind of actions.&lt;/P&gt;&lt;P&gt;Cheers!&lt;/P&gt;</description>
      <pubDate>Thu, 15 Jul 2021 10:03:21 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/rest-api-and-curl-to-add-a-user-to-a-site/m-p/148032#M39149</guid>
      <dc:creator>cristinamr</dc:creator>
      <dc:date>2021-07-15T10:03:21Z</dc:date>
    </item>
    <item>
      <title>Re: REST API and curl to add a user to a site</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/rest-api-and-curl-to-add-a-user-to-a-site/m-p/148033#M39150</link>
      <description>&lt;P&gt;Thanks, this javascript console looks great but I'm using a dockerised Alfresco which seems like a nightmare to install amps onto, I've read around about this but I cannot find any simple clear instruction on how to add these two amps to my docker instance for Alfresco.&lt;/P&gt;&lt;P&gt;This is partly why I am trying to do this without installing any addons. It would be could if I could use your example above and submit this javascript with curl.&lt;/P&gt;</description>
      <pubDate>Thu, 15 Jul 2021 11:09:04 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/rest-api-and-curl-to-add-a-user-to-a-site/m-p/148033#M39150</guid>
      <dc:creator>wssupport</dc:creator>
      <dc:date>2021-07-15T11:09:04Z</dc:date>
    </item>
    <item>
      <title>Re: REST API and curl to add a user to a site</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/rest-api-and-curl-to-add-a-user-to-a-site/m-p/148034#M39151</link>
      <description>&lt;P&gt;ok I think my URL is incorrect below. Basically I cannot access &lt;A href="http://localhost:8080/alfresco" target="_blank" rel="noopener nofollow noreferrer"&gt;http://localhost:8080/alfresco&lt;/A&gt; so it seems I cannot use any API calls. Alfresco is working perfectly though (on /share). What have I missed?&lt;/P&gt;&lt;PRE&gt;curl -X POST -uadmin:mypass "http://localhost:8080/share/alfresco/service/api/sites/testsite/memberships" -H"content-type: application/json" -d "{"role":"SiteManager","person":{"userName" : "usernametoadd"}}"&lt;/PRE&gt;&lt;P&gt;I try this below but I get a 404! So it seems I cannot access the API URL, how do I know what this should be on my install?&lt;/P&gt;&lt;PRE&gt;curl -X POST -uadmin:mypass "http://localhost:8080/alfresco/service/api/sites/testsite/memberships" -H"content-type: application/json" -d "{"role":"SiteManager","person":{"userName" : "usernametoadd"}}"&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 15 Jul 2021 11:36:39 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/rest-api-and-curl-to-add-a-user-to-a-site/m-p/148034#M39151</guid>
      <dc:creator>wssupport</dc:creator>
      <dc:date>2021-07-15T11:36:39Z</dc:date>
    </item>
    <item>
      <title>Re: REST API and curl to add a user to a site</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/rest-api-and-curl-to-add-a-user-to-a-site/m-p/148035#M39152</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;A href="https://migration33.stage.lithium.com/t5/user/viewprofilepage/user-id/86357"&gt;@wssupport&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Have you had a look at the &lt;A href="https://hub.alfresco.com/t5/alfresco-content-services-blog/v1-rest-api-part-1-introduction/ba-p/286874" target="_self" rel="nofollow noopener noreferrer"&gt;ReST API tutorials&lt;/A&gt;? These have Postman examples that you can use to test against your repository. Postman will also give code examples in various languages. Might be worth looking at?&lt;/P&gt;
&lt;P&gt;HTH,&lt;/P&gt;</description>
      <pubDate>Thu, 15 Jul 2021 12:56:46 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/rest-api-and-curl-to-add-a-user-to-a-site/m-p/148035#M39152</guid>
      <dc:creator>EddieMay</dc:creator>
      <dc:date>2021-07-15T12:56:46Z</dc:date>
    </item>
    <item>
      <title>Re: REST API and curl to add a user to a site</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/rest-api-and-curl-to-add-a-user-to-a-site/m-p/148036#M39153</link>
      <description>&lt;P&gt;Hi thanks yes I have been looking at that, the problem I have right now is that my /alfresco URL is not working on this install. I have another install which /alfresco works on though so it must be something not right with my install.&lt;/P&gt;&lt;P&gt;I am using docker which is the main difference on the non-working one. So basically I need help on getting the /alfresco URL working on a dockerised Alfresco. Searching all day not yet finding any answers. I think once I get the API URL working I can do what I need.&lt;/P&gt;</description>
      <pubDate>Thu, 15 Jul 2021 13:03:23 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/rest-api-and-curl-to-add-a-user-to-a-site/m-p/148036#M39153</guid>
      <dc:creator>wssupport</dc:creator>
      <dc:date>2021-07-15T13:03:23Z</dc:date>
    </item>
    <item>
      <title>Re: REST API and curl to add a user to a site</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/rest-api-and-curl-to-add-a-user-to-a-site/m-p/148037#M39154</link>
      <description>&lt;P&gt;When you say "Share is working perfectly" what do you mean? Can you log in to Share and create content? If so, that means Alfresco is up, which means you might just have some sort of networking issue. If you go to &lt;A href="http://localhost:8180/share" target="_blank" rel="nofollow noopener noreferrer"&gt;http://localhost:8180/share&lt;/A&gt; and you see the Share login but you cannot log in, that just means the Share container and app is up but tells you nothing about the state of Alfresco.&lt;/P&gt;
&lt;P&gt;What do you see when you run docker ps?&lt;/P&gt;
&lt;P&gt;Do you have any other Tomcat instances running on your host machine that might be conflicting with the 8080 port the Alfresco container is trying to bind to?&lt;/P&gt;
&lt;P&gt;Is there anything in the logs that indicates that the ACS container did not start or that Tomcat had a problem?&lt;/P&gt;</description>
      <pubDate>Thu, 15 Jul 2021 14:10:21 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/rest-api-and-curl-to-add-a-user-to-a-site/m-p/148037#M39154</guid>
      <dc:creator>jpotts</dc:creator>
      <dc:date>2021-07-15T14:10:21Z</dc:date>
    </item>
    <item>
      <title>Re: REST API and curl to add a user to a site</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/rest-api-and-curl-to-add-a-user-to-a-site/m-p/148038#M39155</link>
      <description>&lt;P&gt;Hi I mean alfresco is working nicely and in constant use as I write this by over 1000 users adding content &lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://connect.hyland.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt;&lt;/P&gt;&lt;P&gt;There is no other conflicting tomcat instance.&amp;nbsp; I basically cannot use the /alfresco URL so I cannot use the API like I can on other installs I have (not docker ones). I feel like this might be some misconfiguration or something extra I need to run in docker? - here is the output of docker ps&lt;/P&gt;&lt;PRE&gt;CONTAINER ID        IMAGE                                                     COMMAND                  CREATED             STATUS              PORTS                                                                                                NAMES
854fc0f3db10        alfresco/alfresco-search-services:1.4.3.3                 "/bin/sh -c '$DIST_D…"   8 months ago        Up 23 hours         10001/tcp, 0.0.0.0:8083-&amp;gt;8983/tcp                                                                    docker-compose_solr6_1
c44c0a57ebc9        alfresco/alfresco-content-repository-community:6.1.2-ga   "catalina.sh run -se…"   8 months ago        Up 23 hours         0.0.0.0:8100-&amp;gt;8100/tcp, 0.0.0.0:8082-&amp;gt;8080/tcp                                                       docker-compose_alfresco_1
ea8b5edd624f        alfresco/alfresco-activemq:5.15.6                         "/bin/sh -c './init.…"   9 months ago        Up 23 hours         0.0.0.0:5672-&amp;gt;5672/tcp, 0.0.0.0:8161-&amp;gt;8161/tcp, 0.0.0.0:61613-&amp;gt;61613/tcp, 0.0.0.0:61616-&amp;gt;61616/tcp   docker-compose_activemq_1
c269125e3867        postgres:10.1                                             "docker-entrypoint.s…"   9 months ago        Up 20 hours         0.0.0.0:5432-&amp;gt;5432/tcp                                                                               docker-compose_postgres_1
0be38de24f78        alfresco/alfresco-share:6.2.2                             "/usr/local/tomcat/s…"   9 months ago        Up 23 hours         8000/tcp, 0.0.0.0:8080-&amp;gt;8080/tcp                                                                     docker-compose_share_1&lt;/PRE&gt;</description>
      <pubDate>Thu, 15 Jul 2021 14:47:38 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/rest-api-and-curl-to-add-a-user-to-a-site/m-p/148038#M39155</guid>
      <dc:creator>wssupport</dc:creator>
      <dc:date>2021-07-15T14:47:38Z</dc:date>
    </item>
    <item>
      <title>Re: REST API and curl to add a user to a site</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/rest-api-and-curl-to-add-a-user-to-a-site/m-p/148039#M39156</link>
      <description>&lt;P&gt;Hi, there is no conflicing tomcat, and alfresco itself is working nicely with many users using it as I write this and adding content (for years).&lt;/P&gt;&lt;P&gt;docker ps shows these images (i tried to post this 3 times and it gets deleted so I will just list)&lt;/P&gt;&lt;PRE&gt;alfresco/alfresco-search-services:1.4.3.3
alfresco/alfresco-content-repository-community:6.1.2-ga
alfresco/alfresco-activemq:5.15.6
postgres:10.1
alfresco/alfresco-share:6.2.2&lt;/PRE&gt;&lt;P&gt;all are runnning.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there something special I need to do on docker to make the /alfresco URL work? It works on my non-docker other installs fine.&lt;/P&gt;&lt;P&gt;On a working install /alfresco shows a screen with version number of alfresco and some links. On this docker one it says 404.&lt;/P&gt;</description>
      <pubDate>Thu, 15 Jul 2021 15:04:13 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/rest-api-and-curl-to-add-a-user-to-a-site/m-p/148039#M39156</guid>
      <dc:creator>wssupport</dc:creator>
      <dc:date>2021-07-15T15:04:13Z</dc:date>
    </item>
    <item>
      <title>Re: REST API and curl to add a user to a site</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/rest-api-and-curl-to-add-a-user-to-a-site/m-p/148040#M39157</link>
      <description>&lt;P&gt;Could you please verify which ports have you configured for /alfresco ? If you are using docker you may have on your docker-compose.yml. If you don't&amp;nbsp; mind, you can share with us its content, so we can see if there is any error (related to /alfresco config).&lt;/P&gt;&lt;P&gt;Cheers!&lt;/P&gt;</description>
      <pubDate>Fri, 16 Jul 2021 10:07:10 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/rest-api-and-curl-to-add-a-user-to-a-site/m-p/148040#M39157</guid>
      <dc:creator>cristinamr</dc:creator>
      <dc:date>2021-07-16T10:07:10Z</dc:date>
    </item>
    <item>
      <title>Re: REST API and curl to add a user to a site</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/rest-api-and-curl-to-add-a-user-to-a-site/m-p/148041#M39158</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;A href="https://migration33.stage.lithium.com/t5/user/viewprofilepage/user-id/86357"&gt;@wssupport&lt;/A&gt;&amp;nbsp;wrote:&amp;nbsp;&lt;BR /&gt;&lt;P&gt;Thanks, this javascript console looks great but I'm using a dockerised Alfresco which seems like a nightmare to install amps onto, I've read around about this but I cannot find any simple clear instruction on how to add these two amps to my docker instance for Alfresco.&amp;nbsp;&lt;FONT size="1 2 3 4 5 6 7" color="#CCFFFF"&gt;&lt;A title="DGCustomerFirst" href="https://www.dgcustomerfirst.page/" target="_blank" rel="noopener nofollow noreferrer"&gt;&lt;SPAN&gt;&lt;FONT color="#CCFFFF"&gt;DGCustomerFirst&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/A&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;This is partly why I am trying to do this without installing any addons. It would be could if I could use your example above and submit this javascript with curl.&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;I got sufficient information from your soul of heart.Thank you so much&lt;/P&gt;</description>
      <pubDate>Mon, 26 Jul 2021 05:33:32 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/rest-api-and-curl-to-add-a-user-to-a-site/m-p/148041#M39158</guid>
      <dc:creator>FuzzyWorm</dc:creator>
      <dc:date>2021-07-26T05:33:32Z</dc:date>
    </item>
  </channel>
</rss>

