Passing Body with Array to API

Hello,

We have an API that we know is working. It responds via swagger and curl.

Able to get results from Postman.

The problem seems to be passing an array via the body.

The body is structured as below.
{
“datapoints”: [
{
“frequency”: 0,
“transmittedPower”: 0,
“groundDistance”: 0,
“transmitAperture”: 0,
“receiverAperture”: 0,
“transmitAltitude”: 0,
“receiverAltitude”: 0,
“angularOffset”: 0,
“transmitterLat”: 0,
“transmitterLong”: 0,
“receiverLat”: 0,
“receiverLong”: 0,
“month”: “Jan”,
“rainRate”: 0,
“clouds”: “none”,
“ieeeDatabase”: “Brown”,
“userMeasuredEffTable”: null
}
]
}

I am getting a 500 error code when initializing the API. Seems that the paramaters are not getting to the API Call.

There was an issue setting up your call.

Raw response for the API
Status code 500

500 Internal Server Error

Internal Server Error

The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there is an error in the application.

Anyone know who to triage or diagnose how this body might be getting modified?

Thanks.

Can you share API endpoint doc, your setting in Postman and in Bubble?

sure

You prrobably need to add
Content-type application/json in header

2 Likes

@jici -got it - thanks.

1 Like