REST CALL Problem

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.

  Discussion posts and replies are publicly visible

Parents
  • 0
    Certified Lead Developer

    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?

  • 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

Reply
  • 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

Children