In this lesson, the following topics are discussed:
- What are the possibilities to create an API?
- Create an API using the 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 further implementations. It acts as a proxy of the actual resource API. The previous name was API Proxy. This name often appears in older documents.
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 can create an API with an API provider, a provided URL, or an existing API.
Procedure
- 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 selected 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 are displayed.
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. You 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.
Before Saving
After Saving
Note
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.
Resource
Help Portal: Create an API Proxy
Summary
There are several ways to create an API. APIs can be created:
- By using the Create button.
- Based on an existing API provider.
- Directly through an provided URL.
Finally, you can also define it with an openAPI specification via the Create button in API Designer.