InstanceScope entity type is invalid for audit events api
Pointed by @manuelgrabowski in !128119 (comment 1961674703)
Hi hraghuvanshi – sorry for the ping, I was just trying to use the API to filter for instance level audit events on GitLab.com but I only get a entity_type does not have a valid value response back. Am I doing it wrong, or misunderstanding something?
curl -s --header "PRIVATE-TOKEN: " 'https://gitlab.com/api/v4/audit_events?entity_type=Gitlab::Audit::InstanceScope' It works fine when I use Group instead, for example. I also tried InstanceScope and gitlab_instance (based on this and this), but they also give the error.
I validated it and it is a bug because Gitlab::Audit::InstanceScope
is not present in valid entity types at https://gitlab.com/gitlab-org/gitlab/-/blob/master/ee/app/finders/audit_event_finder.rb#L9. Adding it there will fix the issue.