# rsc\_update

Source: https://zotonic.com/docs/2503/rsc_update

URI: https://zotonic.com/id/2503

Language: en



Resource update helper module used by `m_rsc`.

This module contains insert/update/delete/merge routines for resources and is logically part of the `m_rsc` model implementation. It is not exposed as a standalone model path endpoint.

Resource insert/update MQTT events include `version`, `previous_version` and `reason`. Background media workers can pass the update option `{update_reason, media_processing}`. The reason is `media_processing` only if that resource's properties are unchanged apart from `version`, `modified` and `modifier_id`; otherwise it is `update`. Clients must still check consecutive versions before acknowledging processing updates on an unsaved form. Menu saves can pass `{update_reason, menu}`; this reason is preserved only when no properties other than `menu` and the modification metadata changed. Derived `pivot_*` fields and absent versus undefined values are ignored for both reasons.

License: 

Attribution: 

Related resources: https://zotonic.com/api/agent/related/2503?language=en


## API access

- [API help](<https://zotonic.com/api-help>)
- [OpenAPI specification](<https://zotonic.com/openapi.json>)
- [This resource as JSON](<https://zotonic.com/api/agent/resource/2503?language=en>)
