Tyk v2.2 Documentation Components

  1. Home
  2. Tyk v2.2 Documentation Components
  3. Tutorial: Create API with GUI (OP:Pro)

Tutorial: Create API with GUI (OP:Pro)

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

API menu item location

Step 2: Select the Add new API button

Add API button location

Step 3: Set up the base settings for your API

API settings form

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 widgets then 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:

Security options form

In this section:

  • Authentication mode This 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 Name The header name that will hold the token on inbound requests. The default for this is Authorization.
  • Allow Query Parameter As Well As Header Set this option to enable checking the query parameter as well as the header for an auth token, for this guide, leave this unchecked.
  • Use Cookie Value It is possible to use a cookie value as well as the other two token locations. Set this as unchecked.

Step 5: Save the API

To save and publish the API, use the Save button at the top of the screen:

Save button location

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:

API URL location