younifyd
Menu

Get Revisions

List Revisions

GET/revisions

Use it in a workflow

  1. Add a step and choose the Directus connector.
  2. Pick the Get Revisions action (under Revisions).
  3. Fill in the fields below, then reference the result from later steps as {{getRevisions.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.

offsetinteger

How many items to skip when fetching data.

metastring

What metadata to return in the response.

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.

pageinteger

Cursor for use in pagination. Often used in combination with limit.

Response

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

dataarray<object>
idinteger

Unique identifier for the revision.

activityinteger

Unique identifier for the activity record. Many-to-one to activity.

collectionstring

Collection of the updated item.

itemstring

Primary key of updated item.

dataobject

Copy of item state at time of update.

deltaobject

Changes between the previous and the current revision.

parentinteger

If the current item was updated relationally, this is the id of the parent revision record. Many-to-one to revisions.

versionstring

Associated version of this revision. Many-to-one to versions.

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": 1,
      "activity": 2,
      "collection": "articles",
      "item": "168",
      "data": {
        "author": 1,
        "body": "This is my first post",
        "featured_image": 15,
        "id": "168",
        "title": "Hello, World!"
      },
      "delta": {
        "title": "Hello, World!"
      },
      "parent": null,
      "version": "draft"
    }
  ],
  "meta": {
    "total_count": 0,
    "filter_count": 0
  }
}

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

Was this page helpful?