Versions Compared

Key

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

The hub for SRP HTTP Framework configuration is the HTTP Framework Setup form (NDW_HTTP_FRAMEWORK_SETUP in the repository). This should already have default configuration information suitable for quick testing, but you might want to make adjustments to suit your environment. Here is a brief description of Below are some of the more important configuration items:.

Table of Contents

Settings Page

Image Modified

After installing the SRP HTTP Framework you will want to do some preliminary configuration changes. Other than changes to the authentication method, all configuration is managed in the SRP_HTTP_FRAMEWORK_SETUP record which is found in the SYSENV table. As of v3 of the SRP HTTP Framework, the configuration values can be set using the NDW_HTTP_FRAMEWORK_SETUP form:

Image Removed

Prior to v3, simply use the record editor of your choice to make these change. These configuration details inform SRP HTTP Framework how to operate your web services properly. Here is a quick start guide on configuring the specific attributes in this record:

<1> - Home URL - Enter the URL for the main site. For example: https://www.mysite.com. Note, do not include parts of the URL that point to the API entry point, unless the main site is the entry point.

<2> - API URL - Enter the URL segment that defines the entry point for the API. For example: /api. SRP HTTP Framework will merge the Home URL with the API Root URL to create a complete URL for hypermedia responses: e.g., https://www.mysite.com/api.

<3> - Capture Path - Enter the OS directory path on the server where you want copies of requests and responses to be stored. These are useful for troubleshooting. You can leave this blank if you do not want to capture anything.

<4> - Enable Authentication - Keep this unchecked if you want to disable authentication. Normally, this should only be done for testing purposes.

<5> - Realm Value - Typically this is the name of the application. This is used by some browsers to inform the user what realm they are connecting to.

<6> - Entry Point Service - Enter the name of the entry point service you wish to use. If left empty. HTTP_Entry_Point_Services will be used. Other than testing multiple entry points, there should be no reason to change this.

If you choose to disable authentication for now then you do not need to do anything else. You will be able to successfully call your APIs without any authentication. Otherwise, you will need to open the HTTP_Authentication_Services stored procedure and examine it to see if the method of authentication will work for you. If you are not using SRP FrameWorks, it is likely you will need to modify this since it was designed to perform an HTTP Basic Authentication validation against the SRP FrameWorks USERS database table. Alternatively, you can update HTTP_Authentication_Services as follows:

...

  • Home URL - This is the URL to the home page of the the main site (e.g., www.examples.org). An incorrect URL does not prevent the SRP HTTP Framework from responding to requests but it will affect how the response is created. If you are doing sandbox testing then just keep this as 127.0.0.1.

  • API URL - This is the URL segment that follows the Home URL and serves as the entry point to your APIs (e.g., www.examples.org/api). Like the Home URL setting, if this is incorrect it will not prevent the SRP HTTP Framework from responding. If you are doing sandbox testing then just keep this as /api.

  • Enable Logging? and Capture Path - These settings tell the SRP HTTP Framework whether logging should be enabled and where the log files should be stored. It is good practice to keep logging enabled. Change the path to any suitable location.

  • API Call Procedure - This tells the SRP HTTP Framework whether to use the new API style routines (e.g., the CONTACTS_API stored procedure) or the legacy Service style routines (e.g., the HTTP_CONTACTS_SERVICES stored procedure). If this is a new project or if you are looking to migrate to the new API routines then just keep this set to Web API.

Authentication Page

Image Added

Various authentication methods are supported via the settings on this page. If this is a new project then we recommend leaving the default configuration values alone and only make changes as business needs dictate. If a quick test of an API is required and providing authentication is difficult (as would be the case if an API endpoint was pasted directly into a web browser), then disabling authentication via the Enable Authentication? setting will work. However, we recommend only doing so for limited periods at a time or only when this is a sand-alone sandbox system.

Resources Page

Image Added

All valid endpoints are defined on this page through the creation of new resources, resource IDs, or resource properties. If this is a new project then leave this page alone until you have confirmed that the SRP HTTP Framework is properly installed and responding to API requestsOnce the above configuration details are in place, you are ready to start building functional web APIs, but we recommend you go through some preliminary testing to make sure there are no surprises.