Versions Compared

Key

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

...

  • API URL – The API URL is the beginning portion of the URL that is minimally necessary to gain access to the API logic on the server. For instance, in the above example, https://www.myapplication.com/api is the API URL but https://www.myapplication.com is the domain and likely displays a home page (e.g., index.html). If the entire website is managed by API logic then these URLs would be one and the same.

  • Entry Point – Whether the API URL is submitted alone or with additional information (as pictured above), the request will begin with the entry point. This serves as a “front gate” and will determine if and how the next step in the URL path will be handled.

  • URL Segments – These are the parts of the URL which are separated by the “/” character. In the above URL, customers is a segment, 5678 is a segment, and phone is a segment. Starting with the entry point, the API navigates its way through each segment in a natural way. This is intended to assist the user with an intuitive understanding of the API. Thus, the URL above should hopefully be understood as “The Work Phone # that belongs to Customer #5678”.

  • End Point – This is a special URL segment that denotes the end of the URL itself. End points typically contain the name of a resource type (e.g., customers or invoices) or a specific resource identifier (e.g., 5676 or work). The end point is where the resolution of the request occurs.

In the SRP HTTP Framework module, the entry point, URL segments, and the end point are managed by separate HTTP services. Segments that are resource identifiers are handled by the preceding HTTP service. Thus, the service that is written to handle the customers segment will also look ahead to see if a specific customer (e.g., 5678) has been included. If so, it will process the request accordingly. A default entry point routine is HTTP_Entry_Point_Services, is included with SRP HTTP Framework. As a design standard, the name of the BASIC+ routine that acts as a web service for a given segment follows this pattern: HTTP_<URLSegment>_SERVICESServices. Hence, the customers segment would be likely be managed by HTTP_Customers_Services.

...