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 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.
Explore the Notification Area (No. 3)
On the right panel, you find the API Health, active calls made, and related usage information about the API.
Since we have not yet used this API, there is 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. Check and see your Host Alias name.
- API Host
- Depends on your subaccount. It can also be your own custom domain name.
Navigation Tabs (No. 2)
There are five tabs with the following names:
- Overview
- Proxy Endpoint
- Target EndPoint
- Resources
- Revisions
- Tab 1: Overview
In this Overview tab, you will find all major information about your API.
These are as follows:
- Title
- 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)
- Description
- Tab 2: Proxy EndPoint
Here, you can add some Proxy Endpoint Properties and Route Rules. Read more here: API Proxy Structure
- Tab 3: 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 4: Resources
This is the most important area of an API. It shows with a Swagger UI all the 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, and the REST action GET with predefined query parameters.
Where do these entries in this tab 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 can 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 UI implementation. It interprets the openAPI spec of this API.
- Tab 5: Revisions
With API revisions, you can make incremental changes to an API proxy without disrupting the deployed API. You can access previous changes made to the API proxy and even restore the API to any of its earlier states.
Revisions typically consist of small, incremental, and compatible changes, such as adding a property, a new resource, or a policy to an API proxy. Revisions are created when changes do not disrupt existing consumption flows. They are independent of the actual URL used for consuming the API. Because the deployed revision is the one being consumed, there is no need to access it separately. The API proxy URL remains consistent across different revisions.
Only one revision of an API proxy exists in the runtime environment. In the design phase, you can view and compare the contents of different revisions.
For more information on creating API Revisions, visit the help.sap.com website: Creating API Revisions | SAP Help Portal
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 it manually. The resources visualize the openAPI spec created in the API Designer.
Procedure for creating an API
In the Configure view of your APIs, choose the link, Create in API Designer, to open the 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. You can also use other editors, such as IDEs, Visual Code, and others, and copy the result into it.
Resources
You find the whole openAPI documentation here:
Summary
The proxy URL is the new URL to ultimately consume the resource API. The virtual host name is defined by you. It is used as an API host (API proxy URL) in the subaccount.
The proxy URL is the new URL to ultimately consume the resource API. The virtual host name is defined by you. It is used as an API host (API proxy URL) in the subaccount. There can also be a custom domain here. SAP API Management offers different tabs with different functionalities in the View API. The Resources tab is the most important. The resources describe the REST functionalities (GET, POST, and so on) and the paths to the actual data (/ProductSet, /BusinessPartnerSet...). The description is based on the openAPI specification. The visualization of the openAPI specification is carried out with the Swagger UI. The Swagger UI is an open-source JavaScript framework to make APIs tangible.