Skip to content

API Root Paths

stud0709 edited this page Oct 4, 2026 · 1 revision

API Root Paths

Overview

The API Root Path is the base HTTP/HTTPS endpoint used by sap-bridge and the sap-dev AI Skill for:

  1. Heartbeat & Liveness Probing: Periodically verifying backend reachability, latency, and session health.
  2. CSRF Token Fetching: Executing lightweight GET requests with X-CSRF-Token: Fetch headers to obtain session tokens required for mutating calls.
  3. API Registry & Service Discovery: Exploring published OData catalogs, CDS services, and ADT capabilities via discovery tools (sap_explore_api_registry).

Default Paths by Architecture

Depending on your SAP system architecture and edition, the appropriate API root endpoint varies:

Architecture / Environment Default API Root Path Protocol / Purpose
Standard ABAP On-Premise / Private Cloud (ECC, NW 7.4+, S/4HANA On-Prem / PCE) /sap/bc/adt/discovery AtomPub ADT Discovery Service (ADT Workbench Core)
SAP S/4HANA Cloud (Public Edition) /sap/opu/odata/IWFND/CATALOGSERVICE;v=2/ Standard OData Catalog Service (V2)
SAP BTP ABAP Environment (Steampunk) /sap/bc/adt/discovery or /sap/opu/odata/IWFND/CATALOGSERVICE;v=2/ ADT Discovery when using Service Keys; OData Catalog when using Communication Arrangements
Generic Non-ABAP / CPI / Cloud Integration / REST APIs Custom (e.g. /api/v1 or /http/...) Configurable per integration scenario

1. Standard ABAP On-Premise & Private Cloud (/sap/bc/adt/discovery)

Traditional SAP NetWeaver and S/4HANA On-Premise or Private Cloud landscapes expose the ABAP Development Tools (ADT) discovery collection under /sap/bc/adt/discovery. This AtomPub document catalogs all available ADT services, object types, and capabilities supported by the active SAP kernel and patch level.

2. SAP S/4HANA Cloud (Public Edition) (/sap/opu/odata/IWFND/CATALOGSERVICE;v=2/)

Public Cloud tenants generally do not expose the classic ADT discovery endpoint unless a 3-System Landscape (3SL) Developer Extensibility arrangement (SAP_COM_0510) is provisioned. Instead, technical communication users connect to the standard SAP Gateway OData Catalog Service at /sap/opu/odata/IWFND/CATALOGSERVICE;v=2/. This service catalogs all published business APIs (e.g., Sales Orders, Business Partners) and serves as an ideal liveness probe and CSRF anchor.

3. SAP BTP ABAP Environment (Steampunk)

For SAP BTP ABAP environments, the endpoint depends on your connection method:

  • ADT Service Key (Developer Access): When connecting with an ADT service key generated from BTP cockpit, use /sap/bc/adt/discovery.
  • Communication Arrangement (OData/API Access): When connecting via inbound communication users or OAuth2 client credentials, use /sap/opu/odata/IWFND/CATALOGSERVICE;v=2/.

4. Non-ABAP Systems, CPI & Generic REST Endpoints

For non-ABAP systems, SAP Cloud Integration (CPI/IS), or custom middleware, you can point the API Root Path to any valid root endpoint (such as /api/v1 or a specific health probe route like /http/ping).


Automatic Preselection in SAP-Bridge

The sap-bridge daemon and Web Dashboard automatically determine and preselect the optimal API Root Path:

  • Automatic Detection: When creating a new connection or viewing Agent Settings:
    • If Non-ABAP System is checked, OR
    • If the host contains s4hana.cloud, s4hana.ondemand, or ondemand.com, the system defaults the API Root Path to /sap/opu/odata/IWFND/CATALOGSERVICE;v=2/.
    • Otherwise, standard ABAP systems default to /sap/bc/adt/discovery.
  • Manual Customization: You can customize or override this value at any time via Agent Settings (gear icon on the system connection card).

Clone this wiki locally