Skip to main content
April 1, 2021
Question

REST CALL Problem

  • April 1, 2021
  • 17 replies
  • 0 views

Hi ,

I am setting a rest call using Integration Smart Service and on the field which is text I need to sent a sprecific structure like follow:

{ { "Name": "Name1","Value": pv!Value1},{ "Name": "Name2","Value": pv!Value2}} .

I try several different scenarios but nothing is complete as expected.

Please advice me how to proceed.

Thanks in advance.

17 replies

stefanhelzle0001
Brainy
April 1, 2021

If the integration object expects text in JSON format, the putting your code inside a toJson() should help. Did you try that? How does the integration object look like?

natasavAuthor
April 1, 2021

For one of the application from expression rule ICARM_Define_Parametarts

I sent in output

{{

"Name" : "requested",
"Value" :ri!SystemInfo.Firewall_requestedFor},
{"Name":"Source",
"Value": ri!SystemInfo.Firewall_sourceAD_IP},
{"Name":"Destination",
"Value": ri!SystemInfo.Firewall_destinationIPs}}

And on the Integration Smart I sent the data in format 

a!toJson (rule!ICARM_Define_Parametarts(pv!SystemInfo).

The other approach that I try is to same the data  into process variable define as  CDT with structure. 

and than sent the data a!tojson pv!variable)

But no one of this two scenarios worked.

BR,Natasa 

a!tojson (rule!Expression

stefanhelzle0001
Brainy
April 1, 2021

Do you see any error messages? Please post them. Can you provide a screenshot of the integration object?