07-15-2021 04:50 AM
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.
From the alfresco box itself (Community version 6.1.2 in docker on Ubuntu 18.04)
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"}}"
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.
07-16-2021 06:07 AM
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 mind, you can share with us its content, so we can see if there is any error (related to /alfresco config).
Cheers!
Explore our Alfresco products with the links below. Use labels to filter content by product module.