Page Contents

Overview

These types of connectors often implement specific methods depending on the underlying system. For example, the REST connector delegates calls to REST APIs while the Push connector integrates with iOS and Android push notification services. 

Models attached to non-database data sources can serve as controllers (a model class that only has methods). Such models usually don’t have property definitions as the backing connector doesn’t support CRUD operations. For example, to define a model for an external REST API, we can have a model as follows:

common/models/my-rest-service.json

{
  "name": "MyRestService",
  "base": "Model",
  "properties": {},
  "validations": [],
  "relations": {},
  "acls": [],
  "methods": []
}

The model is configured to attach to the REST data source.

server/model-config.json

...
  "MyRestService": {
    "dataSource": "myRestDataSource",
    "public": true
  }
...

Available connectors

The officially-supported non-database connectors are:

Tags: data_sources