client.activity¶
Bases: SyncResource
Sync activity-feeds namespace (client.activity).
list_tenant ¶
list_tenant(*, actor: UUID | str | None = None, action: str | None = None, subject_id: UUID | str | None = None, asset_id: UUID | str | None = None, correlation_id: UUID | str | None = None, created_at_from: datetime | str | None = None, created_at_to: datetime | str | None = None, limit: int | None = None, cursor: str | None = None) -> Page[ActivityEvent]
Tenant-wide activity, newest first (cursor-paginated). Admin only.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
actor
|
UUID | str | None
|
filter to events by this user ( |
None
|
action
|
str | None
|
prefix match on the action ( |
None
|
subject_id
|
UUID | str | None
|
filter to events about this exact subject (matches
|
None
|
asset_id
|
UUID | str | None
|
filter to events tagged with this asset — includes
annotation/workflow events on the asset, not just events whose
|
None
|
correlation_id
|
UUID | str | None
|
drill a rolled-up row down to its raw events — pass a
rollup item's |
None
|
Raises:
| Type | Description |
|---|---|
ForbiddenError
|
caller is not a workspace admin. |
BadRequestError
|
malformed cursor (INVALID_CURSOR). |
list_project ¶
list_project(project_id: UUID | str, *, actor: UUID | str | None = None, action: str | None = None, subject_id: UUID | str | None = None, asset_id: UUID | str | None = None, correlation_id: UUID | str | None = None, created_at_from: datetime | str | None = None, created_at_to: datetime | str | None = None, limit: int | None = None, cursor: str | None = None) -> Page[ActivityEvent]
One project's activity feed, newest first (cursor-paginated).
Any project member may read it; a labeler is restricted to their own
events regardless of the actor filter.
Raises:
| Type | Description |
|---|---|
ForbiddenError
|
caller is not a member of this project. |
BadRequestError
|
malformed cursor (INVALID_CURSOR). |
list_dataset ¶
list_dataset(dataset_id: UUID | str, *, actor: UUID | str | None = None, action: str | None = None, subject_id: UUID | str | None = None, asset_id: UUID | str | None = None, correlation_id: UUID | str | None = None, created_at_from: datetime | str | None = None, created_at_to: datetime | str | None = None, limit: int | None = None, cursor: str | None = None) -> Page[ActivityEvent]
One image dataset's activity feed, newest first (cursor-paginated). Workspace-admin only — dataset audit is data-ops territory.
Raises:
| Type | Description |
|---|---|
NotFoundError
|
no such image dataset in this tenant (DATASET_NOT_FOUND). |
ForbiddenError
|
caller is not a workspace admin. |
BadRequestError
|
malformed cursor (INVALID_CURSOR). |
Response models¶
Models returned by client.activity methods (fields, types, and what each means).
Activity-feed model (ADR-0027 + ADR-0035) — the audit-log row every feed returns.
The default feeds (no asset_id / subject_id / correlation_id filter) come
from the rollup projection: one item per logical action ("Alice uploaded 30 photos"),
so count / sample_subject_ids / first_at / last_at aggregate over the
underlying events and id is the group's correlation_id. Pass that id back
as correlation_id= to drill down into the raw per-event detail (count=1 rows,
subject_type reflects the real subject).
ActivityEvent ¶
Bases: BaseModel
One activity item. On a rollup feed this is an aggregate; on a drill-down
(correlation_id / asset_id / subject_id) feed it is a single raw event.