IT CanvassTalk to an advisor
SAP APIs · LessonBy , SAP Trainer, 10 yrs · Published · SAP S/4HANA 2023 · all levels

REST

REST/OData is the modern way to access SAP over HTTP with JSON, the interface behind Fiori and most cloud and web integrations. In SAP, "REST API" in practice usually means OData services.

Quick answer

Prefer REST/OData for UIs, mobile, and modern web integrations, and whenever you consume S/4HANA cloud APIs.

Key takeaways
  • SAP’s primary RESTful interface is OData, a standardised REST protocol returning JSON, with rich query options.
  • OData supports $filter, $select, $expand, $orderby and paging ($top/$skip), so clients fetch exactly what they need.
  • In SAP, "REST API" in practice usually means OData services.
  • Watch out: Over-fetching without $filter/$select/$top.

REST and OData in SAP

SAP’s primary RESTful interface is OData, a standardised REST protocol returning JSON, with rich query options. OData services expose SAP business data and operations to Fiori, mobile apps, and external systems. S/4HANA and cloud products publish many OData APIs (on the Business Accelerator Hub), and you can build your own from CDS.

A REST/OData call

GET /sap/opu/odata/sap/API_SALES_ORDER_SRV/A_SalesOrder?$filter=SoldToParty eq '1000'&$top=20
Authorization: Bearer <token>
Accept: application/json

Query options

OData supports $filter, $select, $expand, $orderby and paging ($top/$skip), so clients fetch exactly what they need. This precision keeps integrations efficient, request minimal data rather than pulling everything and filtering client-side.

When to use it

Prefer REST/OData for UIs, mobile, and modern web integrations, and whenever you consume S/4HANA cloud APIs. It is the strategic direction; reserve SOAP and RFC for classic or SAP-to-SAP scenarios.

Common pitfalls

  • Over-fetching without $filter/$select/$top.
  • Ignoring OData error handling.
  • Using RFC/SOAP where OData fits better.

Practice challenge

+0 XPStreak ×0
Question 1 of 3
Which statement is true of REST?

Frequently asked questions

What does REST stand for in SAP?
REST/OData is the modern way to access SAP over HTTP with JSON, the interface behind Fiori and most cloud and web integrations. In SAP, "REST API" in practice usually means OData services.
What is the Fiori angle on REST?
SAP’s primary RESTful interface is OData, a standardised REST protocol returning JSON, with rich query options.
What is connected to REST in an SAP landscape?
Prefer REST/OData for UIs, mobile, and modern web integrations, and whenever you consume S/4HANA cloud APIs.
What tends to go wrong with REST?
Over-fetching without $filter/$select/$top. Ignoring OData error handling. Using RFC/SOAP where OData fits better.
Already working on SAP and stuck on a live ticket?Get an expert SAP developer on screen-share to finish your daily tasks with you. Deliver on time, protect your reputation and your job. Monthly support only, no task-wise plans.Task assigned · no idea where to startStill stuck · your job on the lineExpert joins your screenDelivered on timeExplore On Job Support