Skip to content

Instantly share code, notes, and snippets.

@fintanmm
Created May 2, 2019 11:19
Show Gist options
  • Select an option

  • Save fintanmm/7e252f978198986b7dafc1a46806e007 to your computer and use it in GitHub Desktop.

Select an option

Save fintanmm/7e252f978198986b7dafc1a46806e007 to your computer and use it in GitHub Desktop.
Get all users from Alfresco and convert it to csv file.
echo '"userName", "enabled", "firstName", "lastName", "jobtitle", "organization", "location", "telephone", "mobile", "email", "companyaddress1", "companyaddress2", "companyaddress3", "companypostcode", "companytelephone", "companyFax", "companyemail", "isDeleted"' > people.csv
curl -u user:"password" "https://domain.com/alfresco/s/api/people?maxResults=2000" | \
jq -r '.people[] | [.userName, .enabled, .firstName, .lastName, .jobtitle, .organization, .location, .telephone, .mobile, .email, .companyaddress1, .companyaddress2, .companyaddress3, .companypostcode, .companytelephone, .companyFax, .companyemail, .isDeleted] | @csv' >> people.csv
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment