To create an API with the GUI is very straightforward, in this section we will create a very simple API that has no special elements set up.
Step 1: Navigate to the API listing page
Step 2: Select the Add new API button
Step 3: Set up the base settings for your API
In this section:
- API Name: The name you want to give this group of endpoints, this will represent the API.
- API Listen Path: The URL segment that will map to this API, e.g., if set to
widgetsthen the full API URL will be
https://your-gateway-domain/widgets. (What about the API Slug? This is not used in a Pro on-premise install, you can set the listen path directly.)
- Target URL: The upstream origin that hosts the service you want to proxy to.
- Enable Round Robin Load Balancing: This allows you to enter more than one target URL, we will ignore this for now.
Step 4: Set up the security option for your API
Scroll to the bottom of this page, and you will see:
In this section:
Authentication modeThis is the security method to use with your API, there can be only one per API. In this case, set it to Auth Token, this is the simplest security mechanism to use.
Auth Key Header NameThe header name that will hold the token on inbound requests. The default for this is
Allow Query Parameter As Well As HeaderSet this option to enable checking the query parameter as well as the header for an auth token, for this guide, leave this
Use Cookie ValueIt is possible to use a cookie value as well as the other two token locations. Set this as
Step 5: Save the API
To save and publish the API, use the
Save button at the top of the screen:
Once saved, you will be taken back to the API list, where the new API will be shown.
To see what URL your API has been given, simply select the API from the list to open it again, and the API URL will be displayed in the top of the editor: