In this lesson, the following topics are discussed:
- Explore the View API view.
- Explore the Notification Area (No. 3).
- Explore the API URL - Proxy URL (No. 1).
- Explore the Navigation Tabs (No. 2).
- Create or edit an API from API Designer.
Explore the View API view
When you create and deploy an API, it is displayed in the API view. The following is the example of the GWSAMPLE_BASIC API.
The following areas are marked to be examined in more detail in the following list:
- No. 1: API URL - Proxy URL.
- No. 2: Navigation Tabs No. 3: Notification area.
Notification Area (No. 3)
On the right panel you will find the API Health, active calls made and related usage information about the API.
Since we have not yet used this API, there is also no usage information available.
API URL - Proxy URL (No. 1)
At No. 1, you can see the new URL (proxy URL) with which you can now call the original source API. The URL consists of the following elements:
- API URL: https://group-cld900-d052537.prod01.apimanagement.eu10.hana.ondemand.com:443/GWSAMPLE_BASIC
- Application protocol: https
- Virtual Host: group-cld900-d052537
- API Host: prod01.apimanagement.eu10.hana.ondemand.com
- API Port: 443
- API Name: GWSAMPLE_BASIC
- Virtual Host
The virtual host was created during the provisioning of API management and can be changed at any time using Settings → APIs.
- API Host
- Depends on your sub account. Can also be your own custom domain name.
Navigation Tabs (No. 2)
There are four tabs with the following names:
- Proxy Endpoint
- Target EndPoint
- Tab: Overview
In this Overview tab you will find all major information about your API.
These are as follows:
- Host Alias, that is the host from your Proxy URL on top of this page
- API Base Path
- API State (Active, Alpha, Beta, Deprecated, Decommissioned)
On the bottom of the interface, there is a Product Associated area. Later we create a product based on our API. Every entry can be changed.
- Tab: Proxy EndPoint
Here you can add some Proxy Endpoint Properties and Route Rules. Read more here: API Proxy Structure
- Tab: Target EndPoint
Here you find the configured API Provider or the URL. In this case, we see the SAPGatewayDemoSystemES5_Provider. It is also possible to use Load Balancing.
- Tab: Resources
This is the most important area of an API. It shows with a swagger UI all possible resource paths and REST actions ( GET, PUT,DELETE ..) with all necessary parameters.
The following figure gives us the example of a resource path, /ProductSet, the REST action GET with predefined query parameters.
Where do these entries come from?
While creating APIs for SOAP and REST, API resources are not auto generated; you must add them manually. While creating the API for ODataAPI, auto generation of resources may be possible in some cases. This is the case if you use an API provider of type On-Premise with SAP backend or one from Type Open Connectors. The visualization of the resources is carried out by the swagger User Interface implementation. This interprets the openAPI spec of this API.
Create or edit an API from the API Designer
Since it is not always possible to have the resources generated automatically, the SAP API Management* also offers you the ability to do this manually. The resources visualize the openAPI spec created in the API Designer.
Procedure for creating an API
In the Develop view of your APIs, open the API Designer by choosing the link, Create in API Designer. You will find a simple start template in YAML.
You can now start to write your own openAPI spec. To edit an openAPI spec, you use the same editor. Of course, you can also use other editors, such as IDEs, Visual Code and others, and copy the result into it.