younifyd
Menu

Sort

Manually Sort Items in Collection

POST/utils/sort/{collection}

Use it in a workflow

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

Request

Path parameters

collectionstringrequired

Collection identifier

Request body

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

itemnumber

Primary key of item to move

tonumber

Primary key of item where to move the current item to

json
{
  "item": 0,
  "to": 0
}

Response

Returns 200 with a any. Read it in later steps with {{sort.response.data.<field>}}.

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

Was this page helpful?