cancel
Showing results for 
Search instead for 
Did you mean: 

HCI Rest scenario + Adapter + Access Token

0 Kudos

My Scenario is sftp to rest, i have to consume rest api,
1. shall i use http adapter for rest or any other.?

2 how we can configure http header access token for rest api in hci?

Accepted Solutions (1)

Accepted Solutions (1)

gagandeep_batra
Active Contributor
0 Kudos

Hi Sid,

1. shall i use http adapter for rest or any other.?

Yes you can use HTTP adapter

2 how we can configure http header access token for rest api in hci?

You can use content modifier before calling the HTTP request and set headers.

Regards

GB

0 Kudos

Thanks a lot Gagandeep Batra,

could you please tell me following things -

1. sender channel sftp picks csv file and send it to receiver rest http channel. so i have to add csv to xml converter only or i have to add xml to json converter too?

2. i have to pick file in csv format and transfer in json format. sender and receiver both having same structure so mapping is mandat or not?

gagandeep_batra
Active Contributor

Hi Sid,


1. sender channel sftp picks csv file and send it to receiver rest http channel. so i have to add csv to xml converter only or i have to add xml to json converter too?

I think we dont have direct CSV to JSON converter, what you have to do is CSV to XML and XML to JSON in sequence . that will work, but our standard JSON converter have some restrictions plz check if that suits you or not. otherwise you can use Script to convert your XML to JSON.

2. i have to pick file in csv format and transfer in json format. sender and receiver both having same structure so mapping is mandat or not?

i dont think we need mapping for that. but if you stuck in some structure issue then you can go for mapping to make it easy conversion.

Regards

GB

0 Kudos

Hi Gagandeep,

I am passing header values in content modifer> header and data type header before http adapter,and in http adapter url and operation post and authentication is none as i am giving acess token in content modifier header, but my data didn't reflect in receiver system. however i am getting status- completed in logs, but in request header payload that i a getting by script body is in format that i want to send but in receiver payload there is note - Your browser does not support JavaScript or it is turned off, what is that and how to resolve that.

Regards,
Sidharth

gagandeep_batra
Active Contributor
0 Kudos

How you are Testing ?

can you first try to test using Postman directly to that service and then via HCI

Regards

GB

Answers (0)