Api

Api

new Api(database, req, res, internal)

An api wrapper for all stores. Useful if exposed to REST services, as it gets a merged options object with all query/fiels/options parts. Foreach collection in the database, the api creates a CollectionApi.
Parameters:
Name Type Description
database Database The database instance
req HttpRequest The http request object
res HttpResponse The http response object
internal boolean Whether the store is in internal mode or not