ExDaytona.Api.Audit (ex_daytona v0.3.0)

Copy Markdown View Source

API calls for all endpoints tagged Audit.

Summary

Functions

Get supported audit log scenarios Returns the supported audit log actions grouped by target type. The list is derived at runtime from the audited routes and system events, so it always reflects what can actually appear in the audit log.

Functions

get_audit_scenarios(connection, opts \\ [])

@spec get_audit_scenarios(
  Tesla.Env.client(),
  keyword()
) :: {:ok, ExDaytona.Model.AuditScenarios.t()} | {:error, Tesla.Env.t()}

Get supported audit log scenarios Returns the supported audit log actions grouped by target type. The list is derived at runtime from the audited routes and system events, so it always reflects what can actually appear in the audit log.

Parameters

  • connection (ExDaytona.Connection): Connection to server
  • opts (keyword): Optional parameters

Returns

  • {:ok, ExDaytona.Model.AuditScenarios.t} on success
  • {:error, Tesla.Env.t} on failure

get_organization_audit_logs(connection, organization_id, opts \\ [])

@spec get_organization_audit_logs(Tesla.Env.client(), String.t(), keyword()) ::
  {:ok, ExDaytona.Model.PaginatedAuditLogs.t()} | {:error, Tesla.Env.t()}

Get audit logs for organization

Parameters

  • connection (ExDaytona.Connection): Connection to server
  • organization_id (String.t): Organization ID
  • opts (keyword): Optional parameters
    • :page (number()): Page number of the results
    • :limit (number()): Number of results per page
    • :from (DateTime.t): Deprecated alias for createdAt[gte]. From date (ISO 8601 format).
    • :to (DateTime.t): Deprecated alias for createdAt[lte]. To date (ISO 8601 format).
    • :nextToken (String.t): Token for cursor-based pagination. When provided, takes precedence over page parameter.
    • :id (StringFilter): Filter by audit log ID.
    • :actorId (StringFilter): Filter by actor user ID.
    • :actorEmail (StringFilter): Filter by actor email.
    • :actorApiKeyPrefix (StringFilter): Filter by actor API key prefix.
    • :actorApiKeySuffix (StringFilter): Filter by actor API key suffix.
    • :action (StringFilter): Filter by action.
    • :targetType (StringFilter): Filter by target type.
    • :targetId (StringFilter): Filter by target ID.
    • :statusCode (IntFilter): Filter by HTTP status code.
    • :createdAt (DateFilter): Filter by creation timestamp.

Returns

  • {:ok, ExDaytona.Model.PaginatedAuditLogs.t} on success
  • {:error, Tesla.Env.t} on failure