HTTP Get Response into variable (fv!result not found)

Hello, 

I am trying to save the HTTP GET response value into a variable in UI and I am getting an error when trying to parse '"fv!result" on a!httpResponse. 

 

I am trying to access the value inside "body" from the attached screenshot. Below is the code that I have been using to access the result: 

 

 saveInto:{
            rule!EXP_BPM_SC1_Calculate_Experience_API(
              lineId:  ri!expediteline.request_line_id,
             ssd:  ri!expediteline.new_scheduled_ship_date,
              role: "SC1",
              onSuccess: {
                 a!httpResponse(
                   statusCode: 200,
                   headers: {
                   a!httpHeader(name: "Content-Type", value: "application/json")
                            },
                  body: a!toJson_17r1(fv!result)
                   ),
                a!save(local!apiResult,fv!result)
              }
            )
          }

 

Thanks

 

  Discussion posts and replies are publicly visible

Parents
  • +1
    Certified Lead Developer
    Hi as per my understanding, you are using integration object to access the API, and hence to access it's result you can follow the below mention steps:

    1. You can call your integration object and store it's response directly into a local variable and parse it.

    load(
    local!result:rule!EXP_BPM_SC1_Calculate_Experience_API(
    lineId: your value,
    ssd: your value,
    role: your value
    ).result.body,
    a!fromJson(local!result)
    )

    2. Now you can store this value into your required place or else you can parse this JSON to get it's attribute value.

    Hope this will help you to get and parse the response from integration object
Reply
  • +1
    Certified Lead Developer
    Hi as per my understanding, you are using integration object to access the API, and hence to access it's result you can follow the below mention steps:

    1. You can call your integration object and store it's response directly into a local variable and parse it.

    load(
    local!result:rule!EXP_BPM_SC1_Calculate_Experience_API(
    lineId: your value,
    ssd: your value,
    role: your value
    ).result.body,
    a!fromJson(local!result)
    )

    2. Now you can store this value into your required place or else you can parse this JSON to get it's attribute value.

    Hope this will help you to get and parse the response from integration object
Children