Audit Logs REST API Troubleshooting


Github REST API /audit-logs seemingly not working. Returning only 404. Looking for additional troubleshooting steps.


Attempting to call REST API using requests library in Python. Code is below:

token = "da_token"
org = "org"
query_url = f"https://<hostname>/api/v3/orgs/{org}/audit-log"
params = {
    "include": "all"
headers = {
'Authorization': f'token {token}'
r = requests.get(query_url, headers=headers, params=params)
  • Org is inside of enterprise using Github Enterprise 3.2
  • Token is a PAT which has admin:org scope, in addition to many other scopes
  • User associated with PAT is an owner of Org listed above
  • Other API calls, such as /orgs/{org} and /users/{username} successfully return results using same Python format
  • Org contains a number of public repos and no private repos (I saw on Stack Overflow there may be intricacies with accessing public vs private repos via API)
  • I am able to see Audit Logs on the Github website
  • This same response/lack of response has been repeated using Postman

Thoughts? What else should I try?