Page Contents

The following pages are tagged with

TitleExcerpt
ACL REST API The ACL model connects principals to protected resources. The system grants permissions to principals (users or applications, that can be grouped into roles).
Access token REST API The built-in access token model represents the access token that LoopBack creates for an authenticated user.
Accessing related models For related models, LoopBack automatically related model methods corresponding to the API routes defined for the relationship.
Adding logic to models There are three ways to add custom application logic to models: Remote methods - REST endpoints mapped to Node functions. Remote hooks - Logic that triggers when a remote method is executed (before or after). Operation hooks - Logic triggered when a model performs create, read, update, and delete operations against a...
Adding remote methods to built-in models To add a remote method to a  built-in model, you can either  extend the model and add the remote method to your new model, or add it in a boot script, as described here by way of example. This example adds a “greet” method the built-in User model....
Application REST API Note: You can use the StrongLoop API Explorer to quickly construct and make requests to a LoopBack app running on the server. If a LoopBack app is running on localhost at port 3000, then by default API Explorer...
Attaching models to data sources Models are connected to backend systems via data sources that use data source connectors. You use the model APIs to interact with the model and the data source to which it is attached. Best practice is to first add data sources to your app, as explained in Defining data...
Creating model relations Relations enable you to specify how models are related to each other, with "BelongsTo," "HasOne", and "HasMany" relations, among others.
Creating models You can create models with the model generator, by "discovery" from existing an existing database schema, and by instance introspection for non-relational da...
Customizing models You can customize a basic model through JSON or JavaScript code.
Defining models Models provide Node and REST APIS for interacting with data sources, performing data validation, and representing relationships among data.
Discovering models from relational databases Overview LoopBack makes it simple to create models from an existing relational database. This process is called discovery and is supported by the following connectors: Cassandra MySQL Oracle PostgreSQL SQL Server IBM DB2 IBM DashDB IBM DB2 for z/OS
Embedded models and relations LoopBack supports several kinds of embedded relations: embedsOne, embedsMany, embedsMany with belongsTo, and referencesMany.
Model definition JSON file The model JSON file declaratively defines a LoopBack model. It's in either the server or common project sub-directory, depending on whether the model is ser...
PersistedModel REST API PersistedModel is the base class for models connected to persistent data sources such as databases and is also the base class for all built-in models (except...
Relation REST API The built-in Relation model represents a relationship between two models.
Remote methods A remote method is a static method of a model, exposed over a custom REST endpoint.
Role REST API The built-in Role model represents a set of access controls that can apply to a specific user.
User REST API The built-in User model represents an application end-user.