Get mongodb collection using Eve Get mongodb collection using Eve mongodb mongodb

Get mongodb collection using Eve


Eve will only expose fields that are mapped to a known domain schema. That is done in order to allow the API maintainer total control over the exposed fieldset, as he/she might not want the whole document to be exposed.

So you have two options. You could set a proper domain schema for the endpoint, something like:

DOMAIN = {  'test': {    'schema': {      'offset': {'type': 'integer'},      'rows': {        'type': 'list',        'schema': {'type': 'dict', 'schema': ..., }      },      ...    }  }}        

Or you could set the global ALLOW_UNKNOWN = True. This last setting is also available as a endpoint-level setting.

For further reference see: