Skip to content

The audit log records the mutations of your organization: who changed what, when, from where and with which details. It keeps rows for 90 days, newest first. An owner or an admin holds audit:read; a member does not.

Filters combine with AND, and each one narrows the list. limit sets the page size and next_cursor reads the next page.

  1. Open the Audit log page.
  2. Enter an action in Action, such as project.create, or leave it empty for every action.
  3. Enter an actor in Actor, such as user:8Xk2mQ4pLd, or leave it empty for every actor.
  4. Choose a Period: Any time (the default), Last hour, Last 24 hours, Last 7 days, Last 30 days, Last 90 days or Custom. Custom adds From and To as YYYY-MM-DD days in your time zone.
  5. Select Apply.
  6. Select Load more to read the next page.

The table shows Time, Actor, Action, Target, IP and Details. IP and Details appear on wider screens.

Field Type What it is
entries array The rows of the page, newest first.
entries[].id string The id of the row.
entries[].actor string Who made the change: user:<id>, key:<id>, node:<name>, operator or system.
entries[].action string What changed, as <resource>.<verb>.
entries[].target string The row that changed, as <resource>:<id>.
entries[].ip string or null The client address of the request, or null when the request had none.
entries[].at_ms integer The time of the change, in Unix epoch milliseconds.
entries[].details object The fields that the action needs, such as the name or the new role; it never holds a token, key or password.
next_cursor string or null The opaque cursor of the next page, or null on the last page. Send it back as cursor.

Scroll horizontally to see all columns.

A cursor names the time and id of the last row of a page, so a row written after the page is read cannot move a row to another page. Send the next_cursor of a page as cursor, and stop when it is null.

import os, requests
url = "https://api.slashinfra.com/audit"
headers = {"Authorization": f"Bearer {os.environ['SI_API_KEY']}"}
params = {"limit": 1, "action": "apikey.create"}
while True:
res = requests.get(url, headers=headers, params=params)
res.raise_for_status()
page = res.json()
for entry in page["entries"]:
print(entry["action"], entry["target"])
if page["next_cursor"] is None:
break
params["cursor"] = page["next_cursor"]
Output
apikey.create apikey:8a2b3c4d5e
apikey.create apikey:9c3d4e5f6a

The API records these actions. The details column of a row holds the fields that the action needs; a token, key or password never appears.

Action What it records
apikey.create An organization key was created.
apikey.revoke A key was revoked.
database.delete A database and its branches and backups were deleted.
join_token.delete A node join token was deleted.
join_token.mint A node join token was minted.
member.add A member was added to the organization.
member.remove A member was removed from the organization.
member.role_update A member’s role changed.
node.drain A node was set to draining.
node.enroll A node enrolled with a join token.
node.leave A node left its pool.
node.quarantine A node was quarantined.
node.revoke A node was revoked.
pool.ca_rotate A pool’s CA was rotated.
pool.create A pool was created.
pool.default_change The default pool changed.
pool.delete A pool was deleted.
pool.update A pool’s settings changed.
project.create A project was created.
project.delete An empty project was deleted.
project.rename A project was renamed.
secret.update A secret’s description changed.
storage.create A storage connection was added.
storage.delete A storage connection was deleted.
storage.rotate A storage connection’s key was rotated.
svm.checkpoint_untrusted A VM’s last checkpoint was signed only by a compromised node.

Scroll horizontally to see all columns.

Field Type Default Allowed values What it changes
limit string 50 1 to 200 The most rows on one page. Another value answers 400 invalid_limit.
cursor string None The next_cursor of the previous page The page to read. An unreadable value answers 400 invalid_cursor.
action (--action) string None Any action in Audit actions Only the rows of this action.
actor (--actor) string None user:<id>, key:<id>, node:<name>, operator or system, exactly Only the rows of this actor. An empty value answers 400 invalid_actor.
from (--from) string None A non-negative whole number; the CLI takes a duration back such as 1h or 7d Only the rows at or after this time. A value that is not a whole number answers 400 invalid_range.
to (--to) string None A non-negative whole number; the CLI takes a duration back such as 1h or 7d Only the rows before this time. from must not be after to.

Scroll horizontally to see all columns.

Code When Fix
invalid_limit limit is not an integer from 1 to 200. Send an integer from 1 to 200, or omit limit for 50.
invalid_cursor cursor does not come from this list. Read the first page again and use its next_cursor.
invalid_actor actor is empty. Send user:<id>, key:<id>, node:<name>, operator or system, or omit actor.
invalid_range from or to is not a non-negative whole number, or from is after to. Send both as Unix epoch milliseconds with from first.

Scroll horizontally to see all columns.

Errors that any request can return are in the error catalog.

Operation Who can Key action
Read the audit log Owner or admin audit:read

Scroll horizontally to see all columns.

  • A page holds 1 to 200 rows; the default is 50.
  • Rows stay 90 days; a daily sweep deletes older rows.
  • The log writes five actor forms, and actor matches the exact string.
  • from and to are Unix epoch milliseconds, and from must not be after to.
  • A cursor names the time and id of the last row, so new rows do not move a page.

The full list is in Limits.