2

Is it possible in Eve to get data from multiple sources/collection to be define in one datasource and used by one endpoint. The usual endpoint definition looks like this:

endpoint = {
  'item_title': 'title',
  'resource_methods': ['GET'],
  'datasource': {'source': 'collection1',
             'default_sort': [('time', -1)]},
  'schema': schema
}

Is it possible to include documents from more than one collection for the same endpoint by making changes at 'Domain' or 'endpoint' tag?

Kumar Vikramjeet
  • 253
  • 1
  • 4
  • 13
  • You could use a flask custom endpoint to manipulate your data, and then register it in eve app. See here (https://docs.python-eve.org/en/stable/snippets/hooks_blueprints.html). You could build a blueprint like that from the example. – gcw May 15 '19 at 18:31
  • did you figure it out? – motipai Jul 10 '19 at 01:24
  • Nope, we instead created a merged collection as source. It's not supported by Eve, alternative is what @gcw mentioned. – Kumar Vikramjeet Jul 10 '19 at 05:38

0 Answers0