younifyd
Menu

Create Content Version

Create a Content Version

POST/versions‎

Use it in a workflow

  1. Add a step and choose the Directus connector.
  2. Pick the Create Content Version action (under Versions).
  3. Fill in the fields below, then reference the result from later steps as {{createContentVersion.response.data}}.

Request

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 {{createContentVersion.response.data.<field>}}.

dataobject
idstring

Primary key of the Content Version.

keystring

Key of the Content Version, used as the value for the "version" query parameter.

namestring

Descriptive name of the Content Version.

collectionstring

Name of the collection the Content Version is created on.

itemstring

The item the Content Version is created on. Many-to-one to items.

hashstring
date_createdstring (date-time)

When the Content Version was created.

date_updatedstring (date-time)

When the Content Version was updated.

user_createdstring

User that created the Content Version. Many-to-one to users.

user_updatedstring

User that updated the Content Version. Many-to-one to users.

deltaobject

The current changes compared to the main version of the item.

json
{
  "data": {
    "id": "63716273-0f29-4648-8a2a-2af2948f6f78",
    "key": "draft",
    "name": "My Draft",
    "collection": "articles",
    "item": "168",
    "hash": "string",
    "date_created": "2022-05-11T13:14:52Z",
    "date_updated": "2022-05-11T13:14:53Z",
    "user_created": "63716273-0f29-4648-8a2a-2af2948f6f78",
    "user_updated": "63716273-0f29-4648-8a2a-2af2948f6f78",
    "delta": {}
  }
}

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