AuditLogs

class AuditLogs(workos: WorkOS)

API accessor for AuditLogs.

Every operation on this class is available in two flavors: a blocking variant (<methodName>) and a coroutine-aware variant (<methodName>Suspend). The Suspend variants delegate to the blocking ones under withContext(Dispatchers.IO), so they are safe to call from any coroutine dispatcher (including Dispatchers.Main).

Constructors

Link copied to clipboard
constructor(workos: WorkOS)

Functions

Link copied to clipboard
fun createEvent(organizationId: String, event: AuditLogEvent, requestOptions: RequestOptions? = null): AuditLogEventCreateResponse

Create Event

Link copied to clipboard
@JvmName(name = "createEventSuspend")
suspend fun createEventSuspend(organizationId: String, event: AuditLogEvent, requestOptions: RequestOptions? = null): AuditLogEventCreateResponse

Coroutine-aware variant of createEvent. Use this from a suspend function or coroutine scope.

Link copied to clipboard
fun createExport(organizationId: String, rangeStart: OffsetDateTime, rangeEnd: OffsetDateTime, actions: List<String>? = null, actors: List<String>? = null, actorNames: List<String>? = null, actorIds: List<String>? = null, targets: List<String>? = null, requestOptions: RequestOptions? = null): AuditLogExportJson

Create Export

Link copied to clipboard
@JvmName(name = "createExportSuspend")
suspend fun createExportSuspend(organizationId: String, rangeStart: OffsetDateTime, rangeEnd: OffsetDateTime, actions: List<String>? = null, actors: List<String>? = null, actorNames: List<String>? = null, actorIds: List<String>? = null, targets: List<String>? = null, requestOptions: RequestOptions? = null): AuditLogExportJson

Coroutine-aware variant of createExport. Use this from a suspend function or coroutine scope.

Link copied to clipboard
fun createSchema(actionName: String, targets: List<AuditLogSchemaTarget>, actor: AuditLogSchemaActor? = null, metadata: Map<String, Any>? = null, requestOptions: RequestOptions? = null): AuditLogSchemaJson

Create Schema

Link copied to clipboard
@JvmName(name = "createSchemaSuspend")
suspend fun createSchemaSuspend(actionName: String, targets: List<AuditLogSchemaTarget>, actor: AuditLogSchemaActor? = null, metadata: Map<String, Any>? = null, requestOptions: RequestOptions? = null): AuditLogSchemaJson

Coroutine-aware variant of createSchema. Use this from a suspend function or coroutine scope.

Link copied to clipboard

Get Retention

Link copied to clipboard
@JvmName(name = "getAuditLogsRetentionSuspend")
suspend fun getAuditLogsRetentionSuspend(id: String, requestOptions: RequestOptions? = null): AuditLogsRetentionJson

Coroutine-aware variant of getAuditLogsRetention. Use this from a suspend function or coroutine scope.

Link copied to clipboard
fun getExport(auditLogExportId: String, requestOptions: RequestOptions? = null): AuditLogExportJson

Get Export

Link copied to clipboard
@JvmName(name = "getExportSuspend")
suspend fun getExportSuspend(auditLogExportId: String, requestOptions: RequestOptions? = null): AuditLogExportJson

Coroutine-aware variant of getExport. Use this from a suspend function or coroutine scope.

Link copied to clipboard
fun listActions(before: String? = null, after: String? = null, limit: Int? = null, order: PaginationOrder? = null, requestOptions: RequestOptions? = null): Page<AuditLogActionJson>

List Actions

Link copied to clipboard
fun listActionSchemas(actionName: String, before: String? = null, after: String? = null, limit: Int? = null, order: PaginationOrder? = null, requestOptions: RequestOptions? = null): Page<AuditLogSchemaJson>

List Schemas

Link copied to clipboard
@JvmName(name = "listActionSchemasSuspend")
suspend fun listActionSchemasSuspend(actionName: String, before: String? = null, after: String? = null, limit: Int? = null, order: PaginationOrder? = null, requestOptions: RequestOptions? = null): Page<AuditLogSchemaJson>

Coroutine-aware variant of listActionSchemas. Use this from a suspend function or coroutine scope.

Link copied to clipboard
@JvmName(name = "listActionsSuspend")
suspend fun listActionsSuspend(before: String? = null, after: String? = null, limit: Int? = null, order: PaginationOrder? = null, requestOptions: RequestOptions? = null): Page<AuditLogActionJson>

Coroutine-aware variant of listActions. Use this from a suspend function or coroutine scope.

Link copied to clipboard
fun updateAuditLogsRetention(id: String, retentionPeriodInDays: Long, requestOptions: RequestOptions? = null): AuditLogsRetentionJson

Set Retention

Link copied to clipboard
@JvmName(name = "updateAuditLogsRetentionSuspend")
suspend fun updateAuditLogsRetentionSuspend(id: String, retentionPeriodInDays: Long, requestOptions: RequestOptions? = null): AuditLogsRetentionJson

Coroutine-aware variant of updateAuditLogsRetention. Use this from a suspend function or coroutine scope.