Hide Cuba properties via REST V2 API

Hey all,

I’m sending an Non-persistent entity as a response via a REST API method, and it also displays the _entityName and _instanceName. Is there a way to easily remove these before sending it back as a response ?


unfortunately, there is no easy way, but you may try few workarounds.

  1. Use the REST API data model versioning. See here and here. Using custom transformer may help in your case. You’ll have to write a transformer implementation that will remove few nodes from the JSON and also, in this case, you’ll have to add the modelVersion query parameter to the URL
  2. Overwrite the EntitiesControllerManager in your project to control the JSON returned. See the following discussion

I went for the first option, Works like a charm. Thanks for pointing out