cancel
Showing results for 
Search instead for 
Did you mean: 

REST Mashup

former_member187270
Participant
0 Kudos

Hi Experts,

, ,

I have created the REST Mashup when i executing it is throwing SERVICE_ID invalid. Below are the steps which i have followed for achieving the requirement.

Step 1: Creating of REST Mashup

Step 2:Entering the details of REST Mashup

In the above step if it has input parameters do i need to provide API key in all parameters or to the field which ask for API key.

From here i am stuck with this.

1. How do i make it to communicate it with target system. Is it required to create the communication system and communication arrangement. if yes where should i provide the details like service id ect of REST Mashup.

2. How to embedded it on the screen.

3. For R&D purpose i have executed it with the ABSL script. It throws the error in invalid service_id.

The above is first method which i followed but i din't achieve successes.So i tried alternate way.

Step 1: I have created External service integration with REST URL.

Step 2: Create Communication Arrangement and Communication System.

Step 3: Executed it with ABSL Code.

With this i am able to get the data successfully. But stuck up how to embedded REST API which has screen/display container.


Please help me how to create REST Mashup and can share your experience with REST API Mashup.


Thanks,

Quddus.

Accepted Solutions (1)

Accepted Solutions (1)

HorstSchaude
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hello Quddus,

I have created a REST based Mashup via the SDK:

  • Add -> New Item ...
  • and chose "REST Mashup Web Service"

By this the REST Mashup becomes part of the solution and can be called with the topmost ABSL snippet.

You created a REST Mashup outside the solution and therefore you got the error regarding the ServiceID

As from the docu:

You can create a Web service based on the REST architectural style. For REST Web services, you need to know the request URL and any relevant query parameters. You define the REST Web service using the administrator tools for mashup and Web service authoring. To integrate the Web service in a screen, you must add the Web service to a data mashup.

HTH,

   Horst

former_member187270
Participant
0 Kudos

Hi Horst,

Thanks you. Actually we are trying to connect to 3rd party system using REST service. REST service which we are consuming has authentication at header level. When i am trying to create communication scenario and arrangement it showing ping failed. I find no way to insert header level authentication. But could you please confirm from your side. Below is the sample REST url.


https://xxxx.xxxxx.net/restapi/v2/login_information?api_password=true&include_account_id_guid=true&l...

Authentication is in below format for the above url

X-ABCD-Authentication:<Credentials>

                                    <Username>emailid</Username>

                                    <Password>xxxxxx</Password>

                                    <IntegratorKey>55fa7e81-1e9a-40c9-a81f-9426c9696203</IntegratorKey>                                           </Credentials>

Accept                        : application/json

Can you please through some light for this issue.

Many Thanks,

Quddus.

Answers (2)

Answers (2)

former_member186648
Active Contributor
0 Kudos

Could you try:


var headerParamEntry: NameAndValue;

headerParamEntry.Name = "value";

headerParamEntry.Value = "value";

headerParam.Add(headerParamEntry);

var result = WebServiceUtilities.ExecuteRESTService("value","value",httpMethod,httpResource,URLParameter,headerParam,httpformat,body);

for header level authentication.

Where, "value" needs to be replaced with actual value.

Thanks, Pradeep.

former_member187149
Participant
0 Kudos

Hi Pradeep,

I have a similar kind of requirement to integrate a REST API with C4C.I have already opened a discussion on this topic.

Please find my post here Creating a Mashup using third party REST service

Kindly help me out with the requirement.

Regards,

Navin

former_member186648
Active Contributor
0 Kudos

Would this help: http://scn.sap.com/community/business-bydesign/studio/blog/2012/12/18/integration-of-sap-ondemand-pr...


http://scn.sap.com/thread/3828900

For you question on thread: http://scn.sap.com/message/16689138#16689138

refer to http://scn.sap.com/thread/3876221 to know how to parse the response in ABSL.

You could assign this to the BO field and display in the UI.

But, currently there is limitation on BO  field length, in such case may be you could use textcollection to store the response.



Thanks, Pradeep.

former_member187149
Participant
0 Kudos

Hi Pradeep,

Please find this post I have added few more points in that post.

Creating a Mashup using third party REST service

former_member186648
Active Contributor
0 Kudos

Hi Navin,

Community should be "SAP Cloud Applications Studio" for SDK queries, hence i have answered your queries in this thread, please refer to my above comment to already know the answer for your question

former_member187149
Participant
0 Kudos

Hi Pradeep,

I will move the post from SAP C4C to Cloud Application Studio.Thanks for your replies I will try implementing my requirement I will get back to you.

Regards,

Navin

former_member187149
Participant
0 Kudos

Hi Quddus,

I hope you would have achieved your above requirmennt. I have a similar kind of requirement to integrate a REST API with C4C.I have already opened a discussion on this topic.

Please find my post here

Kindly share your views on it.That would be very helpful for me.

Regards,

Navin

former_member187270
Participant
0 Kudos

Hi Navin,

I have achieved it using SDK with out using front-end UI. But you can achieve with front-end UI as well.

Steps which i have followed in sdk.

1. I have created external webservice integration and created communication arrangement and scenario.

2. If your authentication is at header level. No worries you just select authentication non in communication arrangement. we can achieve in ABSL scripting by passing the authentication in header parameters as suggested by @Pradeep Kumar N.

3. Execute the REST service.

4. As there are no parsing libraries in sap c4c and If you are reponce is in JSON format, you can use this blog for parsing

Thanks,

Quddus

former_member187149
Participant
0 Kudos

Hi Quddus,

Thanks for your reply.Now there is a slight modification with the requirement.I will explain the scenario.

I need to consume the REST API provided by the Third party service provider into the toolbar area or in a work center.

I have created a REST Mashup Webservice in C4C by entering the API Key and User Key which is required for the API calls.

I have no idea how to bring the chat pop up inside C4C.Kindly let me know how to achieve this requirement in the front end itself because am not familiar with REST API calls in SDK..Whether i need to go for a custom mashup ? in these cases? to get the pop up or a kind of text box to chat with the Pandora Chat Bot.

Thanks in advance.

Regards,

Navin

former_member187149
Participant
0 Kudos

Hi Quddus,

I have used External webservice integration only for SOAP webservices.I never consumed a REST Service.

Could you please give me the steps in detail for creating a External web service for REST API,Communication Arrangement and Communication scenario.

Below is the REST service URL which i should use.

https://aiaas.pandorabots.com/talk/APP_ID/BOTNAME?user_key=USER_KEY&input=INPUT

I have the details like APP_ID,BOTNAME,USER_KEY and Input.

Could you please provide a sample code to call this API from ABSL.

That would be helpful.

-Please share your points also on this.

Regards,

Navin