In this lesson, the following topics are discussed:
- What are the possibilities to create an API?
- Create an API using Create button.
- Create an API using menu links.
What are the possibilities to create an API?
The API which will be created is important for the further implementations. It acts as a proxy of the actual resource API. The previous name was API Proxy. This name often appears in older documentaries.
The following options are available:
- Create an API using the Create button with the following options:
- API provider (No. 1 at concept diagram)
- URL (No. 2 at concept diagram)
- API proxy
- Create an API using menu links with the following options
- Create in API Designer (No. 3 at concept diagram)
- Import an external API
Create an API using the Create button
This is probably the most common case. With this option, you are able to create an API with an API provider, an provided URL or an existing API.
- Start with Design → APIs to open the Develop screen.
- Start the wizard by choosing the Create button. A new window opens.
Use the API Provider option.
Select the API Provider radio button and open the select box. All API providers display. Choose one, for example: SAPGatewayDemoSystemES5_Provider.
When the API Provider is chosen, a new list box with the name, Discover, is available. Some data, such as the host and the type of API, have already been entered.
When the list box is chosen, all available services listed within the catalog service, are displayed.
What exactly is displayed here depends on the type of API Provider. In the case of Open Connectors, for example, all instances are displayed. For the type Cloud Integration, the available integration flows.
The following figure shows a list of available services which are usable from the SAP backend system. The API provider gets defined by choosing one service from the provided catalog services.
You can choose exactly one of the offered services. After that, further data is added to the mask.
When you finish creating this API (Proxy), it has to be deployed so that it can be used. After that, the API (proxy) is ready for testing. The service type is automatically defined. In this case, it is OData.
Use the URL option to create an API
In case you do not use an API provider, you can directly specify the URL of your source.
In this case, you must enter the data manually (marked). The Service Type can only be REST or SOAP.
After saving and deploying the API, it can also be tested.
Use the API Proxy option to create an API
In this case, you can copy an existing API.
In this case, you must enter the data manually (marked). The Service Type can only be REST or SOAP, even if the spied API is from type OData.
Create an API using menu links
Use the Create in API Designer option
Start creating an API by choosing the menu link, Create in API Designer.
Switch to the openAPI editor and can manually create your API there through the openAPI language in YAML. In this case, all entries must be created manually. The server URL is automatically adjusted after saving. The Service Type can only be REST.
Be aware that the shown URL is a sample and will not work.
Import an external API
Start the creation of an API by choosing the menu link, Import API.
The Service Type corresponds to the imported API.
Help Portal: Create an API Proxy
There are several ways to create an API. API`s can be created:
- By using the Create button.
- Based on an existing API provider
- directly through an provided URL.
At last you can define it also with an openAPI specification via the Create button in API Designer.