i'm trying to interact with github api v4, i want to query audit log events based on schemas available in the api. I can found a documentary about the github api here and I can see the schemas available here but there are no working examples of how to query the different schemas.
If there is someone here experience with this API, specially with the audit log schemas, I need a working example to start interacting with the audit log schemas...
for example i want to query all organization add member to team events, suppose to be in the schema TeamAddMemberAuditEntry, or remove member from org OrgRemoveMemberAuditEntry
So far I've tried to query it with node.js:
require('isomorphic-fetch');
fetch('https://api.github.com/graphql', {
method: 'POST',
headers: { 'Content-Type': 'application/json',
'Authorization': 'bearer <token>',
'Accept': 'application/vnd.github.audit-log- preview+json'},
body: JSON.stringify({ query: '{ TeamAddMemberAuditEntry }' }),
})
.then(res => res.json())
.then(res => console.log(res.data));