Creating a Connect to a Custom REST API using JSON

305 views
Skip to first unread message

roy.d...@teknion.com

unread,
Jul 14, 2015, 8:43:17 AM7/14/15
to suppor...@runmyprocess.com
I have created a custom provider to my legacy REST environment. The API uses JSON content.

I have created a provider and put static json content in the "Content" field. When I test it, I get errors from my legacy API. It is returning messages that are consistent with no body being sent.

I know the API is working because I can get it to work in Postman and can recreate the error in Postman when there is no body

What am I doing wrong?

Thanks in advance.

Sweta Suman

unread,
Jul 15, 2015, 3:41:29 AM7/15/15
to suppor...@runmyprocess.com
Hi  Roy,

Could you please provide more information about customer provider and connector you are trying to create ?

Kindly share screenshot of connector configuration and data passed in content field(JSON).

--

teknion.com <http://www.teknion.com>

<http://www.facebook.com/Teknion>
<http://www.linkedin.com/company/teknion>   <http://twitter.com/teknion>
<http://www.youtube.com/teknion>

Please consider the environment before printing this e-mail.

CONFIDENTIALITY NOTICE: This communication, including any attachments, may
contain information that is confidential and privileged. [It may constitute
non-public information and is intended to be conveyed only to the
designated recipient(s).] If the reader or recipient of this communication
is not the intended recipient, or you believe that you have received this
communication in error, please notify us immediately by return e-mail and
promptly delete this e-mail including any attachments without reading or
saving them in any manner. Any other distribution, copying or disclosure is
prohibited and may be unlawful. We accept no responsibility for changes
made to this e-mail or to any attachments after transmission from our
office.

--
Fujitsu - RunMyProcess
---
You received this message because you are subscribed to the Google Groups "Fujitsu RunMyProcess Developer Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to supportforum...@runmyprocess.com.
To post to this group, send email to suppor...@runmyprocess.com.
Visit this group at http://groups.google.com/a/runmyprocess.com/group/supportforum/.
To view this discussion on the web visit https://groups.google.com/a/runmyprocess.com/d/msgid/supportforum/182081fb-ea69-476c-aa2f-952f2fa7e68a%40runmyprocess.com.
For more options, visit https://groups.google.com/a/runmyprocess.com/d/optout.



--
Thanks,
Sweta 
Fujitsu RunMyProcess Support

roy.d...@teknion.com

unread,
Jul 15, 2015, 6:57:42 AM7/15/15
to suppor...@runmyprocess.com
Hi there


Here is the provider (I have put in the schema..but since its my token, I didn't include it)

Also...attached is a couple of screen shots of the connector
Provider.PNG
Connector 1.PNG
connector2.PNG

Takafumi Hoshino

unread,
Jul 15, 2015, 12:14:09 PM7/15/15
to suppor...@runmyprocess.com
Hi Roy,

In the script box screenshot, I see there is a line break between line 1 and 2.
Can you try removing this?

Taka




--
---------------------------------------------------
Taka Hoshino
Fujitsu RunMyProcess
Google Account: thos...@runmyprocess.com

Roy DeLima

unread,
Jul 15, 2015, 2:37:15 PM7/15/15
to suppor...@runmyprocess.com
Hey there Taka

Same issue...taking out the CR didn't do anything


You received this message because you are subscribed to a topic in the Google Groups "Fujitsu RunMyProcess Developer Community" group.
To unsubscribe from this topic, visit https://groups.google.com/a/runmyprocess.com/d/topic/supportforum/QGw7SdU6iO0/unsubscribe.
To unsubscribe from this group and all its topics, send an email to supportforum...@runmyprocess.com.

To post to this group, send email to suppor...@runmyprocess.com.
Visit this group at http://groups.google.com/a/runmyprocess.com/group/supportforum/.



--
Roy de Lima
Manager, Business Process Improvement
Teknion



      

Takafumi Hoshino

unread,
Jul 15, 2015, 2:47:22 PM7/15/15
to suppor...@runmyprocess.com
Can you send a screenshot to postman payload and settings?

Some pointers:

Content type is appjson, Protocol is http - not s. Correct?

Authentication must be done in Provider setting, not as custom header in Connector setting.

Taka Hoshino
Fujitsu RunMyProcess

Roy DeLima

unread,
Jul 15, 2015, 2:50:10 PM7/15/15
to suppor...@runmyprocess.com
my server isn't returning an authentication issue but a payload issue. When I put no payload into Postman, I get the same error.




--
Roy de Lima
Manager, Business Process Improvement
Teknion

roy.d...@teknion.com

unread,
Jul 30, 2015, 7:45:58 AM7/30/15
to Fujitsu RunMyProcess Developer Community, roy.d...@teknion.com
I am still having the same problem. How can see what is being sent to a custom api? I used the browser network debugging tool, but it only shows me what is being sent the RMP. I need to know what RMP is sending to my API. When I mean sending, I mean the body, header,etc


On Tuesday, July 14, 2015 at 8:43:17 AM UTC-4, roy.d...@teknion.com wrote:
> I have created a custom provider to my legacy REST environment. The API uses JSON conten


>

Bidisha Das

unread,
Aug 1, 2015, 6:30:39 AM8/1/15
to suppor...@runmyprocess.com
Hi,
Would you please let me know what api are you calling via your Custom Connector and what exact error you are facing in RMP?

In order to find out what url,content and the entire configuration of the connector,you need to go to the respective sites and check for the particular api you are trying to create in RMP.The sites mention the parameters that need to be passed in Connector url as well as configuration like content-type,method,result format etc for that particular api. Sometimes you may need to change some of the configurations to JSON in RMP.

You can also try to run the url with its respective configuration(Header & Body) in Dev Http chrome client for REST apis(attached screenshot) and check if its working fine and returning the correct parameters.

Please let me know if this helped or else you are looking for something else?


Thanks & Regards
Bidisha
Add-On tool.png

Takafumi Hoshino

unread,
Aug 1, 2015, 7:50:18 PM8/1/15
to suppor...@runmyprocess.com, Roy deLima
Hi Roy,

I once had the same desire and picked up some python script like, reflect.py on the web. 
That showed me the API call received in command line.
I had to run this in my test server and open ports so RMP can call this one.

There needs to be additional config to show Https content, so had to change protocol to http to see the plain text payload.

This is not a RMP functionality, but may help.

Best regards,

Taka

--

teknion.com <http://www.teknion.com>

<http://www.facebook.com/Teknion>
<http://www.linkedin.com/company/teknion>   <http://twitter.com/teknion>
<http://www.youtube.com/teknion>

Please consider the environment before printing this e-mail.

CONFIDENTIALITY NOTICE: This communication, including any attachments, may
contain information that is confidential and privileged. [It may constitute
non-public information and is intended to be conveyed only to the
designated recipient(s).] If the reader or recipient of this communication
is not the intended recipient, or you believe that you have received this
communication in error, please notify us immediately by return e-mail and
promptly delete this e-mail including any attachments without reading or
saving them in any manner. Any other distribution, copying or disclosure is
prohibited and may be unlawful. We accept no responsibility for changes
made to this e-mail or to any attachments after transmission from our
office.

--
Fujitsu - RunMyProcess
---
You received this message because you are subscribed to the Google Groups "Fujitsu RunMyProcess Developer Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to supportforum...@runmyprocess.com.
To post to this group, send email to suppor...@runmyprocess.com.
Visit this group at http://groups.google.com/a/runmyprocess.com/group/supportforum/.

roy.d...@teknion.com

unread,
Aug 4, 2015, 8:17:21 AM8/4/15
to Fujitsu RunMyProcess Developer Community
Hi

So, I have an api that we have written into our on-prem applications. I have a get and I have a post api. The GET works no problem in RMP, the POST is producing a return with a bad request message.

This is what I am figuring is going on based on the numerous tests I have done:

1) The provider is working (because the GET is working)
2) The POST Api is working outside of RMP (because the content and URL are working in PostMan...see attached.)
3) I must be configuring something wrong in the connector for the POST API.

I have attached screen shots of the connector configuration as well as the content. The Provider is a Bearer token model of authentication and like I said, I believe its working. So, I am down to the body of the post. I have attached my "test" result from RMP.

Thanks in advance

Conent.PNG
Config.PNG
result1.PNG
result2.PNG
testinfo.PNG

Bidisha Das

unread,
Aug 5, 2015, 4:55:59 AM8/5/15
to suppor...@runmyprocess.com
Hi,
I am not really sure why you are getting this error because the Connector configuration appears to be correct.This error is basically caused by wrong parameters. But again, you said its working fine in Postman and giving correct response(parameters).

But I would like to know if you are passing any parameters in Authorization Header while running the URL in Postman? If yes,then did you add those in Custom Header in Advanced parameters in the Connector in RMP?


Thanks & Regards 
Bidisha 

Roy DeLima

unread,
Aug 5, 2015, 6:51:07 AM8/5/15
to suppor...@runmyprocess.com
Hey there

Yes I am passing Authorization..but its covered in the authorization schema in the provider...right? I am not getting a security error. In postman, I do have a content-type header set. But I would assume that is covered in the connector detail


--
Fujitsu - RunMyProcess
---
You received this message because you are subscribed to a topic in the Google Groups "Fujitsu RunMyProcess Developer Community" group.
To unsubscribe from this topic, visit https://groups.google.com/a/runmyprocess.com/d/topic/supportforum/QGw7SdU6iO0/unsubscribe.
To unsubscribe from this group and all its topics, send an email to supportforum...@runmyprocess.com.

To post to this group, send email to suppor...@runmyprocess.com.
Visit this group at http://groups.google.com/a/runmyprocess.com/group/supportforum/.



--
Roy de Lima
Manager, Business Process Improvement
Teknion



      

roy.d...@teknion.com

unread,
Aug 12, 2015, 7:27:59 AM8/12/15
to Fujitsu RunMyProcess Developer Community, roy.d...@teknion.com
Hi Taka

I took your advice and got one of my developers to write a raw log of the requests coming into our API server. When the request is made from Postman, we see content-type and body. The request functions as expected. When we launch the request using the connector (and launch test), I don't get any content-type and body.

Here is what I have done:

1) Created a provider for our API server (This works because the GET works)
2) Created a POST connector, set the url, etc. Set Content-Type to Application/JSON and put static text in the CONTENT. I also added the Content-Type in the Custom Header Section.

Is the CONTENT field = HTTP BODY?

Takafumi Hoshino

unread,
Aug 12, 2015, 12:34:45 PM8/12/15
to suppor...@runmyprocess.com, Roy deLima
Hi Roy,

I found this very useful service.

This lets me see what is sent from any HTTP client.
No need to do reflect.py anymore.

As per your question, content field in connector config is request body.
and I feel you don't need to add the custom header content-type.

Here is my test connector.
Inline image 1

This is what is received at requestbin
Inline image 2


Best regards,

Taka


contain information that is confidential and privileged. [It may constitute
non-public information and is intended to be conveyed only to the
designated recipient(s).] If the reader or recipient of this communication
is not the intended recipient, or you believe that you have received this
communication in error, please notify us immediately by return e-mail and
promptly delete this e-mail including any attachments without reading or
saving them in any manner. Any other distribution, copying or disclosure is
prohibited and may be unlawful. We accept no responsibility for changes
made to this e-mail or to any attachments after transmission from our
office.

--
Fujitsu - RunMyProcess
---
You received this message because you are subscribed to the Google Groups "Fujitsu RunMyProcess Developer Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to supportforum...@runmyprocess.com.
To post to this group, send email to suppor...@runmyprocess.com.
Visit this group at http://groups.google.com/a/runmyprocess.com/group/supportforum/.

Roy DeLima

unread,
Aug 12, 2015, 1:16:24 PM8/12/15
to Takafumi Hoshino, suppor...@runmyprocess.com
Thanks Taka

That did the trick. The difference was Content-Type. Where in Postman Content-Type is a single value while in RMP the option of characterset was being sent. Fixed and is working..thanks for the help
--
Roy de Lima
Manager, Business Process Improvement
Teknion



Reply all
Reply to author
Forward
0 new messages