This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Is it possible to read the actual archive path from the user via the restapi like informations as clientoptions over the internal soap connection ?

We try to consolidate things in GWise and we need to find all GWise archives.

So we need a list of the actual path from all users.

we know, we can do this with GWise Mailbox Management (the windows tool), but we have no windows workstations.

So we want do do this over the restapi

Thomas

Parents
  • 0

    If this is still of importance. i use this script to iterate through all active users and set the archive path. replace the "put" with "get" and remove the value part you shoould get the archive output.

    curl -k --user "$GWADMIN":"$ADMINPWD" -n -H "Content-Type:application/json" -X GET https://$IP:$PORT/gwadmin-service/list/user --silent 2>&1 | grep -oP '(?<=\}).*?(?=\{)' | sed 's/^.*\("name.*id"\).*$/\1/' | cut -c 9- | grep ',' | rev | cut -c 7- | rev | while read -r GWID
    	do 
    		curl -k --user "$GWADMIN":"$ADMINPWD" -H "Content-Type:application/json" -X PUT https://$IP:$PORT/gwadmin-service/domains/dom/postoffices/po/users/"$GWID"/clientoptions --data "{\"archiveLocationUnc\":{\"lock\":{\"locklevel\":\"LOCK_USER\",\"itemLocked\":true,\"lockAvailable\":true,\"lockRights\": \"LOCK_USER\",\"modifiable\":true}, \"value\":\"\\\\\\\\$SRV\\\\userdata\\\\$GWID\\\\GroupWise\\\\Archiv\"}}"
    	done

Reply
  • 0

    If this is still of importance. i use this script to iterate through all active users and set the archive path. replace the "put" with "get" and remove the value part you shoould get the archive output.

    curl -k --user "$GWADMIN":"$ADMINPWD" -n -H "Content-Type:application/json" -X GET https://$IP:$PORT/gwadmin-service/list/user --silent 2>&1 | grep -oP '(?<=\}).*?(?=\{)' | sed 's/^.*\("name.*id"\).*$/\1/' | cut -c 9- | grep ',' | rev | cut -c 7- | rev | while read -r GWID
    	do 
    		curl -k --user "$GWADMIN":"$ADMINPWD" -H "Content-Type:application/json" -X PUT https://$IP:$PORT/gwadmin-service/domains/dom/postoffices/po/users/"$GWID"/clientoptions --data "{\"archiveLocationUnc\":{\"lock\":{\"locklevel\":\"LOCK_USER\",\"itemLocked\":true,\"lockAvailable\":true,\"lockRights\": \"LOCK_USER\",\"modifiable\":true}, \"value\":\"\\\\\\\\$SRV\\\\userdata\\\\$GWID\\\\GroupWise\\\\Archiv\"}}"
    	done

Children
No Data