younifyd
Menu

Update Folder

Update a Folder

PATCH/folders/{id}

Use it in a workflow

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

Request

Path parameters

idstringrequired

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

Request body

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

namestring

Name of the folder. Can't be null or empty.

parentinteger

Unique identifier of the parent folder. This allows for nested folders.

json
{
  "name": "string",
  "parent": 3
}

Response

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

dataobject
idstring (uuid)

Unique identifier for the folder.

namestring

Name of the folder.

parentstring

Unique identifier of the parent folder. This allows for nested folders.

json
{
  "data": {
    "id": "0cf0e03d-4364-45df-b77b-ca61f61869d2",
    "name": "New York",
    "parent": "{\n  \"data\": {\n    \"id\": \"fc02d733-95b8-4e27-bd4b-08a32cbe4e66\",\n    \"name\": \"Test\",\n    \"parent\": null\n  }\n}\n"
  }
}

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

Was this page helpful?