loopback/docs/apiexplorer.md

2.0 KiB

Using the API Explorer

Follow these steps to explore the sample app's REST API:

  1. Open your browser to http://localhost:3000/explorer. You'll see a list of REST API endpoints as illustrated below. API Explorer Listing The endpoints are grouped by the model names. Each endpoint consists of a list of operations for the model.
  2. Click on one of the endpoint paths (such as /locations) to see available operations for a given model. You'll see the CRUD operations mapped to HTTP verbs and paths. API Exlporer Endpoints
  3. Click on a given operation to see the signature; for example, GET /locations/{id}: API Spec Notice that each operation has the HTTP verb, path, description, response model, and a list of request parameters.
  4. Invoke an operation: fill in the parameters, then click the Try it out! button. You'll see something like this:
Request/Response

You can see the request URL, the JSON in the response body, and the HTTP response code and headers.

Next Steps

To gain a deeper understanding of LoopBack and how it works, read the following sections, Working with Models and Working with Data Sources and Connectors.

For information on how StrongLoop Suite provides: