Files
directus/docs/reference/item-objects.md
rijkvanzanten 41a3ffcd00 Format md
2020-12-01 16:52:51 -05:00

844 B

Item Objects

TK

Syntax

{
	<operator>: <value>
}

Example

{
	"title": "Directus"
}

Relational

You can set related values by nesting field names. For example, if you have a relational Many-to-One author field, you can set a rule for the author.name field using the following syntax.

{
	"author": {
		"name": "Rijk van Zanten"
	}
}

Dynamic Variables

In addition to static values, you can also set dynamic values using the following variables.

  • $CURRENT_USER — The primary key of the currently authenticated user
  • $CURRENT_ROLE — The primary key of the role for the currently authenticated user
  • $NOW — The current timestamp