MLWeiner Absent Member.
Absent Member.
960 views

Requesting all users in the system via REST

I was given a CSV of a bunch of users and I need to make GroupWise users for them. Since there is no native import functionality, I am automating it with a Python app using an old CoolSolutions post as a jumping off point.

The issue I've hit is that if I call to list users so I can scan for duplicates, it only returns the first 1,000 users in the system. I have that nextId in the results I can use (I believe) to continue another call to keep building the list, except I don't know how to format that. In the documentation there is a gwadmin-service/list/{type}/{base} - which I assumed was a search base or continue base or something of the like (it's not documented at all as to what it does) but I have found all kinds of new and creative ways to get 400 BAD_REQUEST errors, but not so much with getting all my users.

Unfortunately I have limited Python experience and none with the GroupWise APIs so I'm pretty much just slapping things together and seeing what errors I get.
Labels (1)
0 Likes
2 Replies
Highlighted
johnbaird Absent Member.
Absent Member.

Re: Requesting all users in the system via REST

Use something like ...list/USER?nextid=2937

The final response when there are no more objects to return does not contain either <nextId> or <outOf> values.

HTH, John
0 Likes
MLWeiner Absent Member.
Absent Member.

Re: Requesting all users in the system via REST

Thanks, I finally had a chance to sit down and try this and it looks like it works perfectly.
0 Likes
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.