younifyd
Menu

Get Activities

List Activity Actions

GET/activity

Use it in a workflow

  1. Add a step and choose the Directus connector.
  2. Pick the Get Activities action (under Activity).
  3. Fill in the fields below, then reference the result from later steps as {{getActivities.response.data}}.

Request

Query parameters

fieldsarray<string>

Control what fields are being returned in the object.

limitinteger

A limit on the number of objects that are returned.

metastring

What metadata to return in the response.

offsetinteger

How many items to skip when fetching data.

sortarray<string>

How to sort the returned items. `sort` is a CSV of fields used to sort the fetched items. Sorting defaults to ascending (ASC) order but a minus sign (` - `) can be used to reverse this to descending (DESC) order. Fields are prioritized by their order in the CSV.

filterany

Select items in collection by given conditions.

searchstring

Filter by items that contain the given search query in one of their fields.

Response

Returns 200 with an object. Read it in later steps with {{getActivities.response.data.<field>}}.

dataarray<object>
idinteger

Unique identifier for the object.

actionstring

Action that was performed.

One ofcreateupdatedeletelogin

userstring

The user who performed this action. Many-to-one to users.

timestampstring (date-time)

When the action happened.

iponeOf

The IP address of the user at the time the action took place.

user_agentstring

User agent string of the browser the user used when the action took place.

collectiononeOf

Collection identifier in which the item resides.

itemstring

Unique identifier for the item the action applied to. This is always a string, even for integer primary keys.

commentstring

User comment. This will store the comments that show up in the right sidebar of the item edit page in the admin app.

originstring

Origin of the request when the action took place.

revisionsarray<oneOf>

Any changes that were made in this activity. One-to-many to revisions.

metaobject
total_countinteger

Returns the total item count of the collection you're querying.

filter_countinteger

Returns the item count of the collection you're querying, taking the current filter/search parameters into account.

json
{
  "data": [
    {
      "id": 2,
      "action": "update",
      "user": "string",
      "timestamp": "2019-12-05T22:52:09Z",
      "ip": "127.0.0.1",
      "user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_1) AppleWebKit/537.36 (KHTML,like Gecko) Chrome/78.0.3904.108 Safari/537.36",
      "collection": null,
      "item": "328",
      "comment": null,
      "origin": "https://directus.io",
      "revisions": [
        null
      ]
    }
  ],
  "meta": {
    "total_count": 0,
    "filter_count": 0
  }
}

Need more? See the Directus guide for connection setup and behaviour shared by every action.