Viewing activity

Almost all activity in ftrack is logged, whether it’s creating Tasks or Note categories, assigning resources to Tasks, updating Statuses etc.

The Activity feed can be found:

  • as a tab in the sidebar.

  • as a widget on the My Tasks dashboard.

  • as a widget on a custom dashboard.

What’s included in the feed depends on the context.

If you’re in the sidebar of an object, all activity on that particular object is included.

If you’re on your My Tasks dashboard, all activity on tasks related to you is included.

Activity via the API

You can also load and inspect activity via the API.

Activity in the API is represented by an entity type called ‘Event’.

An ‘Event’ object has the following attributes that are of interest:

  • action

  • created_at

  • data

  • insert

  • parent_id

  • parent_type

  • project

  • project_id

  • user

  • user_id

Tip: You can view the full list of attributes in the ‘Help -> API Reference’ page of your ftrack site.

Inspecting activity via the API provides insights into your data which the UI doesn’t surface. For instance, the UI doesn’t present information about deleted objects, but you can get to this information via the API.

  • For example, you can inspect deletion events for a specific day like so:

import arrow

attributes = ['action', 'insert', 'created_at', 'user.username', 'data']

events = session.query(

f'select {",".join(attributes)} from Event '

f'where created_at > "{arrow.now().date()}" '

'and insert is "delete" order by created_at asc'

)

for e in events:

print(f"> {e['action']}:{e['insert']} @ {e['created_at']} by {e['user']['username']}")

Looking into the ‘data’ attribute will give in-depth information about the event.

In the above example, the 'data' attribute would give you the id and data of the deleted items.

Did this answer your question?