Would be possible to have the rendered version of a field as part of {entity_type}/{entity_id} call?

For example, if a node has a video filter in the body, calling /GET node/1234 would return [video:youtube...] instead of the processed value.

Is views module the only way to do this, or there is a plan to include it as part of the entity rest api?

Comments

dagmar created an issue. See original summary.

dawehner’s picture

That's a bit of a tricky question. Core REST is all about getting structured data out of Drupal, but not really about actual rendered data.

https://github.com/forwarddrop/rest_entity_display might give you some idea, or an issue to work on :)

wim leers’s picture

I agree with @dawehner, but I think @dagmar is actually not asking for rendered content, but filtered text (or processed text).

Which makes this a duplicate of #2626924: Include processed text in normalizations: "text" field type's "processed" computed property should be non-internal and carry cacheability metadata.