Page Contents

Once you have defined a model, then you can use create, read, update, and delete (CRUD) operations to add data to the model, manipulate the data, and query it. All LoopBack models that are connected to persistent data stores (such as a database) automatically have the create, retrieve, update, and delete operations of the PersistedModel class.

Operation REST LoopBack model method
(Node API)*
Corresponding SQL
Create PUT /modelName
POST /modelName
create()* INSERT
Read (Retrieve) GET /modelName?filter=... find()* SELECT
Update (Modify) POST /modelName
PUT /modelName
updateAll()* UPDATE
Delete (Destroy) DELETE /modelName/modelID destroyById()* DELETE

(*) Methods listed are just prominent examples; other methods may provide similar functionality; for example: findById()findOne(), and findOrCreate().  See PersistedModel API documentation for more information.

See the following articles for more information: