Versions Compared

Key

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

For this article, we will explain how to create an API capable of responding to HTTP requests. We will not go into how the API should be programmed itself to respond to the request. This is a subject for other articles (likeThe coding within the API to prepare a valid response will be a topic for another another article (e.g., How do I create a resource?).

First, we need to run the HTTP Framework Setup form (e.g., EXEC NDW_HTTP_FRAMEWORK_SETUP from the System Monitor) and then click on the Resources menu to open the Resource Manager:

Image Added

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 start out by defining at least one HTTP method and URI using the Resource Manager tool found on the HTTP Framework Setup form'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 customers when prompted: