Commodore
Commodore
413 views

Groupwise API list who is in each group.

Jump to solution

curl -k --user admin@**************************   "https://10.100.102.167:9710/gwadmin-service/list/group.csv" > groupwisegroups.csv

Gives a list of all groups. user.csv gives a list of all users...

But how do i get a list of all groups with the membership.  Below shows how to do it for a group but i've no real idea on how to get it for a few hundred groups.

GET https://localhost:9710/gwadmin-service/domains/testDom1/postoffices/testPO1/groups/testGroup1/members

Thanks in advance.

I'm sure before 2018 this was easy, and you could just export the address book and just select the groups.

 

Labels (2)
0 Likes
1 Solution

Accepted Solutions
Micro Focus Expert
Micro Focus Expert

@booktrunk  Hi,

I do the following in a browser:

https://147.2.77.186:9710/gwadmin-service/list/GROUP_MEMBER.csv?attrs=name,domain,postoffice,memberName

Then sort the .csv file

Cheers,

Laura

 

Laura Buckley

Views/comments expressed here are entirely my own.
If you find this post helpful, please show your appreciation and click on "Like" below...

View solution in original post

4 Replies
Micro Focus Expert
Micro Focus Expert

@booktrunk  Hi,

I do the following in a browser:

https://147.2.77.186:9710/gwadmin-service/list/GROUP_MEMBER.csv?attrs=name,domain,postoffice,memberName

Then sort the .csv file

Cheers,

Laura

 

Laura Buckley

Views/comments expressed here are entirely my own.
If you find this post helpful, please show your appreciation and click on "Like" below...

View solution in original post

Knowledge Partner Knowledge Partner
Knowledge Partner

There was an excellent session at Brainshare 2015 - TUT7874. Whenever you have access to this file, grab it. It's worth!

I cut out a few lines just to give you an example. It's not your solution because it is loop for users, not for groups. But it is a hint ...

Looping Constructs: CSV, AWK, Curl
urls=`
curl –k –user admin:password“https://gw.x.com/gwadmin-service/list/user.csv?attrs=domain,postoffice,name&filter=lastClientLoginTime%20lt%20now(-1,month)” |
gawk --field-separator=, ‘NR != 1 {print “https://gw.x.com:9710/gwadmin-service/domains/”$1”/postoffices/”$2”/users/”$3}’
`
for url in $urls; do curl –k --user admin:novell–X PUT $url–H “Content-Type: application/json” --data “{\”loginDisabled\”: true}”

Diethmar Rimser
This community is more powerful if you use Likes and Solutions
Commodore
Commodore

Is there anywhere in the documentation a list of everything you can list under /list/*

0 Likes
Knowledge Partner Knowledge Partner
Knowledge Partner

Did you check the online documentation? https://server:9710/gwadmin-service, Detailed Documentation

excerpt:

ListApi
  • /list/checksharedfolders
  • /list/objectsbyguid
  • /list/{type}
  • /list/{type}.csv
  • /list/{type}/schema
  • /list/{type}/{base}
  • /list/{type}.csv/{base}
Diethmar Rimser
This community is more powerful if you use Likes and Solutions
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.