OptixLog Docs
API ReferenceData Models

Audit Models

AuditEvent and ProjectSnapshot — the audit log and multi-section project snapshot data models.

from optixlog.management import AuditEvent, ProjectSnapshot

AuditEvent

A single entry in the project audit log. Audit events capture every significant action taken on a project's resources — who did what, when, and with what outcome.

Signature

@dataclass(frozen=True)
class AuditEvent:
    id: str
    timestamp: datetime
    action: str
    description: str
    category: str
    level: str
    procedure_path: str
    procedure_type: str
    metadata: dict[str, Any] | None
    actor_ref: EntityRef | None
    target_refs: list[EntityRef]
    request_id: str | None

Fields

Prop

Type

Example

from optixlog import SDKClient
from optixlog.management import Management
from datetime import datetime, timezone

client = SDKClient(base_url="https://optixlog.leidos.com", api_key="sk-opt-...")
audit = Management(client).project("proj_grating_7f3a").audit_events

# Fetch recent error-level events
for event in audit.iter(level="error", order="desc"):
    print(f"[{event.timestamp}] {event.action}: {event.description}")
    for ref in event.target_refs:
        print(f"  target: {ref.type}/{ref.id}")

ProjectSnapshot

A multi-section snapshot of a project's state, returned by ManagementProject.snapshot(). Each field is None unless the corresponding section was requested in the include list.

Signature

@dataclass(frozen=True)
class ProjectSnapshot:
    config: ProjectConfig | None
    organization: Organization | None
    teams: list[Team] | None
    members: list[ProjectMember] | None
    workflow_nodes: list[WorkflowNode] | None
    audit_events: list[AuditEvent] | None

Fields

Prop

Type

Example

from optixlog import SDKClient
from optixlog.management import Management

client = SDKClient(base_url="https://optixlog.leidos.com", api_key="sk-opt-...")
mgmt = Management(client).project("proj_grating_7f3a")

snapshot = mgmt.snapshot(
    include=["config", "organization", "teams", "members"],
    team_limit=50,
    member_limit=200,
)

print(snapshot.config.name if snapshot.config else "no config")
print(f"{len(snapshot.teams or [])} teams loaded")
print(f"{len(snapshot.members or [])} members loaded")

snapshot() makes multiple network calls

ManagementProject.snapshot() is a convenience helper that calls each requested section individually (e.g. config.get(), teams.list(...), etc.) and assembles the result. It is not a single atomic snapshot from the server.

On this page