Node Update Property Schema
Updates the property schema of this node and its siblings. All children of a node use the same schema for properties resulting in a table-like structure and behaviour. Property schemas are loosely structured and can automatically cast their values sometimes. A failed cast will not change data and instead just yield an empty value when reading however changing the schema back to the original type (or a type compatible with what the type was before changing) will retain the original data upon next read. This permits clients to undo changes to the schema easily while allowing quick schema changes without the need to remove or update values before.
/nodes/{node_slug}/property-schemaUpdates the property schema of this node and its siblings. All children of a node use the same schema for properties resulting in a table-like structure and behaviour. Property schemas are loosely structured and can automatically cast their values sometimes. A failed cast will not change data and instead just yield an empty value when reading however changing the schema back to the original type (or a type compatible with what the type was before changing) will retain the original data upon next read. This permits clients to undo changes to the schema easily while allowing quick schema changes without the need to remove or update values before.
In: cookie
Path Parameters
Unique node Slug.
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Mutating property schemas permits updating existing fields as well as
adding new fields. The discinction is determined by the presence of the
id field. When an id field is provided, the operation is treated as
an update operation where any of the other fields will be used to write
new values. If an id field is omitted, the schema is considered a new
field and is subject to a uniqueness constraint on the name field.
Response Body
application/json
application/json
curl -X PATCH "https://example.com/nodes/cc5lnd2s1s4652adtu50/property-schema" \ -H "Content-Type: application/json" \ -d '[ { "name": "string", "type": "text", "sort": "string" } ]'{
"properties": [
{
"fid": "cc5lnd2s1s4652adtu50",
"name": "string",
"type": "text",
"sort": "string"
}
]
}{
"type": "string",
"title": "string",
"detail": "string",
"trace_id": "string",
"metadata": {}
}Node Update Properties PATCH
Update the properties of a node. New schema fields will result in the schema of the node being updated before values are assigned. This will also propagate to all sibling nodes as they all share the same schema.
Node Update Visibility PATCH
Update the visibility of a node. When changed, this may trigger other operations such as notifications/newsletters. Changing the visibility of anything to "published" is often accompanied by some other side effects.