Showing results for 
Search instead for 
Did you mean: 
Copilot Lvl 2
Message 1 of 2

GHE management via API

I've been asked to review our GHE appliance to look at suspended users (i.e. people who have left our LDAP servers, but still have now inaccessible GHE accounts), their repositories (private and public), and the amount of storage they're consuming.  


I can do this manually my generating csv reports from the site admin menu and reports button, but I was hoping to be able to do this in a repeatable automated form. So I looked at the API. 


Is there a way to get information about all the repo's? Or all of a users repo's (public and private)?  Or, if not, is there a way to trigger or download the 'all respositories' and 'suspended users' reports? I can't find any references to this sort of thing in the api documention. 




1 Reply
Community Manager
Message 2 of 2

Re: GHE management via API

Hi @WembleyFord2,


Thank you for being here and my sincere apologies for the delayed response. 

The suspended users report can be accessed programmatically, using:

curl -L -u username:password http(s)://hostname/stafftools/reports/suspended_users.csv 


I hope this helps! 

My very best,

Mark helpful posts with Accept as Solution to help other users locate important info. Don't forget to give Kudos for great content!