Repository navigation
API Root Paths
The API Root Path is the base HTTP/HTTPS endpoint used by sap-bridge and the sap-dev AI Skill for:
- Heartbeat & Liveness Probing: Periodically verifying backend reachability, latency, and session health.
-
CSRF Token Fetching: Executing lightweight
GETrequests withX-CSRF-Token: Fetchheaders to obtain session tokens required for mutating calls. -
API Registry & Service Discovery: Exploring published OData catalogs, CDS services, and ADT capabilities via discovery tools (
sap_explore_api_registry).
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 |
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.
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.
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/.
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).
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, orondemand.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).