Table of Contents

Entity view properties in Web APIs

By default, when an entity view is exposed via an API, all its properties are available both in request parameters and responses. However, this behavior can be customized.

How to exclude a property from Get and GetAll responses?

To prevent a property from appearing in Get/GetAll responses, simply uncheck Exposed in GET in the Web API tab of the property settings. This will hide the property in the API responses sent by the server.

Next, consider whether the property value is needed server-side. If not, you can also uncheck Loaded on GET to avoid loading it from the database, which can improve performance. Be aware, though, that a property not loaded will not be usable in a Retrieved rule.

When should Loaded on GET be checked?

For scalar (non-collection) properties, this option is checked by default.

Even if the property is not exposed (Exposed in GET is unchecked), it might be used in a Retrieved rule. In this case, it must still be loaded for the rule to function properly.

When can Loaded on GET be unchecked?

If both Exposed in GET and Loaded on GET are unchecked, it usually only makes sense in the following cases:

  • A property that should be writable but not readable (a rare use case).
  • A property used for filtering only, without returning it in the response.

For collection properties, Loaded on GET is unchecked by default. This configuration helps avoid performance penalties on GetAll routes by not loading the collections unless necessary, while still allowing filtering (see here for more information).

How to exclude a property from Post, BulkPost, and Put arguments?

In the Web API tab, Exposed in POST and Exposed in GET are read-only indicators.

To exclude a property from the arguments of Post, BulkPost, and Put routes, enable the Server-side read only option in the Options tab of the property.

Can required properties with a default value be omitted from POST?

Yes. When a required property has a default value, it no longer needs to be included in the Post or BulkPost request body. If the property is omitted, the server automatically applies its declared default value.

To override this behavior and keep the property explicitly required in Post and BulkPost requests, check the Required in POST option in the Web API tab of the property in Neos Studio.

What happens to properties omitted from PUT?

When a property is absent from a Put request body, it is left unchanged on the server.

For collection items:

  • Key properties must still be provided so the server can identify the existing items to update.
  • Items that should not be updated must still be included with their key properties only. Otherwise, they will be deleted.

For editable references, key properties must be either all provided or all omitted.

How to exclude a property from Post, BulkPost, and Put responses?

This is currently not configurable.

At this time, all properties that are either writable or readable are included in responses—meaning those with Server-side read only unchecked or Exposed in GET checked.

Summary Table

The following table summarizes the main use cases, showing where a property is available depending on the selected options:

Filterable Exposed
in GET
Loaded
on GET
Server-side
read only
GetAll
Filter
Get/GetAll
Retrieved
Get/GetAll
Response
Post/Put
Argument
Post/Put
Response
⬜️
⬜️ ⬜️ ⬜️
⬜️ ⬜️ ⬜️ ⬜️ ⬜️
⬜️ ⬜️ ⬜️ ⬜️ ⬜️ ⬜️ ⬜️
⬜️ ⬜️ ⬜️ ⬜️ ⬜️ ⬜️
⬜️ ⬜️ ⬜️ ⬜️ ⬜️ ⬜️ ⬜️ ⬜️
⬜️