Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

By default, API Builder generates the following API endpoints for models:

  • GET /api/endpoints/<model_name> : Return all objects (the first 1000 records).
  • GET /api/endpoints/<model_name>/query : Return all objects that satisfy a query.
  • GET /api/endpoints/<model_name>/:id : Return a specific object by id
  • GET /api/endpoints/<model_name>/distinct : Find distinct objects
  • GET /api/endpoints/<model_name>/count : Count objects
  • PUT /api/endpoints/<model_name>/:id : Update a specific user by id
  • PUT /api/endpoints/<model_name>/findAndModify : Find and modify an object
  • POST /api/endpoints/<model_name> : Create a new object
  • POST /api/endpoints/<model_name>/upsert : Create or update an object
  • DELETE /api/endpoints/<model_name>/:id : Delete a specific object by id
  • DELETE /api/endpoints/<model_name> : Delete all objects

...

Example:

The following model is disabled from generating pre-defined endpoints. An API endpoint needs to be defined to access the model data as shown below. 

...