Get Server Audit Logs

LoopServers

Retrieve audit log entries for a server.

Action Type ID is a numeric identifier for the audit log action. Returns up to 100 entries.
  • Loop block: the blocks placed inside it run once for each item, and can use the current item's outputs.

Inputs

Server IDRequired

ID of the server to retrieve audit logs from.

Limit

Max entries to retrieve (1-100, default 50).

User ID

Filter by user who performed the action.

Action Type

Filter by action type ID.

Loop Body

Blocks to run for each audit log entry.

Holds blocks

Outputs

Iteration Number

Current iteration (1-based).

Example: 1

Total Iterations

Total number of entries returned.

Example: 50

Entry ID

ID of the audit log entry.

User ID

ID of the user who performed the action.

Target ID

ID of the target entity.

Action Type ID

Numeric audit log action type.

Example: 20

Reason

Reason provided for the action.

Raw JSON

Full raw JSON of the audit log entry.

Build a bot using blocks like Get Server Audit Logs

Use this block in our visual flow editor. Bots are hosted 24/7 for free on inventor.bot.

Advanced Documentation

This documentation can be useful when using code mode. View as Markdown

ID: get_server_audit_logs
  • Loop block: write for item := range get_server_audit_logs(Args{...}) { ... } and read the current item's outputs from item. See loops.

Inputs

FieldInventScript nameValue
Server IDserver_id
Limitlimit
User IDuser_id
Action Typeaction_type
Loop Bodybodyblocks: func() { ... }

Outputs

FieldInventScript nameValue
Iteration Numberiteration_numbere.g. "1"
Total Iterationstotal_iterationse.g. "50"
Entry IDentry_id
User IDuser_id
Target IDtarget_id
Action Type IDaction_type_ide.g. "20"
Reasonreason
Raw JSONraw_json

Example InventScript

for serverAuditLog := range get_server_audit_logs(Args{server_id: trigger.server_id}) {
	send_text_message(Args{
		channel_id:      trigger.channel_id,
		message_content: "Entry ID: " + serverAuditLog.entry_id,
	})
}

More servers blocks