CRUD (an acronym for “create, read, update, delete”) operations can be thought of as the basic “building blocks” used by an API.
CodeBot generates CRUD operations by default, at various layers in the application. While CRUD API endpoints are generated, we do recommend that you focus your domain modeling on task-based APIs and application-layer operations.
However, the application code still needs to read and write to a database at some point, which is where the CRUD ops are chiefly used.
The full range of “CRUD ops” generated by CodeBot doesn’t really fit into a single acronym. However, for conistency and succinctness, we’ve stuck with the CRUD name throughout this documentation and elsewhere…
Also see here for the same set of CRUD ops defined in the context of the REST API.
In the following table, we’ve used “item” to refer to an individual domain object/entity/record/row/instance (call it what you will!)…
| ||Create one or more items|
| ||Find a single item via its ID. If the ID isn’t found, a “not found” (404) is returned.|
| ||Find a single item via a query. If the query doesn’t find anything, a “not found” (404) is returned.|
| ||Find 0 or more items via a query. If no items are found, an empty array is returned. For REST APIs, this is always a POST request with the JSON-based query in the request body.|
| ||Like |
| ||Update individual attributes (not the whole record) as a single-item request, identified by the item ID. If the ID isn’t found, a “not found” (404) is returned.|
| ||Update the whole record (except for its ID) as a single-item request, identified by the item ID. If the ID isn’t found, a “not found” (404) is returned.|
| ||Counts the number of items matching a query.|
| ||Counts all items in a collection/table.|
| ||Deletes a single item, identified by the item ID.|
| ||Deletes 0 or more items that match a query.|
CodeBot also generates
register operations; however these technically count as built-in task ops.