package org.gitlab4j.api; import java.util.Date; import java.util.List; import java.util.stream.Stream; import javax.ws.rs.core.Form; import javax.ws.rs.core.Response; import org.gitlab4j.api.models.AuditEvent; import org.gitlab4j.api.utils.ISO8601; /** * This class implements the client side API for the GitLab Instance Audit Event API. * See Audit Event API at GitLab for more information. */ public class AuditEventApi extends AbstractApi { public AuditEventApi(GitLabApi gitLabApi) { super(gitLabApi); } /** * Get a List of the group audit events viewable by Maintainer or an Owner of the group. * *
GET /audit_events/
*
* @param created_after Return group audit events created on or after the given time.
* @param created_before Return group audit events created on or before the given time.
* @param entityType Return audit events for the given entity type. Valid values are: User, Group, or Project.
* @param entityId Return audit events for the given entity ID. Requires entityType attribute to be present.
* @return a List of group Audit events
* @throws GitLabApiException if any exception occurs
*/
public ListGET /audit_events
*
* @param created_after Return group audit events created on or after the given time.
* @param created_before Return group audit events created on or before the given time.
* @param entityType Return audit events for the given entity type. Valid values are: User, Group, or Project.
* @param entityId Return audit events for the given entity ID. Requires entityType attribute to be present.
* @param itemsPerPage the number of Audit Event instances that will be fetched per page
* @return a Pager of group Audit events
* @throws GitLabApiException if any exception occurs
*/
public PagerGET /audit_events
*
* @param created_after Return group audit events created on or after the given time.
* @param created_before Return group audit events created on or before the given time.
* @param entityType Return audit events for the given entity type. Valid values are: User, Group, or Project.
* @param entityId Return audit events for the given entity ID. Requires entityType attribute to be present.
* @return a Stream of group Audit events
* @throws GitLabApiException if any exception occurs
*/
public StreamGitLab Endpoint: GET /audit_events/:id
*
* @param auditEventId the auditEventId, required
* @return the group Audit event
* @throws GitLabApiException if any exception occurs
*/
public AuditEvent getAuditEvent(Integer auditEventId) throws GitLabApiException {
Response response = get(Response.Status.OK, null, "audit_events", auditEventId);
return (response.readEntity(AuditEvent.class));
}
}