Last active
January 3, 2024 15:39
-
-
Save hi-ko/ed2a6aff62dd5d0df0302a3b97189473 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ALF_TICKET=$(curl -ks "http://localhost:$ALF_TOMCAT_PORT/alfresco/service/api/login.json?u=$ALF_ADMIN_USER&pw=$ALF_ADMIN_PW"|jq -r .data.ticket) | |
echo $ALF_TICKET | |
# validate ticket | |
curl -s -u "$ALF_ADMIN_USER:$ALF_ADMIN_PW" -X GET "http://localhost:$ALF_TOMCAT_PORT/alfresco/service/api/login/ticket/$ALF_TICKET" | |
# delete | |
curl -s -u "$ALF_ADMIN_USER:$ALF_ADMIN_PW" -X DELETE "http://localhost:$ALF_TOMCAT_PORT/alfresco/service/api/login/ticket/$ALF_TICKET?format=json" | |
TICKET_URL_PARAM="alf_ticket=$ALF_TICKET" | |
# Alfresco users | |
curl -s -u "$ALF_ADMIN_USER:$ALF_ADMIN_PW" $ALFTOOLS_ENDPOINT/service/api/people | jq -r '.people[] .userName' | |
curl -s -u "$ALF_ADMIN_USER:$ALF_ADMIN_PW" $ALFTOOLS_ENDPOINT/service/api/people | jq -r '.people[] | "\(.userName),\(.firstName),\(.lastName),\(.email)"' | |
# Alfresco groups | |
curl -s -u "$ALF_ADMIN_USER:$ALF_ADMIN_PW" $ALFTOOLS_ENDPOINT/service/api/groups | jq -r '.data[] .shortName' | |
curl -s -u "$ALF_ADMIN_USER:$ALF_ADMIN_PW" $ALFTOOLS_ENDPOINT/service/api/groups | jq -r '.data[] | "\(.shortName),\(.fullName),\(.displayName)"' | |
# Alfresco sites | |
curl -s -u "$ALF_ADMIN_USER:$ALF_ADMIN_PW" $ALFTOOLS_ENDPOINT/service/api/sites | jq -r '.[] .shortName' | |
curl -s -u "$ALF_ADMIN_USER:$ALF_ADMIN_PW" $ALFTOOLS_ENDPOINT/service/api/sites | jq -r '.[] | "\(.shortName),\(.visibility),\(.title)"' | |
# Alfresco site memberships | |
curl -s -u "$ALF_ADMIN_USER:$ALF_ADMIN_PW" "$ALFTOOLS_ENDPOINT/service/api/sites/$shortname/memberships" | jq -r '.[] | "\(.authority.fullName),\(.role)"' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment