Course

SAP API Management

An expert-level course on publishing, securing and running enterprise APIs with the API Management capability of SAP Integration Suite. You learn the proxy model inside out, every important policy with working configuration, products and monetization, analytics and how to run an API program. Every module has a live example, a lab and a quiz.

14 modules~24 h totalLevel Intermediate → ExpertScenario Partner Order API on S/4HANA
Training documents

Course material

Every module below is a full lesson you can read here. Lab handbooks and slide decks for download are listed here as they are published.

Downloadable PDF lab handbooks are being prepared and will appear in this list.

Module 01

Why APIs need to be managed

60 min · Concepts

An API is a contract: send this request, get that response. SAP systems have always had interfaces (RFC, BAPI, IDoc, SOAP), but modern apps, partners and AI agents expect web APIs: HTTP, JSON or OData, documented in OpenAPI. The moment you publish more than a handful of them, the same questions come up every time. Who is allowed to call this? How many calls per second can the backend take? Which version is a partner using? Who is causing errors?

Answering those questions inside each backend leads to every team solving them differently. API management answers them once, in a layer in front of all backends.

What the API management layer gives you

ConcernWhat it means in practice
One harmonized API layerAll APIs under one domain and URL scheme (e.g. api.company.com/sales/v1/orders), with the same authentication everywhere, whatever system is behind them
SecurityAPI keys, OAuth 2.0, JWT and SAML in one place, plus protection against oversized or malicious payloads
Traffic controlRate limits, quotas and caching so one consumer cannot overload S/4HANA
MediationReshape requests and responses: JSON to XML, REST in front of SOAP, hide internal fields
Self-serviceA developer portal where consumers find APIs, try them and get keys without a ticket
InsightWho calls what, how fast, how often it fails
MonetizationCharge for API usage with rate plans and bills

Typical reasons companies start

  • Partner integration: suppliers, logistics providers and banks connect in real time instead of exchanging files.
  • Apps and channels: mobile apps, portals and kiosks all read the same product, price and stock data.
  • Keeping the core clean: extensions run on BTP and talk to S/4HANA only through managed APIs.
  • New revenue: selling access to data or services, such as address validation or tracking.
  • AI agents: in 2026, many API consumers are agents. They need the same governance, quotas and auditing as human-built apps.
Key idea · API management does not create business logic. It wraps existing logic (S/4HANA OData, Cloud Integration iFlows, CAP services, third-party APIs) and makes it safe, consistent and consumable.

Lab 1 · Find your API candidates

  1. List five data or process needs from apps or partners in a company you know, such as product availability or order status.
  2. For each, note the backend that holds the data and who will consume it (internal, partner or public).
  3. Mark which of them need quotas, which need OAuth and which could be cached.
Module 02

Architecture, components and personas

75 min · Concepts

API Management is a capability of SAP Integration Suite. It has a design-time side, where you build and configure, and a runtime side, which handles every call.

Mobile / web app Partner system AI agent API gateway (runtime) proxies · policies · routing security · quotas · cache analytics data S/4HANA (via Cloud Connector) Cloud Integration iFlows CAP services · third-party APIs API portal API Business HubEnterprise (dev portal)
ComponentRole
API portalWhere API teams create providers, proxies, policies, products, key value maps and certificates, test and debug, and view analytics
API designerEditor for API specifications (OpenAPI) for an API-first approach; can generate server stubs
API Business Hub EnterpriseThe developer portal: consumers browse products, try APIs, create applications and get keys (formerly called the developer portal)
API gatewayThe runtime that executes every call through the proxy and its policies. SAP's gateway is built on proven Apigee technology
AnalyticsUsage, performance and error dashboards, custom reports and an analytics API
Hybrid runtimeWith Edge Integration Cell, proxies can also run inside your own Kubernetes environment for on-premise-to-on-premise traffic, designed in the same cloud portal

The people involved

  • API developer: builds proxies and policies, or builds new APIs API-first.
  • API administrator: owns security standards, certificates, policy templates and the portal.
  • API product manager: decides which APIs to bundle as products, for whom, and at what price; tracks adoption.
  • Application developer: the consumer who finds, tests and uses APIs through the developer portal.

Lab 2 · Draw your target picture

  1. Draw the diagram above for your landscape, naming the real consumers and backends.
  2. Mark which backends are on-premise and will need the Cloud Connector.
  3. Write who would play each of the four personas in your organization.
Module 03

Setup, API providers and your first proxy

2 h · Hands-on

Enable the capability

  1. In your Integration Suite subaccount, open the Integration Suite home and add the API Management capability. Provisioning creates your API portal and runtime.
  2. Assign role collections. Typical ones are APIPortal.Administrator for the API team and the AuthGroup.API.* collections for portal administrators and application developers. Check the current list in your subaccount, as SAP adds roles over time.
  3. Enable API Business Hub Enterprise (the developer portal) and register yourself as a developer.

API providers: describe the backend once

An API provider holds the connection details of a backend: host, port, SSL, connection type and, for SAP Gateway systems, the catalog service used to discover OData services. Proxies then point to the provider instead of hard-coding URLs. When the backend moves, you change one provider instead of fifty proxies.

Connection typeUse for
InternetPublic or cloud backends, such as S/4HANA Cloud or a SaaS API
On PremiseBackends behind the Cloud Connector; you enter the virtual host and port defined there
Cloud IntegrationYour own Integration Suite tenant, so iFlow endpoints can be discovered and proxied
Open ConnectorsThird-party SaaS APIs through Open Connectors instances

For S/4HANA on-premise with SAP Gateway, set the catalog service path (/sap/opu/odata/IWFND/CATALOGSERVICE;v=2 plus the client) and credentials. Then Discover in the proxy wizard lists every OData service the user can see.

Live example: your first proxy

  1. In the Cloud Connector, map virtual host s4h-virtual:44300 to your S/4HANA host and allow path /sap/opu/odata/.
  2. Create provider S4H_ONPREM: type On Premise, host s4h-virtual, port 44300, catalog settings filled in. Use Test Connection.
  3. Create an API: choose the provider, Discover, pick API_BUSINESS_PARTNER.
  4. Set name BusinessPartner, base path /s4/v1/businesspartner, keep documentation import on.
  5. Save, deploy, and call the proxy URL from the Test console. You get data from S/4HANA, now through your gateway.
Practice without a backend · SAP's public sandbox APIs on the Business Accelerator Hub, or SAP's demo gateway system, let you do the same lab with an Internet-type provider.

Lab 3 · Provider, proxy, call

  1. Create an API provider for a reachable backend (on-premise via Cloud Connector, or a sandbox).
  2. Create and deploy a proxy for one OData service with base path /training/v1/….
  3. Call it from the Test console and from Postman, and compare the response with a direct backend call.
Module 04

Proxy anatomy: endpoints, flows and conditions

2 h · Core concept

Every expert decision in API Management comes down to one question: where in the flow does this policy run? A proxy has two endpoints, and each has a request path and a response path.

Client ProxyEndpoint TargetEndpoint Backend request: PreFlow → Conditional → PostFlow request: PreFlow → Conditional → PostFlow response: PreFlow → Conditional → PostFlow response: PreFlow → Conditional → PostFlow PostClientFlow (after reply sent) route rule
PlacePut policies here when…Examples
Proxy request PreFlowThey must run for every call, before anything elseVerify API key or OAuth, spike arrest, threat protection, access control
Proxy conditional flowsThey apply to one resource or verbDifferent quota for POST orders vs GET orders
Target request PreFlowThey prepare the call to the backendRead backend credentials from a key value map, set authorization header, add sap-client
Target responseThey work on the raw backend answerXML to JSON, remove internal fields
Proxy response PostFlowThey shape what the consumer seesAdd CORS or security headers
PostClientFlowWork that should not delay the replyMessage logging to an external log service
Fault rulesSomething failedRaise a clean, consistent error

Conditions and variables

Conditional flows and individual policy steps can have a condition string. Only the first conditional flow whose condition is true runs. Conditions use flow variables, for example:

proxy.pathsuffix MatchesPath "/orders/**" and request.verb = "POST"
request.header.x-channel = "partner"
response.status.code >= 500

Useful variables: request.header.<name>, request.queryparam.<name>, request.verb, proxy.pathsuffix, client.ip, apiproxy.name, and values that policies create, such as the application's client ID after a verify-API-key step.

Route rules

A proxy endpoint's route rules decide which target endpoint gets the request. A route rule with no target means "do not call a backend", which is how you build token endpoints, mocks and health checks that answer from the gateway itself.

Debugging habit · When a policy "does nothing", check the flow it is attached to and its condition first. Nine times out of ten that is the cause.

Lab 4 · Flows in action

  1. On your BusinessPartner proxy, add a conditional flow for GET /A_BusinessPartner and another for everything else.
  2. Add an Assign Message in each that sets a different response header, x-flow.
  3. Call both paths and confirm the header in the response; open a debug session and follow the steps.
Module 05

Traffic management

2 h · Policies

Traffic policies protect backends and enforce agreements. The two most confused policies are Spike Arrest and Quota. Learn the difference once and you will never mix them up:

Spike ArrestQuota
ProtectsThe backend from burstsA business agreement (calls per app per day/month)
CountsRate, smoothed: "10ps" means about one call every 100 msAbsolute calls in a time window
Per consumer?Usually no, protects the totalYes, per application or developer via an identifier
When exceededReject until the next slotReject until the window resets

Spike Arrest

<SpikeArrest async="true" continueOnError="false" enabled="true"
             xmlns="http://www.sap.com/apimgmt">
  <Rate>20ps</Rate>   <!-- ~1 request per 50 ms reaches the backend -->
</SpikeArrest>

Spike arrest smooths: 20ps does not allow 20 calls in the first millisecond. Put it early in the proxy request PreFlow. Counters are not shared across all gateway nodes, so treat limits as approximate.

Quota per application, with limits from the product

<Quota async="false" continueOnError="false" enabled="true" type="calendar"
       xmlns="http://www.sap.com/apimgmt">
  <Identifier ref="verifyapikey.VerifyKey.client_id"/>
  <Allow countRef="verifyapikey.VerifyKey.apiproduct.developer.quota.limit" count="1000"/>
  <Interval ref="verifyapikey.VerifyKey.apiproduct.developer.quota.interval">1</Interval>
  <TimeUnit ref="verifyapikey.VerifyKey.apiproduct.developer.quota.timeunit">day</TimeUnit>
  <StartTime>2026-01-01 00:00:00</StartTime>
</Quota>

The identifier makes the quota count separately per application. The …Ref attributes take the limit from the API product the application subscribed to, so a Gold product can allow 100,000 calls a day and Bronze 1,000 with the same policy. The plain values are fallbacks. Variable names depend on your verify policy name (VerifyKey here); check them in a debug session.

Concurrent Rate Limit

Limits how many calls are in progress to a backend at the same moment, which protects slow systems. It must run in the target request flow, target response flow and the default fault rule, so the counter is released even when a call fails. Some flows are easiest to edit by exporting the proxy, adding the policy steps in the XML bundle and importing it again. Excess calls get HTTP 503.

Access Control

Allows or denies by client IP, evaluating the X-Forwarded-For header. Rules are checked in order and the first match wins. The mask is the number of leading bits that must match: 32 means one exact address, 24 means the whole x.y.z.* range.

<AccessControl async="true" continueOnError="false" enabled="true"
               xmlns="http://www.sap.com/apimgmt">
  <IPRules noRuleMatchAction="DENY">           <!-- allow-list mode -->
    <MatchRule action="ALLOW"><SourceAddress mask="24">203.0.113.0</SourceAddress></MatchRule>
  </IPRules>
</AccessControl>

Response Cache

Answers repeated read requests from the gateway. Attach the same policy in the proxy request flow (lookup) and the response flow (store). Build the cache key from everything that changes the answer: path, query and, for user-specific data, the user or application.

<ResponseCache async="false" continueOnError="false" enabled="true"
               xmlns="http://www.sap.com/apimgmt">
  <CacheKey>
    <KeyFragment ref="request.uri"/>
    <KeyFragment ref="request.header.Accept-Language"/>
  </CacheKey>
  <ExpirySettings><TimeoutInSec>300</TimeoutInSec></ExpirySettings>
  <SkipCacheLookup>request.header.x-refresh = "true"</SkipCacheLookup>
</ResponseCache>

Good candidates are OData $metadata, product catalogs and value lists. Never cache responses that contain one user's personal data under a shared key.

Lab 5 · Protect the backend

  1. Add Spike Arrest 5ps to the BusinessPartner proxy and fire 20 parallel calls; count the rejections.
  2. Add a Response Cache for $metadata with a 10-minute expiry and compare response times on the first and second call.
  3. Add an Access Control rule that allows only your office IP range.
Module 06

Mediation: reshaping messages

2 h 30 min · Policies

Assign Message: the Swiss army knife

Assign Message changes a request or response, or builds a new message for a callout. Its operations are Add (new value, keeps existing), Set (overwrite), Remove, Copy (from another message) and AssignVariable (set a flow variable with a fallback).

<AssignMessage async="false" continueOnError="false" enabled="true"
               xmlns="http://www.sap.com/apimgmt">
  <Remove>
    <Headers><Header name="apikey"/></Headers>        <!-- never forward the consumer's key -->
  </Remove>
  <Set>
    <QueryParams><QueryParam name="sap-client">100</QueryParam></QueryParams>
    <Headers><Header name="x-correlation-id">{messageid}</Header></Headers>
  </Set>
  <IgnoreUnresolvedVariables>false</IgnoreUnresolvedVariables>
  <AssignTo createNew="false" type="request">request</AssignTo>
</AssignMessage>

Values in curly braces are flow variables, resolved at runtime.

Extract Variables: reading values out

Pulls values from headers, query parameters, the URI path, or a JSON or XML body into flow variables, so other policies can use them:

<ExtractVariables async="true" continueOnError="false" enabled="true"
                  xmlns="http://www.sap.com/apimgmt">
  <URIPath><Pattern ignoreCase="true">/orders/{orderId}</Pattern></URIPath>
  <JSONPayload>
    <Variable name="country"><JSONPath>$.order.shipTo.country</JSONPath></Variable>
  </JSONPayload>
  <Source>request</Source>
</ExtractVariables>

JSON to XML and XML to JSON

Convert between formats in either direction. Options control how attributes (a prefix such as @), text nodes, namespaces and arrays are mapped. Test the output carefully with real payloads: a single-element array and a plain object can look the same after conversion.

Key Value Map Operations

A key value map (KVM) stores small configuration values outside the proxy code: backend credentials, feature switches, endpoint suffixes. Mark it encrypted for secrets, and read them into variables starting with private. so they never appear in debug traces.

<KeyValueMapOperations mapIdentifier="S4H_Credentials" async="true"
     continueOnError="false" enabled="true" xmlns="http://www.sap.com/apimgmt">
  <Get assignTo="private.s4user" index="1"><Key><Parameter>technical</Parameter></Key></Get>
  <Get assignTo="private.s4pass" index="2"><Key><Parameter>technical</Parameter></Key></Get>
  <Scope>environment</Scope>
</KeyValueMapOperations>

Raise Fault

Stops processing and returns a response you define: status, reason and body. Use it for clean validation errors and a consistent error format across all APIs.

Service Callout

Calls another service in the middle of the flow: fetch a token, enrich data, check a credit limit. Typical chain: Assign Message builds the callout request, Service Callout sends it (to a URL, an API provider, or another proxy as a local target), and Extract Variables reads the answer.

Live example: a REST facade over SOAP

Consumers want GET /customers/1234 returning JSON, but the backend is SOAP:

  1. Extract Variables reads customerId from the URI path.
  2. Assign Message builds a SOAP envelope with {customerId}, sets Content-Type: text/xml and changes the verb to POST.
  3. The target is the SOAP endpoint.
  4. In the target response flow, Extract Variables (XPath) or an XSLT removes the SOAP envelope, and XML to JSON converts the result.
  5. Raise Fault returns 404 when the SOAP fault says "not found".

Lab 6 · Build the facade

  1. Build the REST-over-SOAP facade above against any public test SOAP service.
  2. Move the backend user and password into an encrypted KVM and read them into private. variables.
  3. Return a 400 with a JSON error body when the customer ID is not numeric.
Module 07

Security policies

3 h · Policies

Security works in two directions. Inbound: who may call your API. Outbound: how the gateway logs into the backend. Keep them separate. Consumers should never know or send backend credentials.

Verify API Key: identifying the application

<VerifyAPIKey async="true" continueOnError="false" enabled="true"
              xmlns="http://www.sap.com/apimgmt">
  <APIKey ref="request.header.apikey"/>
</VerifyAPIKey>

The key identifies the application, not a user, and is issued when the application subscribes to a product. It is enough for internal or low-risk APIs and is required for product-based quotas and monetization. Always remove the key header before calling the backend.

OAuth 2.0 client credentials, step by step

Client app Token proxy Order API proxy 1. POST /oauth/token (key:secret, grant_type) 2. access_token 3. GET /orders Authorization: Bearer … 4. VerifyAccessToken → backend → response
  1. Create a proxy OAuthToken with base path /oauth and a route rule with no target, so the gateway answers itself.
  2. Add an OAuth v2.0 policy with operation GenerateAccessToken and grant type client_credentials.
  3. On every protected proxy, add OAuth v2.0 with operation VerifyAccessToken in the proxy request PreFlow.
  4. Put the protected proxy in a product. The consumer's application key and secret become the OAuth client ID and secret.
  5. The client posts grant_type=client_credentials with basic authentication (key:secret) to the token proxy, then calls APIs with Authorization: Bearer <token>.
<OAuthV2 async="false" continueOnError="false" enabled="true"
         xmlns="http://www.sap.com/apimgmt">
  <Operation>GenerateAccessToken</Operation>
  <ExpiresIn>3600000</ExpiresIn>                  <!-- milliseconds -->
  <SupportedGrantTypes><GrantType>client_credentials</GrantType></SupportedGrantTypes>
  <GenerateResponse enabled="true"/>
</OAuthV2>

When tokens come from an external identity provider such as SAP Cloud Identity Services, validate them with the JWT policies (verify, decode, generate) instead of issuing your own.

Basic Authentication policy

Does not authenticate anyone by itself. It encodes a user and password into an Authorization: Basic header (typically for the backend, with values from an encrypted KVM), or decodes an incoming header into variables.

SAML and principal propagation

When the backend needs to know the user, not just the app, generate a short-lived SAML assertion for the user after validating their token, signed with a key from the API Management key store. For on-premise backends, principal propagation through the Cloud Connector achieves the same end, with the Cloud Connector creating a short-lived certificate for the user.

Content threats

  • JSON Threat Protection: limits depth, array size, entry count and string length, against payloads built to exhaust parsers.
  • XML Threat Protection: the same for XML (node depth, attributes, children, name and value lengths).
  • Regular Expression Protection: rejects requests matching injection patterns.
  • Message Validation: validates XML/SOAP against an XSD stored with the proxy.

Certificates

The trust store holds certificates you trust (backend servers, SAML issuers). The key store holds your own key pairs, used to sign SAML assertions or for client-certificate authentication to backends.

Security baseline for every API · OAuth or API key, spike arrest and threat protection in the proxy request PreFlow; remove consumer credentials before the target; backend credentials only from an encrypted KVM or the API provider; consistent errors that reveal nothing about the backend.

Lab 7 · Secure the Order API

  1. Build the token proxy and protect BusinessPartner with VerifyAccessToken.
  2. Get a token in Postman with client credentials and call the API with and without it.
  3. Add JSON Threat Protection with a container depth of 6 and send a deeper payload to see it rejected.
Module 08

Extensions, reuse and error handling

2 h · Advanced

JavaScript and Python policies

When no standard policy fits, write a script, stored as a proxy resource and referenced by a JavaScript or Python policy. Scripts can read and set flow variables and message content.

// Normalize country codes to upper case and reject unknown ones
var c = (context.getVariable("country") || "").toUpperCase();
var allowed = ["DE", "IN", "US", "GB"];
context.setVariable("country", c);
context.setVariable("countryAllowed", allowed.indexOf(c) >= 0 ? "true" : "false");

Then use countryAllowed = "false" as the condition on a Raise Fault. Keep scripts small and fast: they run on every call.

Policy templates: reuse across proxies

A policy template is a saved set of policies you apply to other proxies in one step, such as your security baseline from module 7. API coaches use templates to make standards the easy path rather than a document nobody reads.

Error handling with fault rules

When a policy fails, normal flow stops and the proxy enters error state. Fault rules with conditions on the error (for example fault.name = "InvalidApiKey" or ratelimit.SpikeArrest.failed = true) let you return your own consistent format, and the default fault rule catches everything else.

{ "error": { "code": "RATE_LIMITED", "message": "Too many requests. Retry after 1 second.",
             "correlationId": "4f1c…" } }
StatusUsual cause
401Missing or invalid key or token
403Valid caller but not allowed: product permissions, IP rule
404Wrong base path or no matching conditional flow
429 or 500 from a traffic policyQuota or spike arrest exceeded (map it to 429 for consumers)
502/503/504Backend unreachable or slow, Cloud Connector down, or concurrent rate limit hit

Statistics Collector and Message Logging

Statistics Collector adds your own dimensions to analytics, for example channel or country. Use only one per proxy. Message Logging sends log lines to an external syslog-type service and belongs in the PostClientFlow, so logging never slows the response.

Lab 8 · Standards as code

  1. Create a policy template "Security Baseline" from your secured proxy and apply it to a second proxy.
  2. Add fault rules so every error returns the JSON format above with the right status.
  3. Add a Statistics Collector for the x-channel header and view it in a custom chart.
Module 09

Products, applications and the developer portal

90 min · Hands-on

Consumers never subscribe to a proxy. They subscribe to a product: a bundle of one or more proxies for a business purpose, with its own documentation, permissions, quota and optional rate plan.

ObjectWho creates itWhat it holds
API proxyAPI developerTechnical facade and policies
ProductAPI product managerProxies, quota settings, permissions, rate plan, custom attributes
ApplicationApplication developer, in the portalSubscriptions to products, plus the key and secret

Publishing a product

  1. Deploy the proxies first. Products can only contain deployed proxies.
  2. Develop → Products → Create: name, title, description written for consumers.
  3. Add the proxies, set product-level quota values, and optionally restrict discovery and subscription to custom roles on the Permissions tab, so only partner developers see a partner product.
  4. Publish. It appears in API Business Hub Enterprise.

Custom attributes: dynamic behaviour without new proxies

Products and applications can carry custom attributes, key-value pairs available as flow variables after key or token verification. One proxy can then behave differently per product tier:

  • tier = gold: higher quota, no cache delay, extra fields.
  • deprecated = true: add a Deprecation warning header.
  • region = EU: route to the EU backend.

The consumer's journey

In API Business Hub Enterprise, a developer browses products, reads the documentation, tries calls in the browser, subscribes (creating an application or adding to an existing one), and receives the application key and secret. Administrators approve or invite developers, can customize the portal's branding, and can post announcements to subscribers.

Lab 9 · Gold and Bronze

  1. Create products "Orders Gold" and "Orders Bronze" with the same proxy and different quota values and a custom attribute tier.
  2. Subscribe two applications, one to each product.
  3. Prove with calls that each application gets its own limit from the same Quota policy.
Module 10

Monetization: rate plans and bills

60 min · Business

Monetization turns API usage into revenue. It needs the gateway to know which application made each call, so a verify API key or OAuth policy on the proxy is a prerequisite.

Rate plans

A rate plan is attached to a product and charged monthly. It can have a basic charge (a fixed fee per month) and per-call pricing, either flat or in tiers:

Calls in the monthPrice per call
1 – 1,0000.00 (free tier)
1,001 – 50,0000.02 EUR
50,001 and above0.01 EUR

Worked example: a basic charge of 10 EUR and 60,000 calls cost 10 + (0 × 1,000) + (0.02 × 49,000) + (0.01 × 10,000) = 10 + 980 + 100 = 1,090 EUR. Each tier only prices the calls that fall inside it.

Bills

The gateway meters calls per application. Developers see their costs in the portal workspace; administrators see bills per developer and month in the API portal and can download them, for example as CSV for invoicing. For full subscription billing, payments and dunning, connect to a billing system such as SAP Subscription Billing.

Product advice · Monetization only works for APIs consumers truly want. Start free, measure adoption in analytics, and price once value is proven.

Lab 10 · Price your API

  1. Create the tiered rate plan above and attach it to "Orders Bronze".
  2. Make a number of test calls with the Bronze application.
  3. Open the developer's cost view and the administrator's bill, and check the amount by hand.
Module 11

Designing and consuming APIs

2 h · Design + hands-on

API-first design

In an API-first approach, you write the contract before the code: an OpenAPI document describing paths, parameters, payloads, errors and security. Consumers and providers agree on it, mock it, then build in parallel. The API designer edits OpenAPI and can generate server stubs, for example Node.js, as a starting point.

openapi: 3.0.3
info: { title: Partner Order API, version: 1.0.0 }
paths:
  /orders/{orderId}:
    get:
      summary: Read one order
      parameters:
        - { name: orderId, in: path, required: true, schema: { type: string } }
      responses:
        '200': { description: The order, content: { application/json: { schema: { $ref: '#/components/schemas/Order' } } } }
        '404': { description: Order not found }
components:
  schemas:
    Order:
      type: object
      properties:
        orderId: { type: string, example: "4500012871" }
        status:  { type: string, enum: [OPEN, SHIPPED, INVOICED] }

Good design rules

  • Nouns for resources (/orders), HTTP verbs for actions, plural names, consistent casing.
  • Version in the path (/v1/) and never break a published version.
  • One error format everywhere, with a correlation ID.
  • Paging, filtering and sorting done the same way in every API.
  • Expose what consumers need, not your table structure.

Building the implementation

Common implementations behind a proxy: an S/4HANA OData service (often standard, from the Business Accelerator Hub), a Cloud Integration iFlow for orchestration across systems, a CAP service for new logic, or a third-party API through Open Connectors. Build them with resilience: timeouts, retries with backoff, circuit breakers, and queues for anything asynchronous.

Consuming APIs

  • SAP Business Accelerator Hub: discover SAP's own APIs, try them in the sandbox, copy them into API Management with Discover.
  • Fiori and CAP apps: create a BTP destination pointing to the proxy URL and call it from SAP Build Code or Business Application Studio.
  • Cloud Integration: generate an iFlow from an API, or call a managed API from an iFlow with its key.
  • Testing: the portal test console with its debugger, plus Postman collections for repeatable tests.

Moving proxies between landscapes

Export and import proxies as ZIP bundles, or better, use the SAP Cloud Transport Management service or SAP's API Management APIs from a CI/CD pipeline. Keep environment-specific values such as backend hosts in API providers and KVMs, not inside proxies.

Lab 11 · Contract first

  1. Write the OpenAPI document for the Partner Order API with read and create operations.
  2. Create a mock proxy that returns example responses with Assign Message and no target.
  3. Point a small Fiori or Postman client at the mock, then switch the proxy's target to the real backend without changing the client.
Module 12

Analytics, monitoring and troubleshooting

90 min · Operations

Analytics answer two groups of questions. Operational: is everything healthy, which API is slow, which backend fails? Business: which products grow, who are the top consumers, what does usage earn?

ViewShowsMain audience
Overview / healthTotal traffic, response time, error rate, SLA status, whether the gateway or the backend is slowOperations, DevOps
PerformanceMost used and slowest APIs, backend response timesAPI developers
ErrorsError-prone APIs, apps and backends, errors by verb and codeSupport
UsageProducts, applications and developers over timeProduct managers
Custom viewsYour own measures and dimensions, drill-down, saved chartsEveryone

Your own dimensions from the Statistics Collector appear in custom views. An analytics API lets you pull the data into SAP Analytics Cloud or another BI tool.

Debugging a failing call

  1. Reproduce the call in the test console or Postman.
  2. Start a debug session on the proxy (it stops automatically after a short time because it costs resources).
  3. Walk through each step: which policy failed, which variables were set, what the backend returned.
  4. Check the most common causes: wrong flow or condition, header name case, missing product subscription, expired token, Cloud Connector or certificate problems.
Golden signal · Compare gateway latency with backend latency. If total time is high but the backend is fast, look at your policies (callouts, scripts). If the backend is slow, caching or the backend owner is your answer.

Lab 12 · Find the problem

  1. Introduce three faults: a wrong API key, a wrong backend path and a spike arrest limit of 1ps.
  2. Use only analytics and debug sessions to find each one.
  3. Build a custom chart of errors by application and save it.
Module 13

Running an API program and governance

75 min · Strategy

Tools do not create a good API landscape; a program does. Without one, teams build overlapping APIs in different styles: API sprawl. That means more attack surface, more cost and confused consumers.

Elements of a working API program

  • Business alignment: every API exists for a business scenario with a sponsor. Find the right APIs by walking through scenarios (for example "partner places an order": catalog, availability, cart, order, status).
  • Portfolio and governance: a catalog of all APIs, a review before new ones are built, reuse first.
  • Standards: a style guide, a security baseline as policy templates, versioning and deprecation rules (for example: support the previous major version for 12 months).
  • Community of practice: API coaches, a regular roundtable, shared examples.
  • Terms of use: legal terms, usage policy and SLAs for consumers.
  • Ecosystem engagement: a good portal, samples, hackathons, and listening to consumers.

Treat APIs as products

An API product has an owner (the API product manager), a target audience, documentation, a roadmap and success metrics: adoption, active applications, time to first call, error rate, revenue. The product manager makes sure it is desirable to consumers, feasible to build and run, and viable for the business.

RoleResponsibility
API program managerGoals and metrics, portfolio and roadmap, usage policy, sponsorship
API coachBest practices, design reviews, policy templates, security alignment
API product managerSuccess of individual products: discovery, delivery, adoption, pricing

Lab 13 · Write the rules

  1. Write a one-page API style guide for your company: naming, versioning, errors, paging, security.
  2. Turn the security part into a policy template.
  3. Define three metrics you would report monthly for the Partner Order API.
Module 14

Live example: the Partner Order API, end to end

3 h · Capstone

This capstone combines everything. A logistics partner needs to read order status from S/4HANA and create delivery confirmations. Requirements: OAuth only, Gold and Bronze tiers, S/4HANA protected from bursts, clean JSON errors, credentials never exposed, usage measured per partner.

The complete flow

StepFlowPolicyPurpose
1Proxy request PreFlowSpike Arrest 50psProtect gateway and backend from bursts
2Proxy request PreFlowOAuth v2.0 VerifyAccessTokenOnly partners with a valid token
3Proxy request PreFlowJSON Threat ProtectionReject malicious payloads
4Proxy request PreFlowQuota with product-based limitsGold and Bronze limits per partner app
5Conditional flow GET /orders/{id}Extract Variables, Response Cache (60 s)Fast repeated status checks
6Target request PreFlowKVM (encrypted) + Basic Authentication encodeTechnical user for S/4HANA, invisible to partners
7Target request PreFlowAssign MessageRemove Authorization from partner, add sap-client, map path to OData
8Target responseJavaScript or Assign MessageReshape OData JSON to the partner contract
9Proxy response PostFlowAssign MessageSecurity headers, correlation ID
10Fault rulesRaise FaultOne JSON error format with the right status
11PostClientFlowStatistics Collector, Message LoggingPartner ID dimension, external audit log

Build order

  1. Cloud Connector mapping and API provider S4H_ONPREM.
  2. OpenAPI contract and a mock proxy, shared with the partner early.
  3. Token proxy /oauth.
  4. The Order API proxy with steps 1 to 11, applied partly from your Security Baseline template.
  5. Products "Partner Orders Gold" and "Bronze" with quota values and the custom attribute tier, restricted to the partner role.
  6. Partner onboarding in API Business Hub Enterprise: invite, subscribe, receive key and secret.
  7. Testing: happy path, invalid token, quota exceeded, backend down, oversized payload.
  8. Transport to production with Cloud Transport Management; production values live in the production provider and KVM.
  9. Operations: a saved custom chart by partner and an alert on error rate.
Interview-ready summary · Be able to explain why each policy sits in its flow. For example: the quota goes after token verification because the quota needs the application identity that verification produces.

Lab 14 · Ship it

  1. Build the Partner Order API exactly as in the table.
  2. Write a test plan with at least eight cases and run it in Postman.
  3. Present the design in five minutes as if to an architecture board.