---
lang: en
title: 'API docs: rest-crud'
keywords: LoopBack 4.0, LoopBack 4
sidebar: lb4_sidebar
permalink: /doc/en/lb4/apidocs.rest-crud.html
---

<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@loopback/rest-crud](./rest-crud.md)

## rest-crud package

[@loopback/rest-crud](https://github.com/strongloop/loopback-next/tree/master/packages/rest-crud)

## Functions

|  Function | Description |
|  --- | --- |
|  [defineCrudRestController(modelCtor, options)](./rest-crud.definecrudrestcontroller.md) | Create (define) a CRUD Controller class for the given model.<!-- -->Example usage:
```ts
const CrudRestController = defineCrudRestController<
  Product,
  typeof Product.prototype.id,
  'id'
>(Product, {basePath: '/products'});

class ProductController extends CrudRestController {
  constructor() {
   super(repo);
  }
}

app.controller(ProductController);

```
 |

## Interfaces

|  Interface | Description |
|  --- | --- |
|  [CrudRestController](./rest-crud.crudrestcontroller.md) | This interface describes prototype members of the controller class returned by <code>defineCrudRestController</code>. |
|  [CrudRestControllerCtor](./rest-crud.crudrestcontrollerctor.md) | Constructor of the controller class returned by <code>defineCrudRestController</code>. |
|  [CrudRestControllerOptions](./rest-crud.crudrestcontrolleroptions.md) | Options to configure different aspects of a CRUD REST Controller. |


