0% found this document useful (0 votes)
5 views9 pages

Unit 04.2 - Create An API Proxy

This document provides a guide for creating a simple API Proxy using SAP API Management, detailing the prerequisites, types of API Proxies, and the steps involved in the creation process. It explains the components of an API Proxy, including Proxy End Point, Target End Point, and API Resources, as well as the differences between OData, REST, and SOAP based API Proxies. The document concludes with a walkthrough of creating an OData based API Proxy and encourages users to explore its properties.

Uploaded by

atungmu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views9 pages

Unit 04.2 - Create An API Proxy

This document provides a guide for creating a simple API Proxy using SAP API Management, detailing the prerequisites, types of API Proxies, and the steps involved in the creation process. It explains the components of an API Proxy, including Proxy End Point, Target End Point, and API Resources, as well as the differences between OData, REST, and SOAP based API Proxies. The document concludes with a walkthrough of creating an OData based API Proxy and encourages users to explore its properties.

Uploaded by

atungmu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 9

Exercise: SAP API Management

Unit 4.2 – Create an API Proxy


www.sap.com

© 2016 SAP SE or an SAP affiliate company. All rights reserved.


No part of this publication may be reproduced or transmitted in any form
or for any purpose without the express permission of SAP SE or an SAP
affiliate company.
SAP and other SAP products and services mentioned herein as well as their
respective logos are trademarks or registered trademarks of SAP SE (or an
SAP affiliate company) in Germany and other countries. Please see
http://www.sap.com/corporate-en/legal/copyright/index.epx#trademark for
additional trademark information and notices. Some software products
marketed by SAP SE and its distributors contain proprietary software
components of other software vendors.
National product specifications may vary.
These materials are provided by SAP SE or an SAP affiliate company for
informational purposes only, without representation or warranty of any kind,
and SAP SE or its affiliated companies shall not be liable for errors or
omissions with respect to the materials. The only warranties for SAP SE or
SAP affiliate company products and services are those that are set forth in
the express warranty statements accompanying such products and services,
if any. Nothing herein should be construed as constituting an additional
warranty.
In particular, SAP SE or its affiliated companies have no obligation to pursue
any course of business outlined in this document or any related presentation,
or to develop or release any functionality mentioned therein. This document,
or any related presentation, and SAP SE’s or its affiliated companies’
strategy and possible future developments, products, and/or platform
directions and functionality are all subject to change and may be changed by
SAP SE or its affiliated companies at any time for any reason without notice.
The information in this document is not a commitment, promise, or legal
obligation to deliver any material, code, or functionality. All forward-looking
statements are subject to various risks and uncertainties that could cause
actual results to differ materially from expectations. Readers are cautioned
not to place undue reliance on these forward-looking statements, which
speak only as of their dates, and they should not be relied upon in making
purchasing decisions.
UNIT 4.2 – API PROXY

Table of Contents
Scenario...................................................................................................................................................................... 4
PREREQUISITES ............................................................................................................................................................ 4
API Proxy .................................................................................................................................................................... 5
AN INTRODUCTION ....................................................................................................................................................... 5
API ARTIFACTS ............................................................................................................................................................ 5
API PROXY: BASED ON SERVICE TYPE ................................................................................................................................ 5
CREATE YOUR FIRST API PROXY ...................................................................................................................................... 6
Part 1 .......................................................................................................................................................................... 6
Description of the API Proxy Properties................................................................................................................. 7

3
UNIT 4.2 – API PROXY

SCENARIO
In this scenario we will create a very simple first API Proxy. This proxy will not leverage any of the multiple
features from SAP API Management, but is mainly intended to setup the stage, e.g.
• What is an API Proxy
• Different types of API Proxy (OData, Rest, SOAP)
• How to create an API Proxy
• How to test an API Proxy

Prerequisites
A configured ES4 System.

4
UNIT 4.2 – API PROXY

API PROXY
An Introduction

An API Proxy is a discrete representation of an API entity that abstracts the actual proxy end point properties
at one end and the actual target endpoint (the endpoint that is relevant for the end user to invoke) at the other
end. It also includes other properties that describe the policies that need to be invoked on the API, the
documents, and other artifacts that are relevant to the API.

API Artifacts

An API Proxy is associated with different kind of artifacts or properties. These artifacts or properties are
explained below.

• Proxy End Point


− It defines the way (or URL) for the consumer application to access the API.
− It also determines whether API is accessed over HTTP or HTTPS.
− Standard policies are attached to the proxy end point only to enforce security, access limit etc.

• Target End Point


− It defines the way proxy interacts with the backend services.
− Target End Point is configured to forward request to the proper backend service, including any security
settings (HTTP or HTTPS protocol) and other connection information.
− Policies can also be attached to the target endpoint to ensure that response messages are properly
formatted.

• API Resource
− An API resource is a URI path fragment that identifies some entity that developers can access by calling
the API.
− In the below example, reports and sales constitute two API Resources:
o http://myapp.com/reports
o http://myapp.com/sales

API Proxy: Based on Service Type

An API Proxy can be created in following ways:


• OData based API Proxy Creation
o In this case, the metadata of the OData Service will be fetched and resources will be added
automatically to it.
o If you want to use this option, then create a System with the given OData service host.
§ Choose the created System as “Provider System” while creating API Proxy.
o Discover option is to fetch the available services provided by SAP Gateway System, like ES4
System.
• REST based API Proxy Creation
o In this case, the resources has to be added manually while creating the API Proxy. Even if the
service is OData based and proxy creation option is chosen to be REST based, then also,
resources has to be added manually.
• SOAP based API Proxy Creation
o In order to fetch the WSDL document for the given SOAP Service, this option has to be used.

5
UNIT 4.2 – API PROXY

Create Your First API Proxy

Explanation Screenshot

Register and Log on to SAP HANA Cloud Portal Trial.


Part 1 Logon to your API Portal

1. Logon to API Portal on the HCP


Trial Landscape
2. Click on the Menu button on left
pane.
3. Click on Develop from the Menu
Items.

4. Click on the Create button

6
UNIT 4.2 – API PROXY

Explanation Screenshot

5. A Create API Wizard will come


up. Select the ES4 API Provider.

Description of the API Proxy Properties


• API Provider
o The API Provider is the system which provides the service we want to expose via this API
Proxy. We have previously created the system on the Configure view.
o You can select a Provider System only while creating an OData based API Proxy. This will
allow you to fetch the metadata from the created Provider System, and discover the services
implemented by that system.
• Discover (button)
o It is used to discover the available services provided by the selected Provider System e.g. the
SAP Gateway System ES4. Selecting a service will prepopulate your API Proxy settings with
all required properties.
• Link Target Server
o This option links the API Proxy with the selected Provider System (Target Server).
o If linked, the API Proxy URL has to be defined relative to the host and port information
mentioned in the corresponding system’s details.
o If not linked, then the complete (absolute) URL has to be given.
• Name
o This is the name (id) of the API Proxy.
o No two API Proxys can have same name. The “name” has to be unique.
o The name can not contain any special characters.
• Title
o This is the display title of the API Proxy.
o The title can be duplicated and does not have to be unique across multiple API Proxies.
o It can also contain special characters.
• API Base Path
o The API Base Path is a path prefix, which is added to the end of the URL.
• Service Type
o An API Proxy can be created based on either OData or REST or SOAP service type.
o If you want to create an OData based API Proxy then you must select a Provider System.
o If no provider system is selected, then only REST based or SOAP based API Proxies can be
created.
• Documentation (toggle button)
o This option fetches advanced service document from services $metadata.
o Available only for OData based API Proxy.
o Used to fetch service documents mostly in case of SAP Gateway System.

Having said that, we will continue with the creation of an OData based API Proxy.

7
UNIT 4.2 – API PROXY

Explanation Screenshot

6. Click on Discover button. You


will get the list of available
services in this system.

7. Choose GWSAMPLE_BASIC.

8. Click OK.

9. The API Proxy Wizard will get


prefilled with the services
information.

10. Click Create.

11. An API Proxy details page with


all the available resources
(already added up) will appear.

12. Click Save and Deploy.

13. Congratulations, you just


created your first API Proxy.

8
UNIT 4.2 – API PROXY

Now, play around with various properties of this API Proxy and start consuming it.

You might also like