younifyd
Menu

Schema Apply

Apply Schema Difference

POST/schema/apply

Use it in a workflow

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

Request

Query parameters

forceboolean

When `true`, bypasses the hash check and applies the diff regardless of whether the current schema matches the snapshot it was generated from.

Request body

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

hashstring
diffobject
collectionsarray<object>2 fields
fieldsarray<object>3 fields
systemFieldsarray<object>3 fields
relationsarray<object>4 fields
json
{
  "hash": "string",
  "diff": {
    "collections": [
      {
        "collection": "string",
        "diff": [
          {}
        ]
      }
    ],
    "fields": [
      {
        "collection": "string",
        "field": "string",
        "diff": [
          {}
        ]
      }
    ],
    "systemFields": [
      {
        "collection": "string",
        "field": "string",
        "diff": [
          {}
        ]
      }
    ],
    "relations": [
      {
        "collection": "string",
        "field": "string",
        "related_collection": "string",
        "diff": [
          {}
        ]
      }
    ]
  }
}

Response

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

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

Was this page helpful?