[ CRUD service ] - Read #478
-
What product are you having troubles with?Console What Console version are you using?12 DescriptionGood morning guys, I have many services that write directly on mongo without setting Forcing the variable Actual OutcomeNo response Expected OutcomeNo response |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hi @georgev-97 The CRUD service performs operations over documents having the proper metadata fields ( If it's possible, you should make your services insert your records through the create endpoints provided by CRUD itself, to support the proper metadata. If you can't edit the services to switch from MongoDB driver to crud service HTTP calls, you can expose these collections by using the MongoDB Views definition provided by the console. Let's suppose you have a collection named Then, you can create a MongoDB view named Finally, in the aggregation section, you can choose So, you can use the endpoint provided by the view to expose the view rather than the collection, to have a document that is compliant to CRUD Service definitions.
Let me know if you need further assistance on this 😃 Bests |
Beta Was this translation helpful? Give feedback.
Hi @georgev-97
The CRUD service performs operations over documents having the proper metadata fields (
__STATE__
is the one only mandatory).If it's possible, you should make your services insert your records through the create endpoints provided by CRUD itself, to support the proper metadata.
If you can't edit the services to switch from MongoDB driver to crud service HTTP calls, you can expose these collections by using the MongoDB Views definition provided by the console.
Let's suppose you have a collection named
test-coll
with a field namedtest
, that is populated by external services.Then, you can create a MongoDB view named
test-view
using the same fields (using the import/export f…