younifyd
Menu

Update Collection

Update a Collection

PATCH/collections/{id}

Use it in a workflow

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

Request

Path parameters

idstringrequired

Unique identifier of the collection.

Query parameters

metastring

What metadata to return in the response.

Request body

Enter the body as JSON in the step's Body field.

metaobject

Metadata of the collection.

iconstring

Name of a Google Material Design Icon that's assigned to this collection.

colorstring

Choose the color for the icon assigned to this collection.

notestring

A note describing the collection.

display_templatestring

Text representation of how items from this collection are shown across the system.

hiddenboolean

Whether or not the collection is hidden from the navigation in the admin app.

singletonboolean

Whether or not the collection is treated as a single object.

translationstring

Key value pairs of how to show this collection's name in different languages in the admin app.

versioningboolean

Whether or not Content Versioning is enabled for this collection.

archive_fieldstring

What field holds the archive value.

archive_app_filterstring

What value to use for "archived" items.

archive_valuestring

What value to use to "unarchive" items.

unarchive_valuestring

Whether or not to show the "archived" filter.

sort_fieldstring

The sort field in the collection.

json
{
  "meta": {
    "icon": "people",
    "color": "#6644ff",
    "note": null,
    "display_template": null,
    "hidden": false,
    "singleton": false,
    "translation": null,
    "versioning": false,
    "archive_field": null,
    "archive_app_filter": null,
    "archive_value": null,
    "unarchive_value": null
  }
}

Response

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

dataobject
collectionstring

Name of the collection. This matches the table name in the database.

iconstring

Icon displayed in the Data Studio when working with this collection.

notestring

Short description displayed in the Data Studio.

display_templatestring

How items in this collection should be displayed when viewed relationally in the Data Studio.

hiddenboolean

Whether or not this collection is hidden in the Data Studio.

singletonboolean

Whether or not this collection is treated as a singleton.

translationsarray<any>

How this collection's name is displayed in the different languages in the Data Studio.

archive_fieldstring

What field in the collection holds the archived state.

archive_app_filterboolean
archive_valuestring

What value the archive field should be set to when archiving an item.

unarchive_valuestring

What value the archive field should be set to when unarchiving an item.

sort_fieldstring

What field holds the sort value on the collection. The Data Studio uses this to allow drag-and-drop manual sorting.

accountabilitystring

What data is tracked. One of `all`, `activity`.

item_duplication_fieldsarray<any>

What fields are duplicated during "Save as copy" action of an item in this collection.

sortinteger

What sort order of the collection relative to other collections of the same level.

groupstring

The name of the parent collection.

collapsestring

What is the default behavior of this collection or "folder" collection when it has nested collections. One of `open`, `closed`, `locked`.

versioningboolean

Whether or not Content Versioning is enabled for this collection.

json
{
  "data": {
    "collection": "customers",
    "icon": "string",
    "note": "string",
    "display_template": "string",
    "hidden": false,
    "singleton": false,
    "translations": [
      null
    ],
    "archive_field": "string",
    "archive_app_filter": false,
    "archive_value": "string",
    "unarchive_value": "string",
    "sort_field": "string"
  }
}

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

Was this page helpful?