Skip to Content

PI REST Adapter – Blog Overview

Do you look for a way of integrating your SAP PI landscape with other REST services or to publish a REST service yourself using an SAP PI Endpoint?

If yes, then this blog could be of interest for you.

Do you have already had a look at the SAP PI REST Adapter and its configuration and now you feel “a bit overwhelmed” by the amount of settings?

If yes, then this blog is also the right one for you.

We have prepared a collection of blog entries for the REST Adapter that shows architectural concepts and configuration of the SAP PI REST Adapter and explain the internal processing steps. We also added some sample scenarios to make it easier for you to understand how your scenario can be implemented using the PI REST Adapter.

Let’s get started.

The first Blog in this series is about the REST Adapter concept and its configuration capabilities. It is a good ramp-up start for working with the REST adapter. It is called

PI Rest Adapter – Don’t be afraid

The next blog in the series deals with a simple scenario that shows how to consume a synchronous RESTful service. In the example, the target URL is set dynamically by using variables.

REST Adapter – Consuming synchronous RESTful service

A useful scenario is the next one that shows how to call a SAP function module via PI’s RFC adapter, and expose the same as a RESTful service.

PI REST Adapter – Exposing a function module as RESTful service

If you like to know more about JSON conversion within the REST adapter, take a look here:

PI REST Adapter – JSON to XML conversion

In case of the provisioning of RESTful services using a REST sender adapter, you have full flexibility for defining the endpoint of the service. An example of a dynamic endpoint can be seen here:
PI REST Adapter – Defining a dynamic endpoint

Within the REST adapter we have shipped a set of pre-defined adapter specific atributes that can be used to control the message flow. Furthermore, you have the possibility to define own custom attributes. An example is shown here:

PI REST Adapter – Using dynamic attributes

A new concept in PI which is unique to the REST adapter is that you are able to expose one and the same endpoint for addressing multiple Integration Flows. Besides the dynamic endpoint definition explained above, this gives you one more option in the definition of endpoints and your routing rules.

PI REST Adapter – Same endpoint for multiple Integration Flows

How the full set of CRUD operations can be mapped to the operations of a Service Interface in SAP PI is shown in the following examples.

In previous releases, we were limited to one Quality of Service per channel. So, in PI REST Adapter – Map CRUD operations to Service Interface Operations we stick to the POST, PUT, and DELETE operations which are all of asynchronous mode, and omitting the GET operation which is of synchronous mode.

With 7.31 SP16 / 7.4 SP11, we have introduced a new feature that allows you to dynamically set the Quality of Service either by HTTP operation or interface operation. This way, we are able to expose all operations as a single end point. An enhancement of the scenario is described in PI REST Adapter – Map CRUD operations to Service Interface Operations with dynamic setting of Quality of Service

If you like to learn more about the various options that the REST adapter supports for handling error situations, check out the following blog.

PI REST Adapter – Custom error handling

Some RESTful services require specific http headers. The following blog shows you along a use case how you can add custom http header elements to the receiver REST adapter.

PI REST Adapter – Define custom http header elements

If you like to poll REST APIs, check out this example: PI REST Adapter – Polling a REST API.

Learn how to access Concur travel and expense management solutions via its REST API, particularly focusing on the OAuth authorization at PI REST Adapter – Connect to Concur.

Still not found what you were looking for?

No problem! Just let us know what kind of information is missing and how we can help.

You must be Logged on to comment or reply to a post.
  • Excelent documents, specially the first one – don’t be afraid!


    Looking forward to try this… (please SAP, update the AWS trial image to SP14!)

  • /
  • Hi Ivo! Great info here! Thanks!


    We just upgrade our PI to SP14 but no lucky to have the REST adapter available.

    SLD still show SP12 (java stack) and SP14 (abap stack). Any light in here?




    • Hi Angelo,


      For me this looks like a deployment issue. From the distance I cannot really explain why the SLD still shows SP12 for the Java Stack.


      Another possible reason for not seeing the REST Adapter is missing adapter metadata in ESR. Most likely, you have missed to update the adapter metadata in ESR. Open the ESR, and upload the latest software component version SAP BASIS 7.31/7.4.

      See also upgrade and update documentation, chapter 3.5.1.



      Hope that helps (at least a bit),


        • Hi Angelo,


          The adapter runs under the security settings of NetWeaver and so you cannot change authentication security level in the adapter itself.



  • /
  • /
  • /
  • Hello Ivo,


    Great overview! Thank you for that.


    There is one question I still have. Is the adapter also downported? If so, which PI version is the last supported for the REST adapter?


    Best regards,


  • Hello Ivo,

    I have another question about the difference between REST and OData adapter. Can I use the REST adapter to forward Gateway OData services? Is this possible with the OData adapter? As there is only a Receiver adapter for the OData adapter.

    Can you tell me the difference between the adapters? As OData is also using the REST protocol?


    Best regards,


  • Hi Ivo,


    Nice blog. We have a requirement for sending attachments using json/rest, is that possible?


    The request content type should be multipart/form-data. The first part should be of mime type (contenttype) application/json and be named data and the second part should be of content-type application/pdf and be named mainDocument.


    best regards,


      • Hi Ivo ,

        Is this feature is added in SAP PO7.5?If yes please guide me how to resolve below requirment:

        Scenario:REST->>PROXY :The request content type should be multipart. The first part should be of mime type (contenttype) application/json and be named data and the second part should be of content-type application/pdf  as attachment.




  • HI Thanks a lot for your blog!

    I have a question for you and everybody else too!


    Currently, without this Rest Adapter there is also a solution for RESTFUL communication using SOAP Axis Framework.
    Let us assume, if the PI/PO system (SP14) is installed without this SOAP Axis Framework, will the REST adapter still work ? or there is a dependency that the SOAP Axis Framework should be installed first ? In other words, Is this New REST adapter dependant on the SOAP Axis Framework or independant ?




  • Hi Ivo,


    Thanks for sharing excellent blog series !!

    Any idea if we can send HTTP 202 instead of HTTP 200 from PI REST Sender Adapter , like we have a similar functionality for SOAP adapter.




  • Hi Ivo / Alexander,


    Thanks for this excellent series of blogs on the REST adapter.

    We had a requirement for sending specific json objects as arrays even if there was only one value in it. The reason for this is that the 3rd party provider has used a REST design where to keep consistency, they have serialized some objects as arrays only. This causes the server to look for an array for that json object. When we trigger from SAP PI with 2-5 values for that object, SAP PI converts this object into an array and adds the square brackets with the curly brackets to it. When we trigger from SAP PPI with only one value for that object, SAP PI assumes this object to be a single value and hence does not convert it into an array and only sends curly brackets.


    Is there a way to indicate to SAP PI REST adapter that a particular object should always be treated as an array and force it to send square and curly brackets even if there is only one value for the object.

  • I see there are many articles debating SAP PO vs Gateway.


    With so many features for SAP PO REST Adapter, why not use SAP PO over Gateway for enabling REST based services

  • Thanks for the post VERY usefull.

    One issue I have,

    In the REST URL I need to construct a URL pattern that have more than 10 variables.

    When I use the “pattern variable replacement” I have only 10 entries…


    How can I add more variables…?





  • Thanks for the post!!!
    I have this scenario, the same restful services has two operation. One for the authentication y the another one for get information (dont work the second operation if you didnt call the first operation).

    The authentication operation send back a cookie and with that cookie is possible call the second operation and get the information.

    I know that scenario is possible develop with SOAP Receiver, AXIS Transport Protocol, but this option I didnt find in the communication channel options.


    Do you know if this scenario is possible with REST Adapter?


    Thanks for your help.

  • Hello Alexander,


    is it possible to set header parameters (in response messages) like “Access-Control-Allow-Origin” in REST-Sender-Adapter to provide CORS mechanism for Webservices ?


    Thank you in advance.

    Best regards,

    Fabian Engel

  • Hello,


    thank you for this complete blog ! Good job !


    I have a question about standardFaultMessage of a Synchronous Service Interface during execution of WS in REST mode. How it works ? How the fault message is filled ?


    Thank you, have a good day.



  • Hi Alex,


    In one of the comments above it was mentioned that the PI REST adapter did not support MIME attachments for now. Is there a plan to support this in the near future?

    We have a requirement to send an XML file as an application/octet-stream attachment to a RESTful PUT service.




  • Hello,


    First, congratulation for your blog, it has helped me a lot !


    Second, my question : do there is a way to customize timeout as for SOAP adapter with parameters XI.Timeout / XMBWS.Timeout


    Thank you



  • Hello,


    we have a SOAP<sync>REST scenario, I need to catch the response to send it back to the sender.


    What I experiment is to handle “http code” with value “400”. When the flow start there is no error (status seems to be catched) but I can’t see the “Message Content” from Action “Custom Result” even in Logviewer.


    What I want to do is to get back the “Message Content” and integrates it into the response part of my service interface sender. I m not sure it is possible with my version, If I have well understand it only possible from the version 7.4 SP13, is that true ?


    If my version is efficient to catch the “Message Content” I have not understand how to do (sorry If you already explain it)


    Our system : SAP PO 7.4 SP11


    Thank you for your help



  • Hi Alexander,


    REST is the adapter I was expecting from SAP AG since quite some time – robust and really feature-rich. Well done to you and your team !


    What I can feel, as well, is that due to its mightiness, this adapter will be (mis)used in slightly different cases than pure REST (if there is such thing as “pure” REST) – have seen already usecases for it – JSON parsing instead custom adapter module, URL vs. payload manipulations, etc. …. I can see it now as a superset of the other adapters, hopefully, we will not end up in complete RESTfulness in AAE/CC configurations



    Lalo Ivanov

  • Hi Alexander


    A good blog for starters on Rest Adapter. Thank you for that.


    We are facing an issue with CORS, thought if you can help us here


    We used the PI Rest Adapter and created a service. We would like to use this service for mobile applications, hence the browsers are throwing the below error


    Response to preflight request doesn’t pass access control check: No ‘Access-Control-Allow-Origin’ header is present on the requested resource. Origin is therefore not allowed access.


    I have added the Allow Public Access in Channel section of the Sender Adapter and tried with Allow Cross site requests  values – Allow all clients and also Allow Specific clients.

    Still i donot see the response header being added and the same error is being thrown.


    Please let me know if there are any other configurations that have to be done


    We are on PI 7.4 SP13 for the component SAP_XIAF and others we are on PI 7.4 SP10




  • Hi Alex,

    Is there any plan in future to come up other OAuth 2.0 flows for rest adapter to connect with SalesForce and MS Dynamic CRM?  PI rest adapter does not provide great flexibility connecting to 3rd party cloud based tools having different authentications and grant types.

    Right now only two kind of authorization flows is being supported by PI rest adapter i.e. SAML and Concur.

  • Hi all,

    It seem that the REST (sender) adapter is not handling gzip transport compression, even when the http header Content-Encoding: gzip is set.

    This is wrong in my opinion. For example the HTTP adapter is able to handle it and automatically decompresses gzip compressed messages when it receives a call with the mentioned header set.

    Has this not been implemented or are we doing something wrong?

    I even tried to write an adapter module that decompresses the message, but it seems the adapter somehow corrupts the binary data it receives, so that decompression fails (of course we unchecked “Convert to XML” so that the adapter should not try to convert the compressed string – we would do that in the custom module later).



  • Hi Team,


    I have a query, is it possible to hit PI REST sender adapter from POSTMAN using form-data.

    If yes, how ?

    I got some blog from SAP but, no didn’t understand.

    Please read this note:
    –> “With this SAP Note since 7.50 SP07 a new functionality is added to the REST adapter that allows sending and receiving MIME multipart messages ”

    I guess the form-data what you select in POSTMAN is also such a multipart message, at least according to this document:

    Kindly assist with the steps.

    Thank you.

    Raghavender, SAP PI Consultant

  • Hi Ivo and Alexander,

    Can you provide me information whether the following features are supported in the REST adapter:

    • CMIS (Content Management Interoperability Services)
    • JSON-RPC
    • AtomPub

    Thanks in advance!

    Kind regards,

    Mark van Dooren



  • Hi ,


    Need help form you. My scenario is SAP PO 7.5 to Sales-force using REST adapter with oauth2.0.

    I am  able to send data from SAP PO 7.5 to Sales-force using REST adapter with oauth2.0 including PATCH method.

    But how can i do Bulk API transmission using REST adapter?. Please guide me to achieve  Bulk API data transmission.

    Thanks in advance for your help.

    Best Regards,

    Karunakar A


  • Hello


    Need help form you.

    I want to increase Rest Receiver synctimeout in Sender (SOAP) To Receiver (REST) Sync scenario .

    I faced error at ‘Synchronous timeout exceeded’. 

    So, I set ‘syncTimeout=10Min’ in ‘SOAP’ Sender.

    But, ‘Call Server’ in Rest Reciever adater and getted timeout error within 5Min.


    Could you tell me how to increase Rest Receiver timeout?

    Thanks in advance for your help.

    Best Regards

  • Hi Expert,

    I am REST adapter synchronous scenario I am getting csv format response from the target system.

    Please guide me how I can receive csv format data in synchronous call using REST adapter.

    Thanks in Advance for your help.

  • Hi,

    I am working on REST synchronous scenario, we’re the REST API will be called based on HTTP operation (POST, PUT, DELETE) ,very strange behavior what I observed is, whenever there is a change in the HTTP opearation the channel fails to identify the operation and the message gets triggered for the previous operation but, if I edit and activate the channel it identifies the operation that is selected.

    Kindly assist me on this

    Thanks in advance