JSON Api rest empty response

I have a problem with a rest service that responds empty. I already tried to use the output as  Record List and List but the result is the same. Can someone help me please?

Request:

{
    "data": [
        {
       
            "customer_firstName": "gfdsdg"
        }
    ]
}



I need a list type object in response

"data": [

{

"application_id": 19543,

"radication_number": "0212",

"radication_status": true,

"radication_code": "Sip",


}

]


but the response is empty.  I attach the project. Thanks


Debug:



Solution

Hi German Quintero,

The mistake here you did that, you cannot assign the values directly to list.current. Create an another variable of data type response. Assign the value to that variable and perform list append.

Other Alternative is to use list append and enlarge the element option and directly assign the values there itself.


Attaching the sample oml for reference.

Regards,

Koushik.

Solution

Hi German Quintero,

I think you need to check API which your calling, getting empty response from API is nothing to do with OutSystems.

To convert JSON, have look of below URL.

https://success.outsystems.com/Documentation/11/Reference/OutSystems_Language/Logic/Implementing_Logic/Web_Logic_Tools/JSON_Serialize


Sravan

Koushik Prathi wrote:

Hi German Quintero,

The mistake here you did that, you cannot assign the values directly to list.current. Create an another variable of data type response. Assign the value to that variable and perform list append.

Other Alternative is to use list append and enlarge the element option and directly assign the values there itself.


Attaching the sample oml for reference.

Regards,

Koushik.



Thank you !! It worked perfect.