Versions Compared

Key

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

...

When creating an API you are either creating a new resource and defining one or more supported HTTP methods or you are adding new supported HTTP methods to an existing resource. We'll start by creating a new resource. For instance, let's plan on creating a customers resource with an endpoint of /api/customers. Since this resource is directly underneath our /api endpoint, we start by selecting the api resource item in the Resource Manager tree (which is already demonstrated in the above screenshot). We then click on the New Resource button and enter type customers when where prompted and press the Enter key:

Image Added

This defines the resource within the SRP HTTP Framework environment but it does not yet create the API. This requires two more actions. First, click on one or more methods to support. For now we'll just click on the GET method. Second, click on the Create APIs button. If successful, the following message will appear:

Image Added

A new stored procedure (aka API module) will exist in your repository and this can be opened with any code editor (we recommend using the SRP Editor because of its native support for enhanced BASIC+ syntax, such as the API keyword). API modules are named after the resource using the pattern <ResourceName>_API.