Class AuditEventApi

java.lang.Object
org.gitlab4j.api.AbstractApi
org.gitlab4j.api.AuditEventApi
All Implemented Interfaces:
Constants

public class AuditEventApi extends AbstractApi
This class implements the client side API for the GitLab Instance Audit Event API. See Audit Event API at GitLab for more information.
  • Constructor Details

    • AuditEventApi

      public AuditEventApi(GitLabApi gitLabApi)
  • Method Details

    • getAuditEvents

      public List<AuditEvent> getAuditEvents(Date created_after, Date created_before, String entityType, Long entityId) throws GitLabApiException
      Get a List of the group audit events viewable by Maintainer or an Owner of the group.
      GET /audit_events/
      Parameters:
      created_after - Return group audit events created on or after the given time.
      created_before - Return group audit events created on or before the given time.
      entityType - Return audit events for the given entity type. Valid values are: User, Group, or Project.
      entityId - Return audit events for the given entity ID. Requires entityType attribute to be present.
      Returns:
      a List of group Audit events
      Throws:
      GitLabApiException - if any exception occurs
    • getAuditEvents

      public Pager<AuditEvent> getAuditEvents(Date created_after, Date created_before, String entityType, Long entityId, int itemsPerPage) throws GitLabApiException
      Get a Pager of the group audit events viewable by Maintainer or an Owner of the group.
      GET /audit_events
      Parameters:
      created_after - Return group audit events created on or after the given time.
      created_before - Return group audit events created on or before the given time.
      entityType - Return audit events for the given entity type. Valid values are: User, Group, or Project.
      entityId - Return audit events for the given entity ID. Requires entityType attribute to be present.
      itemsPerPage - the number of Audit Event instances that will be fetched per page
      Returns:
      a Pager of group Audit events
      Throws:
      GitLabApiException - if any exception occurs
    • getAuditEventsStream

      public Stream<AuditEvent> getAuditEventsStream(Date created_after, Date created_before, String entityType, Long entityId) throws GitLabApiException
      Get a Stream of the group audit events viewable by Maintainer or an Owner of the group.
      GET /audit_events
      Parameters:
      created_after - Return group audit events created on or after the given time.
      created_before - Return group audit events created on or before the given time.
      entityType - Return audit events for the given entity type. Valid values are: User, Group, or Project.
      entityId - Return audit events for the given entity ID. Requires entityType attribute to be present.
      Returns:
      a Stream of group Audit events
      Throws:
      GitLabApiException - if any exception occurs
    • getAuditEvent

      public AuditEvent getAuditEvent(Long auditEventId) throws GitLabApiException
      Get a specific instance audit event.
      GitLab Endpoint: GET /audit_events/:id
      Parameters:
      auditEventId - the auditEventId, required
      Returns:
      the group Audit event
      Throws:
      GitLabApiException - if any exception occurs