Getting a count of users through terminal for GroupWise 14 or 18 by using the RestAPI.
Below is an easy way to get a count of users from each post office. Please follow the directions after the command:
curl -sS -k --user admin:novell -X GET https://#serveraddress#:9710/gwadmin-service/domains/#domain#/postoffices/#postoffice#/users > /tmp/tmp.txt ; tr '"' '\n' < /tmp/tmp.txt | grep -c guid ; rm /tmp/tmp.txt
- Modify the user portion with your GroupWise admin username and password.
- Modify the URL section to reflect your own GroupWise information. (#serveraddress#, #domain#, #postoffice#.)
- Copy and paste the URL into your browser. After logging in, you should see XML information. If you receive a 404 not found error, double-check your URL information.
- Run the command. You will see a number count below the command for how many users are present in the specified post office.