younifyd
Menu

Get Revision

Retrieve a Revision

GET/revisions/{id}

Use it in a workflow

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

Request

Path parameters

idintegerrequired

Identifier for the object.

Query parameters

fieldsarray<string>

Control what fields are being returned in the object.

metastring

What metadata to return in the response.

Response

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

dataobject
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.

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"
  }
}

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

Was this page helpful?