Humaans.AuditEvents (Humaans v0.6.0)

Copy Markdown View Source

This module provides functions for retrieving audit event resources in the Humaans API. Audit events are retrieve-only via the API; there is no list endpoint.

Summary

Functions

Retrieves a specific audit_event by ID.

Types

response()

@type response() ::
  {:ok,
   %Humaans.Resources.AuditEvent{
     action: term(),
     actor: term(),
     company_id: term(),
     entity: term(),
     id: term(),
     request: term(),
     seq: term(),
     subject: term(),
     ts: term()
   }}
  | {:error, Humaans.Error.t()}

Functions

retrieve(client, id)

@spec retrieve(client :: map(), id :: String.t()) ::
  {:ok, Humaans.Resources.AuditEvent.t()} | {:error, Humaans.Error.t()}

Retrieves a specific audit_event by ID.

Parameters

  • client - Client created with Humaans.new/1
  • id - String ID of the audit_event to retrieve

Examples

client = Humaans.new(access_token: "your_access_token")
{:ok, audit_event} = Humaans.AuditEvents.retrieve(client, "audit_event_id")