cancel
Showing results for 
Search instead for 
Did you mean: 

How to access Global/Local variable in SAP CPI using Business Accelerator Hub APIs

shankar7891
Explorer
0 Kudos

I am trying to access the Local/Global variables in my CPI CF Tenant using the APIs available in the Business Accelerator Hub, but I am not able to read the value of the variables.

I am accessing /Variables(VariableName='{VariableName}',IntegrationFlow='{IntegrationFlowId}') this end point via my IFlow/SOAP UI, but I am receiving the response in "application/octetstream" content Type with binary data as the response, and unable to parse it as a readable value. In the Try Out Url in Business Accelerator Hub, it is displayed as if the return type would be application/json with the value, however I am not getting it.

I also see that I am getting an attachment when I look at the "Content-disposition" http response header, which contains a "zip" file with the variable name as the Filename, but I am unable to parse this and read it as well.

I request the community's support in getting the value easily. I have also raised an incident with SAP and waiting for response.

P.S: I know about accessing the variables in Content Modifier step but I am not interested in that solution.The Other end points which gives the list of variables in the tenant is working fine for me and hence accessing the APIs and credentials are not an issue.

Accepted Solutions (0)

Answers (1)

Answers (1)

VijayKonam
Active Contributor
0 Kudos

A SOAPUI or POSTMAN response screenshot would help.

shankar7891
Explorer
0 Kudos

HI Vijay,

The XML response I got in SOAP UI is

<data contentType="application/octet-stream" contentLength="298">UEsDBBQACAgIAHqD7VYAAAAAAAAAAAAAAAAMAAAAaGVhZGVycy5wcm9wLczbCoIwAIDhe59i0LXgZmkJXoh56gDL7OQ/LD86W2pzgj+fRPf/9y+SegS7kQOoA2hYyLRWCFwSFyAN6YrvxZk/osyb8pq0FT+JpEPIBtkJlhNuzxFSNVNFUDk7ODv23O2EoJxI1rVRYTvBIQ1uZSI/rT/T06uF9xJPeT/xB/4JLGhFWyrmbzFr9ifpdWPmzVDvm/VbfaZMfowwjJfKF1BLBwgOTQyLoAAAAK4AAABQSwECFAAUAAgICAB6g+1WDk0Mi6AAAACuAAAADAAAAAAAAAAAAAAAAAAAAAAAaGVhZGVycy5wcm9wUEsFBgAAAAABAAEAOgAAANoAAAAAAA==</data>

Raw data version of the same along with the response Headers. As you can see, the "content-disposition" contains the name of the variable as a zip attachment.

VijayKonam
Active Contributor
0 Kudos

did you use any accept header om your request? Request headers would help as well. Also did you try POSTMAN? I would prefer SOAP UI for only SOAP calls as RESTful services handling is a pain with SOAP UI.

shankar7891
Explorer
0 Kudos

Hi Vijay,

Yes I tried with the Accept parameter too, by setting to the default value it automatically sets which is gzip, deflate and also to "application/json" and it still doesn't work.

Postman web app had issues with Oauth authentication with the CPI tenant and I heard its a common issue. I am trying to get the desktop version installed soon and I shall update once I have it and tested.